/* ===== 学员端 H5 样式 ===== */
:root {
  --p: #00b578;
  --p-dark: #009c68;
  --p-light: #e6f7f0;
  --danger: #ee4d2d;
  --orange: #ff8f1f;
  --blue: #1677ff;
  --t1: #1f2329;
  --t2: #646a73;
  --t3: #9ca3ab;
  --border: #eef0f2;
  --bg: #f6f7f9;
  --card: #fff;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #e8eaed; color: var(--t1); font-size: 15px;
}
.hidden { display: none !important; }
button { font-family: inherit; }

/* ===== 商城扩展样式 ===== */
/* 首页搜索 */
.home-search {
  display: flex; gap: 8px; padding: 12px 16px; background: var(--card);
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border);
}
.home-search input {
  flex: 1; height: 36px; border: none; background: var(--bg); border-radius: 18px;
  padding: 0 16px; font-size: 14px; outline: none;
}
.home-search button {
  border: none; background: var(--p); color: #fff; border-radius: 18px;
  padding: 0 18px; font-size: 14px; cursor: pointer;
}
/* 装修模块 */
.mod { margin: 12px 12px 0; background: var(--card); border-radius: 12px; overflow: hidden; }
.mod-title { font-size: 16px; font-weight: 600; padding: 14px 14px 10px; }
/* Banner 轮播 */
.banner { position: relative; overflow: hidden; }
.banner-track { display: flex; transition: transform .4s ease; }
.banner-item { flex: 0 0 100%; cursor: pointer; }
.banner-item img { width: 100%; height: 160px; object-fit: cover; display: block; }
.banner-ph { height: 160px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #00b578, #1677ff); color: #fff; font-size: 18px; font-weight: 600; }
.banner-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.banner-dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: all .3s; }
.banner-dots span.on { width: 16px; background: #fff; }
/* 图片广告 */
.pic-ad { cursor: pointer; }
.pic-ad img { width: 100%; height: 90px; object-fit: cover; display: block; }
/* 分类宫格 */
.grid-nav { display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px 6px 14px; }
.grid-item { text-align: center; cursor: pointer; padding: 6px 0; }
.g-icon {
  width: 42px; height: 42px; margin: 0 auto 6px; border-radius: 12px;
  background: var(--p-light); color: var(--p); font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.grid-item:nth-child(2n) .g-icon { background: #e8f1ff; color: var(--blue); }
.g-name { font-size: 12px; color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 富文本 */
.rich-text { padding: 4px 14px 14px; font-size: 14px; color: var(--t2); line-height: 1.7; }
.rich-text h1, .rich-text h2, .rich-text h3 { color: var(--t1); margin: 8px 0 6px; font-size: 16px; }
.rich-text p { margin: 6px 0; }
/* 推荐列表 */
.reco-head { display: flex; align-items: center; justify-content: space-between; padding-right: 12px; }
.reco-head .mod-title { padding-bottom: 0; }
.reco-tabs { display: flex; gap: 4px; }
.reco-tabs span { font-size: 12px; color: var(--t2); padding: 3px 10px; border-radius: 12px; background: var(--bg); cursor: pointer; }
.reco-tabs span.on { background: var(--p); color: #fff; }
.reco-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px 14px; }
.reco-empty { grid-column: 1 / -1; text-align: center; color: var(--t3); font-size: 13px; padding: 20px 0; }
.reco-card { cursor: pointer; background: var(--bg); border-radius: 10px; overflow: hidden; }
.reco-cover { width: 100%; height: 88px; object-fit: cover; display: block; }
.cover-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #00b57822, #1677ff33); color: var(--p); font-size: 26px; font-weight: 700; }
.reco-info { padding: 8px 9px 10px; }
.reco-info .t { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 36px; }
.reco-info .s { font-size: 11px; color: var(--t3); margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reco-info .p b { color: var(--danger); font-size: 15px; }
.reco-info .p b.free { color: var(--p); }
.reco-info .p del { color: var(--t3); font-size: 11px; margin-left: 4px; }
/* ===== 选课列表 ===== */
.mall-search { padding: 12px 16px; background: var(--card); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); }
.mall-search input {
  width: 100%; height: 36px; border: none; background: var(--bg); border-radius: 18px;
  padding: 0 16px; font-size: 14px; outline: none;
}
.cat-chips { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; background: var(--card); scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips span {
  flex: 0 0 auto; font-size: 13px; color: var(--t2); padding: 5px 14px;
  border-radius: 14px; background: var(--bg); cursor: pointer;
}
.cat-chips span.on { background: var(--p); color: #fff; font-weight: 600; }
.sort-bar {
  display: flex; gap: 6px; padding: 8px 14px; background: var(--bg);
  position: sticky; top: 57px; z-index: 15; align-items: center;
}
.sort-bar span { font-size: 13px; color: var(--t2); padding: 4px 10px; cursor: pointer; border-radius: 6px; }
.sort-bar span.on { color: var(--p); font-weight: 600; background: var(--p-light); }
.sort-bar .price-dir { font-style: normal; font-size: 10px; }
.sort-bar span.asc .price-dir::after { content: '↑'; }
.sort-bar span.desc .price-dir::after { content: '↓'; }
.sort-bar .tag-free { margin-left: auto; }
.sort-bar .tag-free.on { background: var(--p); color: #fff; }
.mall-list { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.mall-card {
  display: flex; gap: 10px; background: var(--card); border-radius: 10px;
  padding: 10px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.mall-cover { width: 116px; height: 76px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.mall-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.mall-info .t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mall-info .s { font-size: 12px; color: var(--t3); }
.mall-info .p b { color: var(--danger); font-size: 16px; }
.mall-info .p b.free { color: var(--p); }
.mall-info .p del { color: var(--t3); font-size: 11px; margin-left: 4px; }
.mall-info .rate { float: right; font-size: 12px; color: var(--orange); }
.mall-more { text-align: center; padding: 12px; color: var(--p); font-size: 14px; cursor: pointer; }
/* ===== 课程详情（商城） ===== */
.dt-media { position: relative; background: #000; }
.dt-video, .dt-cover { width: 100%; height: 210px; object-fit: cover; display: block; }
.dt-cover.cover-fallback { height: 210px; font-size: 60px; color: #fff; background: linear-gradient(135deg, #00b578, #1677ff); }
.dt-trial {
  position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 12px;
}
.dt-head { background: var(--card); padding: 14px 16px; }
.dt-head h1 { font-size: 18px; line-height: 1.4; }
.dt-tags { display: flex; gap: 6px; margin: 8px 0 4px; }
.dt-tags span { font-size: 11px; color: var(--p); background: var(--p-light); padding: 2px 8px; border-radius: 4px; }
.dt-meta { font-size: 12px; color: var(--t3); display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.dt-price { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.dt-price b { color: var(--danger); font-size: 24px; }
.dt-price b.free { color: var(--p); }
.dt-price del { color: var(--t3); font-size: 13px; }
.dt-price .dt-cate { margin-left: auto; font-size: 12px; color: var(--t3); background: var(--bg); padding: 3px 10px; border-radius: 12px; }
.dt-valid { font-size: 12px; color: var(--orange); margin-top: 6px; }
.lesson-item.locked { opacity: .75; }
.li-trial { font-size: 11px; color: var(--p); background: var(--p-light); padding: 2px 8px; border-radius: 10px; flex: 0 0 auto; }
.li-lock { font-size: 13px; flex: 0 0 auto; }
.dt-buybar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: var(--card); display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); z-index: 30;
}
.dt-buybar .price { flex: 1; display: flex; align-items: baseline; gap: 6px; }
.dt-buybar .price b { color: var(--danger); font-size: 20px; }
.dt-buybar .price b.free { color: var(--p); }
.dt-buybar .price del { color: var(--t3); font-size: 12px; }
.buy-btn { flex: 0 0 auto; margin: 0 !important; padding: 0 40px !important; }
/* ===== 订单确认 / 收银台 ===== */
.oc-box { padding: 14px; }
.oc-course {
  display: flex; gap: 10px; background: var(--card); border-radius: 10px; padding: 12px;
  align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.oc-cover { width: 88px; height: 58px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.oc-info { flex: 1; min-width: 0; }
.oc-info .t { font-size: 14px; font-weight: 600; }
.oc-info .s { font-size: 12px; color: var(--t3); margin-top: 4px; }
.oc-price { color: var(--danger); font-weight: 700; font-size: 16px; flex: 0 0 auto; }
.oc-rows { background: var(--card); border-radius: 10px; margin-top: 12px; padding: 4px 12px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.oc-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.oc-row:last-child { border-bottom: none; }
.oc-row span { color: var(--t3); }
.oc-row b { font-weight: 500; max-width: 60%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-row b.hl { color: var(--danger); }
.oc-box .btn-main, .pay-wrap .btn-main { margin-top: 16px; }
.oc-tip { text-align: center; font-size: 12px; color: var(--t3); margin-top: 12px; line-height: 1.6; }
.pay-amount { background: var(--card); text-align: center; padding: 26px 0 20px; }
.pay-amount .k { font-size: 13px; color: var(--t3); }
.pay-amount .v { font-size: 34px; font-weight: 700; color: var(--t1); margin: 8px 0; }
.pay-amount .no { font-size: 12px; color: var(--t3); }
.pay-channels { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pay-ch {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: 10px; padding: 13px 14px; cursor: pointer; border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.pay-ch.on { border-color: var(--p); }
.pc-icon {
  width: 34px; height: 34px; border-radius: 8px; color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pay-ch.wechat .pc-icon { background: #09bb07; }
.pay-ch.alipay .pc-icon { background: #1677ff; }
.pc-name { flex: 1; font-size: 15px; }
.pc-check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--t3); position: relative; }
.pay-ch.on .pc-check { border-color: var(--p); background: var(--p); }
.pay-ch.on .pc-check::after { content: '✓'; color: #fff; font-size: 12px; position: absolute; top: 0; left: 4px; }
.pay-wrap .btn-main { margin: 14px; }
/* 支付成功 */
.pay-done { text-align: center; padding: 60px 30px; }
.pd-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--p); color: #fff;
  font-size: 34px; line-height: 64px; margin: 0 auto 16px;
}
.pay-done h2 { font-size: 19px; margin-bottom: 8px; }
.pay-done p { color: var(--t2); font-size: 14px; margin-bottom: 26px; }
.btn-main.cancel { background: var(--bg); color: var(--t2); margin-top: 10px !important; }
/* ===== 我的订单 ===== */
.order-card { margin: 12px; background: var(--card); border-radius: 10px; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.oc-right { text-align: right; flex: 0 0 auto; }
.oc-right .st { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-top: 4px; }
.oc-right .st.ok { color: var(--p); background: var(--p-light); }
.oc-right .st.warn { color: var(--orange); background: #fff3e5; }
.oc-right .st.mute { color: var(--t3); background: var(--bg); }
.order-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.btn-mini {
  font-size: 13px; padding: 6px 14px; border-radius: 15px; border: 1px solid var(--border);
  background: var(--card); color: var(--t2); cursor: pointer;
}
.btn-mini.primary { background: var(--p); border-color: var(--p); color: #fff; }
.od-rows .oc-row b { font-weight: 600; }
/* ===== 播放器增强 ===== */
.rate-bar {
  display: flex; align-items: center; gap: 6px; background: var(--card);
  padding: 8px 14px; border-bottom: 1px solid var(--border);
}
.rate-label { font-size: 13px; color: var(--t3); margin-right: 4px; }
.rate-bar span[data-rate] {
  font-size: 12px; padding: 3px 10px; border-radius: 12px; background: var(--bg);
  color: var(--t2); cursor: pointer;
}
.rate-bar span[data-rate].on { background: var(--p); color: #fff; }
.player-box { position: relative; }
.no-seek-badge {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 10px; pointer-events: none;
}
/* 目录抽屉 */
.sheet.catalog-sheet { max-height: 70vh; display: flex; flex-direction: column; }
.catalog-sheet h3 small { font-size: 12px; color: var(--t3); font-weight: 400; margin-left: 8px; }
.catalog-list { flex: 1; overflow-y: auto; margin: 8px -20px 0; padding: 0 20px; }
.catalog-sheet .ch-head { margin: 10px -20px 0; padding: 0 20px; }
.cat-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.cat-item.now { background: var(--p-light); color: var(--p); font-weight: 600; }
.cat-item .li-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-done { color: var(--p); font-size: 13px; }
.catalog-sheet .btn-main.cancel { margin-top: 12px !important; }
/* 我的页新增行 */
.me-row .m-icon { width: 34px; height: 34px; border-radius: 9px; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }

.app-wrap {
  max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  position: relative; box-shadow: 0 0 30px rgba(0,0,0,.08); display: flex; flex-direction: column;
}
.page { flex: 1; padding-bottom: 66px; }
.page.no-tab { padding-bottom: 0; }

/* ===== 顶部栏 ===== */
.navbar {
  position: sticky; top: 0; z-index: 20; background: var(--card);
  display: flex; align-items: center; height: 48px; padding: 0 14px; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.navbar .back { font-size: 22px; line-height: 1; color: var(--t1); background: none; border: none; padding: 4px 8px 4px 0; cursor: pointer; }
.navbar .title { flex: 1; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar .action { color: var(--p); font-size: 14px; background: none; border: none; cursor: pointer; }

/* ===== 登录页 ===== */
.login-hero { padding: 70px 30px 40px; text-align: center; }
.login-logo {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 20px;
  background: linear-gradient(135deg, #00c984, #009c68); color: #fff;
  font-size: 34px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 181, 120, .35);
}
.login-hero h1 { font-size: 22px; margin-bottom: 6px; }
.login-hero p { color: var(--t3); font-size: 14px; }
.login-box { padding: 10px 26px 30px; }
.inp-group {
  display: flex; align-items: center; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 0 14px; margin-bottom: 14px; height: 50px;
}
.inp-group:focus-within { border-color: var(--p); box-shadow: 0 0 0 3px rgba(0,181,120,.1); }
.inp-group .icon { width: 20px; text-align: center; margin-right: 10px; color: var(--t3); font-size: 15px; }
.inp-group input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; height: 100%; }
.btn-main {
  width: 100%; height: 48px; border: none; border-radius: 12px; background: var(--p);
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: .15s;
}
.btn-main:active { background: var(--p-dark); }
.btn-main:disabled { opacity: .6; }
.login-tip { text-align: center; color: var(--t3); font-size: 12px; margin-top: 18px; line-height: 1.8; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: var(--card); display: flex;
  border-top: 1px solid var(--border); z-index: 30; padding-bottom: env(safe-area-inset-bottom);
}
.tab-item { flex: 1; text-align: center; padding: 8px 0 7px; color: var(--t3); font-size: 11px; cursor: pointer; }
.tab-item .tab-icon { width: 24px; height: 24px; margin: 0 auto 2px; }
.tab-item .tab-icon svg { width: 24px; height: 24px; }
.tab-item.active { color: var(--p); font-weight: 600; }

/* ===== 课程列表 ===== */
.page-title-bar { padding: 18px 16px 6px; font-size: 20px; font-weight: 700; }
.page-title-bar small { display: block; font-size: 13px; color: var(--t3); font-weight: 400; margin-top: 3px; }
.course-card {
  margin: 12px 14px; background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(31,35,41,.06); cursor: pointer;
}
.cc-top { display: flex; gap: 12px; padding: 12px; }
.cc-cover {
  width: 118px; height: 82px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #e5f4ed;
}
.cc-cover-empty {
  width: 118px; height: 82px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #d7f2e5, #b3e7d0); display: flex; align-items: center; justify-content: center;
  color: var(--p); font-size: 20px; font-weight: 700;
}
.cc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-title { font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-meta { margin-top: auto; font-size: 12px; color: var(--t3); display: flex; justify-content: space-between; align-items: center; }
.cc-expire { color: var(--orange); }
.cc-progress { padding: 0 12px 12px; }
.cc-progress .bar { height: 6px; background: #eef0f2; border-radius: 6px; overflow: hidden; }
.cc-progress .bar > div { height: 100%; background: linear-gradient(90deg, #00c984, var(--p)); border-radius: 6px; transition: width .4s; }
.cc-progress .txt { font-size: 12px; color: var(--t2); margin-top: 5px; display: flex; justify-content: space-between; }
.cc-progress .txt b { color: var(--p); }

/* ===== 课程详情 ===== */
.cd-hero { padding: 18px 16px; background: linear-gradient(135deg, #079a67, #00b578); color: #fff; }
.cd-hero h1 { font-size: 19px; line-height: 1.45; }
.cd-hero .sub { font-size: 13px; opacity: .85; margin-top: 8px; display: flex; justify-content: space-between; }
.cd-progress { margin: 14px 16px -22px; background: var(--card); border-radius: 12px; box-shadow: 0 2px 10px rgba(31,35,41,.08); padding: 14px 16px; position: relative; }
.cd-progress .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--t2); margin-bottom: 8px; }
.cd-progress .row b { color: var(--p); font-size: 15px; }
.cd-progress .bar { height: 8px; background: #eef0f2; border-radius: 8px; overflow: hidden; }
.cd-progress .bar > div { height: 100%; background: linear-gradient(90deg, #00c984, var(--p)); border-radius: 8px; }
.cd-desc { margin: 30px 14px 0; background: var(--card); border-radius: 14px; padding: 16px; }
.sec-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.sec-title .badge { font-size: 11px; font-weight: 400; }
.cd-desc .content { font-size: 14px; color: var(--t2); line-height: 1.8; word-break: break-word; }
.cd-desc .content img { max-width: 100%; border-radius: 8px; }
.exam-card {
  margin: 14px 14px 0; background: var(--card); border-radius: 14px; padding: 15px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.exam-card .eicon {
  width: 42px; height: 42px; border-radius: 12px; background: #fff3e5; color: var(--orange);
  display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0;
}
.exam-card .einfo { flex: 1; min-width: 0; }
.exam-card .einfo .t { font-weight: 600; font-size: 15px; }
.exam-card .einfo .d { font-size: 12px; color: var(--t3); margin-top: 3px; }
.exam-card .lock { color: var(--t3); font-size: 12px; flex-shrink: 0; }
.exam-card .go { color: var(--p); font-size: 13px; flex-shrink: 0; }
.exam-card.locked { opacity: .65; }

/* 课程目录 */
.chapter-sec { margin: 14px 14px 0; background: var(--card); border-radius: 14px; overflow: hidden; padding-bottom: 6px; }
.chapter-sec:last-child { margin-bottom: 20px; }
.ch-head { padding: 14px 16px 8px; font-size: 14px; font-weight: 700; color: var(--t1); }
.ch-head small { color: var(--t3); font-weight: 400; margin-left: 8px; font-size: 12px; }
.lesson-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--border); cursor: pointer;
}
.lesson-item:active { background: #fafbfc; }
.lesson-item .li-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: #e8f1ff; color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.lesson-item .li-icon.text { background: #fff3e5; color: var(--orange); }
.lesson-item .li-main { flex: 1; min-width: 0; }
.lesson-item .li-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-item .li-sub { font-size: 11px; color: var(--t3); margin-top: 2px; }
.lesson-item .li-check { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid #d5d8dc; position: relative; }
.lesson-item .li-check.done { background: var(--p); border-color: var(--p); }
.lesson-item .li-check.done::after {
  content: ""; position: absolute; left: 5.5px; top: 2.5px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ===== 课时学习页 ===== */
.player-box { background: #000; width: 100%; aspect-ratio: 16/9; position: relative; }
.player-box video { width: 100%; height: 100%; display: block; }
.text-lesson { background: var(--card); margin: 14px; border-radius: 14px; padding: 20px 18px; font-size: 15px; line-height: 1.9; word-break: break-word; }
.text-lesson img { max-width: 100%; border-radius: 8px; }
.lesson-foot { padding: 14px; display: flex; gap: 10px; }
.btn-outline {
  flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--card);
  color: var(--t2); font-size: 14px; cursor: pointer;
}
.btn-outline:disabled { opacity: .4; }
.btn-solid {
  flex: 1; height: 44px; border-radius: 12px; border: none; background: var(--p); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-solid:disabled { opacity: .5; }
.btn-solid.done { background: var(--p-light); color: var(--p); }
.lesson-info { padding: 14px 16px 4px; }
.lesson-info h1 { font-size: 17px; }
.lesson-info .meta { font-size: 12px; color: var(--t3); margin-top: 6px; }

/* ===== 考试 ===== */
.exam-hero { padding: 26px 20px; background: linear-gradient(135deg, #079a67, #00b578); color: #fff; text-align: center; }
.exam-hero .big { font-size: 42px; font-weight: 700; line-height: 1.2; }
.exam-hero .big.passed { color: #b9ffdf; }
.exam-hero .sub { margin-top: 6px; font-size: 13px; opacity: .9; }
.exam-meta-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 14px; }
.exam-meta-item { background: var(--card); border-radius: 12px; padding: 14px 0; text-align: center; }
.exam-meta-item .v { font-size: 18px; font-weight: 700; }
.exam-meta-item .k { font-size: 12px; color: var(--t3); margin-top: 3px; }
.exam-tip { margin: 0 14px; background: #fff8e6; border: 1px solid #ffe4a6; color: #9a6b00; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.7; }
.exam-actions { padding: 20px 14px 30px; }
.exam-start-btn { width: 100%; height: 50px; }

.exam-timer {
  position: sticky; top: 0; z-index: 20; background: #1f2329; color: #fff; text-align: center;
  padding: 9px 0; font-size: 14px; font-variant-numeric: tabular-nums;
}
.exam-timer.warn { background: var(--danger); }
.q-card { background: var(--card); margin: 12px 14px; border-radius: 14px; padding: 16px; }
.q-type { font-size: 11px; color: var(--p); background: var(--p-light); border-radius: 4px; padding: 1px 7px; margin-right: 8px; }
.q-stem { font-size: 15px; font-weight: 600; line-height: 1.6; margin-top: 8px; word-break: break-word; }
.q-opts { margin-top: 12px; }
.q-opt {
  display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 13px; margin-bottom: 9px; cursor: pointer; transition: .12s; font-size: 14px; line-height: 1.5;
}
.q-opt .letter {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #d5d8dc; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--t2);
}
.q-opt.sel { border-color: var(--p); background: var(--p-light); }
.q-opt.sel .letter { background: var(--p); border-color: var(--p); color: #fff; }
.submit-bar { position: sticky; bottom: 0; padding: 12px 14px 16px; background: linear-gradient(transparent, var(--bg) 30%); }

.review-item { background: var(--card); margin: 12px 14px; border-radius: 14px; padding: 15px 16px; }
.review-item .r-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.review-item .r-badge { font-size: 11px; border-radius: 4px; padding: 1px 7px; flex-shrink: 0; }
.review-item .ok .r-badge { background: var(--p-light); color: var(--p); }
.review-item .bad .r-badge { background: #ffefe9; color: var(--danger); }
.review-opts { margin-top: 10px; font-size: 13px; color: var(--t2); line-height: 2; }
.review-opts .row.sel-wrong { color: var(--danger); font-weight: 600; }
.review-opts .row.right { color: var(--p); font-weight: 600; }
.review-ans { margin-top: 8px; font-size: 13px; background: #f7f8fa; border-radius: 8px; padding: 9px 12px; line-height: 1.7; }
.review-ans b { color: var(--p); }

/* ===== 兑换页 ===== */
.redeem-box { margin: 26px 18px; background: var(--card); border-radius: 16px; padding: 26px 20px; text-align: center; }
.redeem-icon { font-size: 40px; margin-bottom: 10px; }
.redeem-box h2 { font-size: 17px; margin-bottom: 6px; }
.redeem-box .d { color: var(--t3); font-size: 13px; margin-bottom: 20px; line-height: 1.7; }
.redeem-input {
  width: 100%; height: 52px; border: 1.5px dashed #c8e6d7; border-radius: 12px; background: #f7fcf9;
  text-align: center; font-size: 17px; letter-spacing: 2px; font-weight: 600; outline: none; font-family: Consolas, Menlo, monospace;
}
.redeem-input:focus { border-color: var(--p); }
.redeem-btn { margin-top: 16px; }
.redeem-rules { margin: 0 18px 30px; background: var(--card); border-radius: 16px; padding: 18px 20px; }
.redeem-rules h3 { font-size: 14px; margin-bottom: 10px; }
.redeem-rules li { font-size: 13px; color: var(--t2); line-height: 2; margin-left: 18px; }

/* ===== 我的 ===== */
.me-head {
  padding: 30px 20px 26px; background: linear-gradient(135deg, #079a67, #00b578);
  color: #fff; display: flex; align-items: center; gap: 14px;
}
.me-avatar {
  width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0;
}
.me-head .n { font-size: 19px; font-weight: 700; }
.me-head .p { font-size: 13px; opacity: .85; margin-top: 4px; font-family: Consolas, Menlo, monospace; letter-spacing: 1px; }
.me-stats { display: flex; margin: -18px 14px 0; background: var(--card); border-radius: 14px; box-shadow: 0 2px 10px rgba(31,35,41,.08); }
.me-stat { flex: 1; text-align: center; padding: 15px 0; }
.me-stat + .me-stat { border-left: 1px solid var(--border); }
.me-stat .v { font-size: 19px; font-weight: 700; color: var(--p); }
.me-stat .k { font-size: 12px; color: var(--t3); margin-top: 2px; }
.me-list { margin: 14px; background: var(--card); border-radius: 14px; overflow: hidden; }
.me-row { display: flex; align-items: center; gap: 12px; padding: 15px 16px; font-size: 14px; cursor: pointer; }
.me-row + .me-row { border-top: 1px solid var(--border); }
.me-row:active { background: #fafbfc; }
.me-row .m-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.me-row .arr { margin-left: auto; color: #c9cdd4; }
.me-row .m-val { margin-left: auto; color: var(--t3); font-size: 13px; }
.logout-btn {
  margin: 4px 14px 30px; width: calc(100% - 28px); height: 46px; border: none; border-radius: 12px;
  background: var(--card); color: var(--danger); font-size: 14px; cursor: pointer;
}

/* 空状态 */
.empty-block { text-align: center; padding: 70px 30px; color: var(--t3); }
.empty-block .e-icon { font-size: 40px; margin-bottom: 12px; opacity: .4; }
.empty-block p { font-size: 14px; }

/* 弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(15,20,25,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 480px; background: var(--card); border-radius: 18px 18px 0 0;
  padding: 22px 20px 30px; animation: up .2s ease;
}
@keyframes up { from { transform: translateY(60px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet h3 { text-align: center; font-size: 16px; margin-bottom: 18px; }
.sheet .btn-main { margin-top: 8px; }
.sheet .cancel { margin-top: 10px; background: #f2f3f5; color: var(--t2); }

/* Toast */
.toast {
  position: fixed; top: 50px; left: 50%; transform: translateX(-50%); z-index: 999;
  background: rgba(31,35,41,.92); color: #fff; font-size: 14px; padding: 11px 22px;
  border-radius: 10px; max-width: 80vw; text-align: center; line-height: 1.5;
}
.toast.ok::before { content: "✓ "; color: #3ddc97; }
.toast.err::before { content: "✕ "; color: #ff7866; }

/* 加载 */
.loading { text-align: center; color: var(--t3); padding: 60px 0; font-size: 14px; }

/* ===== 直播 ===== */
.live-list { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.live-card {
  display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 10px;
  padding: 10px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.live-cover-wrap { position: relative; flex: 0 0 auto; }
.live-cover { width: 116px; height: 76px; object-fit: cover; border-radius: 8px; display: block; }
.live-cover.cover-fallback {
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #ff6a3d, #ff9a3d);
}
.live-info { flex: 1; min-width: 0; }
.live-info .t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.live-info .s { font-size: 12px; color: var(--t3); margin-top: 4px; }
.live-info .d { font-size: 12px; color: var(--orange); margin-top: 3px; }
.live-arrow { color: #c9cdd4; flex-shrink: 0; }
.live-badge {
  position: absolute; top: 6px; left: 6px; font-size: 11px; padding: 2px 7px; border-radius: 10px; color: #fff;
}
/* 列表内定位；详情页单独定位 */
.live-detail .live-badge { position: static; display: inline-block; margin-bottom: 8px; }
.live-badge.living { background: #f5483b; }
.live-badge.living::before { content: '● '; animation: blink 1.1s infinite; }
.live-badge.upcoming { background: var(--orange); }
.live-badge.ended { background: #9ca3ab; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.live-hero { position: relative; background: #111; }
.live-hero-cover { width: 100%; height: 200px; object-fit: cover; display: block; }
.live-hero-cover.cover-fallback {
  display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #ff6a3d, #ff9a3d);
}
.live-hero-mask { position: absolute; left: 14px; bottom: 12px; }
.live-hero-mask .live-badge { position: static; display: inline-block; }
.live-player { background: #000; position: relative; }
.live-video { width: 100%; height: 210px; display: block; background: #000; object-fit: contain; }
.live-frame { width: 100%; height: 240px; display: block; border: none; background: #000; }
.live-empty {
  height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #cfd4da; font-size: 14px; background: #14181d; gap: 8px;
}
.live-count-tip { font-size: 12px; color: #8b939c; }
.live-detail { background: var(--card); padding: 16px; }
.live-detail h2 { font-size: 17px; line-height: 1.4; margin-bottom: 6px; }
.live-meta { font-size: 12px; color: var(--t3); }
.live-desc { margin-top: 12px; font-size: 14px; color: var(--t2); line-height: 1.8; }
.live-pass {
  margin-top: 14px; background: #fff7e8; border: 1px dashed #ffcf8f; border-radius: 10px;
  padding: 12px 14px; font-size: 14px; color: var(--t2); display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.live-pass b { color: var(--danger); font-size: 18px; letter-spacing: 1px; font-family: Consolas, Menlo, monospace; }
.live-pass .copy { margin-left: auto; font-size: 12px; color: var(--orange); }
.live-detail .btn-main { margin-top: 18px; }

/* ===== 视频水印 / 验证码 / 通知 / 直播预约 ===== */
.player-box { overflow: hidden; }
.wm-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.wm-layer span {
  position: absolute; top: 0; left: 0; color: #fff; opacity: .22; font-size: 12px;
  line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.65); white-space: nowrap; will-change: transform; user-select: none;
}
.code-btn {
  flex: 0 0 auto; border: 1px solid var(--p); color: var(--p); background: transparent;
  font-size: 12px; padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.code-btn:disabled { color: var(--t3); border-color: var(--border); }
.login-tip a { color: var(--p); text-decoration: none; }
.notif-dot {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #f5483b; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
}
.notif-dot + .arr { margin-left: 8px; }
.live-reserve {
  flex: 0 0 auto; border: 1px solid var(--p); background: transparent; color: var(--p);
  font-size: 12px; padding: 5px 9px; border-radius: 12px; cursor: pointer;
}
.live-reserve.on { background: var(--p); color: #fff; }
.live-archived {
  position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: #fff;
  background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 8px;
}
.live-reserve-btn { margin-top: 16px !important; }
.notif-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.notif-card { background: var(--card); border-radius: 10px; padding: 13px 14px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.notif-card.unread { border-left: 3px solid #f5483b; }
.notif-card .nt { font-size: 14px; font-weight: 600; line-height: 1.5; }
.notif-card .nc { font-size: 13px; color: var(--t2); margin-top: 5px; line-height: 1.6; }
.notif-card .nd { font-size: 11px; color: var(--t3); margin-top: 6px; }
