/* ============================================================
   企鹅课堂-免费分享 · 主站样式（方案 A · 精修升级）
   2026-10-11 视觉改版：统一设计令牌 / 内联 SVG 图标 / 分类色彩编码
   约束：强制浅色主题 / 弹性自适应 / 无黑底黑框 / 无装饰控件

   ★ 主色一律走 --accent / --accent-soft —— 后台「主色调」设置由
     app.js 的 applyBranding() 覆盖这两个变量，此处只提供默认值。
   ============================================================ */

:root {
  /* —— 品牌主色（默认＝后台 theme 设置值；被 JS 覆盖后以此为准）—— */
  --accent: #2f7cf6;
  --accent-soft: rgba(47, 124, 246, 0.10);
  /* ★ 2026-10-25 审查修复：全站 7 处 var(--accent-deep) 一直无定义，
     「深主色」全部按 CSS 规则回退成继承色（分类选中态辨识度失效）。
     现补默认值＝默认主色 #2f7cf6 的加深档；后台换主题时 JS 只覆盖
     --accent/--accent-soft，deep 档沿用此默认（与默认主色配套）。 */
  --accent-deep: #1d5fd6;

  /* —— 中性色 —— */
  --bg: #f5f7fb;
  --bg-2: #fafbfe;
  --card: #ffffff;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #98a1ae;
  --line: #e8ecf3;
  --line-2: #dce3ee;

  /* —— 语义色 —— */
  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, 0.12);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.14);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.10);
  --star: #f59e0b;
  --star-soft: rgba(245, 158, 11, 0.16);

  /* —— 形状与阴影 —— */
  --radius-l: 20px;
  --radius-m: 14px;
  --radius-s: 10px;
  --shadow-s: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow-m: 0 4px 10px rgba(16, 24, 40, 0.06), 0 16px 32px rgba(16, 24, 40, 0.09);

  /* —— 布局 —— */
  --topbar-h: 62px;
  --pad-x: 24px;
  --pad-y: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

/* 内联 SVG 图标统一规格（替代 emoji / 几何符号，跨设备渲染一致） */
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8;
      stroke-linecap: round; stroke-linejoin: round; }
.ic { width: 17px; height: 17px; flex: 0 0 auto; }

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); }

/* ---------------- 顶部栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 var(--pad-x);
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  background: linear-gradient(158deg, #eaf1ff, #dce8ff);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(47, 124, 246, 0.14);
}
.brand-logo svg { width: 27px; height: 27px; stroke: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.brand-sub { font-size: 11.5px; color: var(--text-3); }

.search { margin-left: auto; position: relative; flex: 0 1 268px; min-width: 130px; }
.search input {
  width: 100%; height: 38px;
  padding: 0 34px 0 36px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: rgba(120, 128, 140, 0.10);
  color: var(--text);
  font-size: 14px; outline: none;
  -webkit-appearance: none; appearance: none;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--text-3); }
.search input:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search .ico {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3); pointer-events: none; stroke-width: 1.9;
}
.search .clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  display: none; place-items: center;
  background: rgba(120, 128, 140, 0.22);
  color: #fff;
}
.search .clear svg { width: 12px; height: 12px; stroke-width: 2.4; }
.search.has-value .clear { display: grid; }

.topbar-right { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.icon-btn {
  height: 38px; padding: 0 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 11px;
  background: rgba(120, 128, 140, 0.10);
  color: var(--text-2);
  font-size: 13px; font-weight: 550;
  white-space: nowrap; flex: 0 0 auto;
  transition: background .16s, color .16s;
}
.icon-btn .ic { width: 16px; height: 16px; color: var(--accent); }
.icon-btn:hover { background: rgba(120, 128, 140, 0.18); color: var(--text); }

/* ---------------- 分类导航 ---------------- */
.navwrap {
  position: sticky; top: var(--topbar-h); z-index: 55;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-main {
  display: flex; align-items: center; gap: 8px;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  padding: 0 2px;
  justify-content: flex-start;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.nav-main::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto; height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px;
  font-size: 14px; font-weight: 550;
  color: var(--text-2);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .16s, color .16s, box-shadow .16s, transform .12s;
  white-space: nowrap; scroll-snap-align: center;
}
.tab .ic { width: 16px; height: 16px; }
.tab:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tab.on {
  background: var(--accent); color: #fff;
  box-shadow: 0 3px 12px var(--accent-soft), 0 1px 2px rgba(16, 24, 40, 0.10);
}
.tab .cnt { font-size: 11px; opacity: .66; font-variant-numeric: tabular-nums; }
.tab.on .cnt { opacity: .88; }

.nav-sub {
  display: flex; align-items: center; gap: 7px;
  padding: 8px var(--pad-x) 9px;
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.nav-sub::-webkit-scrollbar { display: none; }
.nav-sub:empty { display: none; }

.chip {
  flex: 0 0 auto; height: 30px; padding: 0 13px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: all .16s; white-space: nowrap; scroll-snap-align: center;
}
.chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.chip.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; box-shadow: inset 0 0 0 1px var(--accent-soft); }
.chip .cnt { font-size: 11px; opacity: .68; font-variant-numeric: tabular-nums; }
.chip.on .cnt { opacity: .85; }

/* ---------------- 主体 ---------------- */
main {
  padding: var(--pad-y) var(--pad-x) 60px;
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
  max-width: 1680px; margin: 0 auto;
}

.statline {
  display: flex; align-items: center; gap: 10px;
  margin: 0 2px 14px;
  font-size: 13px; color: var(--text-2);
}
.statline b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

.announce {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 0 16px;
  padding: 12px 15px 12px 14px;
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, #eef4ff, #e8f0ff);
  border: 1px solid rgba(47, 124, 246, 0.16);
  border-left: 4px solid var(--accent);
  color: #24549e;
  font-size: 13.5px; line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: break-word;
}

.section-title {
  margin: 6px 2px 12px;
  font-size: 16px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 9px;
}
.section-title .dot { width: 4px; height: 17px; border-radius: 2px; background: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 17px;
}

/* ---------------- 卡片 ---------------- */
.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  border: 1px solid var(--line);
  transition: transform .2s cubic-bezier(.22,.8,.36,1), box-shadow .2s, border-color .2s;
  cursor: pointer;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); border-color: var(--line-2); }
.card:active { transform: translateY(-1px) scale(.995); }

.thumb {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #eef3fb, #e4ebf7);
  overflow: hidden;
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s cubic-bezier(.22,.8,.36,1);
}
.card:hover .thumb img { transform: scale(1.045); }
.thumb .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--text-3);
}
.thumb .ph svg { width: 34px; height: 34px; stroke-width: 1.5; }

.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb .play span {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.18);
  opacity: 0; transform: scale(.82);
  transition: all .22s cubic-bezier(.22,.8,.36,1);
}
.thumb .play svg { width: 17px; height: 17px; margin-left: 2px; stroke: none; fill: currentColor; }
.card:hover .thumb .play span { opacity: 1; transform: scale(1); }

.meta { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 9px; flex: 1; }

