/* ================= 熊老师NCE英语-伴学笔记 · 样式（2026-10-29 重构） =================
   设计语言：暖橙品牌色 + 深墨文字 + 大量留白，移动优先
   注意：所有类名与重构前保持一致，app.js 无需改动
   ============================================================================= */

:root {
  --brand: #FF6B35;
  --brand-2: #FF9A3C;
  --brand-soft: #FFF3ED;
  --ink: #171E28;
  --ink-2: #3D4753;
  --muted: #8A94A2;
  --line: #EDEFF3;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --radius: 18px;
  --shadow-sm: 0 2px 8px rgba(23, 30, 40, .05);
  --shadow: 0 8px 28px rgba(23, 30, 40, .08);
  --shadow-lg: 0 18px 48px rgba(23, 30, 40, .12);
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 24px;
}

a { color: var(--brand); }

/* ================= 顶部 ================= */
.header {
  position: relative;
  overflow: hidden;
  padding: 34px 22px 30px;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8A3D 52%, #FFA833 100%);
  color: #fff;
}
.header::before {
  content: '';
  position: absolute;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  right: -110px; top: -150px;
}
.header::after {
  content: '';
  position: absolute;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  left: -70px; bottom: -110px;
}

.header h1 {
  position: relative;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.35;
}

.header .subtitle {
  position: relative;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, .88);
  letter-spacing: .5px;
}

/* ================= 用户栏 ================= */
.user-bar {
  position: relative;
  margin: -18px 16px 0;
  padding: 13px 16px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
  z-index: 2;
}
#userInfo {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-mini {
  flex: 0 0 auto;
  border: 0;
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(255, 107, 53, .3);
  cursor: pointer;
}
.btn-mini:active { transform: scale(.97); }

