/* 新版首页（site-v2）样式。类名统一用 sv2- 前缀，避免和网站现有 Bootstrap/简墨样式冲突。
   宽度规则对齐 B 站当前首页：
   >= 1560px 两侧留白 140px，内容最宽 1980px；1400–1559 留白 60px；1300–1399 内容固定 1180px；
   1140–1299 留白 60px；1024–1139 内容固定 1020px。
   每排卡片数：>= 1400px 5 张；1024–1399 4 张；768–1023 3 张；< 768 手机 2 张。 */

*, *::before, *::after { box-sizing: border-box; }

body.sv2 {
  margin: 0;
  font-family: var(--sv2-font-family);
  font-size: var(--sv2-font-size-sm);
  line-height: var(--sv2-line-height);
  color: var(--sv2-color-text);
  background: var(--sv2-color-bg);
}
.sv2 a { color: inherit; text-decoration: none; }
.sv2 button { font: inherit; }
.sv2 svg { width: 20px; height: 20px; flex-shrink: 0; }

.sv2-container {
  width: 100%;
  max-width: calc(var(--sv2-container) + 2 * var(--sv2-gutter));
  margin: 0 auto;
  padding: 0 var(--sv2-gutter);
}
/* 内容区在各宽度下都随窗口铺开，只调两侧留白 */
@media (max-width: 1559px) { :root { --sv2-gutter: 60px; } }
@media (max-width: 1023px) { :root { --sv2-gutter: 40px; } }

/* ---------- 新人优惠条（只对新注册用户显示） ---------- */
.sv2-newcomer { display: block; padding: 0 var(--sv2-space-6); background: linear-gradient(90deg, #f25b61, var(--sv2-color-primary)); color: #fff; font-size: 14px; }
.sv2-newcomer[hidden] { display: none; }
.sv2-newcomer:hover { filter: brightness(1.04); }
.sv2-newcomer__inner { display: flex; align-items: center; justify-content: center; gap: var(--sv2-space-4); min-height: 40px; white-space: nowrap; }
.sv2-newcomer__inner > svg { width: 20px; height: 20px; }
.sv2-newcomer__title { padding: 1px 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); }
.sv2-newcomer__copy { overflow: hidden; text-overflow: ellipsis; }
.sv2-newcomer__time { padding-left: var(--sv2-space-4); border-left: 1px solid rgba(255, 255, 255, 0.4); }
.sv2-newcomer__time b { font-variant-numeric: tabular-nums; }
.sv2-newcomer__link { padding: 2px 10px; border-radius: 12px; background: #fff; color: #f25b61; font-size: 13px; }

/* ---------- 页头 ---------- */
.sv2-top { position: relative; }
.sv2-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--sv2-header-height);
  color: #fff;
}
.sv2-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sv2-space-6);
  height: var(--sv2-header-height); /* 吸顶后页头下方多一排分类，页头本身变高，横条保持原高度 */
  padding: 0 var(--sv2-space-6);
}
.sv2-header__left,
.sv2-header__right { display: flex; align-items: center; flex: 1 1 0; min-width: 0; white-space: nowrap; }
.sv2-header__left { gap: var(--sv2-space-5); }
.sv2-header__right { gap: var(--sv2-space-5); justify-content: flex-end; }
.sv2-header__left a,
.sv2-entry { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.sv2-header__left a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.sv2-header__left a:hover,
.sv2-entry:hover { opacity: 0.8; }
.sv2-header__left svg { width: 18px; height: 18px; }
/* 左上角 logo：SiKi 字标 v2（黑色透明底，16px 高；普通屏用 64w 原图，高清屏用 3 倍图），所有宽度都显示
   （!important 盖过窄屏隐藏导航链接的规则）。右侧一条细竖线和导航分开 */
.sv2-header__logo {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  height: 28px;
  padding-right: var(--sv2-space-5);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  text-shadow: none !important;
  transition: opacity 0.2s;
}
.sv2-header__logo:hover { opacity: 0.75 !important; }
.sv2-header__brand {
  display: block;
  width: auto;
  height: 16px;
  filter: invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); /* 原图是黑色，深色横幅上反白，加一点阴影压住游戏背景 */
  transition: filter 0.2s;
}
.sv2-header.is-fixed .sv2-header__logo { border-right-color: var(--sv2-color-border); }
.sv2-header.is-fixed .sv2-header__brand { filter: none; } /* 白底页头上显示原本的黑色 */
/* 导航放不下时先收起系统课/单卖课，再收起全部课程（下面频道栏里都有） */
@media (max-width: 1349px) { .sv2-header__left a:nth-child(n+4) { display: none; } }
@media (max-width: 1099px) { .sv2-header__left a:nth-child(n+3) { display: none; } }
/* 窄桌面左右两组按内容宽度，搜索框收窄，避免右侧按钮压到搜索框上 */
@media (max-width: 1279px) {
  .sv2-header__left, .sv2-header__right { flex: 1 0 auto; }
  .sv2-search { min-width: 180px; }
}

.sv2-search {
  display: flex;
  align-items: center;
  flex: 0 1 500px;
  height: 40px;
  padding: 0 4px 0 var(--sv2-space-4);
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  transition: background 0.2s;
}
.sv2-search:focus-within { background: #fff; box-shadow: var(--sv2-shadow-pop); }
.sv2-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sv2-color-text);
  font: inherit;
}
.sv2-search input::placeholder { color: var(--sv2-color-text-muted); }
.sv2-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sv2-color-text);
  cursor: pointer;
}
.sv2-search button:hover { background: var(--sv2-color-chip); }

.sv2-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sv2-color-accent);
  color: #fff;
  font-size: var(--sv2-font-size-xs);
  text-shadow: none;
}
.sv2-entry { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; line-height: 1; }
.sv2-study {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sv2-space-4);
  border-radius: 8px;
  background: var(--sv2-color-primary);
  color: #fff;
  font-size: 14px;
}
.sv2-study:hover { background: var(--sv2-color-primary-dark); }
.sv2-study svg { width: 18px; height: 18px; }

/* 滚动后吸顶：白底深色字 */
.sv2-header.is-fixed {
  position: fixed;
  background: #fff;
  color: var(--sv2-color-text-secondary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  animation: sv2-drop 0.2s ease;
}
.sv2-header.is-fixed .sv2-header__left a,
.sv2-header.is-fixed .sv2-entry { text-shadow: none; color: var(--sv2-color-text); }
.sv2-header.is-fixed .sv2-search { background: var(--sv2-color-chip); border-color: var(--sv2-color-border); }
@keyframes sv2-drop { from { transform: translateY(-100%); } to { transform: none; } }

/* 吸顶后横条下方的课程分类：一排灰色标签，放不下的收起，右侧箭头展开（home.js 判断是否放得下）。手机宽度不显示 */
.sv2-header__cats { display: none; }
.sv2-header.is-fixed { height: auto; }
.sv2-header.is-fixed .sv2-header__cats { display: block; border-top: 1px solid var(--sv2-color-border); }
.sv2-header__cats-inner { display: flex; align-items: flex-start; gap: var(--sv2-space-5); padding-top: 10px; padding-bottom: 10px; }
.sv2-header__cats-icons { display: flex; flex: 0 0 auto; align-items: center; gap: var(--sv2-space-5); height: 32px; padding-right: var(--sv2-space-5); border-right: 1px solid var(--sv2-color-border); }
.sv2-header__cats-icons a { display: inline-flex; align-items: center; gap: 4px; color: var(--sv2-color-text-secondary); font-size: 13px; }
.sv2-header__cats-icons a:hover { color: var(--sv2-color-primary); }
.sv2-header__cats-icons svg { width: 16px; height: 16px; }
.sv2-header__cats-list {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); /* 分类少、一排放得下时标签拉宽铺满 */
  grid-auto-rows: 32px;
  gap: 8px 12px;
  max-height: 32px;
  overflow: hidden;
}
.sv2-header__cats.is-open .sv2-header__cats-list { max-height: none; }
.sv2-header__cats-list .sv2-chip { display: block; height: 32px; padding: 0 8px; overflow: hidden; font-size: 13px; line-height: 32px; text-align: center; text-overflow: ellipsis; }
.sv2-header__cats-more { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--sv2-color-text-secondary); cursor: pointer; }
.sv2-header__cats-more[hidden] { display: none; }
.sv2-header__cats-more:hover { background: var(--sv2-color-chip); }
.sv2-header__cats-more svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform 0.2s; }
.sv2-header__cats.is-open .sv2-header__cats-more svg { transform: rotate(-90deg); }
@media (max-width: 767px) { .sv2-header.is-fixed .sv2-header__cats { display: none; } }

/* ---------- 横幅 ---------- */
.sv2-banner { position: relative; height: 155px; overflow: hidden; background: #160f30; }
.sv2-banner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 80px;
  pointer-events: none; /* 不挡住下面小游戏的点击 */
  background: linear-gradient(rgba(0, 0, 0, 0.28), transparent);
}
.sv2-wordmark {
  font-size: 44px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 1px;
  color: #fff;
  -webkit-text-stroke: 2px var(--sv2-color-primary);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 rgba(247, 99, 143, 0.35);
}

/* ---------- 横幅像素小游戏：整块横幅背景就是游戏画面，logo 和页头叠在上面 ---------- */
.sv2-game {
  position: absolute;
  inset: 0;
  cursor: pointer;
  outline: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sv2-game canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
/* 得分和音效开关：页头下方、内容区右边对齐 */
.sv2-game__bar {
  position: absolute;
  top: calc(var(--sv2-header-height) + 6px);
  right: max(var(--sv2-gutter), calc((100% - var(--sv2-container)) / 2));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sv2-game__hud { color: #d6c8ff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.sv2-game__sound {
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #e9e3ff;
  font: inherit;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}
.sv2-game__sound:hover { background: rgba(255, 255, 255, 0.24); }
.sv2-game__sound[aria-pressed="false"] { opacity: 0.6; text-decoration: line-through; }
/* 提示：页头下方，跑道区域居中（left 由脚本按 logo 位置算） */
.sv2-game__hint {
  position: absolute;
  top: calc(var(--sv2-header-height) + 6px);
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 2px 10px;
  border: 1px solid rgba(160, 130, 255, 0.4);
  border-radius: 10px;
  background: rgba(12, 9, 28, 0.8);
  color: #e9e3ff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.sv2-game__hint[hidden] { display: none; }

/* ---------- 频道分类 ---------- */
.sv2-channels__inner { display: flex; align-items: center; gap: var(--sv2-space-6); padding-top: var(--sv2-space-5); padding-bottom: 0; } /* 下方间距由课程区 margin-top 提供，和上方横幅到分类的间距相同 */
.sv2-channels__icons { display: flex; gap: var(--sv2-space-5); }
.sv2-channel-icon { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--sv2-font-size-xs); color: var(--sv2-color-text-secondary); }
.sv2-channel-icon:hover { color: var(--sv2-color-primary); }
.sv2-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
}
.sv2-round svg { width: 24px; height: 24px; }
.sv2-round--sm { width: 36px; height: 36px; }
.sv2-round--sm svg { width: 20px; height: 20px; }
.sv2-round--orange { background: #ff9212; }
.sv2-round--red { background: #ff6a49; }
.sv2-round--blue { background: var(--sv2-color-accent); }
.sv2-round--pink { background: var(--sv2-color-primary); }

.sv2-channels__list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr)); /* 13 个分类 + 全部课程 = 2 排 */
  gap: 10px 12px;
  padding: 0 var(--sv2-space-6);
  border-left: 1px solid var(--sv2-color-border);
  border-right: 1px solid var(--sv2-color-border);
}
.sv2-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 6px;
  background: var(--sv2-color-chip);
  color: var(--sv2-color-text-secondary);
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s;
}
.sv2-chip:hover { background: var(--sv2-color-border); }
.sv2-chip--home { display: none; }