.title {
  font-size: 14px; font-weight: 600; line-height: 1.42;
  color: var(--text);
  /* ★ 必须保留：标题盒撑满整行，才能把编号顶到「标题那一行的最右端」 */
  flex: 1 1 auto; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: 1.38em;
}
/* 兼容旧结构（若页面仍从旧脚本渲染出编号徽标） */
.title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-idx {
  flex: 0 0 auto;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 7px; line-height: 1.3; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tag {
  height: 22px; padding: 0 8px;
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 7px;
  font-size: 11px; font-weight: 500;
  background: rgba(120, 128, 140, 0.09);
  color: var(--text-2);
  white-space: nowrap;
}
.tag.hot { background: var(--accent-soft); color: var(--accent); }

.tags-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tags-row .tags { flex: 1 1 auto; min-width: 0; margin-top: 0; }
.card-acts { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.fav-btn {
  align-self: flex-start;
  height: 26px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  background: rgba(120, 128, 140, 0.08);
  color: var(--text-2);
  transition: all .16s;
  flex: 0 0 auto; position: relative;
}
.fav-btn .ic { width: 14px; height: 14px; }
.fav-btn:hover, .fav-btn.on { background: var(--star-soft); color: #a2690a; }
.fav-btn.on .ic { fill: var(--star); stroke: var(--star); }

.empty {
  grid-column: 1 / -1;
  padding: 70px 20px; text-align: center; color: var(--text-3);
}
.empty .big { font-size: 40px; margin-bottom: 10px; opacity: .75; }
.empty .big svg { width: 40px; height: 40px; margin: 0 auto; opacity: .55; stroke-width: 1.4; stroke: var(--text-3); }
.empty .sub { font-size: 13px; margin-top: 6px; line-height: 1.7; }

/* ---------------- 骨架屏 ---------------- */
.sk {
  position: relative; overflow: hidden;
  border-radius: var(--radius-m);
  background: #fff;
  border: 1px solid var(--line);
  min-height: 168px;
}
.sk::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 56.25%;
  background: linear-gradient(140deg, #eef3fb, #e4ebf7);
}
.sk::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(120,128,140,0) 18%, rgba(120,128,140,.10) 42%, rgba(120,128,140,0) 66%);
  background-size: 240% 100%;
  animation: skmove 1.3s ease-in-out infinite;
}
@keyframes skmove { from { background-position: 130% 0; } to { background-position: -70% 0; } }

/* ---------------- 播放层 ---------------- */
.player {
  position: fixed; inset: 0; z-index: 200;
  display: none; flex-direction: column;
  background: #fff;
  height: 100vh;
  height: 100dvh;
}
.player.on { display: flex; }

.player-bar {
  height: 56px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.pbtn {
  height: 36px; padding: 0 13px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 10px;
  background: rgba(120, 128, 140, 0.10);
  color: var(--text);
  font-size: 13.5px; font-weight: 550;
  transition: background .16s; flex: 0 0 auto;
}
.pbtn .ic { width: 16px; height: 16px; }
.pbtn:hover { background: rgba(120, 128, 140, 0.18); }
.pbtn.primary { background: var(--accent); color: #fff; }
.pbtn.primary:hover { filter: brightness(.94); }
/* ★ 2026-10-16 老板反馈：播放条里的收藏按钮要与其它按钮完全同尺寸、同对齐
   （.fav-btn 基础样式是给卡片用的 26px 小药丸 + align-self:flex-start，放进播放条会错位） */
.pbtn.fav-btn {
  height: 36px; align-self: auto; padding: 0 13px; gap: 6px;
  border-radius: 10px; font-size: 13.5px; font-weight: 550;
}
.pbtn.fav-btn .ic { width: 16px; height: 16px; }

.player-title {
  flex: 1; min-width: 0;
  font-size: 14.5px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-body { flex: 1; position: relative; background: var(--bg); overscroll-behavior: contain; }
.player-body iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* ★ 引流公告（播放层 · 悬浮胶囊，2026-10-16 老板要求：悬浮不占版面）
   桌面：悬浮在播放区右上角（不挤压任何内容）；手机端课件内不显示（底部断点 display:none）。 */
.ply-ann {
  position: absolute; top: 66px; right: 14px; left: auto; z-index: 30;
  max-width: min(440px, 62%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 251, 243, 0.96);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 999px; padding: 7px 13px;
  font-size: 12.5px; color: #8a4b08; line-height: 1.5;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.10);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ply-ann[hidden] { display: none; }
.ply-ann .ic { width: 16px; height: 16px; flex: 0 0 auto; color: var(--warn); }
.ply-ann-bd { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ply-wx { color: #b45309; font-weight: 700; }
.ply-ann-cp {
  flex: 0 0 auto; height: 26px; padding: 0 11px; margin-left: 4px;
  display: inline-flex; align-items: center; border-radius: 999px;
  background: var(--warn); color: #fff; font-size: 12px; font-weight: 700;
}
.ply-ann-cp:hover { filter: brightness(.95); }
.ply-ann-x {
  flex: 0 0 auto; width: 22px; height: 22px; margin-left: 2px;
  display: grid; place-items: center;
  border-radius: 999px; color: #8a4b08;
  background: rgba(217, 119, 6, 0.14);
}
.ply-ann-x svg { width: 13px; height: 13px; stroke-width: 2.4; }
.ply-ann-x:hover { background: rgba(217, 119, 6, 0.24); }

/* 手机端提示条 */
.player-hint {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  background: linear-gradient(180deg, #eef4ff, #e8f0ff);
  border-bottom: 1px solid rgba(47, 124, 246, 0.16);
  color: #24549e;
  font-size: 13px; line-height: 1.5;
}
.player-hint[hidden] { display: none; }
.player-hint .hint-ic { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.7; }
.player-hint .hint-txt { flex: 1 1 auto; min-width: 0; }
.player-hint .hint-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px;
  border-radius: 8px;
  background: #fff; color: var(--accent);
  font-size: 12.5px; font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(47, 124, 246, 0.22);
}
.player-hint .hint-btn .ic { width: 14px; height: 14px; }
.player-hint .hint-x {
  flex: 0 0 auto; width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px; color: #6b86b4;
}
.player-hint .hint-x svg { width: 14px; height: 14px; stroke-width: 2.2; }

.loading-mask {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--bg);
  color: var(--text-2); font-size: 14px;
}
.spinner {
  width: 22px; height: 22px; margin: 0 auto 12px;
  border: 2.5px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(34px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  z-index: 300;
  padding: 11px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-m);
  border: 1px solid var(--line);
  font-size: 13.5px; color: var(--text);
  opacity: 0; pointer-events: none;
  transition: all .26s cubic-bezier(.22,.8,.36,1);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.footer {
  max-width: 1680px; margin: 0 auto;
  padding: 0 var(--pad-x) calc(44px + env(safe-area-inset-bottom));
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
  color: var(--text-3); font-size: 12.5px;
  text-align: center;
}

/* ============================================================
   响应式 · 5 档
   ≥1281 桌面 / 1025–1280 小桌面 / 769–1024 平板 / 431–768 手机与小平板 / ≤430 手机竖
   ============================================================ */

@media (max-width: 1280px) {
  main { --pad-y: 18px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; gap: 14px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root { --pad-x: 16px; }
  .grid { grid-template-columns: repeat(3, 1fr) !important; gap: 14px; }
}

@media (max-width: 900px) {
  :root { --pad-x: 14px; --pad-y: 16px; }
  .topbar { gap: 10px; }
  .brand-sub { display: none; }
  .search { flex: 1 1 auto; min-width: 0; }
  /* ★ 16px：iOS Safari 对 <16px 的输入框聚焦时会强制放大整页且不回弹 */
  .search input { height: 40px; font-size: 16px; }
  .nav-main { padding: 0 2px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)) !important; gap: 12px; }
  .title { font-size: 13.5px; }
  .footer { padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
}

/* 761–900：3 列，避免这个区间卡片被切得过碎 */
@media (min-width: 761px) and (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ≤820：顶栏换两行（品牌 + 搜索/随机 → 分类条独占一行） */
@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap; height: auto;
    padding: 8px var(--pad-x) 6px;
    padding-left: max(var(--pad-x), env(safe-area-inset-left));
    padding-right: max(var(--pad-x), env(safe-area-inset-right));
    gap: 8px;
  }
  .brand { flex: 0 0 auto; }
  .topbar-right { flex: 1 1 0%; justify-content: flex-end; order: 2; min-width: 0; }
  .nav-main { order: 3; width: 100%; flex: 1 1 100%; padding: 2px 0 4px; }
  .nav-main .tab { height: 32px; font-size: 13px; padding: 0 12px; }
  .icon-btn span { display: none; }
  .icon-btn { padding: 0 10px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .meta { padding: 9px 10px 10px; }
  .player-title { font-size: 13px; }
  .pbtn .lbl { display: none; }
  .pbtn { padding: 0 11px; }
  .player-hint { padding: 8px 10px; gap: 7px; font-size: 12.5px; }
  .player-hint .hint-btn span { display: none; }
  .player-hint .hint-btn { padding: 0 9px; }
}

@media (max-width: 430px) {
  :root { --pad-x: 12px; --pad-y: 14px; }
  .brand-name { font-size: 15px; max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-logo { width: 32px; height: 32px; border-radius: 10px; }
  .brand-logo svg { width: 23px; height: 23px; }
  .grid { gap: 9px; }
}

/* ============================================================
   触屏（无 hover / 粗指针）
   ============================================================ */
@media (hover: none), (pointer: coarse) {
  .thumb .play span { opacity: .92; transform: scale(1); }
  .card:hover { transform: none; }
  .card:hover .thumb img { transform: none; }
  .card:active { transform: scale(.985); }

  /* 触摸目标 ≥44px（Apple HIG 44pt / Material 48dp） */
  .tab { height: 38px; }
  .chip { min-height: 34px; }
  .icon-btn { min-height: 40px; min-width: 44px; justify-content: center; }
  .pbtn { min-height: 44px; }
  .player-hint .hint-btn { min-height: 36px; }
  .player-hint .hint-x { width: 40px; height: 40px; }

  /* 命中区撑到 44px，但视觉尺寸不变（伪元素扩展命中范围，不参与布局） */
  .fav-btn::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    height: 44px;
  }
}

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

/* ============================================================
   移动端改版（2026-10-16 老板拍板样板）：≤820px 生效，桌面零影响
   · 底部 TabBar（首页 / 分类 / 我的收藏）
   · 首页分类宫格（★ 不显示计数数字 —— 老板 2026-10-16 要求）
   · 分类地图（子分类换行平铺，替代横滑被裁切）
   · 手机课件落地页（主出口 = 复制链接发电脑）
   ============================================================ */

/* 底部 TabBar：桌面隐藏（display 由 ≤820 媒体查询接管） */
.mtabbar { display: none; }

/* ---- 手机课件落地页（只有手机流程会打开，桌面不触达） ---- */
.mland {
  position: fixed; inset: 0; z-index: 150;
  display: none; flex-direction: column;
  background: var(--bg);
}
.mland.on { display: flex; }
.ml-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.ml-bk {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(120, 128, 140, 0.10); color: var(--text);
  flex: 0 0 auto;
}
.ml-bk svg { width: 18px; height: 18px; }
.ml-t {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ml-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}
.ml-hero {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-s);
}
.ml-hero .im { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(140deg, #eef3fb, #e4ebf7); }
.ml-hero .im img { width: 100%; height: 100%; object-fit: cover; }
.ml-hero .im .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.ml-hero .im .ph svg { width: 34px; height: 34px; stroke-width: 1.5; }
.ml-hero .im .mpl { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ml-hero .im .mpl span {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94); color: var(--accent);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.18);
}
.ml-hero .im .mpl svg { width: 17px; height: 17px; margin-left: 2px; }
.ml-hero .bd { padding: 11px 13px 13px; }
.ml-tt { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.ml-tt .x { flex: 1 1 auto; min-width: 0; font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.ml-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ml-chips span {
  font-size: 11px; color: var(--text-2);
  background: rgba(120, 128, 140, 0.09); border-radius: 6px; padding: 3px 9px;
}
.ml-tip {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, #eef4ff, #e8f0ff);
  border: 1px solid rgba(47, 124, 246, 0.16);
  border-radius: 10px; padding: 9px 11px; margin: 12px 0;
  font-size: 12px; color: #24549e;
}
.ml-tip .ic { width: 16px; height: 16px; flex: 0 0 auto; }
.ml-big {
  width: 100%; height: 46px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 12px; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(47, 124, 246, 0.35);
}
.ml-big .ic { width: 16px; height: 16px; }
.ml-big:active { filter: brightness(0.95); }
.ml-ghost {
  width: 100%; height: 42px; margin-top: 9px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 12px; background: var(--card);
  border: 1px solid var(--line-2); color: var(--text-2);
  font-size: 13px; font-weight: 600;
}
.ml-ghost .ic { width: 14px; height: 14px; }
.ml-rel { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
.ml-rel-t { margin-top: 16px; }

/* ---- ≤820px：手机档 ---- */
@media (max-width: 820px) {
  /* 分类胶囊条与子分类横滑条整体退场（被宫格 + 分类地图取代）
     ★ nav-main 在 topbar 内部（不在 .navwrap 里），必须单独隐藏 */
  .navwrap, .topbar .nav-main { display: none; }
  /* 公告与统计行降级，首屏让位给内容 */
  .announce, .statline { display: none; }
  /* 卡片降噪：标签只留 1 个 */
  .tags .tag:nth-child(n+2) { display: none; }

  /* ★ 老板 2026-10-17：手机顶栏去掉搜索 + 随机骰子，突出网站名 */
  .topbar-right { display: none !important; }
  .brand-name { font-size: 20px; font-weight: 800; letter-spacing: .3px; max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }

  /* ★ 方案A「一条长河」顶部条（#mHome 已 sticky）：醒目入口 + 当前位置 */
  .m-entry {
    display: flex; align-items: center; gap: 9px; margin: 11px 12px 0; height: 46px; padding: 0 14px;
    border-radius: 13px; color: #fff; font-size: 14.5px; font-weight: 800;
    background: linear-gradient(135deg, #4a90ff, #2f7cf6); box-shadow: 0 7px 18px rgba(47,124,246,.34);
  }
  .m-entry .ic { width: 18px; height: 18px; flex: 0 0 auto; }
  .m-entry-t { flex: 1 1 auto; text-align: left; }
  .m-entry-n { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.22); border-radius: 999px; padding: 3px 10px; }
  .m-loc { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); padding: 10px 15px 9px; }
  .m-loc svg { width: 13px; height: 13px; color: var(--accent); flex: 0 0 auto; }
  .m-loc b { color: var(--text); font-weight: 700; }
  .m-loc .sep { color: var(--text-3); margin: 0 3px; }

  /* 长河主体（右侧留出跳转轴空间） */
  .m-river { display: block; padding: 0 38px 16px 12px; }
  .m-catbanner {
    display: flex; align-items: center; gap: 9px; padding: 11px 13px; margin: 10px 0 6px;
    background: linear-gradient(120deg, #e9f1ff, #e0eaff); border: 1px solid #d4e2ff; border-radius: 13px;
    scroll-margin-top: calc(var(--topbar-h) + var(--msticky-h, 100px) + 8px);
  }
  .m-catbanner .cb-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
  .m-catbanner .cb-ic .ic { width: 16px; height: 16px; }
  .m-catbanner .cb-t { font-size: 15px; font-weight: 800; color: var(--accent-deep); }
  .m-catbanner .cb-n { margin-left: auto; font-size: 12px; color: var(--text-2); font-weight: 600; }
  .m-river-sec { margin-bottom: 4px; scroll-margin-top: calc(var(--topbar-h) + var(--msticky-h, 100px) + 8px); }
  .m-river-head { display: flex; align-items: center; gap: 8px; padding: 13px 3px 9px; }
  .m-river-head .bar { width: 4px; height: 17px; border-radius: 2px; background: var(--accent); }
  .m-river-head .nm { font-size: 15px; font-weight: 800; }
  .m-river-head .ct { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

  /* 右侧跳转轴 */
  .m-rail { position: fixed; right: 5px; top: 50%; transform: translateY(-50%); z-index: 45;
            display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .m-rail[hidden] { display: none; }
  .m-rail .mr { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
                font-size: 11px; font-weight: 800; color: var(--text-2); background: rgba(255,255,255,.92);
                border: 1px solid var(--line); box-shadow: var(--shadow-s); }
  .m-rail .mr.on { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 10px rgba(47,124,246,.42); }

  /* 给底部 TabBar 留出空间 */
  main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }

  /* ---- 首页：热门搜索 ---- */
  .m-hot {
    display: flex; align-items: center; gap: 6px;
    margin: 0 2px 10px;
    overflow-x: auto; scrollbar-width: none;
  }
  .m-hot::-webkit-scrollbar { display: none; }
  .m-hot .lb { flex: 0 0 auto; font-size: 11px; color: var(--text-3); }
  .m-hot .w {
    flex: 0 0 auto; font-size: 12px; font-weight: 500;
    color: var(--text-2); background: var(--card);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 4px 11px; white-space: nowrap;
  }
  .m-hot .w.on { color: var(--accent); border-color: rgba(47, 124, 246, 0.30); background: var(--accent-soft); }

  /* ---- 首页/分类：两层吸顶分类条（老板 2026-10-16 确认样板） ---- */
  /* ★ 手机筛选条（2026-10-16 重做）：常驻「所有分类」按钮 + 当前分类清除 chip。
     固定高度、吸顶、不做滚动高亮/折叠 —— 解决旧两层条「消失/抖动/闪烁/横向藏起来」的问题。 */
  .m-filterbar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 4px; border-bottom: 1px solid var(--line);
  }
  .m-allbtn {
    flex: 0 0 auto; height: 36px; padding: 0 15px;
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px; font-size: 13.5px; font-weight: 700;
    color: var(--accent); background: var(--accent-soft);
    white-space: nowrap;
  }
  .m-allbtn .ic { width: 15px; height: 15px; }
  .m-curchip {
    flex: 0 0 auto; height: 36px; padding: 0 12px 0 14px;
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--text); background: var(--card);
    box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap;
  }
  .m-curchip .x { color: var(--text-3); font-size: 12px; line-height: 1; }

  /* ---- 首页：信任条 + 筛选 chip ---- */
  .m-trust {
    display: flex; align-items: center; gap: 7px;
    background: linear-gradient(180deg, #eef4ff, #e8f0ff);
    border: 1px solid rgba(47, 124, 246, 0.16);
    border-radius: 10px; padding: 7px 10px; margin: 0 2px 12px;
    font-size: 11.5px; color: #24549e;
  }
  .m-trust .ic { width: 15px; height: 15px; flex: 0 0 auto; }
  .m-trust b { color: var(--accent); }
  .m-fchip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600;
    color: var(--accent); background: var(--accent-soft);
    border-radius: 999px; padding: 5px 12px; margin: 0 2px 10px;
  }

  /* ---- 分类地图（子分类平铺） ---- */
  .m-map-head {
    font-size: 16px; font-weight: 700; color: var(--text);
    margin: 4px 2px 12px;
    display: flex; align-items: center; gap: 9px;
  }
  .m-map-head::before { content: ""; width: 4px; height: 17px; border-radius: 2px; background: var(--accent); }
  .mrow {
    display: flex; align-items: flex-start; gap: 11px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; padding: 11px 12px; margin-bottom: 9px;
    box-shadow: var(--shadow-s); cursor: pointer;
  }
  .mrow:active { background: #f8fafd; }
  .mrow .mc {
    width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center; flex: 0 0 auto;
    background: linear-gradient(158deg, #eaf1ff, #dce8ff); color: var(--accent);
  }
  .mrow .mc svg { width: 20px; height: 20px; }
  .mrow .minfo { flex: 1 1 auto; min-width: 0; }
  .mrow .mn {
    font-size: 14px; font-weight: 600; color: var(--text);
    display: flex; align-items: baseline; gap: 8px;
  }
  .mrow .mn .mct { font-size: 11px; font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .mrow .msub { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .mrow .msub .s {
    font-size: 13px; font-weight: 500; color: var(--text-2);
    background: rgba(120, 128, 140, 0.08);
    border-radius: 999px; padding: 7px 14px; white-space: nowrap;
    min-height: 34px; display: inline-flex; align-items: center;
  }
  .mrow .msub .s.on { color: var(--accent); background: var(--accent-soft); font-weight: 650; }

  /* ---- 底部 TabBar ---- */
  .mtabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .mtabbar .mi {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; font-weight: 500; color: var(--text-3);
    padding: 2px 0;
  }
  .mtabbar .mi .ic { width: 21px; height: 21px; }
  .mtabbar .mi.on { color: var(--accent); font-weight: 700; }

  /* ---- 2026-10-16 重做：手机筛选条 / 分区 / 引流公告 ---- */
  #mHome { padding: 0; position: sticky; top: var(--topbar-h); z-index: 40; background: var(--bg); }

  /* 移动端分区（最新/热门、按子分类） */
  .m-home-secs { display: block; }
  .m-sec, .m-subsec { margin-bottom: 16px; scroll-margin-top: calc(var(--topbar-h) + 56px); }
  .m-sec .section-title, .m-subsec .section-title { margin: 10px 2px 11px; }
  .m-subn { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 5px; font-variant-numeric: tabular-nums; }
  .grid.m-sec-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }

  /* 落地页收藏按钮（★ 老板：进课件后收藏按钮不能丢） */
  .ml-head .ml-fav {
    flex: 0 0 auto; height: 32px; padding: 0 10px;
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 9px; background: rgba(120, 128, 140, 0.10); color: var(--text-2);
    font-size: 12px; font-weight: 600;
  }
  .ml-head .ml-fav .ic { width: 14px; height: 14px; }
  .ml-head .ml-fav.on { background: var(--star-soft); color: #a2690a; }
  .ml-head .ml-fav.on .ic { fill: var(--star); stroke: var(--star); }

  /* 引流公告（课程内 · 获客） */
  .ml-ann {
    display: flex; align-items: center; gap: 8px;
    background: linear-gradient(180deg, #fff7ed, #ffedd5);
    border: 1px solid rgba(217, 119, 6, 0.22); border-left: 4px solid var(--warn);
    border-radius: 10px; padding: 10px 11px; margin-top: 12px;
    font-size: 12.5px; color: #8a4b08; line-height: 1.5;
  }
  .ml-ann .ic { width: 16px; height: 16px; flex: 0 0 auto; color: var(--warn); }
  .ml-ann-bd { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
  .ml-wx { color: #b45309; font-weight: 700; }
  .ml-ann-cp {
    flex: 0 0 auto; height: 28px; padding: 0 10px; margin-left: auto;
    display: inline-flex; align-items: center; border-radius: 8px;
    background: var(--warn); color: #fff; font-size: 12px; font-weight: 700;
  }
  .ml-ann-cp:active { filter: brightness(.95); }

  /* ★ 老板 2026-10-16：手机端课件播放层不显示公告栏（遮挡按钮，只留落地页「打开」下面一条） */
  .ply-ann { display: none !important; }

  /* ---- 分类展开底 sheet（点「展开」随时切换全部分类） ---- */
  .m-sheet-mask { display: none; position: fixed; inset: 0; z-index: 140; background: rgba(16,24,40,.4); }
  .m-sheet-mask.on { display: block; }
  .m-sheet {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 141;
    background: var(--card); border-radius: 20px 20px 0 0;
    padding: 14px 16px calc(22px + env(safe-area-inset-bottom));
    max-height: 78%; overflow-y: auto; -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 30px rgba(16,24,40,.18);
  }
  .m-sheet.on { display: block; }
  .m-sheet-hd {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 12px;
  }
  .m-sheet-x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); background: rgba(120,128,140,.10); }
  .m-sheet-x svg { width: 16px; height: 16px; stroke-width: 2.2; }
  .m-grp { margin-bottom: 14px; }
  .m-gh { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 800; color: var(--text); margin-bottom: 9px; background: none; border: 0; padding: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
  .m-gh.on { color: var(--accent); }
  .m-gdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .m-gs { display: flex; flex-wrap: wrap; gap: 8px; }
  .m-gsub {
    padding: 8px 14px; border-radius: 999px;
    background: #f4f6fa; border: 1px solid var(--line);
    font-size: 13px; font-weight: 600; color: var(--text-2);
  }
  .m-gsub.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
}


/* ============================================================
   2026-10-17 盒马风 + 门户改版样式
   桌面门户(#portal) / 手机三页(#mApp) / 旧容器隐藏
   ============================================================ */
/* 旧容器全部隐藏（旧 JS 仍可无错运行，但不显示） */
#navMain, .navwrap, #mHome, #mCatMap, #mRail, .announce, #sectionTitle, #statLine, #grid,
.m-sheet, .m-sheet-mask { display: none !important; }
@media (min-width: 821px){ .mtabbar{ display:none !important; } #mApp{ display:none !important; } }
@media (max-width: 820px){ #portal{ display:none !important; } }

/* ---- 桌面门户 ---- */
.portal{ max-width:1200px; margin:0 auto; padding:20px 24px 40px; }
.p-hero{ display:grid; grid-template-columns:1fr 320px; gap:18px; margin-bottom:20px; }
.p-carousel{ position:relative; }
.p-side{ display:flex; flex-direction:column; gap:14px; }

/* 轮播（有图）*/
.banner{ position:relative; border-radius:16px; overflow:hidden; box-shadow:var(--shadow-m); background:#eef3fb; }
.banner-img{ height:280px; }
.banner-img .bn-track{ position:absolute; inset:0; }
.banner-img .bn-slide{ position:absolute; inset:0; opacity:0; transition:opacity .35s; }
.banner-img .bn-slide.on{ opacity:1; }
.banner-img .bn-slide img{ width:100%; height:100%; object-fit:cover; display:block; }
.banner-img .bn-arw{ position:absolute; top:50%; transform:translateY(-50%); width:38px; height:38px; border-radius:50%;
  background:rgba(255,255,255,.24); border:0; color:#fff; display:grid; place-items:center; cursor:pointer; }
.banner-img .bn-arw:hover{ background:rgba(255,255,255,.4); }
.banner-img .bn-arw svg{ width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:2.4; }
.banner-img .bn-arw.l{ left:14px; } .banner-img .bn-arw.r{ right:14px; }
.banner-img .bn-dots{ position:absolute; bottom:14px; left:50%; transform:translateX(-50%); display:flex; gap:6px; }
.banner-img .bn-dots i{ width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.55); cursor:pointer; transition:.2s; }
.banner-img .bn-dots i.on{ background:#fff; width:16px; border-radius:4px; }
/* 轮播（无图·文字卡）*/
.banner-txt{ height:200px; background:linear-gradient(120deg,#2f7cf6,#63a4ff); display:grid; place-items:center; }
.banner-txt .bt{ text-align:center; color:#fff; padding:20px; }
.banner-txt .bt-t{ font-size:30px; font-weight:800; letter-spacing:1px; }
.banner-txt .bt-s{ font-size:15px; opacity:.92; margin-top:8px; }

/* 统计行 + 引流 */
.stat-lines{ background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px 18px; box-shadow:var(--shadow-s); }
.stat-lines .sl{ font-size:14px; color:var(--text-2); padding:6px 0; }
.stat-lines .sl b{ color:var(--accent); font-weight:800; font-size:15px; margin-right:2px; }
.hm-ann{ display:flex; align-items:center; gap:9px; flex:1; background:linear-gradient(180deg,#fff7ed,#ffedd5);
  border:1px solid rgba(217,119,6,.22); border-left:4px solid var(--warn); border-radius:14px; padding:14px 16px; font-size:13.5px; color:#8a4b08; }
.hm-ann .ic{ width:18px; height:18px; flex:0 0 auto; color:var(--warn); }
.hm-ann b{ color:#b45309; }
.hm-ann .cp{ margin-left:auto; flex:0 0 auto; font-size:12.5px; font-weight:700; color:#fff; background:var(--warn); border:0; border-radius:8px; padding:6px 13px; cursor:pointer; }

/* 分类入口卡（桌面吸顶）*/
.p-cats{ position:sticky; top:70px; z-index:20; display:grid; grid-template-columns:repeat(7,1fr); gap:12px;
  margin:0 0 16px; padding:12px; background:var(--bg); border-radius:14px; }
.catcard{ background:var(--card); border:1px solid var(--line); border-radius:13px; padding:14px 8px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:8px; box-shadow:var(--shadow-s); transition:.15s; font-family:inherit; }
.catcard:hover{ transform:translateY(-3px); box-shadow:var(--shadow-m); border-color:#cfe0ff; }
.catcard.on{ border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft), var(--shadow-m); }
.catcard .cc-ic{ width:46px; height:46px; border-radius:50%; display:grid; place-items:center; }
.catcard .cc-ic svg, .catcard .cc-ic .ic{ width:23px; height:23px; }
.catcard .cc-nm{ font-size:13.5px; font-weight:700; color:var(--text); }
.catcard.on .cc-nm{ color:var(--accent-deep); }
.catcard .cc-ct{ font-size:11px; color:var(--text-3); }
.cc-ic.t-blue{ background:linear-gradient(150deg,#e7f0ff,#d5e4ff); color:#2f7cf6; }
.cc-ic.t-red{ background:linear-gradient(150deg,#fdecec,#fbdcdc); color:#e0533d; }
.cc-ic.t-green{ background:linear-gradient(150deg,#eafaf3,#d8f3e6); color:#1ea97c; }
.cc-ic.t-purple{ background:linear-gradient(150deg,#f3ecff,#e6dbff); color:#7a5af0; }
.cc-ic.t-orange{ background:linear-gradient(150deg,#fff3e2,#ffe6cc); color:#f08a2e; }
.cc-ic.t-cyan{ background:linear-gradient(150deg,#e9f4ff,#d8ecff); color:#3aa0e0; }
.cc-ic.t-gray{ background:linear-gradient(150deg,#eef1f6,#e2e7f0); color:#5b6472; }

/* 桌面子分类 + 分区标题 */
.p-subchips{ display:flex; gap:7px; flex-wrap:wrap; margin:0 0 14px; }
.p-subchips:empty{ display:none; }
.p-subchips .sc{ font-size:12.5px; color:var(--text-2); background:#fff; border:1px solid var(--line); border-radius:999px; padding:6px 14px; cursor:pointer; font-family:inherit; }
.p-subchips .sc.on{ color:var(--accent-deep); background:var(--accent-soft); border-color:#cfe0ff; font-weight:700; }
.p-sectitle{ font-size:20px; font-weight:800; display:flex; align-items:center; gap:9px; margin:0 0 14px; }
.p-sectitle::before{ content:""; width:5px; height:20px; border-radius:3px; background:var(--accent); }

/* ---- 手机三页 ---- */
.mapp{ display:block; }
.m-search{ padding:8px 12px; background:#fff; }
.ms-box{ display:flex; align-items:center; gap:7px; height:38px; background:#f1f4f9; border-radius:999px; padding:0 15px; color:var(--text-3); font-size:13.5px; }
.ms-box svg, .ms-box .ic{ width:16px; height:16px; }
.m-hot{ display:flex; align-items:center; gap:7px; padding:2px 12px 10px; background:#fff; overflow:hidden; }
.m-hot .lb{ font-size:12.5px; font-weight:800; color:var(--text); flex:0 0 auto; }
.m-hot .w{ font-size:12px; color:var(--text-2); background:#f2f4f8; border:0; border-radius:999px; padding:4px 11px; white-space:nowrap; cursor:pointer; font-family:inherit; }
.m-hot .w.on{ color:#fff; background:var(--accent); }
.m-homebody{ padding:10px 12px 20px; }
.m-catgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px 8px; margin:14px 0 4px; }
.m-sechd{ font-size:15px; font-weight:800; display:flex; align-items:center; gap:8px; margin:16px 2px 10px; }
.m-sechd::before{ content:""; width:4px; height:16px; border-radius:2px; background:var(--accent); }
.m-grid2{ grid-template-columns:repeat(2,1fr) !important; gap:11px; }

/* 盒马分类页 */
.mc-search{ padding:8px 12px; background:#fff; display:flex; align-items:center; gap:7px; height:44px; color:var(--text-3); font-size:13.5px; }
.mc-search svg, .mc-search .ic{ width:16px; height:16px; }
.mc-split{ display:flex; min-height:calc(100vh - 44px - 58px); }
.mc-left{ width:96px; flex:0 0 auto; background:#fff; border-right:1px solid var(--line); padding-top:6px; }
.mcl{ width:100%; display:flex; flex-direction:column; align-items:center; gap:5px; padding:12px 4px; border:0; background:none;
  font-size:12px; font-weight:600; color:var(--text-2); position:relative; cursor:pointer; font-family:inherit; }
.mcl .mcl-ic{ width:34px; height:34px; border-radius:10px; display:grid; place-items:center; }
.mcl .mcl-ic svg, .mcl .mcl-ic .ic{ width:17px; height:17px; }
.mcl.on{ color:var(--accent-deep); background:var(--accent-soft); font-weight:800; }
.mcl.on .mcl-ic{ box-shadow:0 0 0 2px #fff inset; }
.mcl.on::before{ content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:2px; background:var(--accent); }
.mc-right{ flex:1 1 auto; min-width:0; background:var(--bg); }
.mc-subchips{ display:flex; gap:6px; padding:10px 11px; overflow-x:auto; scrollbar-width:none; background:#fff; border-bottom:1px solid var(--line); }
.mc-subchips::-webkit-scrollbar{ display:none; }
.mcs{ flex:0 0 auto; font-size:12px; color:var(--text-2); background:#f2f4f8; border:1px solid var(--line); border-radius:999px; padding:5px 12px; cursor:pointer; font-family:inherit; white-space:nowrap; }
.mcs.on{ color:#fff; background:var(--accent); border-color:var(--accent); font-weight:700; }
.mc-list{ background:#fff; }
.mc-empty{ padding:60px 20px; text-align:center; color:var(--text-3); font-size:13.5px; }
/* 一行一个 */
.mrowcard{ display:flex; align-items:center; gap:11px; padding:11px 12px; border-bottom:1px solid var(--line); cursor:pointer; }
.mrowcard:active{ background:#f7f9fc; }
.mrc-thumb{ position:relative; width:120px; height:74px; border-radius:9px; overflow:hidden; flex:0 0 auto; background:#eef3fb; }
.mrc-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.mrc-thumb .mrc-play{ position:absolute; inset:0; display:grid; place-items:center; }
.mrc-thumb .mrc-play svg, .mrc-thumb .mrc-play .ic{ width:22px; height:22px; color:#fff; filter:drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.mrc-thumb .mrc-ph{ position:absolute; inset:0; display:grid; place-items:center; color:var(--text-3); }
.mrc-mid{ flex:1 1 auto; min-width:0; }
.mrc-ti{ font-size:13.5px; font-weight:700; line-height:1.28; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mrc-tag{ display:inline-block; margin-top:6px; font-size:10.5px; color:var(--accent); background:var(--accent-soft); border-radius:5px; padding:2px 8px; font-weight:600; }
.mrc-cd{ margin-top:6px; font-size:10.5px; color:var(--text-3); font-weight:700; }
.mrc-go{ flex:0 0 auto; width:42px; height:42px; border-radius:50%; border:0; background:var(--accent); color:#fff; display:grid; place-items:center; cursor:pointer; box-shadow:0 4px 10px rgba(47,124,246,.3); }
.mrc-go svg, .mrc-go .ic{ width:15px; height:15px; margin-left:2px; }

/* 手机收藏页 */
.m-favhd{ padding:14px 16px 8px; font-size:18px; font-weight:800; background:#fff; }
.m-favempty{ padding:70px 20px; text-align:center; color:var(--text-3); }
.m-favempty .big{ width:60px; height:60px; margin:0 auto 12px; border-radius:50%; background:#eef1f6; display:grid; place-items:center; }
.m-favempty .big svg, .m-favempty .big .ic{ width:26px; height:26px; stroke:var(--text-3); }
.m-favempty .sub{ font-size:12px; margin-top:6px; }


/* 手机端「搜索态」：点主页搜索框 → 顶栏显示真搜索（藏品牌+骰子），清空/失焦还原 */
@media (max-width: 820px){
  body.msearch .topbar .topbar-right{ display:flex !important; flex:1 1 auto; }
  body.msearch .topbar .topbar-right #btnRandom{ display:none !important; }
  body.msearch .topbar .brand-text{ display:none; }
  body.msearch .topbar .topbar-right .search{ flex:1 1 auto; max-width:none; }
}


/* ============================================================
   2026-10-17 v2 覆盖：长河 + 无数量 + 选中变深 + 大卡 + 吸顶 + 独立滚动
   ============================================================ */
/* 分类卡：无数量(HTML 已去)；选中=整块图标变深 */
.catcard .cc-ct{ display:none !important; }
.catcard.on{ background:var(--accent-soft); border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.catcard.on .cc-ic{ background:var(--accent) !important; color:#fff !important; }
.catcard.on .cc-nm{ color:var(--accent-deep); }
.catcard.on .cc-ic svg, .catcard.on .cc-ic .ic{ color:#fff; }

/* 桌面子分类：吸顶 */
.p-subchips{ position:sticky; top:calc(var(--topbar-h) + var(--pcats-h, 96px)); z-index:19; background:var(--bg); padding:4px 0 10px; margin-bottom:12px; }
.p-subchips:empty{ display:none; }

/* 长河：大分类头 + 子分类头 + 大卡网格 */
.wf-top{ margin:22px 0 6px; scroll-margin-top:calc(var(--topbar-h) + 150px); }
.wf-top-hd{ display:flex; align-items:center; gap:10px; }
.wf-top-hd .wf-ic{ width:34px; height:34px; border-radius:10px; display:grid; place-items:center; }
.wf-top-hd .wf-ic svg, .wf-top-hd .wf-ic .ic{ width:18px; height:18px; }
.wf-top-hd .wf-nm{ font-size:20px; font-weight:800; }
.wf-sub{ margin-bottom:8px; scroll-margin-top:calc(var(--topbar-h) + 170px); }
.wf-sub-hd{ display:flex; align-items:center; gap:8px; padding:10px 2px 8px; }
.wf-sub-hd .bar{ width:4px; height:16px; border-radius:2px; background:var(--accent); }
.wf-sub-hd .nm{ font-size:15px; font-weight:800; }
.wf-grid{ grid-template-columns:repeat(auto-fill, minmax(230px,1fr)) !important; gap:18px; }
.wf-grid .card .thumb{ aspect-ratio:16/10; }

/* 手机分类页：左固定(独立滚动) + 右长河 */
.mc-split{ display:flex; align-items:flex-start; min-height:calc(100vh - 44px); }
.mc-left{ position:sticky; top:0; align-self:flex-start; height:calc(100vh - 44px); overflow-y:auto; width:96px; flex:0 0 auto; background:#fff; border-right:1px solid var(--line); padding-top:6px; }
.mc-main{ flex:1 1 auto; min-width:0; }
.mc-subwrap{ position:sticky; top:0; z-index:15; background:var(--bg); }
.mc-subbar{ padding:8px 12px; background:#fff; border-bottom:1px solid var(--line); }
.mc-subexp{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:var(--text); background:#f2f4f8; border:1px solid var(--line); border-radius:999px; padding:6px 13px; }
.mc-subexp .caret{ width:14px; height:14px; color:var(--text-3); }
.mc-subpanel{ display:flex; flex-wrap:wrap; gap:7px; padding:10px 12px; background:#fff; border-bottom:1px solid var(--line); }
.mc-subpanel[hidden]{ display:none; }
.msp{ font-size:12.5px; color:var(--text-2); background:#f4f6fa; border:1px solid var(--line); border-radius:999px; padding:6px 13px; }
.msp.on{ color:#fff; background:var(--accent); border-color:var(--accent); font-weight:700; }
.mc-river{ padding:0 0 20px; }
/* 一行一个：缩略图加大、无播放按钮 */
.mrowcard{ display:flex; align-items:center; gap:12px; padding:12px; border-bottom:1px solid var(--line); background:#fff; cursor:pointer; }
.mrowcard:active{ background:#f7f9fc; }
.mrc-thumb{ position:relative; width:150px; height:92px; border-radius:10px; overflow:hidden; flex:0 0 auto; background:#eef3fb; }
.mrc-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.mrc-thumb .mrc-ph{ position:absolute; inset:0; display:grid; place-items:center; color:var(--text-3); }
.mrc-mid{ flex:1 1 auto; min-width:0; }
.mrc-ti{ font-size:14px; font-weight:700; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mrc-tag{ display:inline-block; margin-top:7px; font-size:11px; color:var(--accent); background:var(--accent-soft); border-radius:5px; padding:2px 8px; font-weight:600; }
.mrc-cd{ margin-top:7px; font-size:11px; color:var(--text-3); font-weight:700; }

/* 手机主页：分类 4 列(2 行) + 搜索框填充 */
.m-catgrid{ grid-template-columns:repeat(4,1fr) !important; gap:14px 6px; }
.m-search .ms-box{ width:100%; }

/* 轮播图：object-fit 适配两端，居中裁剪 */
.banner-img .bn-slide img{ object-fit:cover; object-position:center; }


/* v2b：分类页左侧/子分类栏 + 桌面分类卡，避开吸顶顶栏与底部Tab */
.mc-left{ top:var(--topbar-h) !important; height:calc(100vh - var(--topbar-h) - 62px) !important; }
.mc-subwrap{ top:var(--topbar-h) !important; }
.p-cats{ top:var(--topbar-h) !important; }


/* v2c：桌面 8 张分类卡一行；手机 banner 压低 */
.p-cats{ grid-template-columns:repeat(8,1fr) !important; }
@media (max-width:820px){
  .banner-img{ height:150px; }
  .banner-txt{ height:150px; }
  .banner-txt .bt-t{ font-size:22px; }
  .banner-txt .bt-s{ font-size:12.5px; }
}


/* v2d：长河外层容器（大分类/子分类分区）用 block，只有分区内部才是卡片网格 */
.wf-body{ display:block; }
.wf-rows{ display:block; }


/* ============================================================
   v3：桌面撑满整屏 + 卡片加密（电脑用全宽，不套手机窄布局）
   ============================================================ */
.portal{ max-width:none !important; margin:0 !important; padding:16px 28px 44px !important; }
.wf-grid{ grid-template-columns:repeat(auto-fill, minmax(240px,1fr)) !important; gap:18px !important; }
/* 顶部：大 banner + 右侧统计/引流，随全宽铺满 */
.p-hero{ grid-template-columns:1fr 340px !important; gap:20px !important; }
.banner-txt{ height:200px; }
.banner-img{ height:220px; }
/* 8 个分类卡满宽一行 */
.p-cats{ grid-template-columns:repeat(8,1fr) !important; gap:14px !important; }
/* 超大屏也别只挤在中间（去掉任何潜在限宽） */
main{ max-width:none !important; }


/* ============================================================
   v4：搜索加大 / 公告上顶栏 / 子分类选中加深 / 卡片收藏下移 / 播放器内嵌公告
   ============================================================ */
/* 搜索栏加大 */
.topbar .search{ flex:1 1 auto; max-width:760px; height:44px; margin:0 10px; }
.topbar .search input{ font-size:15px; }
/* 顶部引流公告（最右，紧凑） */
.hdr-ann{ flex:0 0 auto; display:flex; align-items:center; }
.hdr-ann .hm-ann{ margin:0; padding:8px 12px; font-size:12.5px; border-radius:10px; }
@media (max-width:820px){ .hdr-ann{ display:none !important; } }
/* 子分类选中：整块变深、加大（与大分类统一） */
.p-subchips .sc.on{ background:var(--accent) !important; color:#fff !important; border-color:var(--accent) !important; font-weight:700; }
/* 卡片：标题放大、收藏移到 ID 下面 */
.card .title{ font-size:14px; font-weight:700; line-height:1.32; margin-bottom:8px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.meta-row{ display:flex; align-items:flex-end; gap:8px; }
.meta-row .tags{ flex:0 1 auto; min-width:0; display:flex; flex-wrap:wrap; gap:4px; }
.meta-right{ margin-left:auto; display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:0 0 auto; }
.meta-right .card-idx{ font-size:11px; color:var(--text-3); font-weight:700; }
/* 手机一行一个卡片：收藏在 ID 下面 */
.mrc-foot{ display:flex; align-items:center; gap:10px; margin-top:8px; }
.mrc-foot .mrc-cd{ margin:0; }
.mrc-foot .fav-btn{ margin-left:auto; }
/* 播放器中间内嵌公告（桌面、不可关闭、点击复制） */
.ply-mid-ann{ display:none; }
@media (min-width:821px){
  .player-bar .player-title{ flex:0 1 auto; max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ply-mid-ann{ display:flex; align-items:center; gap:8px; flex:1 1 auto; justify-content:center; min-width:0; height:34px; padding:0 14px;
    background:linear-gradient(180deg,#fff7ed,#ffedd5); border:1px solid rgba(217,119,6,.22); border-radius:999px; font-size:12.5px; color:#8a4b08; overflow:hidden; }
  .ply-mid-ann .ic{ width:15px; height:15px; flex:0 0 auto; color:var(--warn); }
  .ply-mid-ann .pma-t{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .ply-mid-ann .pma-t b{ color:#b45309; }
  .ply-mid-ann .pma-cp{ flex:0 0 auto; font-size:11.5px; font-weight:700; color:#fff; background:var(--warn); border:0; border-radius:7px; padding:4px 12px; cursor:pointer; }
}


/* ============================================================
   v5：课件网格固定 6 列（更大）/ 卡片两行紧凑 / 编号深色高对比
   ============================================================ */
.wf-grid{ grid-template-columns:repeat(6,1fr) !important; gap:18px !important; }
@media (max-width:1150px){ .wf-grid{ grid-template-columns:repeat(3,1fr) !important; } }
/* 标题占满剩余宽度，编号跟在标题右边同一行 */
.card .title{ flex:1 1 auto; min-width:0; font-size:14px; font-weight:700; line-height:1.34; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.title-row{ display:flex; align-items:flex-start; gap:8px; }
.tags-row{ display:flex; align-items:center; gap:8px; margin-top:9px; }
/* 编号：深色高对比（去浅灰），浅蓝底深蓝字 */
.card-idx{ color:var(--accent-deep) !important; background:var(--accent-soft) !important; font-weight:800; }
/* 手机行卡编号也加深，别浅灰 */
.mrc-cd{ color:var(--text-2) !important; }

/* v5b：编号改为纯深蓝文字，去掉浅色胶囊底（老板不喜欢浅色配白底） */
.card-idx{ background:transparent !important; padding:0 !important; color:var(--accent-deep) !important; font-weight:800; }


/* ============================================================
   v6：课件ID 橙色打底 + 白字（购买暗号，处处醒目）
   ============================================================ */
.card-idx{ background:#f97316 !important; color:#fff !important; font-weight:800 !important; padding:2px 8px !important; border-radius:6px !important; letter-spacing:.3px; }
.mrc-cd{ background:#f97316 !important; color:#fff !important; font-weight:800 !important; padding:1px 7px !important; border-radius:5px !important; }
.ply-id{ flex:0 0 auto; background:#f97316; color:#fff; font-weight:800; font-size:12.5px; padding:3px 9px; border-radius:6px; margin-right:8px; letter-spacing:.3px; }
.ply-id:empty{ display:none; }
.ml-id{ flex:0 0 auto; background:#f97316; color:#fff; font-weight:800; font-size:12.5px; padding:3px 9px; border-radius:6px; margin-right:8px; letter-spacing:.3px; }
.ml-id:empty{ display:none; }


/* ============================================================
   v7：行卡收藏紧凑不溢出；落地页卡片内收藏
   ============================================================ */
.mrowcard{ overflow:hidden; }
.mrc-mid{ min-width:0; }
.mrc-foot{ flex-wrap:wrap; }
.mrc-foot .fav-btn{ height:24px; padding:0 9px; font-size:11.5px; }
.ml-meta{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; }
.ml-meta .ml-chips{ margin-top:0; }
.ml-cardfav{ height:30px; padding:0 13px; font-size:12.5px; border-radius:9px; }
.ml-cardfav.on{ color:#a2690a; background:var(--star-soft); }


/* v8：桌面——引流公告贴顶栏最右；砍掉轮播+统计(只手机端显示) */
.topbar .topbar-right{ flex:1 1 auto; min-width:0; }
.topbar .hdr-ann{ margin-left:auto; }
.p-hero{ display:none !important; }


/* v9：课件卡片分类标签文字加深、加粗，看得清（.tag.hot 仍用主色） */
.tag{ color:var(--text); font-weight:600; background:rgba(120,128,140,0.13); }


/* ============================================================
   v10：手机搜索态 = 干净搜索页（顶栏真输入 + 结果，无假框/轮播/宫格）
   ============================================================ */
.m-searchpg{ padding:12px 12px 24px; }
.m-results-hd{ font-size:14.5px; font-weight:800; margin:2px 2px 12px; }
.m-searchhint{ text-align:center; color:var(--text-3); font-size:13px; padding:46px 20px; }
/* 搜索态下顶栏里的搜索框占满、更醒目 */
body.msearch .topbar .search{ height:44px; border:1px solid #cfe0ff; background:#fff; }

/* ============================================================
   顶栏「教务资料」入口（2026-10-21 新增频道）
   ============================================================ */
.nav-docs{flex:0 0 auto;display:inline-flex;align-items:center;margin-left:8px;
  padding:7px 13px;border-radius:9px;font-size:13.5px;font-weight:600;
  color:var(--accent);background:var(--accent-soft);text-decoration:none;white-space:nowrap}
.nav-docs:hover{background:rgba(47,124,246,.16)}
@media (max-width:820px){
  .nav-docs{margin-left:6px;padding:5px 10px;font-size:12.5px}
}

/* ============================================================
   频道切换 Tab（2026-10-21）：交互课件 / 教务资料
   父级 .topbar 是 sticky → 一直置顶；选中态实心主色，一眼看清在哪个频道
   ============================================================ */
.ch-tabs{flex:0 0 auto;display:flex;gap:2px;padding:3px;margin-left:4px;
  background:#f1f4f9;border:1px solid var(--line);border-radius:11px}
.ch-tab{display:inline-flex;align-items:center;justify-content:center;
  padding:6px 15px;border-radius:8px;font-size:13.5px;font-weight:600;
  color:var(--text-2);text-decoration:none;white-space:nowrap;
  transition:background .16s,color .16s,box-shadow .16s}
.ch-tab:hover{color:var(--accent);background:rgba(255,255,255,.75)}
.ch-tab.on,.ch-tab.on:hover{background:var(--accent);color:#fff;
  box-shadow:0 1px 3px rgba(47,124,246,.35)}

/* 中小屏：Tab 收窄，别把搜索挤没 */
@media (max-width:1180px){
  .ch-tab{padding:6px 11px;font-size:13px}
}
/* 手机：Tab 独占一行、两个各占一半 —— 一直贴在顶栏，切换最顺手 */
@media (max-width:820px){
  .ch-tabs{order:3;width:100%;margin:8px 0 0;padding:3px;gap:3px}
  .ch-tab{flex:1 1 0;padding:8px 0;font-size:14px}
}
