/* ============================================================
   TF Chat 视频中心 /videos/（build/videos.html + videos/videos.js）

   设计变量（--ink / --brand-600 / --line …）、.container、.btn、.eyebrow、.dl-help 都来自 /styles.css，
   这里只放视频中心自己的版式。
   ⚠ 视频页的样式不要写进 styles.css：那份文件一变，全站页面的 ?v= 指纹跟着变，
     连 60 张预渲染手册页都得重建。本文件有自己的指纹（build/assets.py 的 videos_version()）。
   ⚠ 同一个页面两种视图：列表视图有首屏标题区；播放视图由 <html class="vd-watch"> 标记，
     首屏与页尾的「没找到想看的」都不显示。这个 class 在 <head> 的内联脚本里就加上了。
   ⚠ 手机宽度（≤720px）：卡片改成左图右文的行、筛选条横向滚动、点击目标不小于 44px、
     页面本身绝不能横向滚动（长标题靠 overflow-wrap 与行数截断收住）。
   ============================================================ */

/* JS 用 hidden 属性做筛选；下面很多元素自己设了 display，会盖掉浏览器默认的 [hidden] 规则 */
.vd-main [hidden], .vd-hero [hidden] { display: none !important; }

/* ---------- 首屏 ---------- */
.vd-hero { position: relative; overflow: hidden; background: var(--gradient-hero); color: #fff; padding: calc(var(--nav-h) + 56px) 0 64px; }
.vd-hero::before,
.vd-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; pointer-events: none; }
.vd-hero::before { width: 520px; height: 520px; background: radial-gradient(circle, rgba(31, 211, 197, 0.5), transparent 70%); top: -240px; right: -160px; }
.vd-hero::after { width: 460px; height: 460px; background: radial-gradient(circle, rgba(74, 144, 217, 0.55), transparent 70%); bottom: -260px; left: -160px; }
.vd-hero .container { position: relative; z-index: 2; }
/* 文案列在 1180 容器里正好 500px：六种语言的两行标题是按这个宽度量过的（葡语第一行 46px 下 483px），
   所以标题封顶 44px 留出余量——字体换成 macOS 的 SF 之后字宽会有出入。改文案或改列宽都要重量。 */