/* 导航二级菜单：鼠标移到分类标签上展开（键盘聚焦也展开） */
.sv2-navitem { position: relative; min-width: 0; }
.sv2-navitem > .sv2-chip { width: 100%; }
.sv2-drop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  min-width: 220px;
  margin-top: 6px;
  padding: var(--sv2-space-2) 0;
  border: 1px solid var(--sv2-color-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--sv2-shadow-pop);
}
.sv2-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* 鼠标从标签移到菜单时不断开 */
.sv2-drop a { padding: 7px var(--sv2-space-4); color: var(--sv2-color-text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv2-drop a:hover { background: var(--sv2-color-chip); color: var(--sv2-color-accent); }
.sv2-drop--right { left: auto; right: 0; }
.sv2-drop--center { left: 50%; transform: translateX(-50%); }
.sv2-drop--cols { display: none; grid-template-columns: repeat(2, 260px); }
.sv2-navitem:hover > .sv2-drop,
.sv2-navitem:focus-within > .sv2-drop { display: flex; }
.sv2-navitem:hover > .sv2-drop--cols,
.sv2-navitem:focus-within > .sv2-drop--cols { display: grid; }

/* 分类右侧：学习路线、开发软件合集 */
.sv2-channels__extra { display: flex; flex-direction: column; gap: 10px; }
.sv2-extra { display: flex; align-items: center; gap: 6px; height: 34px; color: var(--sv2-color-text-secondary); font-size: 14px; white-space: nowrap; }
.sv2-extra:hover { color: var(--sv2-color-primary); }
.sv2-extra svg { width: 18px; height: 18px; }

/* 每日签到：分类最右侧的圆形图标（同左侧“全部课程”“A计划”）；已签到变灰绿；提示条在页面上方居中，几秒后自动淡出 */
.sv2-round--green { background: #1fbd78; }
.sv2-round--gold { background: #f5a623; }
.sv2-community { flex-shrink: 0; }
.sv2-community .sv2-round { transition: transform 0.2s; }
.sv2-community:hover .sv2-round { transform: translateY(-2px); }
.sv2-sign { flex-shrink: 0; padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.sv2-sign b { font-weight: 400; }
.sv2-sign .sv2-round { transition: transform 0.2s, background 0.2s; }
.sv2-sign:hover .sv2-round { transform: translateY(-2px); }
.sv2-sign.is-signed .sv2-round { background: #9fdcc1; }
.sv2-sign:disabled { cursor: default; opacity: 0.7; }
.sv2-toast { position: fixed; top: 0; left: 0; z-index: 1100; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 10px; background: rgba(24, 25, 28, 0.88); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); color: #fff; font-size: 15px; line-height: 1.5; opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.sv2-toast.is-show { opacity: 1; transform: none; }
.sv2-toast svg { flex-shrink: 0; width: 22px; height: 22px; color: #3ddc97; }
.sv2-toast b { color: #ffd54a; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .sv2-toast, .sv2-sign .sv2-round, .sv2-community .sv2-round { transition: none; } }

/* ---------- 排行榜（“更多好课”第一排最右一格，签到榜 / 学习榜） ---------- */
/* 固定在第一排最后一列，占第一批系统课的位置（接口 rank=1：第一批不带系统课，之后每批的系统课仍在每排最右）；
   dense 让加载进来的课程卡片先填满它左边的格子 */
.sv2-grid--rank { grid-auto-flow: row dense; }
.sv2-rank { grid-column: -2 / -1; grid-row: 1; display: flex; flex-direction: column; min-width: 0; padding: 10px 14px 12px; border: 1px solid #f3e3e9; border-radius: var(--sv2-radius-lg); background: linear-gradient(180deg, var(--sv2-color-primary-soft) 0, #fff 96px); }
.sv2-rank__tabs { display: flex; gap: var(--sv2-space-4); border-bottom: 1px solid var(--sv2-color-border); }
.sv2-rank__tab { position: relative; padding: 2px 0 8px; border: 0; background: none; color: var(--sv2-color-text-secondary); font-size: 15px; cursor: pointer; }
.sv2-rank__tab:hover { color: var(--sv2-color-primary); }
.sv2-rank__tab.is-active { color: var(--sv2-color-text); font-weight: 600; }
.sv2-rank__tab.is-active::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 20px; height: 3px; border-radius: 2px; background: var(--sv2-color-primary); transform: translateX(-50%); }
/* 课程卡片加载进来后，排行榜不参与决定行高（contain: size），高度跟同排卡片一致；5 行名次在里面均分，每行 24–34px */
.sv2-grid--rank:has(> .sv2-vcard) .sv2-rank { contain: size; }
.sv2-rank__panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sv2-rank__panel[hidden] { display: none; }
.sv2-rank__note { margin: 6px 0 2px; color: var(--sv2-color-text-muted); font-size: var(--sv2-font-size-xs); }
.sv2-rank__list { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 0; overflow: hidden; list-style: none; }
.sv2-rank__item { flex: 1 1 0; display: flex; align-items: center; gap: var(--sv2-space-2); min-height: 24px; max-height: 34px; }
.sv2-rank__no { flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px; background: var(--sv2-color-chip); color: var(--sv2-color-text-muted); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.sv2-rank__no--1 { background: #ffb400; color: #fff; }
.sv2-rank__no--2 { background: #9fb0c8; color: #fff; }
.sv2-rank__no--3 { background: #e39a62; color: #fff; }
.sv2-rank__user { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sv2-space-2); color: var(--sv2-color-text); font-size: 14px; }
.sv2-rank__user:hover { color: var(--sv2-color-primary); }
.sv2-rank__user img { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #eee; }
.sv2-rank__user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv2-rank__value { flex-shrink: 0; color: var(--sv2-color-primary); font-size: 13px; font-style: normal; font-weight: 600; }
.sv2-rank__empty { margin: 24px 0; color: var(--sv2-color-text-muted); font-size: 13px; text-align: center; }

/* ---------- 网格 ---------- */
.sv2-grid,
.sv2-feed {
  display: grid;
  grid-template-columns: repeat(var(--sv2-cols), minmax(0, 1fr));
  gap: var(--sv2-space-5);
  row-gap: var(--sv2-space-6);
}

/* 卡片数量随列数取整行：
   推荐流 = 轮播旁 (列数-2)×2 张 + 下面 1 整行；系统课 2 整行 */
.sv2-feed__cards > :nth-child(n+12),
[data-sv2-classrooms] > :nth-child(n+11) { display: none; }

/* ---------- 网校课程分类筛选 ---------- */
.sv2-feedbar { display: flex; align-items: center; gap: var(--sv2-space-4); height: 40px; margin: var(--sv2-space-1) 0 var(--sv2-space-3); }
.sv2-feedbar__title { margin: 0; font-size: 20px; font-weight: 500; white-space: nowrap; }
.sv2-filter { flex: 1; min-width: 0; display: flex; gap: var(--sv2-space-1); overflow-x: auto; scrollbar-width: none; }
.sv2-filter::-webkit-scrollbar { display: none; }
.sv2-filter button {
  flex: 0 0 auto;
  padding: 3px var(--sv2-space-3);
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--sv2-color-text-secondary);
  white-space: nowrap;
  cursor: pointer;
}
.sv2-filter button:hover { color: var(--sv2-color-accent); }
.sv2-filter button.is-active { background: var(--sv2-color-accent-soft); color: var(--sv2-color-accent); }

/* ---------- 首屏推荐流 ---------- */
.sv2-feed { position: relative; margin-top: var(--sv2-space-5); }
.sv2-feed__cards { display: contents; }
.sv2-feed__empty { grid-column: 3 / -1; display: flex; align-items: center; justify-content: center; color: var(--sv2-color-text-muted); }
.sv2-feed__empty a { color: var(--sv2-color-accent); }
/* 换一换：推荐流右侧竖排按钮，留白够宽（≥1400）时显示；窄屏用右下角“刷新” */
.sv2-roll {
  position: absolute;
  top: 0;
  right: -50px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 40px;
  padding: 12px 0;
  border: 1px solid var(--sv2-color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--sv2-color-text);
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
.sv2-roll:hover { background: var(--sv2-color-chip); }
.sv2-roll svg { width: 18px; height: 18px; transition: transform 0.4s; }
.sv2-roll:hover svg { transform: rotate(-180deg); }
@media (min-width: 1400px) { .sv2-roll { display: flex; } }

.sv2-carousel {
  position: relative;
  grid-column: span 2;
  grid-row: span 2;
  min-height: 280px;
  overflow: hidden;
  border-radius: var(--sv2-radius-md);
  background: #333;
}
.sv2-carousel__track { position: absolute; inset: 0; display: flex; transition: transform 0.5s ease; }
.sv2-carousel__slide { position: relative; flex: 0 0 100%; height: 100%; container-type: inline-size; }
/* 图片完整显示；比例和框不一致时（如沿用旧首页 1140×450 海报），空白处用同一张图放大模糊铺底。
   新首页轮播区块建议尺寸 780×600：电脑端（≥1024）轮播框固定为同样的 780:600，最宽 780×600，图片按原比例铺满不裁切；平板手机仍完整显示 */
.sv2-carousel__slide { overflow: hidden; }
.sv2-carousel__blur { position: absolute; inset: 0; background: center / cover no-repeat; filter: blur(28px) brightness(0.85); transform: scale(1.25); }
.sv2-carousel__slide > img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; object-position: center 35%; }
/* 框比两排卡片矮时贴顶，下面留白。新轮播区块的图也按 contain 整张缩放进框（2026-11-18），
   尺寸不是 780×600 的海报不再被裁切，空白处同样用模糊图铺底；780×600 的图和框比例相同，显示不变 */
@media (min-width: 1024px) {
  .sv2-carousel { aspect-ratio: 780 / 600; align-self: start; min-height: 0; }
}
.sv2-carousel__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: var(--sv2-space-3);
  padding: 50px var(--sv2-space-4) var(--sv2-space-4);
  color: #fff;
  background: linear-gradient(transparent, var(--sv2-slide-color, rgba(0, 0, 0, 0.7)) 62%);
}
.sv2-carousel__title {
  flex: 1;
  min-width: 0;
  font-size: var(--sv2-font-size-lg);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sv2-carousel__dots { position: absolute; left: var(--sv2-space-4); bottom: 6px; display: flex; gap: 6px; }
.sv2-carousel__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.2s;
}
.sv2-carousel__dot.is-active { width: 16px; background: #fff; }
.sv2-carousel__arrows { display: flex; gap: 8px; }
.sv2-carousel__arrows button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
}
/* 箭头用 SVG 图标（i-arrow 朝右，上一张翻转），字符 ‹ › 在字体里偏上偏左，按钮里看起来不居中 */
.sv2-carousel__arrows svg { width: 18px; height: 18px; }
.sv2-carousel__prev { transform: scaleX(-1); }
.sv2-carousel__arrows button:hover { background: rgba(255, 255, 255, 0.3); }

/* ---------- 视频样式卡片 ---------- */
.sv2-vcard { display: flex; flex-direction: column; min-width: 0; }
.sv2-vcard__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--sv2-radius-md);
  container-type: inline-size;
  background: #eee;
}
/* 真实封面图：铺满 16:9，悬停微放大 */
.sv2-vcard__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.sv2-vcard:hover .sv2-vcard__img { transform: scale(1.05); }
/* 所有班级卡片（含搜索列表）统一按原封面 3:2 完整显示 */
.sv2-vcard__cover--room { aspect-ratio: 3 / 2; }
.sv2-vcard__cover--room .sv2-vcard__img { object-fit: contain; }
.sv2-vcard__cover--room .sv2-vcard__blur { display: none; }
.sv2-vcard__blur { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); object-fit: cover; filter: blur(12px) brightness(0.8); }
[data-sv2-classrooms] .sv2-vcard__cover { aspect-ratio: 3 / 2; }
[data-sv2-classrooms] .sv2-vcard__blur { display: none; }
/* 混在课程流里：卡片宽度取一列的 27/32 并居中，3:2 封面高度正好等于相邻 16:9 课程封面，不再用模糊图补两侧 */
.sv2-vcard--room-mixed { width: calc(100% * 27 / 32); margin: 0 auto; }
.sv2-vcard--room-mixed .sv2-vcard__cover { aspect-ratio: 3 / 2; }
.sv2-vcard--room-mixed .sv2-vcard__blur { display: none; }
.sv2-vcard__stats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--sv2-space-3);
  padding: 20px 8px 6px;
  color: #fff;
  font-size: 13px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}
.sv2-vcard__stats span { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
/* 班级有进行中的优惠活动时，封面左上角的角标 */
.sv2-vcard__promo { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 8px; border-radius: 4px; background: linear-gradient(90deg, #e8482a, #d92d20); color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; max-width: calc(100% - 64px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } /* 显示后台设置的活动名，过长省略，右上角留给“永久”角标 */
.sv2-vcard__stats svg { width: 18px; height: 18px; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.45)); } /* 参照 B 站卡片：播放图标 18px、文字 13px；浅阴影让图标在亮色封面上也看得清 */
.sv2-vcard__dur { margin-left: auto; }
.sv2-vcard__title {
  margin: var(--sv2-space-2) 0 0;
  font-size: var(--sv2-font-size-md);
  font-weight: 500;
  line-height: 22px;
  max-height: 44px; /* 最多两行；只有一行时下面的署名行跟着上移（2026-11-19 用户要求） */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.sv2-vcard:hover .sv2-vcard__title { color: var(--sv2-color-accent); }
.sv2-vcard__info {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--sv2-color-text-muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.sv2-vcard__info svg { flex: 0 0 auto; width: 18px; height: 18px; } /* 参照 B 站 UP 图标大小（方框约 14×12） */
/* 署名前的字母方块（SVG，和原图标同尺寸）：同一组卡片依次显示 S、i、K、i（SiKi），按卡片在组里的位置决定，滚动加载的新卡片自动接上 */
.sv2-vcard__mark use { display: none; }
.sv2-vcard:nth-child(4n+1) .sv2-vcard__mark-s,
.sv2-vcard:nth-child(2n) .sv2-vcard__mark-i,
.sv2-vcard:nth-child(4n+3) .sv2-vcard__mark-k { display: inline; }
.sv2-vcard__name { overflow: hidden; text-overflow: ellipsis; }
.sv2-vcard__info:hover .sv2-vcard__name { color: var(--sv2-color-accent); }
.sv2-price { margin-left: auto; padding-left: 4px; color: var(--sv2-color-price); font-weight: 600; }
.sv2-price--free { color: var(--sv2-color-accent); }

/* ---------- 板块 ---------- */
.sv2-section { margin-top: var(--sv2-space-10); }
.sv2-section__head { display: flex; align-items: center; gap: var(--sv2-space-3); height: 40px; margin-bottom: var(--sv2-space-4); }
.sv2-section__title { margin: 0; font-size: 24px; font-weight: 400; white-space: nowrap; }
.sv2-section__head .sv2-tool { margin-left: auto; }
.sv2-tool {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--sv2-space-3);
  border: 1px solid var(--sv2-color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--sv2-color-text);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.sv2-tool:hover { background: var(--sv2-color-chip); }

/* ---------- 页脚 ---------- */
.sv2-footer { margin-top: 56px; padding: var(--sv2-space-8) 0; border-top: 1px solid var(--sv2-color-border); color: var(--sv2-color-text-muted); font-size: var(--sv2-font-size-xs); }
.sv2-footer__main { display: flex; justify-content: space-between; gap: var(--sv2-space-8); padding-bottom: var(--sv2-space-6); border-bottom: 1px solid var(--sv2-color-border); }
.sv2-footer__cols { display: grid; grid-template-columns: repeat(7, auto); gap: var(--sv2-space-4) 48px; } /* 区块 5 栏 + 代码补的 Cocos、Godot */
.sv2-footer__cols h3 { margin: 0 0 var(--sv2-space-3); color: var(--sv2-color-text); font-size: 14px; font-weight: 500; }
.sv2-footer__cols a { display: block; color: var(--sv2-color-text-secondary); font-size: var(--sv2-font-size-sm); line-height: 24px; }
.sv2-footer__cols a:hover { color: var(--sv2-color-accent); }
.sv2-footer__brand { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sv2-space-3); }
.sv2-wordmark--sm { font-size: 28px; -webkit-text-stroke-width: 1.5px; text-shadow: 2px 2px 0 rgba(247, 99, 143, 0.35); }
.sv2-footer__sns { display: flex; gap: var(--sv2-space-4); color: var(--sv2-color-text-secondary); font-size: var(--sv2-font-size-sm); }
.sv2-footer__sns a:hover { color: var(--sv2-color-accent); }
.sv2-footer__qr { position: relative; cursor: pointer; }
.sv2-footer__qr img { position: absolute; right: 0; bottom: calc(100% + 8px); display: none; width: 120px; height: 120px; padding: 6px; border: 1px solid var(--sv2-color-border); border-radius: 8px; background: #fff; box-shadow: var(--sv2-shadow-pop); }
.sv2-footer__qr:hover img,
.sv2-footer__qr:focus img { display: block; }
.sv2-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sv2-space-2) var(--sv2-space-6); margin-top: var(--sv2-space-6); color: var(--sv2-color-text-secondary); font-size: var(--sv2-font-size-sm); }
.sv2-footer__links a:hover { color: var(--sv2-color-accent); }
.sv2-footer__bottom { margin-top: var(--sv2-space-4); text-align: center; }

/* 右下角悬浮按钮：咨询一直显示，刷新、顶部往下滚动后出现 */
.sv2-float { position: fixed; right: 24px; bottom: 40px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.sv2-float__btn--scroll { display: none !important; }
.sv2-float.is-show .sv2-float__btn--scroll { display: flex !important; }
.sv2-float__btn--consult { color: var(--sv2-color-primary); }
.sv2-consult { position: relative; }
.sv2-consult__panel {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  display: none;
  width: 340px;
  overflow: visible;
  border: 1px solid var(--sv2-color-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  line-height: 1.5;
  color: var(--sv2-color-text);
}
.sv2-consult__panel::after { content: ""; position: absolute; top: 0; bottom: 0; right: -14px; width: 14px; } /* 鼠标移到面板时不断开 */
.sv2-consult:hover .sv2-consult__panel,
.sv2-consult.is-open .sv2-consult__panel { display: block; }
.sv2-consult__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 13px 13px 0 0; background: linear-gradient(120deg, #1fa3e5, #4fc3f7); color: #fff; }
.sv2-consult__head i { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.sv2-consult__head i svg { width: 22px; height: 22px; }
.sv2-consult__head h3 { margin: 0; font-size: 16px; font-weight: 600; color: #fff; }
.sv2-consult__head p { margin: 2px 0 0; font-size: 12px; opacity: 0.9; }
.sv2-consult__body { padding: 6px 18px 16px; }
.sv2-consult__body section { padding: 12px 0; border-bottom: 1px dashed var(--sv2-color-border); }
.sv2-consult__body section:last-child { border-bottom: 0; padding-bottom: 0; }
.sv2-consult__body h4 { margin: 0 0 8px; color: var(--sv2-color-text-muted); font-size: 12px; font-weight: 400; }
.sv2-consult__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sv2-consult__chips > * { padding: 3px 10px; border-radius: 999px; background: var(--sv2-color-accent-soft); color: var(--sv2-color-accent); font-size: 12px; white-space: nowrap; transition: background-color 0.2s, color 0.2s; }
.sv2 .sv2-consult__chips > a:hover { background: var(--sv2-color-accent); color: #fff; }
.sv2-consult__contact { display: flex; align-items: center; gap: 14px; }
.sv2-consult__qr { flex-shrink: 0; width: 92px; height: 92px; padding: 4px; border: 1px solid var(--sv2-color-border); border-radius: 8px; object-fit: contain; background: #fff; }
.sv2-consult__lines { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sv2-consult__lines b { display: flex; align-items: center; gap: 6px; font-weight: 500; color: #07c160; }
.sv2-consult__lines p { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--sv2-color-text-secondary); font-size: 12px; overflow-wrap: break-word; }
.sv2-consult__lines svg { width: 14px; height: 14px; margin-top: 2px; }
.sv2-consult__lines b svg { margin-top: 0; width: 16px; height: 16px; }
.sv2-consult__lines a { color: var(--sv2-color-accent); }
.sv2-float__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--sv2-color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--sv2-color-text-secondary);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.sv2-float__btn:hover { color: var(--sv2-color-accent); }
.sv2-float__btn svg { width: 16px; height: 16px; }
.sv2-float__btn span { font-size: 12px; white-space: nowrap; }
.sv2-float__btn { padding: 0; } /* 去掉按钮默认内边距，“QQ群”三个字能排在一行 */

/* ---------- 往下滚动加载更多：底部状态条（同时是触发加载的观察点） ---------- */
.sv2-more-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sv2-space-2);
  height: 72px;
  color: var(--sv2-color-text-muted);
  font-size: var(--sv2-font-size-sm);
}
.sv2-more-status.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--sv2-color-border);
  border-top-color: var(--sv2-color-primary);
  border-radius: 50%;
  animation: sv2-spin 0.8s linear infinite;
}
.sv2-more-status a,
.sv2-more-status button { padding: 0; border: 0; background: none; color: var(--sv2-color-accent); cursor: pointer; }
@keyframes sv2-spin { to { transform: rotate(360deg); } }

/* ---------- 1024–1399：每排 4 张（同 B 站） ---------- */
@media (max-width: 1399px) {
  :root { --sv2-cols: 4; }
  .sv2-feed__cards > :nth-child(n+9),
  [data-sv2-classrooms] > :nth-child(n+9) { display: none; }
}
@media (max-width: 1279px) {
  .sv2-channels__extra { display: none; }
  .sv2-channels__list { border-right: 0; padding-right: 0; }
  .sv2-footer__cols { gap: var(--sv2-space-4) 32px; }
  .sv2-entry span { display: none; }
  .sv2-header__left a:nth-child(n+7) { display: none; }
}

/* ---------- 768–1023：每排 3 张 ---------- */
@media (max-width: 1023px) {
  :root { --sv2-cols: 3; }
  .sv2-carousel { grid-column: 1 / -1; grid-row: auto; min-height: 0; aspect-ratio: 16 / 7; }
  .sv2-feed__cards > :nth-child(n+7) { display: none; }
  [data-sv2-classrooms] > :nth-child(n+7) { display: none; }
  .sv2-header__left a:not(.sv2-header__home) { display: none; }
  .sv2-header__left, .sv2-header__right { flex: 0 0 auto; }
  .sv2-search { margin: 0 auto; }
  .sv2-entry, .sv2-study { display: none; }
  .sv2-channels__icons, .sv2-sign, .sv2-community { display: none; }
  .sv2-channels__list { border-left: 0; padding-left: 0; }
  .sv2-feed__empty { grid-column: 1 / -1; padding: var(--sv2-space-8) 0; }
  .sv2-newcomer__copy { display: none; }
  .sv2-footer__main { flex-direction: column; }
  .sv2-footer__cols { grid-template-columns: repeat(3, auto); justify-content: start; }
  .sv2-footer__brand { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- 手机 < 768：白色吸顶页头 + 横滑分类，每排 2 张 ---------- */
@media (max-width: 767px) {
  :root { --sv2-header-height: 52px; --sv2-cols: 2; --sv2-gutter: 12px; }
  .sv2-rank, .sv2-grid--rank:has(> .sv2-vcard) .sv2-rank { grid-column: 1 / -1; contain: none; } /* 一格太窄：独占第一排，高度按内容 */
  .sv2-rank__item { flex: none; height: 34px; }

  .sv2-header,
  .sv2-header.is-fixed { position: sticky; background: #fff; color: var(--sv2-color-text); box-shadow: none; animation: none; }
  .sv2-header__inner { gap: var(--sv2-space-3); padding: 0 var(--sv2-space-3); }
  .sv2-header__left a { text-shadow: none; }
  .sv2-header__left a.sv2-header__home { display: none; }
  .sv2-header__logo { display: inline-flex !important; padding-right: 0; border-right: 0; }
  .sv2-header__brand { height: 16px; filter: none; } /* 手机页头是白底 */  .sv2-search { flex: 1; height: 34px; background: var(--sv2-color-chip); border-radius: 17px; }
  .sv2-avatar { width: 32px; height: 32px; }
  .sv2-banner { display: none; }

  .sv2-channels { position: sticky; top: var(--sv2-header-height); z-index: 90; background: #fff; border-bottom: 1px solid var(--sv2-color-border); }
  .sv2-channels__inner { padding-top: 0; padding-bottom: 0; }
  .sv2-channels__list { display: flex; gap: var(--sv2-space-5); overflow-x: auto; scrollbar-width: none; }
  .sv2-channels__list::-webkit-scrollbar { display: none; }
  .sv2-chip, .sv2-chip--home { display: flex; position: relative; flex: 0 0 auto; height: 40px; padding: 0; background: none; font-size: 15px; }
  .sv2-navitem { flex: 0 0 auto; position: static; }
  .sv2-drop, .sv2-navitem:hover > .sv2-drop, .sv2-navitem:focus-within > .sv2-drop { display: none; } /* 手机上标签直接跳转，不展开菜单 */
  .sv2-register { display: none; }
  .sv2-newcomer { padding: 0 10px; font-size: 12px; }
  .sv2-newcomer__inner { justify-content: flex-start; gap: 8px; min-height: 40px; }
  .sv2-newcomer__inner > svg { display: none; }
  .sv2-newcomer__time { padding-left: 0; border: 0; }
  .sv2-newcomer__link { margin-left: auto; padding: 2px 8px; font-size: 12px; }
  .sv2-feedbar { gap: var(--sv2-space-2); height: 36px; margin: var(--sv2-space-3) 0 var(--sv2-space-2); }
  .sv2-feedbar__title { font-size: var(--sv2-font-size-md); }
  .sv2-feedbar .sv2-tool { display: none; }
  .sv2-footer__cols { grid-template-columns: repeat(2, auto); }
  .sv2-consult__panel { width: min(340px, calc(100vw - 80px)); }
  .sv2-chip:hover { background: none; }
  .sv2-chip.is-active { color: var(--sv2-color-primary); font-weight: 600; }
  .sv2-chip.is-active::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--sv2-color-primary); }

  .sv2-grid, .sv2-feed { gap: 10px; row-gap: var(--sv2-space-4); }
  .sv2-feed { margin-top: var(--sv2-space-3); }
  .sv2-carousel { aspect-ratio: 16 / 9; border-radius: var(--sv2-radius-md); }
  .sv2-carousel__title { font-size: var(--sv2-font-size-md); }
  .sv2-carousel__arrows { display: none; }
  .sv2-feed__cards > :nth-child(n+7) { display: flex; }
  .sv2-feed__cards > :nth-child(n+11) { display: none; }
  [data-sv2-classrooms] > :nth-child(n+7) { display: flex; }
  [data-sv2-classrooms] > :nth-child(n+9) { display: none; }

  .sv2-section { margin-top: var(--sv2-space-6); }
  .sv2-section__head { height: 32px; margin-bottom: var(--sv2-space-3); }
  .sv2-section__title { font-size: var(--sv2-font-size-lg); }
  .sv2-round--sm { width: 28px; height: 28px; }
  .sv2-round--sm svg { width: 16px; height: 16px; }

  .sv2-vcard__title { font-size: 13px; line-height: 18px; max-height: 36px; margin-top: 6px; }
  .sv2-vcard__info { font-size: 12px; }
  .sv2-vcard__stats { gap: var(--sv2-space-2); font-size: 12px; padding: 16px 6px 4px; }
  .sv2-vcard__stats span:nth-child(2):not(:last-child) { display: none; }

  .sv2-float { right: 12px; bottom: 20px; }
}

/* ---------- 接入网站：和 Bootstrap / 简墨主题共存 ---------- */
body.sv2 .es-wrap { padding: 0; background: none; }
.sv2 h2, .sv2 h3 { line-height: inherit; }
.sv2 a:hover, .sv2 a:focus { text-decoration: none; }
/* 鼠标点击后不显示 Bootstrap 的黑色焦点框（a:focus outline）；键盘 Tab 聚焦时仍显示 */
.sv2 a:focus:not(:focus-visible), .sv2 button:focus:not(:focus-visible) { outline: 0; }
.sv2-avatar { overflow: hidden; }
.sv2-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sv2-user__name { font-weight: 500; }
.sv2-entry { position: relative; }
.sv2-badge { position: absolute; top: -6px; left: 50%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--sv2-color-primary); color: #fff; font-size: 11px; font-weight: 400; line-height: 16px; text-align: center; text-shadow: none; }
.sv2-feed__cards.is-loading { opacity: 0.5; pointer-events: none; transition: opacity 0.2s; }

/* 卡片价格：内容由网站已有价格模板输出（含促销、折扣、免费），这里只统一成卡片里的一行 */
.sv2-price .course-price-widget, .sv2-price .price, .sv2-price .promotion-price { display: inline-flex; align-items: baseline; gap: 4px; margin: 0; font-size: inherit; }
.sv2-price .course-cash-price, .sv2-price .course-cash-price-from { color: var(--sv2-color-price); font-size: 14px; font-weight: 600; }
.sv2-price .course-cash-original-price, .sv2-price del { color: var(--sv2-color-text-muted); font-size: 12px; font-weight: 400; }
.sv2-price .free { display: none; } /* 免费课不显示价格标志；专享标识照常显示 */
/* 专享标识（A计划专享、就业班专享）：仿 B 站“课堂”小标签，细边框描边，不用整块红底 */
.sv2 .sv2-price .course-exclusive-label { display: inline-block; height: auto; margin: 0; padding: 1px 6px; border: 0; border-radius: 4px; background: linear-gradient(90deg, #f25b61, var(--sv2-color-primary)); box-shadow: 0 1px 3px rgba(251, 114, 153, .35); color: #fff; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; }
.sv2-price .promotion-activity { display: none; }

/* 页脚底部：授权声明、存档、版权、备案号一行显示 */
.sv2-footer__bottom { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding-bottom: var(--sv2-space-6); color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2-footer__bottom a:hover { color: var(--sv2-color-accent); }
.sv2-footer__bottom > * { margin: 0; }

/* 咨询面板：真实客服微信二维码 */

/* “联系老师”（无脸男，web/custom/qq-contact）放进右侧悬浮列，大小和咨询按钮一致 */
.sv2-float__qq:empty { display: none; }
.sv2-float #siki-qq-contact { position: relative; right: auto; bottom: auto; z-index: auto; }
.sv2-float #siki-qq-contact .siki-qq-launcher { gap: 2px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--sv2-color-border); border-radius: 8px; background: #fff; color: var(--sv2-color-text-secondary); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); }
.sv2-float #siki-qq-contact .siki-qq-launcher:hover { color: var(--sv2-color-accent); }
.sv2-float #siki-qq-contact .siki-qq-launcher svg { width: 13px; height: 16px; }
.sv2-float #siki-qq-contact .siki-qq-launcher span { font-size: 12px; font-weight: 400; line-height: 1; }
.sv2-float #siki-qq-contact .siki-qq-panel { right: calc(100% + 12px); bottom: auto; top: 0; }
/* 手机上悬浮列贴右边、缩成 34px 半透明圆钮、只留图标（文字仍给读屏），少挡卡片（2026-11-14 用户反馈遮挡课程卡片） */
@media (max-width: 767px) {
  .sv2-float { right: 4px; bottom: 16px; gap: 6px; }
  .sv2-float__btn, .sv2-float #siki-qq-contact .siki-qq-launcher { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.86); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
  .sv2-float__btn span, .sv2-float #siki-qq-contact .siki-qq-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* 页头彩色按钮：“.sv2 a { color: inherit }” 会让它们在白色吸顶页头上变成深色字，这里固定白字 */
.sv2 .sv2-study, .sv2 a.sv2-avatar { color: #fff; text-shadow: none; }
.sv2 .sv2-study:hover { background: #f04d7e; color: #fff; }
.sv2 a.sv2-avatar:hover { filter: brightness(1.08); color: #fff; }
.sv2-study svg { width: 16px; height: 16px; }

/* 头像菜单：鼠标移上去头像放大并下移压在面板顶部，面板在头像正下方淡入 */
.sv2-user { position: relative; display: flex; align-items: center; height: var(--sv2-header-height); }
.sv2 a.sv2-user__avatar { position: relative; z-index: 82; border: 2px solid #fff; background: #fff; background-clip: padding-box; transition: transform 0.25s ease, border-color 0.25s ease; }
.sv2-user:hover a.sv2-user__avatar,
.sv2-user:focus-within a.sv2-user__avatar { transform: translateY(30px) scale(2); border-color: #fff; filter: none; }
.sv2-user__panel {
  position: absolute;
  top: calc(50% + 10px);
  left: 50%;
  z-index: 81;
  width: 300px;
  padding: 52px 20px 12px;
  border: 1px solid var(--sv2-color-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  color: var(--sv2-color-text);
  text-align: center;
  text-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.sv2-user:hover .sv2-user__panel,
.sv2-user:focus-within .sv2-user__panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0.05s; }
.sv2 .sv2-user__panel a { color: var(--sv2-color-text); }
.sv2 a.sv2-user__name { display: block; overflow: hidden; font-size: 18px; font-weight: 600; line-height: 26px; white-space: nowrap; text-overflow: ellipsis; }
.sv2 a.sv2-user__name:hover { color: var(--sv2-color-primary); }
.sv2-user__tags { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.sv2-user__tag { padding: 0 6px; border-radius: 3px; background: var(--sv2-color-accent-soft); color: var(--sv2-color-accent); font-size: 12px; line-height: 18px; }
.sv2-user__tag--admin { background: var(--sv2-color-primary-soft); color: var(--sv2-color-primary); }
.sv2-user__stats { display: flex; justify-content: space-around; margin: 14px 0 10px; }
.sv2 .sv2-user__stats a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; }
.sv2-user__stats b { font-size: 18px; font-weight: 600; line-height: 22px; }
.sv2-user__stats span { color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2 .sv2-user__stats a:hover b, .sv2 .sv2-user__stats a:hover span { color: var(--sv2-color-accent); }
.sv2-user__menu { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--sv2-color-border); border-bottom: 1px solid var(--sv2-color-border); text-align: left; }
.sv2 .sv2-user__menu a { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 8px; color: var(--sv2-color-text-secondary); font-size: 14px; }
.sv2-user__menu svg { flex: 0 0 auto; width: 18px; height: 18px; }
.sv2-user__menu .sv2-user__arrow { width: 14px; height: 14px; margin-left: auto; }
.sv2 .sv2-user__menu a:hover { background: var(--sv2-color-chip); color: var(--sv2-color-text); }
.sv2 a.sv2-user__logout { display: flex; align-items: center; gap: 12px; height: 38px; margin-top: 8px; padding: 0 12px; border-radius: 8px; color: var(--sv2-color-text-secondary); font-size: 14px; text-align: left; }
.sv2-user__logout svg { width: 18px; height: 18px; }
.sv2 a.sv2-user__logout:hover { background: var(--sv2-color-chip); color: var(--sv2-color-text); }
@media (max-width: 767px) {
  .sv2-user { height: auto; }
  .sv2-user__panel { display: none; } /* 手机上点头像直接进个人主页 */
  .sv2-user:hover a.sv2-user__avatar, .sv2-user:focus-within a.sv2-user__avatar { transform: none; }
}

/* 学习历史：鼠标移到按钮上，下方淡入最近学习的 10 门课 */
.sv2-history { position: relative; display: flex; align-items: center; height: var(--sv2-header-height); }
.sv2-history__panel {
  position: absolute;
  top: calc(50% + 24px);
  right: 0;
  z-index: 81;
  width: 360px;
  padding: 12px 8px 8px;
  border: 1px solid var(--sv2-color-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  color: var(--sv2-color-text);
  text-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.sv2-history__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -26px; height: 26px; } /* 鼠标从按钮移到面板时不断开 */
.sv2-history:hover .sv2-history__panel,
.sv2-history:focus-within .sv2-history__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0.05s; }
.sv2-history__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 8px; font-size: 14px; }
.sv2-history__head b { font-weight: 600; }
.sv2 .sv2-history__head a { display: inline-flex; align-items: center; gap: 2px; color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2 .sv2-history__head a:hover { color: var(--sv2-color-accent); }
.sv2-history__head svg { width: 12px; height: 12px; }
.sv2-history__list { max-height: min(560px, calc(100vh - 120px)); overflow-y: auto; overscroll-behavior: contain; }
.sv2 a.sv2-history__item { display: flex; gap: 10px; padding: 8px; border-radius: 6px; color: var(--sv2-color-text); }
.sv2 a.sv2-history__item:hover { background: var(--sv2-color-chip); }
.sv2 a.sv2-history__item:hover .sv2-history__title { color: var(--sv2-color-accent); }
.sv2-history__item img { flex: 0 0 auto; width: 112px; height: 63px; border-radius: 4px; object-fit: cover; background: var(--sv2-color-chip); }
.sv2-history__body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.sv2-history__title { display: -webkit-box; overflow: hidden; white-space: normal; font-size: 14px; line-height: 20px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sv2-history__meta { display: flex; gap: 10px; color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2-history__progress { color: var(--sv2-color-primary); }
.sv2-history__empty { margin: 0; padding: 24px 8px; color: var(--sv2-color-text-muted); font-size: 13px; text-align: center; }
@media (max-width: 767px) {
  .sv2-history { height: auto; }
  .sv2-history__panel { display: none; } /* 手机上点按钮直接进“我的学习” */
}

/* 页头右侧“学习路线”“软件下载”下拉：白底菜单，不继承页头的白字和阴影 */
.sv2-header__menu { display: flex; flex: 0 0 auto; align-items: center; height: var(--sv2-header-height); }
.sv2-header__right > .sv2-entry, .sv2-header__right > .sv2-user, .sv2-header__right > .sv2-history, .sv2-header__right > .sv2-avatar, .sv2-user .sv2-avatar { flex: 0 0 auto; } /* 入口变多后不压扁头像、不让文字重叠，由搜索框让出宽度 */
.sv2-header__menu .sv2-drop { top: calc(50% + 22px); min-width: 180px; text-shadow: none; }
.sv2-header__menu .sv2-drop::before { display: none; } /* 菜单顶边已压在入口所在的整条页头高度内，不需要过渡区；过渡区会盖住入口和相邻入口 */
.sv2 .sv2-header__menu .sv2-drop a { color: var(--sv2-color-text); }
.sv2 .sv2-header__menu .sv2-drop a:hover { color: var(--sv2-color-accent); }
@media (max-width: 767px) { .sv2-header__menu { display: none; } }
/* 右侧入口按内容宽度排开（不再挤进搜索框），左侧导航和搜索框让出宽度；左侧放不下的链接裁掉（频道栏里都有） */
@media (min-width: 1024px) {
  .sv2-header__right { flex: 1 0 auto; }
  .sv2-header__left { overflow: hidden; }
  .sv2-search { min-width: 200px; }
}
/* 搜索框在整条页头正中：左右两栏等宽，左栏最小宽度 = 右侧入口实际宽度（home.js 量出写入 --sv2-header-side）；放不下时搜索框变窄 */
@media (min-width: 1024px) {
  .sv2-header__inner { display: grid; grid-template-columns: minmax(var(--sv2-header-side, 0px), 1fr) minmax(0, 500px) minmax(max-content, 1fr); }
  .sv2-search { min-width: 0; }
}
/* 右侧加了全部课程/学习路线/软件下载后，左侧导航整项收起，不切半个字：先收全部课程以后的链接，再收“首页” */
@media (max-width: 1799px) { .sv2-header__left a:nth-child(n+3) { display: none; } }
@media (max-width: 1299px) and (min-width: 1024px) { .sv2-header__left a.sv2-header__home { display: none; } .sv2-header__logo { border-right: 0 !important; } }
/* 全部课程下拉：分类两列；下拉底部“查看全部”一行 */
.sv2-header__menu .sv2-drop--grid { display: none; grid-template-columns: repeat(2, minmax(110px, auto)); }
.sv2-header__menu .sv2-drop--plans { grid-template-columns: repeat(2, max-content); left: auto; right: 0; transform: none; } /* A计划名称较长，按全名定宽不省略；靠入口右边对齐，不超出屏幕 */
.sv2-header__menu:hover > .sv2-drop--grid,
.sv2-header__menu:focus-within > .sv2-drop--grid { display: grid; }
.sv2 .sv2-header__menu .sv2-drop a.sv2-drop__all { grid-column: 1 / -1; margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--sv2-color-border); color: var(--sv2-color-text-muted); font-size: 13px; }
.sv2 .sv2-header__menu .sv2-drop a.sv2-drop__all:hover { color: var(--sv2-color-accent); }

/* ---------- 其他页面的页头（headerStatic）：一开始就是白色吸顶，不显示第二排分类；搜索框占位保持右侧入口位置 ---------- */
.sv2-header.sv2-header--static { position: sticky; top: 0; animation: none; }
.sv2-header.sv2-header--static .sv2-header__cats { display: none; }
/* 页头搜索框先占位不显示；页面里的大搜索框滚出视口后才出现（home.js 加 is-sr-search） */
.sv2-header--static .sv2-search { visibility: hidden; opacity: 0; transition: opacity 0.2s, visibility 0.2s; }
.sv2-header--static.is-sr-search .sv2-search { visibility: visible; opacity: 1; }

/* ---------- 搜索结果页（仿 B 站搜索页）：大搜索框、分栏、排序和更多筛选、页码 ---------- */
.sv2-sr { padding-top: 30px; padding-bottom: 20px; }
.sv2-sr__box { display: flex; align-items: center; gap: 10px; max-width: 640px; height: 48px; margin: 0 auto; padding: 5px 5px 5px 18px; border: 1px solid #f1f2f3; border-radius: 6px; background: var(--sv2-color-chip); transition: background-color 0.2s, border-color 0.2s; }
.sv2-sr__box:hover,
.sv2-sr__box:focus-within { border-color: var(--sv2-color-border); background: #fff; }
.sv2-sr__box > svg { width: 22px; height: 22px; color: var(--sv2-color-accent); }
.sv2-sr__box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--sv2-color-text); font-size: 18px; }
.sv2-sr__box input::placeholder { color: var(--sv2-color-text-muted); font-size: 16px; }
.sv2-sr__box input::-webkit-search-cancel-button { cursor: pointer; }
.sv2-sr__box button { flex: 0 0 auto; width: 100px; height: 38px; border: 0; border-radius: 8px; background: var(--sv2-color-accent); color: #fff; font-size: 16px; cursor: pointer; transition: filter 0.2s; }
.sv2-sr__box button:hover { filter: brightness(1.08); }

/* 分栏下方的分隔线和 B 站一样横贯整个窗口：用不占位的阴影向两侧延伸，不会出现横向滚动条。
   分栏多（全部 + 各方向 + A计划），放不下时横向滑动 */
.sv2-sr__tabbar { position: relative; margin-top: 20px; }
.sv2-sr__tabbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--sv2-color-border); box-shadow: 0 0 0 100vmax var(--sv2-color-border); clip-path: inset(0 -100vmax); }
.sv2-sr__tabs { position: relative; display: flex; gap: 32px; overflow-x: auto; scrollbar-width: none; }
.sv2-sr__tabs::-webkit-scrollbar { display: none; }
.sv2-sr__tab { position: relative; display: flex; flex: 0 0 auto; align-items: center; gap: 6px; height: 44px; padding-bottom: 4px; color: var(--sv2-color-text); font-size: 16px; white-space: nowrap; transition: color 0.2s; }
.sv2-sr__tab span { min-width: 18px; padding: 0 5px; border-radius: 4px; background: #f1f2f3; color: var(--sv2-color-text-muted); font-size: 12px; line-height: 18px; text-align: center; }
.sv2-sr__tab:hover,
.sv2-sr__tab.is-active { color: var(--sv2-color-accent); }
.sv2-sr__tab.is-active::after { content: ""; position: absolute; z-index: 1; left: 0; bottom: 0; width: 100%; height: 3px; border-radius: 2px; background: var(--sv2-color-accent); }
.sv2-sr__tab.is-active:has(span)::after { width: calc(100% - 30px); max-width: 32px; } /* 下划线只在文字下方 */

.sv2-sr__conds { margin-top: 24px; }
.sv2-sr__row { display: flex; align-items: flex-start; gap: 16px; }
.sv2-sr__row .sv2-sr__chips { flex: 1; min-width: 0; }
.sv2-sr__chips { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.sv2-sr__chip { display: inline-flex; align-items: center; justify-content: center; min-width: 100px; height: 32px; padding: 0 15px; border-radius: 8px; color: var(--sv2-color-text-secondary); font-size: 14px; white-space: nowrap; transition: color 0.2s, background-color 0.2s; }
.sv2-sr__chip:hover { background: var(--sv2-color-chip); color: var(--sv2-color-text); }
.sv2-sr__chip.is-active { background: #dff6fd; color: var(--sv2-color-accent); }
.sv2-sr__panel .sv2-sr__chip { min-width: 0; }
.sv2-sr__more { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 15px; border: 1px solid var(--sv2-color-border); border-radius: 8px; background: #fff; color: var(--sv2-color-text); font-size: 14px; cursor: pointer; transition: background-color 0.2s; }
.sv2-sr__more:hover { background: var(--sv2-color-chip); }
.sv2-sr__more svg { width: 14px; height: 14px; transform: rotate(90deg); transition: transform 0.2s; }
.sv2-sr__conds.is-open .sv2-sr__more svg { transform: rotate(-90deg); }
.sv2-sr__panel { display: none; flex-direction: column; gap: 12px; margin-top: 12px; }
.sv2-sr__conds.is-open .sv2-sr__panel { display: flex; }
.sv2-sr__chips--sub { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--sv2-color-border); }

.sv2-sr__grid { margin-top: 30px; }
.sv2-hl { color: var(--sv2-color-primary); font-style: normal; } /* 标题里命中的关键词 */
.sv2-sr__empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 100px 0 80px; color: var(--sv2-color-text-muted); font-size: 15px; }
.sv2-sr__empty > svg { width: 48px; height: 48px; margin-bottom: 8px; color: var(--sv2-color-border); }
.sv2-sr__empty p { margin: 0; }
.sv2-sr__hint { font-size: 13px; }
.sv2-sr__hint a { color: var(--sv2-color-accent); }

.sv2-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 50px 0 30px; }
.sv2-pager__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--sv2-color-border); border-radius: 8px; background: #fff; color: var(--sv2-color-text); font-size: 14px; transition: background-color 0.2s; }
.sv2-pager__btn--side { min-width: 100px; padding: 0 12px; }
a.sv2-pager__btn:hover { background: var(--sv2-color-chip); }
.sv2-pager__btn.is-active { border-color: var(--sv2-color-accent); background: var(--sv2-color-accent); color: #fff; }
.sv2-pager__btn.is-disabled { color: var(--sv2-color-text-muted); opacity: 0.6; }
.sv2-pager__gap { min-width: 26px; color: var(--sv2-color-text-muted); text-align: center; }

@media (max-width: 767px) {
  .sv2-header--static .sv2-search { visibility: visible; opacity: 1; } /* 手机页头只有搜索框，页面里的大搜索框隐藏 */
  .sv2-sr { padding-top: 12px; }
  .sv2-sr__box { display: none; }
  .sv2-sr__tabbar { margin-top: 0; }
  .sv2-sr__tabs { gap: 24px; }
  .sv2-sr__tab { height: 40px; font-size: 15px; }
  .sv2-sr__chips { flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .sv2-sr__chips::-webkit-scrollbar { display: none; }
  .sv2-sr__chip { min-width: 0; height: 30px; padding: 0 12px; font-size: 13px; }
  .sv2-sr__more { height: 30px; padding: 0 8px 0 10px; font-size: 13px; }
  .sv2-sr__grid { margin-top: 16px; }
  .sv2-pager { gap: 6px; margin-top: 32px; }
  .sv2-pager__btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: 13px; }
  .sv2-pager__btn--side { min-width: 0; padding: 0 12px; }
  .sv2-pager__btn.is-disabled { display: none; }
}

/* ---------- 全部课程下拉：每个方向前面一个彩色图标块，颜色由页头模板的 --sv2-cat 给出 ---------- */
.sv2-header__menu .sv2-drop--grid:not(.sv2-drop--plans) { grid-template-columns: repeat(2, minmax(150px, auto)); gap: 2px 4px; padding: 10px; border-radius: 12px; }
.sv2 .sv2-header__menu .sv2-drop a.sv2-drop__cat { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 8px; transition: background-color 0.2s, color 0.2s; }
.sv2-drop__cat i { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--sv2-cat) 12%, #fff); color: var(--sv2-cat); transition: background-color 0.2s, color 0.2s, transform 0.2s; }
.sv2-drop__cat i svg { width: 18px; height: 18px; }
.sv2 .sv2-header__menu .sv2-drop a.sv2-drop__cat:hover { background: var(--sv2-color-chip); color: var(--sv2-cat); }
.sv2-drop__cat:hover i { background: var(--sv2-cat); color: #fff; transform: scale(1.06); }
.sv2-header__menu .sv2-drop--grid:not(.sv2-drop--plans) a.sv2-drop__all { margin: 6px 6px 0; padding-left: 6px; }

/* ---------- A计划下拉：已加入且未过期的单独一组放在上面 ---------- */
.sv2-drop__head { grid-column: 1 / -1; padding: 8px var(--sv2-space-4) 4px; color: var(--sv2-color-text-muted); font-size: 12px; font-weight: 400; }
.sv2-drop__mine ~ .sv2-drop__head { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--sv2-color-border); }
/* 我的 A计划：同“更多 A计划”的方向图标，图标实心；浅色底卡片，名称下一行绿色对勾 + 有效期 */
.sv2 .sv2-header__menu .sv2-drop a.sv2-drop__mine { margin: 2px 0; padding: 7px 12px 7px 7px; border: 1px solid color-mix(in srgb, var(--sv2-cat) 16%, #fff); background: color-mix(in srgb, var(--sv2-cat) 5%, #fff); }
.sv2 .sv2-header__menu .sv2-drop a.sv2-drop__mine:hover { border-color: color-mix(in srgb, var(--sv2-cat) 40%, #fff); background: color-mix(in srgb, var(--sv2-cat) 9%, #fff); color: var(--sv2-cat); }
.sv2-drop__mine i { width: 34px; height: 34px; background: var(--sv2-cat); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--sv2-cat) 30%, transparent); }
.sv2-drop__mine-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sv2-drop__mine-text b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; }
.sv2-drop__mine-text small { display: inline-flex; align-items: center; gap: 3px; color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2-drop__mine-text small svg { width: 12px; height: 12px; color: #1a9e55; }

/* ---------- 搜索页二级分类：排序上面一块浅灰底，左边标出方向，子分类是圆角标签 ---------- */
.sv2-sr__sub { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 10px 14px; border-radius: 12px; background: var(--sv2-color-chip); }
.sv2-sr__sub-label { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; color: var(--sv2-color-text); font-size: 14px; font-weight: 600; }
.sv2-sr__sub-label svg { width: 14px; height: 14px; color: var(--sv2-color-text-muted); }
.sv2-sr__sub .sv2-sr__chips { flex: 1; min-width: 0; gap: 8px; }
.sv2-sr__sub .sv2-sr__chip { min-width: 0; height: 30px; padding: 0 16px; border: 1px solid var(--sv2-color-border); border-radius: 999px; background: #fff; font-size: 13px; }
.sv2-sr__sub .sv2-sr__chip:hover { border-color: var(--sv2-color-accent); background: #fff; color: var(--sv2-color-accent); }
.sv2-sr__sub .sv2-sr__chip.is-active { border-color: var(--sv2-color-accent); background: var(--sv2-color-accent); color: #fff; }
.sv2-sr__sub + .sv2-sr__conds { margin-top: 16px; }
@media (max-width: 767px) {
  .sv2-sr__sub { gap: 10px; margin-top: 12px; padding: 8px 10px; }
  .sv2-sr__sub-label { font-size: 13px; }
  .sv2-sr__sub .sv2-sr__chip { flex: 0 0 auto; }
}

/* ---------- 页脚品牌区：站名 + 口号 + 两个带图标的圆角按钮 ---------- */
.sv2-footer__brand { gap: 10px; }
.sv2-footer__slogan { margin: 0; color: var(--sv2-color-text-muted); font-size: 13px; }
.sv2-footer__sns { gap: 10px; margin-top: 4px; }
.sv2-footer__pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; border: 1px solid var(--sv2-color-border); border-radius: 999px; background: #fff; color: var(--sv2-color-text-secondary); font-size: 13px; transition: color 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s; }
.sv2-footer__pill svg { width: 16px; height: 16px; }
.sv2-footer__pill--video svg { color: #00aeec; } /* B 站蓝 */
.sv2 .sv2-footer__sns a.sv2-footer__pill--video:hover { border-color: #00aeec; background: #e6f7fd; color: #0090c4; box-shadow: 0 2px 8px rgba(0, 174, 236, 0.2); }
.sv2-footer__pill--wx svg { color: #07c160; } /* 微信绿 */
.sv2-footer__pill--wx:hover, .sv2-footer__pill--wx:focus { --sv2-icon-bg: #ebf9f1; border-color: #2fb36b; background: #ebf9f1; color: #1f8f52; box-shadow: 0 2px 8px rgba(47, 179, 107, 0.2); outline: 0; }
.sv2-footer__pill { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 767px) { .sv2-footer__brand { flex-wrap: wrap; } } /* 手机上 logo、标语、两个按钮一排放不下：换行，按钮文字不再被挤成竖排（2026-11-13） */
.sv2-header__menu .sv2-drop--routes { gap: 2px; padding: 10px; border-radius: 12px; } /* 学习路线下拉：一列，带方向图标 */
/* 搜索页结果按 B 站搜索页的宽度分档：1100 起每排 5 张、1700 起 6 张、2200 起 7 张（更窄时同全站） */
@media (min-width: 1100px) { .sv2-sr__grid { --sv2-cols: 5; } }
@media (min-width: 1700px) { .sv2-sr__grid { --sv2-cols: 6; } }
@media (min-width: 2200px) { .sv2-sr__grid { --sv2-cols: 7; } }
.sv2-footer__logo { display: block; line-height: 0; } /* 页脚品牌 logo */
.sv2-footer__logo img { display: block; width: auto; height: 40px; }
.sv2-header__menu .sv2-drop--plans { gap: 2px 4px; padding: 10px; border-radius: 12px; } /* A计划下拉：每条带方向图标，同一方向的永久/一年排在同一行 */
.sv2-header__menu .sv2-drop--plans .sv2-drop__head { padding-left: 6px; padding-right: 6px; }
.sv2-header__menu .sv2-drop--plans a.sv2-drop__all { margin: 6px 6px 0; padding-left: 6px; }
.sv2-consult__body h4 small { margin-left: 6px; font-size: 11px; opacity: 0.8; } /* QQ 群：群名 + 群号，点击复制 */
.sv2-consult__groups > button { display: inline-flex; align-items: baseline; gap: 5px; border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.sv2-consult__groups em { font-style: normal; font-size: 11px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.sv2-consult__groups > button:hover, .sv2-consult__groups > button.is-copied { background: var(--sv2-color-accent); color: #fff; }
.sv2-consult__groups > button.is-copied { background: #2fb36b; }

/* ---------- 老师个人主页（仿 B 站个人空间）：通栏横幅 + 吸顶导航条 + 主页左右两栏，见 space.html.twig ---------- */
.sv2-sp { padding-bottom: 20px; }
/* 横幅：游戏风插画（按老师 ID 轮换 4 张，space-bg/*.svg），图没加载时是品牌渐变；页头透明叠在上面（顶部留出页头高度），顶部和左下压暗保证白字可读 */
.sv2-sp__head { position: relative; overflow: hidden; padding-top: var(--sv2-header-height); background: linear-gradient(120deg, var(--sv2-color-accent), #6d8cf0 55%, var(--sv2-color-primary)); color: #fff; isolation: isolate; }
.sv2-sp__bg { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.sv2-sp__head::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 90px), linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 45%), linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.5)); }
/* 头像、昵称块、按钮三者垂直居中对齐（学员没有头衔签名时昵称正对头像中线，按钮不再沉到底） */
.sv2-sp__info { display: flex; align-items: center; gap: 20px; min-height: 176px; padding-top: 16px; padding-bottom: 24px; }
.sv2-sp__avatar { flex: 0 0 auto; width: 88px; height: 88px; border: 3px solid #fff; border-radius: 50%; object-fit: cover; background: #eee; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.sv2-sp__who { flex: 1; min-width: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 12px rgba(0, 0, 0, 0.25); }
.sv2-sp__name { display: flex; align-items: center; gap: 8px; margin: 0; color: #fff; font-size: 26px; font-weight: 600; line-height: 1.3; letter-spacing: 0.5px; }
.sv2-sp__badge { padding: 0 6px; border-radius: 4px; background: var(--sv2-color-primary); color: #fff; font-size: 12px; font-weight: 400; line-height: 20px; text-shadow: none; }
.sv2-sp__title, .sv2-sp__sign { overflow: hidden; margin: 6px 0 0; font-size: 13px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.sv2-sp__title { color: rgba(255, 255, 255, 0.95); }
.sv2-sp__sign { margin-top: 2px; color: rgba(255, 255, 255, 0.75); }
.sv2-sp__acts { display: flex; flex: 0 0 auto; gap: 12px; }
.sv2-sp__btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 120px; height: 36px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 8px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 14px; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background-color 0.2s, filter 0.2s; }
.sv2-sp__btn:hover, .sv2-sp__btn:focus { background: rgba(255, 255, 255, 0.28); color: #fff; }
.sv2-sp__btn svg { width: 16px; height: 16px; }
.sv2-sp__btn b { font-weight: 400; }
.sv2-sp__btn--follow { border-color: var(--sv2-color-accent); background: var(--sv2-color-accent); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sv2-sp__btn--follow:hover, .sv2-sp__btn--follow:focus { background: var(--sv2-color-accent); filter: brightness(1.08); }
.sv2-sp__btn--follow.is-followed, .sv2-sp__btn--follow.is-followed:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.16); filter: none; }
.sv2-sp__btn:disabled { cursor: default; opacity: 0.7; }
/* 导航条：白底通栏（不吸顶：站点页头会盖住它）；左边带图标的分栏，右边数字（同 B 站空间导航条） */
.sv2-sp__nav { background: #fff; box-shadow: 0 1px 0 var(--sv2-color-border); }
.sv2-sp__tabbar { display: flex; align-items: center; gap: 24px; }
.sv2-sp__tabbar .sv2-sr__tabs { flex: 1; min-width: 0; }
.sv2-sp__tabbar .sv2-sr__tab { height: 60px; padding-bottom: 0; }
.sv2-sp__tabbar .sv2-sr__tab svg { width: 18px; height: 18px; }
.sv2-sp__tabbar .sv2-sr__tab.is-active::after { width: 100%; max-width: none; }
/* 粉丝数 / 关注数 / 播放数：灰色小标签在上、加粗数字在下，细竖线分隔；粉丝、关注可点（移上去变主题色）。
   .sv2 前缀盖过全站 “.sv2 a { color: inherit }”，三项颜色一致 */
.sv2-sp__stats { position: relative; display: flex; flex: 0 0 auto; align-items: center; }
.sv2-sp__stats > * { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 0 16px; font-size: 12px; line-height: 1.4; }
.sv2-sp__stats > * + *::before { content: ""; position: absolute; top: 50%; left: 0; height: 22px; margin-top: -11px; border-left: 1px solid var(--sv2-color-border); }
.sv2-sp__stats > :last-child { padding-right: 0; }
.sv2 .sv2-sp__stats > * > span { color: var(--sv2-color-text-muted); transition: color 0.2s; }
.sv2 .sv2-sp__stats b { color: var(--sv2-color-text); font-size: 16px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; transition: color 0.2s; }
.sv2 .sv2-sp__stats a:hover > span, .sv2 .sv2-sp__stats a:hover b { color: var(--sv2-color-accent); }
/* 主页两栏：左边课程（每排 4 张），右边 300px 简介和个人资料，右栏吸顶在页头下 */
.sv2-sp__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.sv2-sp__main { --sv2-cols: 4; min-width: 0; }
.sv2-sp__side { position: sticky; top: 133px; /* 吸顶白色页头（含分类排）117px 下方 */ display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.sv2-sp__card { padding: 16px; border-radius: 8px; background: var(--sv2-color-chip); font-size: 13px; line-height: 22px; }
.sv2-sp__card h2 { margin: 0 0 8px; color: var(--sv2-color-text); font-size: 16px; font-weight: 500; }
.sv2-sp__intro p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--sv2-color-text-secondary); -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow-wrap: anywhere; }
.sv2-sp__intro.is-open p { display: block; }
.sv2-sp__intro button { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--sv2-color-accent); font-size: 13px; line-height: 22px; cursor: pointer; }
.sv2-sp__facts ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--sv2-color-text-secondary); }
.sv2-sp__facts li { display: flex; align-items: flex-start; gap: 8px; }
.sv2-sp__facts svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; color: var(--sv2-color-text-muted); }
.sv2-sp__sec { margin-top: 24px; }
.sv2-sp__sec-title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--sv2-color-text); font-size: 20px; font-weight: 500; }
.sv2-sp__sec-title > span:not(.sv2-sp__sec-sorts) { color: var(--sv2-color-text-muted); font-size: 14px; font-weight: 400; }
.sv2-sp__sec-sorts { display: flex; gap: 4px; margin-left: 16px; }
.sv2-sp__sec-sorts a { padding: 0 10px; border-radius: 6px; color: var(--sv2-color-text-secondary); font-size: 13px; font-weight: 400; line-height: 28px; transition: background-color 0.2s, color 0.2s; }
.sv2-sp__sec-sorts a:hover { background: var(--sv2-color-chip); color: var(--sv2-color-text); }
.sv2-sp__sec-sorts a.is-active { background: #dff6fd; color: var(--sv2-color-accent); }
.sv2-sp__sec-more { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; height: 28px; margin-left: auto; padding: 0 6px 0 10px; border: 1px solid var(--sv2-color-border); border-radius: 6px; color: var(--sv2-color-text-secondary); font-size: 13px; font-weight: 400; transition: background-color 0.2s, color 0.2s; }
.sv2-sp__sec-more:hover { background: var(--sv2-color-chip); color: var(--sv2-color-accent); }
.sv2-sp__sec-more svg { width: 14px; height: 14px; }
.sv2-sp__sorts { margin-top: 20px; }
.sv2-sp__wrap > .sv2-sp__grid, .sv2-sp__wrap > [data-sv2-sp-swap="list"] > .sv2-sp__grid:first-child { margin-top: 20px; }
/* 系统课封面按原图 3:2 完整显示（同首页系统课板块），不再用模糊图补成 16:9 */
.sv2-sp__grid--room .sv2-vcard__cover { aspect-ratio: 3 / 2; }
.sv2-sp__grid--room .sv2-vcard__blur { display: none; }
/* 主页每块按列数取整：代表作 1 排，课程和系统课 2 排 */
.sv2-sp__grid--one > :nth-child(n+5), .sv2-sp__grid--two > :nth-child(n+9) { display: none; }
@media (max-width: 1399px) {
  .sv2-sp__main { --sv2-cols: 3; }
  .sv2-sp__grid--one > :nth-child(n+4), .sv2-sp__grid--two > :nth-child(n+7) { display: none; }
  .sv2-sp__body { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
}
@media (max-width: 1023px) {
  .sv2-sp__info { min-height: 150px; }
  .sv2-sp__body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sv2-sp__side { position: static; order: -1; margin-top: 16px; }
  .sv2-sp__facts { display: none; }
  .sv2-sp__intro p { -webkit-line-clamp: 3; }
  /* 平板仍是一排：分栏在左（放不下时横向滚动），数字在右收紧；手机才拆成两排 */
  .sv2-sp__tabbar { gap: 16px; }
  .sv2-sp__stats > * { min-width: 0; padding: 0 12px; }
  .sv2-sp__tabbar .sv2-sr__tab { height: 52px; }
}
@media (max-width: 767px) {
  /* 手机页头是白色吸顶（同全站），横幅接在页头下面；拆掉 .sv2-top 外框，页头整页吸顶 */
  .sv2-space-page .sv2-top { display: contents; }
  .sv2-sp__head { padding-top: 0; }
  .sv2-sp__main { --sv2-cols: 2; }
  .sv2-sp__grid--one > :nth-child(n+3), .sv2-sp__grid--two > :nth-child(n+5) { display: none; }
  .sv2-sp__info { flex-wrap: wrap; align-items: center; gap: 12px; min-height: 0; padding-top: 28px; padding-bottom: 14px; }
  .sv2-sp__tabbar { flex-direction: column; align-items: stretch; gap: 0; }
  .sv2-sp__stats { order: -1; padding: 12px 0 4px; }
  .sv2-sp__stats > * { flex: 1; padding: 0 8px; }
  .sv2-sp__stats > :last-child { padding-right: 8px; }
  .sv2-sp__tabbar .sv2-sr__tab { height: 48px; }
  .sv2-sp__avatar { width: 64px; height: 64px; border-width: 2px; }
  .sv2-sp__name { font-size: 19px; letter-spacing: 0; }
  .sv2-sp__who { flex-basis: 0; }
  .sv2-sp__title, .sv2-sp__sign { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .sv2-sp__acts { width: 100%; }
  .sv2-sp__btn { flex: 1; min-width: 0; }
  .sv2-sp__card { padding: 10px 12px; }
  .sv2-sp__card h2 { margin-bottom: 4px; font-size: 14px; }
  .sv2-sp__sec { margin-top: 22px; }
  .sv2-sp__sec-title { flex-wrap: wrap; margin-bottom: 12px; font-size: 18px; }
  .sv2-sp__sec-sorts { order: 3; width: 100%; margin-left: -10px; }
  .sv2-sp__sorts .sv2-sr__chip { min-width: 0; }
}
/* 个人主页：后台加载排序 / 翻页时，正在换的块变淡（home.js） */
.sv2-sp [data-sv2-sp-swap] { transition: opacity 0.15s; }
.sv2-sp [data-sv2-sp-swap].is-loading { opacity: 0.5; pointer-events: none; }
button.sv2-sp__sec-more { background: #fff; font-family: inherit; cursor: pointer; }
button.sv2-sp__sec-more svg { width: 14px; height: 14px; margin-right: 2px; }
/* 编辑代表作弹窗（老师本人）：标题、搜索、课程列表（封面 + 标题，勾选后右上角显示顺序号）、底部按钮 */
.sv2-spw-dlg { width: min(720px, calc(100vw - 32px)); max-height: min(80vh, 760px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); color: var(--sv2-color-text); }
.sv2-spw-dlg[open] { display: flex; flex-direction: column; }
.sv2-spw-dlg::backdrop { background: rgba(0, 0, 0, 0.45); }
.sv2-spw-dlg__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.sv2-spw-dlg__head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.sv2-spw-dlg__x { width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; color: var(--sv2-color-text-muted); font-size: 24px; line-height: 1; cursor: pointer; }
.sv2-spw-dlg__x:hover { background: var(--sv2-color-chip); color: var(--sv2-color-text); }
.sv2-spw-dlg__body { flex: 1; min-height: 200px; overflow-y: auto; padding: 0 20px; }
.sv2-spw-dlg__foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--sv2-color-border); }
.sv2-spw-dlg__foot > span { flex: 1; color: var(--sv2-color-text-secondary); font-size: 13px; }
.sv2-spw-dlg__btn { min-width: 72px; height: 34px; padding: 0 14px; border: 1px solid var(--sv2-color-border); border-radius: 8px; background: #fff; color: var(--sv2-color-text); font: inherit; font-size: 14px; cursor: pointer; }
.sv2-spw-dlg__btn:hover { border-color: var(--sv2-color-primary); color: var(--sv2-color-primary); }
.sv2-spw-dlg__btn--primary, .sv2-spw-dlg__btn--primary:hover { border-color: var(--sv2-color-primary); background: var(--sv2-color-primary); color: #fff; }
.sv2-spw-dlg__btn--primary:hover { background: var(--sv2-color-primary-dark); }
.sv2-spw-dlg__btn:disabled { opacity: 0.6; cursor: default; }
.sv2-spw__bar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 0 12px; background: #fff; }
.sv2-spw__search { flex: 0 1 260px; min-width: 0; height: 34px; padding: 0 12px; border: 1px solid var(--sv2-color-border); border-radius: 8px; font: inherit; font-size: 14px; outline: none; }
.sv2-spw__search:focus { border-color: var(--sv2-color-accent); }
.sv2-spw__hint { color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2-spw__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0 0 16px; list-style: none; }
.sv2-spw__list li[hidden] { display: none; }
.sv2-spw__list label { position: relative; display: block; margin: 0; padding: 6px; border: 2px solid transparent; border-radius: 10px; font-weight: 400; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.sv2-spw__list label:hover { background: var(--sv2-color-chip); }
.sv2-spw__list input { position: absolute; opacity: 0; pointer-events: none; }
.sv2-spw__list img { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: #eee; }
.sv2-spw__list span { display: -webkit-box; overflow: hidden; margin-top: 6px; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sv2-spw__list em { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, 0.3); color: #fff; font-size: 13px; font-style: normal; font-weight: 600; }
.sv2-spw__list input:checked ~ em { background: var(--sv2-color-primary); }
.sv2-spw__list label:has(input:checked) { border-color: var(--sv2-color-primary); background: var(--sv2-color-primary-soft); }
.sv2-spw__list label:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.sv2-spw__list input:focus-visible ~ img { outline: 2px solid var(--sv2-color-accent); outline-offset: 2px; }
.sv2-spw__none { padding: 40px 0; color: var(--sv2-color-text-muted); text-align: center; }
@media (max-width: 767px) {
  .sv2-spw__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sv2-spw-dlg__head, .sv2-spw-dlg__foot { padding-left: 14px; padding-right: 14px; }
  .sv2-spw-dlg__body { padding: 0 14px; }
  .sv2-spw-dlg__btn { min-width: 0; }
  .sv2-spw__hint { width: 100%; }
}
/* 新版“我的收藏”：在“我的学习”布局里放课程卡片（每排 4 / 3 / 2 张），卡片封面右上角“取消收藏”（鼠标移上卡片才显示，触屏常显） */
.sv2-my__count { margin-left: 8px; color: var(--sv2-color-text-muted); font-size: 14px; font-weight: 400; }
.sv2-fav__grid { --sv2-cols: 4; margin-top: 16px; }
.sv2-fav__item { position: relative; min-width: 0; transition: opacity 0.2s, transform 0.2s; }
.sv2-fav__item.is-removing { opacity: 0; transform: scale(0.96); }
.sv2-fav__del { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; font: inherit; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.2s, background-color 0.2s; }
.sv2-fav__del svg { --sv2-star-fill: currentColor; width: 14px; height: 14px; color: #ffb02e; }
.sv2-fav__item:hover .sv2-fav__del, .sv2-fav__del:focus-visible { opacity: 1; }
.sv2-fav__del:hover { background: var(--sv2-color-primary); }
.sv2-fav__del:disabled { cursor: default; }
@media (max-width: 1279px) { .sv2-fav__grid { --sv2-cols: 3; } }
@media (max-width: 1023px) { .sv2-fav__grid { --sv2-cols: 2; } }
@media (hover: none) { .sv2-fav__del { opacity: 1; } }
@media (max-width: 767px) {
  .sv2-fav__del { top: 6px; right: 6px; height: 24px; padding: 0 6px; }
}

/* 新版“我的学习”（2026-11-14）：左侧菜单 + 右侧内容（site-v2/my/*），手机上菜单变成顶部横向滚动条 */
.sv2-my { --sv2-container: 1200px; display: flex; align-items: flex-start; gap: 24px; min-height: 60vh; padding-top: 24px; padding-bottom: 40px; }
.sv2-my__nav { position: sticky; top: 16px; flex: 0 0 180px; padding: 12px 8px; border-radius: var(--sv2-radius-lg); background: var(--sv2-color-surface); }
.sv2-my__nav-title { padding: 4px 12px 10px; color: var(--sv2-color-text-muted); font-size: 13px; }
.sv2-my__nav-item { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: var(--sv2-radius-md); color: var(--sv2-color-text); font-size: 15px; transition: background-color 0.2s, color 0.2s; }
.sv2-my__nav-item svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--sv2-color-text-muted); }
.sv2-my__nav-item:hover { background: var(--sv2-color-bg); color: var(--sv2-color-primary); }
.sv2-my__nav-item.is-active { background: var(--sv2-color-primary-soft); color: var(--sv2-color-primary); font-weight: 500; }
.sv2-my__nav-item.is-active svg, .sv2-my__nav-item:hover svg { color: var(--sv2-color-primary); }
.sv2-my__main { flex: 1 1 auto; min-width: 0; padding: 20px 24px; border-radius: var(--sv2-radius-lg); background: var(--sv2-color-surface); }
.sv2-my__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 12px; border-bottom: 1px solid var(--sv2-color-border); }
.sv2-my__head h1 { margin: 0; color: var(--sv2-color-text); font-size: 20px; font-weight: 500; }
.sv2-my__h1-course { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sv2-my__h1-course img { flex: 0 0 auto; width: 64px; height: 36px; border-radius: var(--sv2-radius-sm); object-fit: cover; }
.sv2-my__h1-course span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv2-my__tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sv2-my__tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 14px; border-radius: 16px; color: var(--sv2-color-text-secondary); font-size: 14px; white-space: nowrap; transition: background-color 0.2s, color 0.2s; }
.sv2-my__tab span { color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2-my__tab:hover { color: var(--sv2-color-primary); }
.sv2-my__tab.is-active { background: var(--sv2-color-primary-soft); color: var(--sv2-color-primary); font-weight: 500; }
.sv2-my__tab.is-active span { color: inherit; }
.sv2-my__row, .sv2-my__thread { display: flex; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--sv2-color-border); }
.sv2-my__row:last-child, .sv2-my__thread:last-child { border-bottom: 0; }
.sv2-my__cover { flex: 0 0 auto; width: 192px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--sv2-radius-md); background: var(--sv2-color-bg); }
.sv2-my__cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.sv2-my__cover:hover img { transform: scale(1.04); }
.sv2-my__body, .sv2-my__thread-main { flex: 1 1 auto; min-width: 0; }
.sv2-my__title, .sv2-my__thread-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--sv2-color-text); font-size: 16px; font-weight: 500; line-height: 1.5; }
.sv2-my__title a, .sv2-my__thread-title a { min-width: 0; overflow: hidden; color: var(--sv2-color-text); text-overflow: ellipsis; white-space: nowrap; }
.sv2-my__title a:hover, .sv2-my__thread-title a:hover { color: var(--sv2-color-primary); }
.sv2-my__tag { flex: 0 0 auto; padding: 0 6px; border-radius: 4px; background: var(--sv2-color-accent-soft); color: var(--sv2-color-accent); font-size: 12px; font-weight: 400; line-height: 20px; }
.sv2-my__tag.is-green { background: #e8f7ee; color: #1f9d55; }
.sv2-my__tag.is-muted { background: var(--sv2-color-chip); color: var(--sv2-color-text-muted); }
.sv2-my__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--sv2-color-text-muted); font-size: 13px; line-height: 1.6; }
.sv2-my__meta a { color: var(--sv2-color-text-secondary); }
.sv2-my__meta a:hover { color: var(--sv2-color-primary); }
.sv2-my__progress { display: flex; align-items: center; gap: 10px; max-width: 360px; margin-top: 12px; }
.sv2-my__bar { flex: 1 1 auto; height: 6px; overflow: hidden; border-radius: 3px; background: var(--sv2-color-chip); }
.sv2-my__bar span { display: block; max-width: 100%; height: 100%; border-radius: 3px; background: var(--sv2-color-primary); }
.sv2-my__pct { flex: 0 0 auto; color: var(--sv2-color-text-secondary); font-size: 13px; }
.sv2-my__act { position: relative; flex: 0 0 auto; }
.sv2-my__btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 96px; height: 36px; padding: 0 16px; border: 1px solid var(--sv2-color-primary); border-radius: 18px; background: var(--sv2-color-primary); color: #fff; font-size: 14px; white-space: nowrap; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.sv2-my__btn:hover { background: var(--sv2-color-primary-dark); color: #fff; }
.sv2-my__btn.is-ghost { background: #fff; color: var(--sv2-color-primary); }
.sv2-my__btn.is-ghost:hover { background: var(--sv2-color-primary-soft); }
.sv2-my__btn svg { width: 12px; height: 12px; transform: rotate(90deg); }
.sv2-my__plans summary { list-style: none; }
.sv2-my__plans summary::-webkit-details-marker { display: none; }
.sv2-my__plans ul { position: absolute; top: 42px; right: 0; z-index: 5; width: 260px; margin: 0; padding: 6px; border-radius: var(--sv2-radius-md); background: #fff; box-shadow: var(--sv2-shadow-pop); list-style: none; }
.sv2-my__plans li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--sv2-radius-sm); color: var(--sv2-color-text); font-size: 14px; }
.sv2-my__plans li a:hover { background: var(--sv2-color-bg); color: var(--sv2-color-primary); }
.sv2-my__plan-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv2-my__plans em { flex: 0 0 auto; color: var(--sv2-color-text-secondary); font-style: normal; }
.sv2-my__plans em small { color: var(--sv2-color-text-muted); }
.sv2-my__plans em.is-muted { color: var(--sv2-color-text-muted); }
.sv2-my__replies { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 56px; color: var(--sv2-color-text-muted); font-size: 12px; }
.sv2-my__replies b { color: var(--sv2-color-primary); font-size: 18px; font-weight: 500; }
.sv2-my__replies.is-zero b { color: var(--sv2-color-text-muted); }
.sv2-my__score { flex: 0 0 auto; min-width: 110px; color: var(--sv2-color-text-muted); font-size: 13px; text-align: right; }
.sv2-my__score b { color: var(--sv2-color-price); font-size: 20px; font-weight: 500; }
.sv2-my__score small { display: block; }
.sv2-my__score .is-warn { color: var(--sv2-color-accent); }
.sv2-my__note { padding: 16px 0; border-bottom: 1px solid var(--sv2-color-border); }
.sv2-my__note-head { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.sv2-my__note-head a { min-width: 0; overflow: hidden; color: var(--sv2-color-text); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.sv2-my__note-head a:hover { color: var(--sv2-color-primary); }
.sv2-my__note-len { flex: 0 0 auto; margin-left: auto; color: var(--sv2-color-text-muted); font-size: 13px; }
.sv2-my__note-del, .sv2-my__note-toggle { padding: 0; border: 0; background: none; color: var(--sv2-color-text-muted); font: inherit; font-size: 13px; cursor: pointer; }
.sv2-my__note-del { flex: 0 0 auto; }
.sv2-my__note-del:hover { color: var(--sv2-color-price); }
.sv2-my__note-toggle { margin-top: 6px; color: var(--sv2-color-primary); }
.sv2-my__note-summary { margin-top: 8px; color: var(--sv2-color-text-secondary); font-size: 14px; line-height: 1.7; word-break: break-all; }
.sv2-my__note-body { margin-top: 8px; color: var(--sv2-color-text); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.sv2-my__note-body img { max-width: 100%; height: auto; }
.sv2-my .sv2-sr__empty { padding: 80px 0 60px; }
.sv2-my .sv2-sr__empty .sv2-sp__sec-more { margin: 12px auto 0; }
.sv2-my .sv2-pager { margin: 28px 0 8px; }
.sv2-my [hidden] { display: none !important; }
.sv2-my-page .sv2-header--static .sv2-search { visibility: visible; opacity: 1; } /* 我的学习各页没有自己的搜索框，页头一直显示 */
@media (max-width: 1023px) {
  .sv2-my__nav { flex-basis: 150px; }
  .sv2-my__cover { width: 150px; }
}
@media (max-width: 767px) {
  .sv2-my { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 12px; }
  .sv2-my__nav { position: static; display: flex; flex: 0 0 auto; gap: 4px; padding: 6px; overflow-x: auto; scrollbar-width: none; }
  .sv2-my__nav::-webkit-scrollbar, .sv2-my__tabs::-webkit-scrollbar { display: none; }
  .sv2-my__nav-title { display: none; }
  .sv2-my__nav-item { flex: 0 0 auto; height: 34px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
  .sv2-my__nav-item svg { display: none; }
  .sv2-my__main { padding: 14px 14px 8px; }
  .sv2-my__head h1 { font-size: 18px; }
  .sv2-my__row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 12px; padding: 14px 0; }
  .sv2-my__cover { width: 120px; }
  .sv2-my__title, .sv2-my__thread-title { margin-bottom: 4px; font-size: 15px; }
  .sv2-my__progress { margin-top: 8px; }
  .sv2-my__row .sv2-my__act { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .sv2-my__btn { min-width: 84px; height: 32px; font-size: 13px; }
  .sv2-my__thread { flex-wrap: wrap; gap: 8px 12px; padding: 14px 0; }
  .sv2-my__score { min-width: 0; text-align: left; }
  .sv2-my__meta { gap: 2px 10px; font-size: 12px; }
}

/* 手机底部导航（site-v2/mobile-tabbar.html.twig，只在手机浏览器的首页、课程列表、我的学习输出）：
   高 56px 加底部安全区；页面底部留出同样高度免得挡住页脚，右下悬浮按钮移到导航上方 */
.sv2-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--sv2-color-border); background: rgba(255, 255, 255, 0.96); box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04); }
.sv2-tabbar__item { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; line-height: 1; }
/* “.sv2 a { color: inherit }” 优先级更高，颜色写在 .sv2 下 */
.sv2 .sv2-tabbar__item, .sv2 .sv2-tabbar__item:hover, .sv2 .sv2-tabbar__item:focus { color: var(--sv2-color-text-secondary); }
.sv2 .sv2-tabbar__item.is-active { color: var(--sv2-color-primary); }
.sv2-tabbar__item svg { width: 22px; height: 22px; }
.sv2-tabbar__dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: #f34f5c; box-shadow: 0 0 0 2px #fff; }
body.sv2-tabbar-page .es-wrap { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
body.sv2-tabbar-page .sv2-float { bottom: calc(68px + env(safe-area-inset-bottom)); }