/* ================= 价格区 ================= */
.price-box {
  margin: 14px 16px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.price-item {
  position: relative;
  padding: 14px 14px 12px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.price-item:active { transform: scale(.98); }

.price-label {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .5px;
}

.price-value {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.price-value span { font-size: 24px; }

.price-hint {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.price-item.highlight {
  background: linear-gradient(150deg, #FFF6F1, #FFEEE4);
  border-color: #FFCDB6;
}
.price-item.highlight .price-value { color: var(--brand); }
.price-item.highlight::after {
  content: '推荐';
  position: absolute;
  top: -1px; right: -1px;
  padding: 2px 9px;
  font-size: 10.5px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 0 13px 0 10px;
}

/* ================= 课程列表 ================= */
.course-tree {
  margin: 18px 16px 0;
}

.loading, .empty-tip {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.book-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1px;
  margin: 4px 2px 12px;
  text-transform: none;
}

/* 2026-10-30：内容区顶部页签 —— 与「课程列表」同款橙色文字，无胶囊底 */
.list-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
}
.lt-item {
  font-size: 13px;
  font-weight: 600;
  color: #C99C86;
  padding-bottom: 3px;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
}
.lt-item.active { color: var(--brand); }
.lt-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}
.lt-grow { flex: 1; }
.book-sub { font-size: 12.5px; color: var(--muted); margin: 2px 2px 8px; }

/* ===== 2026-10-30：内容区页签（课程列表 / 相关资料 / 课堂互动）===== */
.cat-tabs.sub-tabs {
  padding-top: 0;
  padding-bottom: 8px;
}
.sub-tabs .cat-tab {
  font-size: 13px;
  padding: 5px 13px;
  background: #fff;
}
.sub-tabs .cat-tab.active {
  color: #E8730C;
  background: #FFF1E6;
  border-color: #FFD3B6;
  box-shadow: none;
}

/* 相关资料 */
.mat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #FFE7DA;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 107, 53, .08);
}
.mat-ico { font-size: 20px; line-height: 1; }
.mat-body { flex: 1; min-width: 0; }
.mat-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mat-go { color: #D9C2B4; font-size: 18px; }

/* 2026-10-30：一节课下有多个视频时，展开成可选列表（默认收起） */
.vid-list { display: none; }
.vid-list.open { display: block; }

.vid-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 24px;
  background: #FFFDFB;
  border: 1px solid #FFE7DA;
  border-top: none;
  font-size: 13.5px;
  color: var(--ink);
}
.vid-list .vid-row:first-child { margin-top: -6px; }
.vid-list .vid-row:last-child { border-radius: 0 0 14px 14px; margin-bottom: 10px; }
.lesson-play.expand, .flat-play.expand { color: #C0A695; font-size: 12px; }
.vid-row .vid-no { color: var(--brand); font-size: 12px; }
.vid-row.locked { color: #A8A8A8; }
.vid-row.locked .vid-no { color: #C9C9C9; }
.vid-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vid-tag {
  font-size: 11px;
  color: var(--brand);
  border: 1px solid #FFD3B6;
  border-radius: 6px;
  padding: 1px 5px;
}

/* Word 在线预览弹窗 */
.doc-body {
  max-height: 62vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #FFE7DA;
  border-radius: 12px;
  padding: 14px 16px;
  -webkit-overflow-scrolling: touch;
}
.doc-render { font-size: 14.5px; line-height: 1.75; color: var(--ink); word-break: break-word; }
.doc-render p { margin: 0 0 10px; }
.doc-render h1, .doc-render h2, .doc-render h3, .doc-render h4 { margin: 16px 0 10px; line-height: 1.4; }
.doc-render ul, .doc-render ol { padding-left: 20px; margin: 0 0 10px; }
.doc-render img { max-width: 100%; height: auto; }
.doc-render table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.doc-render table td, .doc-render table th { border: 1px solid #EEEEEE; padding: 6px 8px; }

/* 课堂互动 */
.board-box {
  background: #fff;
  border: 1px solid #FFE7DA;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(255, 107, 53, .08);
}
#boardInput {
  width: 100%;
  min-height: 74px;
  border: none;
  outline: none;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
  font-family: inherit;
}
.board-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.board-tip { font-size: 12px; color: var(--muted); }
.board-send { padding: 8px 20px; font-size: 13.5px; border-radius: 100px; }

.cmt-item {
  background: #fff;
  border: 1px solid #FFE7DA;
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(255, 107, 53, .06);
}
.cmt-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.cmt-name { color: #E8730C; font-weight: 600; }
.cmt-body {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  word-break: break-word;
}
.cmt-reply {
  margin-top: 8px;
  padding: 9px 11px;
  background: #FFF7F0;
  border-radius: 10px;
  font-size: 13.5px;
  color: #8A5A3B;
  line-height: 1.6;
  word-break: break-word;
}

/* 2026-10-30：课程列表右侧的「选季」下拉 */
.season-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #FFD3B6;
  background: #FFF7F0 url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23E8730C' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #E8730C;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 26px 6px 10px;
  border-radius: 10px;
  max-width: 45%;
  text-overflow: ellipsis;
}

.season-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #F1F3F6;
}

.season-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  cursor: pointer;
}

/* 2026-10-30：加了封面后，第一个 div 变成封面了 → 标题区单独给个 .season-body */
.season-header > .season-body { flex: 1; min-width: 0; }

.season-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-prep {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #FFD9C6;
  border-radius: 5px;
  padding: 1px 6px;
  letter-spacing: .5px;
}

.season-meta {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

.season-price {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* 2026-10-30：箭头原来是灰色 #C3CAD4，看着像「禁用」，学员不知道能点 → 改橙色 */
.season-arrow {
  flex: 0 0 auto;
  width: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--brand);
  transition: transform .22s ease;
}
.season-arrow.open { transform: rotate(90deg); }

/* 季的课节列表：默认【收起】—— 一共要放到 10 季，全展开太长；
   点季名展开/收起（状态存在 app.js 的 seasonOpen 里，重新渲染不丢） */
.lessons {
  display: none;
  border-top: 1px solid var(--line);
  padding: 6px 0 8px;
  background: #FCFDFE;
}
.lessons.open { display: block; }

.lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
}
.lesson-item:active { background: #F7F9FB; }
.lesson-item + .lesson-item::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: #F2F4F7;
}

/* 课节左侧播放圆标 */
.lesson-item::after {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 18px;
  margin-top: -9px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.lesson-info { flex: 1; min-width: 0; }

.lesson-name {
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.45;
}

.lesson-tag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 600;
  letter-spacing: .3px;
}
.tag-bought {
  color: #1B8F5A;
  background: #E9F8F0;
  border: 1px solid #C5EDD9;
}

.video-count {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* ================= 弹窗 ================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(16, 22, 30, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.show { display: flex; }

.modal-content {
  width: 100%;
  max-width: 400px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: var(--shadow-lg);
  animation: pop .22s ease-out;
}
.modal-content.wide { max-width: 760px; }

@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.modal-content h3 {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
  color: var(--ink);
}

.modal-content input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  margin-bottom: 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  color: var(--ink);
  background: #FAFBFC;
  outline: none;
  transition: border-color .16s, background .16s;
}
.modal-content input:focus {
  border-color: var(--brand);
  background: #fff;
}
.modal-content input::placeholder { color: #B4BCC7; }

.modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-primary, .btn-cancel {
  flex: 1;
  height: 46px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .14s, opacity .14s;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(255, 107, 53, .28);
}
.btn-cancel {
  color: var(--ink-2);
  background: #F2F4F7;
}
.btn-primary:active, .btn-cancel:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .55; box-shadow: none; }

.hint {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

/* 支付弹窗 */
.qr-area { text-align: center; }
.pay-notice {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 14px;
}
#qrImage {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: #F7F8FA;
}
#qrArea > div { display: flex; justify-content: center; }
.amount {
  margin-top: 14px;
  font-size: 26px;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* ================= 播放器 ================= */
.player-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.player-area video { display: block; }

.custom-ctrl {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 22px 12px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .72));
  opacity: 0;
  transition: opacity .22s;
}
.player-area:hover .custom-ctrl,
.player-area.show-ctrl .custom-ctrl { opacity: 1; }

.cc-btn {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.cc-btn:active { background: rgba(255, 255, 255, .16); }

.cc-time {
  color: #fff;
  font-size: 12px;
  opacity: .9;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.cc-bar {
  position: relative;
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.cc-bar::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .26);
}
.cc-bar-fill {
  position: absolute;
  left: 0;
  height: 4px;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.cc-bar-dot {
  position: absolute;
  left: 0;
  width: 11px; height: 11px;
  margin-left: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, .45);
}

.cc-rate {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 4px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 12px;
  outline: none;
}

/* ================= 页脚 ================= */
.footer {
  margin: 26px 16px 0;
  padding: 22px 10px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}
.footer .copyright { color: #9AA3AF; }
.footer .icp { font-size: 12px; }
.footer .icp a { color: #A9B2BE; text-decoration: none; }

/* ================= 小屏适配 ================= */
@media (max-width: 359px) {
  .price-value, .price-value span { font-size: 21px; }
  .header h1 { font-size: 19px; }
}

/* 桌面预览时收窄，避免拉成一条 */
@media (min-width: 720px) {
  body { max-width: 620px; margin: 0 auto; background: #EEF1F5; }
  html { background: #EEF1F5; }
}

/* 兜底：某些安卓 WebView 里 button 的默认样式会吃掉背景，显式指定 */
.btn-mini {
  -webkit-appearance: none;
  appearance: none;
  min-width: 62px;
  line-height: 1.25;
}

/* ================= 听课历史（2026-10-29） ================= */
.history-bar {
  margin: 12px 16px 0;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid #F1F3F6;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hb-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.hb-icon { font-size: 19px; flex: 0 0 auto; }
.hb-text { min-width: 0; }
.hb-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-sub {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-more {
  flex: 0 0 auto;
  font-size: 12.5px;
  color: var(--brand);
  text-decoration: none;
}

.history-list { max-height: 58vh; overflow-y: auto; }
.h-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.h-item:last-child { border-bottom: 0; }
.h-item:active { background: #F8FAFC; }
.h-main { flex: 1; min-width: 0; }
.h-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.h-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.h-bar {
  height: 3px;
  margin-top: 6px;
  border-radius: 3px;
  background: #EEF1F5;
  overflow: hidden;
}
.h-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.h-play {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ================= 首页改版（2026-10-29） ================= */
body { padding-bottom: 78px; }

/* 顶部 */
.home-top {
  padding: 18px 16px 14px;
  background: linear-gradient(180deg, #FFF4EE 0%, rgba(255, 244, 238, 0) 100%);
}
.ht-greet { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.ht-date { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .3px; }
.ht-line { font-size: 12.5px; color: var(--muted); }
.ht-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #E9EDF2;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}
.ht-search-ico { font-size: 14px; opacity: .5; }
.ht-search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
}
.ht-search input::placeholder { color: #B4BCC7; }

/* 上次学到 */
.last-card {
  margin: 0 16px 14px;
  padding: 14px;
  background: linear-gradient(150deg, #FFFFFF, #FFF9F5);
  border: 1px solid #FFE4D6;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(255, 107, 53, .10);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lc-badge {
  align-self: flex-start;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: #FFEDE4;
  border-radius: 6px;
}
.lc-body { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.lc-cover {
  flex: 0 0 auto;
  width: 64px; height: 48px;
  border-radius: 10px;
  background: linear-gradient(140deg, #2E7D6B, #1F5C4F);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  overflow: hidden;
  position: relative;
}
.lc-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.lc-cover .lc-play {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  pointer-events: none;
}

/* 单课平铺（2026-10-29） */
.flat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid #F1F3F6;
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.flat-item:active { background: #F8FAFC; }
.flat-main { flex: 1; min-width: 0; }
.flat-name {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.flat-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.flat-play {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.flat-play.locked { background: #F2F4F7; color: #B4BCC7; }
.lc-info { flex: 1; min-width: 0; }
.lc-title {
  font-size: 15px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-sub {
  margin-top: 2px; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lc-btn {
  flex: 0 0 auto;
  border: 0;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(255, 107, 53, .28);
  cursor: pointer;
}
.lc-more { align-self: flex-end; font-size: 12px; color: var(--muted); text-decoration: none; }

/* 分类 tab */
.cat-tabs {
  display: flex;
  gap: 20px;
  padding: 4px 18px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0 6px;
  position: relative;
}
.cat-tab.active { color: var(--ink); font-weight: 700; font-size: 16px; }
.cat-tab.active::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 18px; height: 3px;
  border-radius: 3px;
  background: var(--brand);
}

/* 分类切换（纯 CSS） */
/* ⚠️ 2026-10-30：原来这里 display:none !important 把课节永久藏死，
   系列课 tab 点季名完全没反应。现在「收起/展开」由 .lessons / .lessons.open 统一控制。 */
body[data-filter="season"] .season-arrow { visibility: visible; }
body[data-filter="lesson"] .season-header { display: none; }
body[data-filter="lesson"] .lessons { display: block !important; border-top: 0; }
body[data-filter="lesson"] .season-card { margin-bottom: 8px; }

/* 底部导航 */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  display: flex;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #EEF1F5;
  z-index: 900;
  padding-bottom: env(safe-area-inset-bottom);
}
.tb-item {
  flex: 1;
  position: relative;          /* 未读数字用 absolute 定位，锚点靠它 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #9AA3AF;
  text-decoration: none;
}
.tb-item .tb-ico { font-size: 19px; filter: grayscale(1) opacity(.55); }
.tb-item.active { color: var(--brand); font-weight: 600; }
.tb-item.active .tb-ico { filter: none; }

/* 消息页 / 我的页 */
.page-head {
  padding: 20px 18px 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.empty-box {
  margin: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.empty-ico { font-size: 40px; opacity: .35; margin-bottom: 10px; }
.empty-sub { font-size: 12.5px; color: #B4BCC7; }

.me-card {
  margin: 8px 16px 14px;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}
.me-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.me-info { flex: 1; min-width: 0; }
.me-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.me-phone { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.me-list {
  margin: 0 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.me-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  font-size: 14.5px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.me-item:last-child { border-bottom: 0; }
.me-item em { font-style: normal; color: #C3CAD4; }
.me-icp { text-align: center; margin-top: 22px; font-size: 11.5px; color: #C3CAD4; }

/* ================= 橙色主色调（2026-10-29 二次调整：用户嫌太白） ================= */
/* 整体背景改暖色，顶部改橙色渐变块，卡片加橙调边框 */
body { background: #FFF7F1; }

.home-top {
  padding: 20px 18px 46px;
  background: linear-gradient(140deg, #FF6B35 0%, #FF8A3D 55%, #FFA733 100%);
  border-radius: 0 0 26px 26px;
  position: relative;
  overflow: hidden;
}
.home-top::before {
  content: '';
  position: absolute;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  right: -90px; top: -120px;
}
.ht-greet { position: relative; margin-bottom: 14px; }
.ht-date { color: #fff; font-weight: 700; }
.ht-line { color: rgba(255, 255, 255, .92); }
.ht-search {
  position: relative;
  background: rgba(255, 255, 255, .95);
  border: 0;
  box-shadow: 0 6px 18px rgba(160, 60, 10, .16);
}

/* 「上次学到」→ 白卡 + 淡橙边（和橙色头部区分开，2026-10-29 二次调整） */
.last-card {
  margin: -30px 16px 16px;
  background: #FFFFFF;
  border: 1px solid #FFDCC8;
  box-shadow: 0 12px 26px rgba(255, 107, 53, .16);
  position: relative;
  z-index: 3;
}
.lc-badge {
  background: #FFF1E8;
  color: var(--brand);
  border: 1px solid #FFDCC8;
}
.lc-title { color: var(--ink); }
.lc-sub { color: var(--muted); }
.lc-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 107, 53, .28);
}
.lc-more { color: var(--muted); }
.lc-cover {
  background: #F3F4F6;
  border: 0;
}

/* 分类 tab：白底胶囊条 */
.cat-tabs {
  gap: 8px;
  padding: 4px 16px 12px;
}
.cat-tab {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13.5px;
  color: #9A6B55;
  background: #FFFFFF;
  border: 1px solid #FFE2D2;
}
.cat-tab.active {
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(255, 107, 53, .3);
}
.cat-tab.active::after { display: none; }

/* 课程卡：橙调边框 + 标题小色条 */
.season-card {
  border: 1px solid #FFE7DA;
  box-shadow: 0 6px 18px rgba(255, 107, 53, .08);
}
.book-title { color: var(--brand); font-weight: 700; }
.flat-item {
  border: 1px solid #FFE7DA;
  box-shadow: 0 6px 18px rgba(255, 107, 53, .08);
}

/* ================= 分享落地（2026-10-30） ================= */
/* 朋友点开分享链接时，顶部告诉他「这是哪节课」 */
.share-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFF3EA, #FFE7D6);
  border: 1px solid #FFD9C2;
}
.share-banner .sb-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.share-banner .sb-main b { font-size: 13px; color: var(--brand); font-weight: 700; }
.share-banner .sb-main span {
  font-size: 13px;
  color: #8A5A3B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-banner .sb-close {
  border: 0;
  background: transparent;
  color: #B98A6C;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
}
/* 被分享的那节课闪两下，方便一眼找到 */
.lesson-item.share-hit,
.flat-item.share-hit {
  animation: shareHit 1.4s ease-out 2;
}
@keyframes shareHit {
  0%, 100% { background: transparent; }
  30% { background: #FFF0E6; }
}

/* ================= 免费课（2026-10-30） ================= */
/* 免费课 tab 顶部说明：强调「不用登录」，降低新学员的进门门槛 */
.free-tip {
  margin: 0 16px 12px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #8A5A3B;
  background: linear-gradient(135deg, #FFF3EA, #FFE7D6);
  border: 1px solid #FFD9C2;
}
.free-tip b { color: var(--brand); }

/* 免费课分类板块（2026-11-04）：每个分类一张白卡，和单课的卡片风格统一
   非谓语动词 / 定语从句 / 被动语态… 各自一张卡，卡内是这一类的课节 */
.free-group {
  background: var(--card);
  border: 1px solid #F1F3F6;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.free-group .fg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid #F5F7FA;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.free-group.collapsed .fg-head { border-bottom: 0; }
.free-group .fg-main { flex: 1; min-width: 0; }
.free-group .fg-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.free-group .fg-sub {
  font-size: 11.5px;
  color: #8A929E;
  margin-top: 3px;
}
.free-group .fg-arrow {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--brand);
}

/* 卡内的课节行：不再单独成卡片，改成白卡里的一行行（细线分隔） */
.free-group .flat-item {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #F7F9FB;
}
.free-group .flat-item:last-child { border-bottom: 0; }
.free-group .flat-item:active { background: #FFFCF8; }

/* 免费课播放弹窗里的「解锁完整课程」 */
.unlock-cta {
  width: 100%;
  height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF6B35, #FFA733);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ================= 消息页（2026-11-03） ================= */
.notice-card {
  margin: 0 16px 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.notice-card .nt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.notice-card .nt-head b { font-size: 14.5px; color: var(--ink); }
.notice-card .nt-head span { font-size: 11.5px; color: #B4BCC7; flex: 0 0 auto; }
.notice-card .nt-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin: 2px 0 10px;
  background: #F3F5F9;
}
.notice-card .nt-body {
  font-size: 13.5px;
  line-height: 1.75;
  color: #4A5563;
  white-space: normal;
  word-break: break-word;
}
.notice-card .nt-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

/* 底部导航「消息」上的未读红点 */
/* 播放器底部轻提示（2026-11-04：替代原来的「解锁完整课程」大按钮） */
.player-tip {
  margin: 10px 0 4px;
  padding: 8px 12px;
  text-align: center;
  font-size: 12.5px;
  color: #8A929E;
  background: #F6F8FB;
  border-radius: 10px;
}

/* 首页刷新按钮（2026-11-04）
   场景：老师刚传了课 / 改了价格，学员这边不退出重进就看不到 */
.ht-refresh {
  margin-left: auto;
  align-self: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--brand);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(160, 60, 10, .14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.ht-refresh:active { transform: scale(.94); }
.ht-refresh:disabled { opacity: .65; }
.ht-refresh.spinning { animation: htSpin .7s linear infinite; }
@keyframes htSpin { to { transform: rotate(360deg); } }

/* 底部导航「消息」未读数（2026-11-03：红点改成数字，例如 +3） */
.tb-badge {
  position: absolute;
  top: 3px;
  left: 50%;
  margin-left: 3px;
  min-width: 20px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: #FF3B30;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 0 0 2px #fff;
  font-style: normal;
}

/* 首页分类行右侧的「分享」（2026-11-02） */
.cat-share {
  margin-left: auto;
  align-self: center;
  padding: 5px 12px;
  border-radius: 14px;
  background: #FFF0E6;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ================= 课程封面（2026-10-30） ================= */
/* 季卡片左侧大图：占卡片宽度的 2/5（2026-10-30 用户要求放大） */
.season-cover {
  flex: 0 0 40%;
  width: 40%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #F3F5F9;
}
.season-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 课节行左侧小图（系列课展开后的列表） */
.lesson-cover {
  flex: 0 0 auto;
  width: 68px;
  height: 48px;
  border-radius: 9px;
  overflow: hidden;
  background: #F3F5F9;
}
.lesson-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 单课 / 免费课平铺列表左侧图（也放大到接近参考图的比例） */
.flat-cover {
  flex: 0 0 30%;
  width: 30%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #F3F5F9;
}
.flat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 没传封面时的占位：品牌渐变 + 首字 */
.season-cover.cv-ph,
.lesson-cover.cv-ph,
.flat-cover.cv-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #FFB07C, #FF6B35);
}
.lesson-cover.cv-ph { font-size: 18px; }
.flat-cover.cv-ph { font-size: 20px; }

/* 后台「课程结构」里的小缩略图 */
.tree-cover {
  width: 44px;
  height: 30px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
}