.vd-hero-grid { display: grid; grid-template-columns: minmax(0, 500fr) minmax(0, 580fr); gap: 52px; align-items: center; }
.vd-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }
.vd-hero .eyebrow { background: rgba(255, 255, 255, 0.1); color: #9fe6dd; margin-bottom: 0; }
.vd-hero .eyebrow::before { background: var(--accent-400); }
.vd-hero h1 { color: #fff; font-size: clamp(30px, 3.5vw, 44px); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; text-wrap: balance; }
.vd-hero-sub { font-size: clamp(15px, 1.7vw, 18px); line-height: 1.65; color: #c7d7ec; }
.vd-jump { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.vd-jump a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 18px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.18s, transform 0.18s;
}
.vd-jump a:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.vd-jump a svg { width: 17px; height: 17px; flex: none; }

/* 推荐视频位：取到数据之前是一块同比例的占位，避免首屏高度在渲染后跳动 */
.vd-featured { min-width: 0; }
.vd-featured:empty::before {
  content: ""; display: block; aspect-ratio: 620 / 349; border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
}
/* 没有视频 / 取数失败：没有可推荐的东西，首屏只留标题 */
.vd-nofeature .vd-featured { display: none; }
.vd-nofeature .vd-hero-grid { grid-template-columns: minmax(0, 720px); }
.vd-nofeature .vd-more { display: none; }

/* 播放视图：不要首屏和页尾求助块；导航是 fixed 的，正文自己让出导航高度。
   min-height：「视频不存在」这类短页面上，页脚不能悬在屏幕中间、下面露一截白底 */
.vd-watch .vd-hero, .vd-watch .vd-more { display: none; }
.vd-watch .vd-main { padding-top: var(--nav-h); min-height: 70vh; }

.vd-main { min-height: 300px; }
.vd-loading { padding: 64px 0; text-align: center; color: var(--text-muted); font-size: 15px; }

/* ---------- 封面（色块封面 / 封面图）----------
   没有封面图时用标题生成一张色块封面：底色 + 右上角一个大圆 + 左上角标签 + 标题。
   三套配色：normal（深蓝）、series（品牌蓝，系列分集）、feature（最深，首屏推荐位与播放器）。
   ⚠ 标题字号跟着封面宽度走（cqw）：同一套标记要用在 4 列、3 列、首屏和播放器里。
     不支持容器查询单位的浏览器会丢掉第二条 font-size，用前面的固定值。 */
.vd-thumb {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  aspect-ratio: 16 / 9; padding: 14px 16px; color: #fff; background: #14315a;
  container-type: inline-size;
}
.vd-thumb::before {
  content: ""; position: absolute; width: 68%; aspect-ratio: 1; border-radius: 50%;
  right: -21.5%; top: -44%; background: #1d4477;
}
.vd-thumb > * { position: relative; }
.vd-thumb--series { background: #245a95; }
.vd-thumb--series::before { background: #2c6fb2; }
.vd-thumb--feature { background: #0b1a30; }
.vd-thumb--feature::before { background: #14315a; }
.vd-thumb > img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.vd-thumb.has-img::before { display: none; }

.vd-thumb-tag { align-self: flex-start; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.4; color: #9fe6dd; }
.vd-thumb--series .vd-thumb-tag { color: #d6e8fb; }
/* 压在封面图上的标签要有底，否则浅色图上看不清 */
.vd-thumb.has-img .vd-thumb-tag { color: #fff; background: rgba(8, 18, 33, 0.78); padding: 2px 7px; border-radius: 6px; letter-spacing: 0.02em; }
.vd-thumb-title {
  margin-top: 10px; max-width: 88%; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;
  font-size: 21px; font-size: clamp(15px, 7.6cqw, 26px);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
.vd-thumb--normal .vd-thumb-title { font-size: 24px; font-size: clamp(15px, 6.6cqw, 26px); }
.vd-thumb-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-width: 0; }
.vd-thumb-play { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #fff; color: #14315a; display: grid; place-items: center; }
.vd-thumb--series .vd-thumb-play { color: #245a95; }
.vd-thumb-play svg { width: 14px; height: 14px; }
.vd-thumb-time { margin-left: auto; flex: none; font-size: 12px; font-weight: 600; line-height: 1.4; color: #fff; background: rgba(8, 18, 33, 0.78); padding: 3px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }

/* 小封面（右栏列表、手机上的行）：只留标签和时长，标题在封面旁边 */
.vd-thumb--mini { width: 120px; flex: none; border-radius: 9px; padding: 8px 9px; }
.vd-thumb--mini .vd-thumb-tag { font-size: 10.5px; letter-spacing: 0.02em; }
.vd-thumb--mini .vd-thumb-time { font-size: 11px; padding: 2px 5px; border-radius: 5px; }

/* 首屏推荐位 / 播放器封面：播放键居中 */
.vd-feature {
  aspect-ratio: 620 / 349; padding: 24px 28px; border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: 0 30px 70px rgba(6, 18, 36, 0.45);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
a.vd-feature:hover { transform: translateY(-4px); color: #fff; }
.vd-feature .vd-thumb-tag { font-size: 12px; letter-spacing: 0.08em; }
.vd-feature .vd-thumb-title { margin-top: 12px; max-width: 62%; font-size: 30px; font-size: clamp(19px, 5.2cqw, 34px); line-height: 1.25; -webkit-line-clamp: 3; }
.vd-feature .vd-thumb-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  color: #14315a; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.vd-feature .vd-thumb-play svg { width: 30px; height: 30px; }
.vd-feature .vd-thumb-time { font-size: 13px; padding: 4px 9px; border-radius: 7px; }
.vd-feature-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vd-feature-name { font-size: 17px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.vd-feature-sum { font-size: 13.5px; line-height: 1.5; color: #c7d7ec; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* 有封面图时底部压一层渐变，标题与简介才读得清 */
.vd-feature.has-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(180deg, rgba(8, 18, 33, 0), rgba(8, 18, 33, 0.82)); }
.vd-feature.has-img > .vd-thumb-foot { z-index: 1; }

/* ---------- 分类筛选 + 搜索 ---------- */
.vd-bar { border-bottom: 1px solid var(--line-soft); background: #fff; }
.vd-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.vd-chips { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
.vd-chips::-webkit-scrollbar { display: none; }
.vd-chip {
  flex: none; height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: #fff; color: var(--text-soft);
  font-family: inherit; font-size: 15px; font-weight: 600;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.vd-chip:hover { border-color: var(--brand-400); color: var(--brand-700); }
.vd-chip[aria-pressed="true"] { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.vd-search { position: relative; width: 280px; flex: none; }
.vd-search svg { position: absolute; left: 15px; top: 13px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.vd-search input {
  width: 100%; height: 44px; padding: 0 16px 0 42px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); font-family: inherit; font-size: 14.5px; color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.vd-search input:focus { outline: none; border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.18); }

/* ---------- 分类分区 ---------- */
.vd-list { padding-bottom: 8px; }
.vd-sec {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 26px; align-items: end;
  grid-template-areas: "head play" "grid grid" "more more";
  padding-top: 56px;
}
.vd-sec-head { grid-area: head; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vd-sec-head h2 { font-size: clamp(22px, 2.8vw, 30px); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.vd-sec-head p { font-size: 16px; color: var(--text-soft); }
.vd-playall { grid-area: play; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--brand-600); }
.vd-playall:hover { color: var(--brand-700); }
.vd-playall svg { width: 17px; height: 17px; flex: none; }
.vd-playall .vd-ic-play { display: none; }
.vd-grid { grid-area: grid; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.vd-sec--series .vd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.vd-showall { grid-area: more; display: none; }

.vd-card {
  display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.vd-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e2f2; }
.vd-card .vd-thumb--normal { padding: 18px 20px; }
.vd-card .vd-thumb--normal .vd-thumb-play { width: 38px; height: 38px; }
.vd-card .vd-thumb--normal .vd-thumb-play svg { width: 16px; height: 16px; }
.vd-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px 20px 20px; }
.vd-sec--series .vd-card-body { padding: 16px 18px 18px; }
.vd-card-title { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.vd-sec--series .vd-card-title { font-size: 16px; }
.vd-card-sum {
  font-size: 14px; line-height: 1.55; color: var(--text-soft);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
.vd-sec--series .vd-card-sum { font-size: 13.5px; }

/* ---------- 状态块：空态 / 出错 / 没有结果 / 视频不存在 ---------- */
.vd-state { max-width: 560px; margin: 0 auto; padding: 72px 0 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vd-state-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-3); color: var(--brand-600); margin-bottom: 6px; }
.vd-state-ic svg { width: 30px; height: 30px; }
.vd-state h2 { font-size: clamp(21px, 2.6vw, 26px); }
.vd-state p { font-size: 15.5px; color: var(--text-soft); }
.vd-state .btn { margin-top: 10px; }
.vd-watch .vd-state, .vd-nofeature .vd-state { padding-bottom: 96px; }

/* ---------- 播放视图 ---------- */
.vd-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; min-height: 60px; padding: 10px 0; font-size: 14px; color: var(--text-muted); }
.vd-crumbs a { display: inline-flex; align-items: center; gap: 2px; color: var(--brand-600); font-weight: 600; }
.vd-crumbs a:hover { color: var(--brand-700); }
.vd-crumbs svg { width: 12px; height: 12px; flex: none; }
.vd-crumbs .vd-ic-back { display: none; }
.vd-crumbs > span { overflow-wrap: anywhere; min-width: 0; }

.vd-watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-bottom: 96px; }
.vd-watch-main { display: flex; flex-direction: column; min-width: 0; }
.vd-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.vd-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0b1a30; }
.vd-player video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; background: #0b1a30; }
/* 没有封面图：播放前盖一层标题色块封面，整块可点。开始播放后（.is-started）撤掉，露出原生控制条 */
.vd-cover {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 2;
  aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 30px 34px;
  font-family: inherit; text-align: left; cursor: pointer;
}
.vd-cover .vd-thumb-tag { font-size: 13px; }
.vd-cover .vd-thumb-title { max-width: 70%; font-size: 36px; font-size: clamp(20px, 4.75cqw, 40px); }
.vd-cover .vd-thumb-play { width: 84px; height: 84px; margin: -42px 0 0 -42px; transition: transform 0.18s; }
.vd-cover .vd-thumb-play svg { width: 34px; height: 34px; }
.vd-cover:hover .vd-thumb-play { transform: scale(1.06); }
.vd-player.is-started .vd-cover { display: none; }
.vd-player-error {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 3; padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: #0b1a30; color: #fff; font-size: 15px;
}
.vd-player-error strong { font-size: 17px; }
.vd-player-error span { color: #c7d7ec; }

.vd-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: #fff4e6; color: #6b3f0a; font-size: 13.5px; line-height: 1.55; }
.vd-notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.vd-info { display: flex; flex-direction: column; align-items: flex-start; padding-top: 24px; min-width: 0; }
.vd-pill { font-size: 13px; font-weight: 700; color: var(--brand-700); background: var(--surface-3); padding: 5px 12px; border-radius: 999px; }
.vd-info h1 { margin-top: 12px; font-size: clamp(24px, 2.8vw, 30px); line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; max-width: 100%; }
.vd-meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--text-muted); }
.vd-summary { margin-top: 18px; font-size: 16px; line-height: 1.7; color: var(--text-soft); overflow-wrap: anywhere; white-space: pre-line; }
.vd-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; max-width: 100%; }
.vd-actions .btn { min-height: 48px; }

.vd-chapters { margin-top: 36px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 12px 12px; }
.vd-chapters h2 { margin: 0 12px 10px; font-size: 18px; }
.vd-chapters ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.vd-chapter {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 15px; line-height: 1.45; text-align: left; color: var(--text);
  transition: background 0.15s;
}
.vd-chapter:hover { background: var(--surface-2); }
.vd-chapter-t { flex: none; width: 52px; font-weight: 600; color: var(--brand-600); font-variant-numeric: tabular-nums; }
.vd-chapter-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vd-chapter-now { display: none; flex: none; font-size: 12.5px; font-weight: 600; color: var(--brand-700); }
.vd-chapter[aria-current="true"] { background: var(--surface-3); font-weight: 700; color: var(--ink); }
.vd-chapter[aria-current="true"] .vd-chapter-t { font-weight: 700; color: var(--brand-700); }
.vd-chapter[aria-current="true"] .vd-chapter-now { display: block; }

.vd-pn { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vd-pn a { display: flex; align-items: center; gap: 14px; min-height: 84px; min-width: 0; padding: 14px 20px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.18s, box-shadow 0.18s; }
.vd-pn a:hover { border-color: var(--brand-400); box-shadow: var(--shadow-sm); }
.vd-pn svg { width: 20px; height: 20px; flex: none; color: var(--brand-600); }
.vd-pn-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vd-pn-label { font-size: 12.5px; color: var(--text-muted); }
.vd-pn-title { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.vd-pn-next { grid-column: 2; justify-content: flex-end; text-align: right; }

/* 右栏：本系列分集 / 同分类视频 / 接着看 */
.vd-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 10px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* 允许折行：葡语 / 西语的「Reprodução automática」很长，和标题挤在一行会把标题压成三行，放不下时开关自己落到下一行 */
.vd-box-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 0 10px 4px; }
.vd-box-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
.vd-box h2 { font-size: 17px; overflow-wrap: anywhere; }
.vd-box-sub { font-size: 13px; color: var(--text-muted); }
.vd-autoplay { display: flex; align-items: center; gap: 8px; flex: none; min-height: 44px; font-size: 13px; color: var(--text-soft); cursor: pointer; user-select: none; }
.vd-switch { position: relative; width: 40px; height: 24px; flex: none; border: 0; padding: 0; border-radius: 999px; background: #c6d0dc; cursor: pointer; transition: background 0.18s; }
.vd-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.18s; }
.vd-switch[aria-checked="true"] { background: var(--brand-600); }
.vd-switch[aria-checked="true"]::after { transform: translateX(16px); }
.vd-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; min-width: 0; transition: background 0.15s; }
.vd-item:hover { background: var(--surface-2); }
.vd-item[aria-current="true"] { background: var(--surface-3); }
.vd-item-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vd-item-title { font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.vd-item-sub { font-size: 12.5px; color: var(--text-muted); }
.vd-item-sub.is-now { font-weight: 600; color: var(--brand-700); }
.vd-viewall { display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 6px 10px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--brand-600); text-align: center; }
.vd-viewall:hover { border-color: var(--brand-400); color: var(--brand-700); }

/* ---------- 平板 ---------- */
@media (max-width: 1024px) {
  .vd-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .vd-featured { max-width: 680px; }
  .vd-sec--series .vd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vd-watch-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 900px) {
  .vd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 手机 ---------- */
@media (max-width: 720px) {
  /* 共用导航里的语言胶囊与汉堡在手机上不足 44px，这一页补到 44（只作用于带 .vd-page 的 body） */
  .vd-page .lang-switch > summary { min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .vd-page .nav-toggle { width: 44px; height: 44px; }

  .vd-hero { padding: calc(var(--nav-h) + 28px) 0 32px; }
  .vd-hero-grid { gap: 22px; }
  .vd-hero-copy { gap: 12px; }
  .vd-hero h1 { font-size: 28px; line-height: 1.22; margin-top: 2px; }
  .vd-hero-sub { font-size: 15px; line-height: 1.6; }
  .vd-jump { display: none; }
  .vd-featured:empty::before { border-radius: var(--radius); }
  .vd-feature { padding: 14px 16px; border-radius: var(--radius); box-shadow: none; }
  .vd-feature .vd-thumb-tag { font-size: 11px; }
  .vd-feature .vd-thumb-title { margin-top: 6px; max-width: 78%; -webkit-line-clamp: 2; }
  .vd-feature .vd-thumb-play { width: 56px; height: 56px; margin: -20px 0 0 -28px; }
  .vd-feature .vd-thumb-play svg { width: 22px; height: 22px; }
  .vd-feature .vd-thumb-time { font-size: 12px; padding: 3px 7px; border-radius: 6px; }
  .vd-feature-name { font-size: 14px; }
  .vd-feature-sum { display: none; }

  /* 筛选条：分类横向滚动（右侧出血到屏幕边，提示后面还有），搜索框单独一行 */
  .vd-bar-inner { flex-direction: column; align-items: stretch; gap: 10px; min-height: 0; padding: 10px 0 14px; }
  .vd-chips { gap: 8px; margin-right: -18px; padding-right: 18px; }
  .vd-chip { padding: 0 18px; font-size: 14.5px; }
  .vd-search { width: 100%; }
  /* 小于 16px 的输入框在 iOS 上聚焦时整页会被放大 */
  .vd-search input { font-size: 16px; }

  .vd-sec { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "grid" "play" "more"; row-gap: 16px; padding-top: 30px; }
  .vd-sec-head { gap: 6px; }
  .vd-sec-head h2 { font-size: 22px; }
  .vd-sec-head p { font-size: 14.5px; line-height: 1.55; }
  .vd-grid, .vd-sec--series .vd-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  /* 卡片改成左图右文的行 */
  .vd-card { flex-direction: row; align-items: center; gap: 12px; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: none; }
  .vd-card:hover { transform: none; box-shadow: none; }
  .vd-card .vd-thumb, .vd-card .vd-thumb--normal { width: 136px; flex: none; border-radius: 10px; padding: 9px 10px; }
  .vd-card .vd-thumb-title, .vd-card .vd-thumb-play { display: none; }
  .vd-card .vd-thumb-tag { font-size: 10.5px; letter-spacing: 0.02em; }
  .vd-card .vd-thumb-time { font-size: 11px; padding: 2px 5px; border-radius: 5px; }
  .vd-card-body, .vd-sec--series .vd-card-body { padding: 0; gap: 5px; }
  .vd-card-title, .vd-sec--series .vd-card-title { font-size: 15px; }
  .vd-card-sum, .vd-sec--series .vd-card-sum { font-size: 13px; line-height: 1.45; color: var(--text-muted); }
  /* 「从第 1 集开始连续播放」在手机上是分区底部的通栏主按钮 */
  .vd-playall { justify-content: center; gap: 8px; min-height: 48px; padding: 8px 18px; border-radius: 999px; background: var(--brand-600); color: #fff; text-align: center; }
  .vd-playall:hover { color: #fff; }
  .vd-playall .vd-ic-play { display: block; width: 16px; height: 16px; }
  .vd-playall .vd-ic-arrow { display: none; }
  /* 普通分类在「全部」下只先露 4 个，其余收在「查看全部」后面（点了就是筛到这个分类） */
  .vd-sec.is-collapsed .vd-card:nth-child(n+5) { display: none; }
  .vd-sec.is-collapsed .vd-showall {
    display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 18px;
    border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
    font-family: inherit; font-size: 15px; font-weight: 600; color: var(--brand-600);
  }
  .vd-more.section--tight { padding: 36px 0 56px; }
  .vd-state { padding: 48px 0 16px; }

  /* 播放视图：面包屑收成一个返回入口，播放器与提示条通栏 */
  .vd-crumbs { min-height: 52px; padding: 4px 0; }
  .vd-crumbs > *:not(.vd-crumb-root) { display: none; }
  .vd-crumbs a.vd-crumb-root { min-height: 44px; margin-left: -6px; padding-right: 10px; font-size: 15.5px; color: var(--ink); }
  .vd-crumbs .vd-ic-back { display: block; width: 22px; height: 22px; }
  .vd-watch-grid { gap: 28px; padding-bottom: 56px; }
  .vd-player { margin: 0 -18px; border-radius: 0; }
  .vd-cover { padding: 14px 16px; border-radius: 0; }
  .vd-cover .vd-thumb-tag { font-size: 11px; }
  .vd-cover .vd-thumb-title { max-width: 80%; margin-top: 6px; }
  .vd-cover .vd-thumb-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .vd-cover .vd-thumb-play svg { width: 24px; height: 24px; }
  .vd-notice { margin: 0 -18px; padding: 12px 18px; border-radius: 0; }
  .vd-info { padding-top: 20px; }
  .vd-pill { font-size: 12.5px; padding: 5px 11px; }
  .vd-info h1 { margin-top: 10px; font-size: 24px; }
  .vd-meta { margin-top: 8px; font-size: 13px; gap: 4px 14px; }
  /* 手机上先给按钮、再给简介（视觉稿的顺序） */
  .vd-actions { order: 1; align-self: stretch; flex-direction: column; margin-top: 18px; gap: 10px; }
  .vd-actions .btn { width: 100%; white-space: normal; text-align: center; }
  .vd-summary { order: 2; margin-top: 20px; font-size: 15px; line-height: 1.65; }
  .vd-chapters { margin-top: 24px; padding: 18px 8px 8px; }
  .vd-chapters h2 { margin: 0 10px 8px; font-size: 17px; }
  .vd-chapter { gap: 12px; min-height: 48px; padding: 6px 10px; font-size: 14.5px; }
  .vd-chapter-t { width: 44px; }
  .vd-chapter[aria-current="true"] .vd-chapter-now { display: none; }
  .vd-pn { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
  .vd-pn a { min-height: 68px; padding: 12px 16px; }
  .vd-pn-next { grid-column: auto; }
  .vd-side { gap: 28px; }
  .vd-box { border: 0; border-radius: 0; padding: 0; gap: 4px; }
  .vd-box-head { padding: 0 0 6px; }
  .vd-box h2 { font-size: 19px; }
  .vd-item { margin: 0 -8px; padding: 6px 8px; border-radius: 14px; }
  .vd-item .vd-thumb--mini { width: 136px; border-radius: 10px; padding: 9px 10px; }
  .vd-item-title { font-size: 15px; }
  .vd-item-sub { font-size: 13px; }
  .vd-viewall { min-height: 48px; margin: 10px 0 0; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .vd-card:hover, a.vd-feature:hover, .vd-jump a:hover { transform: none; }
}
@media print {
  .vd-bar, .vd-side, .vd-more { display: none !important; }
}
