/* =============================================================
作品墙 — 作品图库页
配色 / 字体对齐 case study 页（Cyagen 项目语言：森林绿 + 梅紫 + 青柠）
圆角 / 间距沿用原 Canva 复刻令牌，未改动
============================================================= */

:root {
  /* —— 颜色（对齐 case study 页） —— */
  --ink:            #111827;
  --ink-2:          #4B5563;
  --ink-3:          #6B7280;
  --surface:        #ffffff;
  --surface-2:      #f9fafb;
  --canvas:         #f3f5f4;
  --line:           rgba(17, 24, 39, .10);
  --line-soft:      rgba(17, 24, 39, .06);
  --brand:          #25965D;
  --brand-deep:     #1b6e44;
  --brand-soft:     #ECFDD0;
  --brand-lime:     #DBF8AA;
  --accent:         #711079;

  /* —— 圆角（Canva 实测：卡片 min(radius-md,10px)，控件胶囊形） —— */
  --r-card:         8px;
  --r-md:           10px;
  --r-lg:           14px;
  --r-pill:         999px;

  /* —— 间距：桌面 24 / 平板 20 / 移动 16（Canva 实测移动端 16） —— */
  --gap:            24px;
  --gap-tight:      12px;

  --shadow-card:    0 1px 2px rgba(15, 16, 21, .06), 0 8px 24px rgba(15, 16, 21, .08);
  --shadow-pop:     0 24px 70px rgba(15, 16, 21, .22);

  --font: "Plus Jakarta Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 仅大标题「作品墙」使用衬线，其余保持无衬线 */
  --font-serif: "Newsreader", Georgia, "Noto Sans SC", "PingFang SC", serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input  { font: inherit; color: inherit; }

/* ============================================================
   骨架
   ============================================================ */

.app { display: block; min-height: 100vh; }

.main {
  flex: 1;
  min-width: 0;
  padding: 0 40px 72px;
}

/* ============================================================
   页头
   ============================================================ */

.hero { padding: 40px 0 22px; }

/* 快捷链接现在放在标题下方、左对齐 */
.hero__title { margin-bottom: 0; }

/* 选中态：文字底色浅绿 + 文字深绿（对齐 case study 页） */
::selection { background: var(--brand-lime); color: var(--brand); }

.hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 400;
  font-style: italic;
  line-height: .95;
  letter-spacing: -.03em;
  color: var(--brand);
}

.hero__sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

.hero__count { display: none; font-size: 14px; color: var(--ink-3); white-space: nowrap; }

/* —— 标签页（窄屏横向滑动，不换行） —— */
.tabs {
display: flex;
gap: 4px;
margin: 22px 0 16px;
border-bottom: 1px solid var(--line);
overflow-x: auto;
flex-wrap: nowrap;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
position: relative;
flex: 0 0 auto;
white-space: nowrap;
padding: 9px 14px 12px;
font-size: 14px;
color: var(--brand);
border-radius: var(--r-md) var(--r-md) 0 0;
}
.tab:hover { color: var(--brand-deep); background: var(--brand-soft); }
/* 选中态：更绿的青柠底 + 胶囊同款深绿字，保留书签（标签）形状 */
.tab.is-active {
  color: var(--brand-deep);
  font-weight: 600;
  background: var(--brand-lime);
}
.tab.is-active::after {
  content: "";
  position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 3px; border-radius: 3px;
  background: rgba(37, 150, 93, .5);
}

/* —— 搜索框 —— */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-3);
  transition: border-color .15s, box-shadow .15s;
}
.searchbar:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.searchbar input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: none;
  font-size: 15px; color: var(--ink);
}
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar__clear {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(15, 16, 21, .07);
  color: var(--ink-3);
  font-size: 11px;
}
.searchbar__clear:hover { background: rgba(15, 16, 21, .14); color: var(--ink); }
.searchbar__clear[hidden] { display: none; }

/* —— 筛选胶囊 —— */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: rgba(15, 16, 21, .22); color: var(--ink); }
.chip.is-open { border-color: var(--brand); color: var(--brand); background: #fff; }
.chip__caret { width: 12px; height: 12px; opacity: .55; }
.chip.is-set { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }

.dropdown {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 40;
min-width: 180px;
max-height: min(320px, 60vh);
overflow-y: auto;
padding: 6px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--r-lg);
box-shadow: var(--shadow-pop);
scrollbar-width: thin;
scrollbar-color: rgba(0, 0, 0, .2) transparent;
}
/* 细滚动条：默认隐形，hover（滚动）时才显现；用选中底色那种浅绿 */
.dropdown::-webkit-scrollbar { width: 6px; }
.dropdown::-webkit-scrollbar-track { background: transparent; }
.dropdown::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.dropdown:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .25); }
.dropdown[hidden] { display: none; }

/* 高度过低时改为居中弹窗（独立遮罩 + 卡片），避免盖住内容 */
.dropdown-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, .4);
  z-index: 290;
}
.dropdown.is-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, 86vw);
  max-height: min(64vh, 460px);
  z-index: 300;
}

.dropdown__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  text-align: left;
  color: var(--ink-2);
}
.dropdown__option:hover { background: rgba(15, 16, 21, .05); color: var(--ink); }
.dropdown__option.is-active { color: var(--brand-deep); font-weight: 600; }
.dropdown__option small { color: var(--ink-3); font-weight: 400; }

/* ============================================================
   画廊（justify rows）
   ============================================================ */

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding-bottom: 8px;
}

/* 每行：行内等高，宽度按画幅比例分配，精确撑满容器 */
.row {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
  justify-content: flex-start;
}
/* 行高被上限夹住（多半是竖版卡在宽屏上）→ 这一行填不满，居中显示 */
.row.is-partial { justify-content: center; }

.card {
  position: relative;
  flex: 0 0 auto;
  display: block;
  border-radius: var(--r-card);
  overflow: hidden;
  background: #e8e7e3;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.2, .8, .3, 1), box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.card__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}
.card__img.is-broken { display: none; }
.card__media--vertical .card__img { object-position: center 28%; }

/* 悬停预览层：叠在封面上，淡入淡出。离开 hover 时只隐藏本层，
   封面从未被换掉 → 恢复是瞬时的，不依赖网络 */
.card__hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .12s ease;
  pointer-events: none;
}
.card__hover.is-on { opacity: 1; }
.card__media--vertical .card__hover { object-position: center 28%; }

.card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 6px;
  align-content: center;
  background: linear-gradient(135deg, #deddd8 0%, #cccac3 100%);
  color: rgba(15, 16, 21, .40);
  font-size: 12px;
  letter-spacing: .08em;
}
.card__fallback b { font-size: 15px; font-weight: 700; letter-spacing: 0; color: rgba(15, 16, 21, .34); }

/* —— 卡片浮层（位置按 Canva 实测） —— */
.card__play {
  position: absolute;
  inset-inline-start: 8px;      /* Canva: 播放按钮在左侧 */
  bottom: 8px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(15, 16, 21, .62);
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
}
.card:hover .card__play,
.card:focus-visible .card__play { opacity: 1; transform: none; backdrop-filter: blur(4px); }
.card__play svg { width: 13px; height: 13px; margin-left: 1.5px; }

/* 类型徽章（左上） */
.card__badge {
  position: absolute;
  inset-inline-start: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .92);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}
.card:hover .card__badge { opacity: 1; transform: none; }

/* 时长（右上） */
.card__time {
  position: absolute;
  inset-inline-end: 8px;
  top: 8px;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: rgba(15, 16, 21, .62);
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity .18s ease;
}
.card:hover .card__time { opacity: 1; }

.empty {
  padding: 80px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
}

/* ============================================================
   详情层
   ============================================================ */

.detail {
  position: fixed;
  inset: 0;
  z-index: 100;
  /* 用 flex 而非 grid：grid 行高 auto 会让子项的 max-height:100% 无法解析，
     导致面板高度 = 内容高度、超出视口却滚不动 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.detail[hidden] { display: none; }

.detail__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 21, .48);
  backdrop-filter: blur(3px);
  animation: fade .18s ease;
}

/* 内层容器与面板同尺寸，关闭按钮以它为基准定位 */
.detail__inner {
  position: relative;
  width: min(1320px, 100%);
  max-height: 100%;
  display: flex;
}

.detail__panel {
  position: relative;
  width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  animation: pop .22s cubic-bezier(.2, .9, .3, 1);
}

@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985) } }

/* 关闭按钮：白色圆底，完全悬在面板右上角外侧；窄视口时由 CSS 收回面板内 */
.detail__close {
  position: absolute;
  top: 1px; right: -48px;
  z-index: 3;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(15, 16, 21, .22);
}
.detail__close:hover { background: #f1f0f6; }

/* —— 分镜条：视频下方，高度一致，宽度按各自画幅比例 —— */
/* 分镜条：直接贴在预览下方 —— 没有标题行，也没有分割线（Canva 就这样） */
.filmstrip {
  --shot-h: 92px;                 /* 所有分镜框统一高度 */
  min-width: 0;
  margin-top: 14px;
}

.filmstrip__stripwrap { position: relative; }

/* 真正的横向滚动容器：内容再长也能一路滑到底 */
.filmstrip__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;          /* 给滑动进度条留位，不叠在分镜框上 */
}
.filmstrip__viewport::-webkit-scrollbar { display: none; }

.filmstrip__track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}

/* 分镜框：高度统一，宽度按该帧自己的画幅比例自然推导（现为 <a> 帧链接） */
.shot {
display: block;
color: inherit;
text-decoration: none;
position: relative;
flex: 0 0 auto;
height: var(--shot-h);
padding: 0;
border: 0;
background: none;
scroll-snap-align: start;
cursor: pointer;
}

.shot__frame {
  position: relative;
  display: block;
  height: 100%;
  width: auto;
  aspect-ratio: 16 / 9;      /* 每帧按自己的画幅覆盖 */
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, #deddd8 0%, #cccac3 100%);
  border: 2px solid transparent;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.shot.is-active .shot__frame {
  border-color: rgba(27, 110, 68, .8);
  box-shadow: 0 0 0 3px rgba(27, 110, 68, .3);
}

/* 圆形箭头：叠在缩略图条上（对齐 Canva） */
.filmstrip__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(15, 16, 21, .20);
  z-index: 2;
  /* 中间默认隐藏：PC hover 分镜条才显；两端箭头常显（.at-start/.at-end） */
  opacity: 0;
  transition: opacity .16s ease;
}
.filmstrip__stripwrap:hover .filmstrip__nav,
.filmstrip__stripwrap.at-start .filmstrip__nav--next,
.filmstrip__stripwrap.at-end .filmstrip__nav--prev { opacity: 1; }
.filmstrip__nav--prev { left: 8px; }
.filmstrip__nav--next { right: 8px; }
.filmstrip__nav[hidden] { display: none; }
.filmstrip__nav:disabled { opacity: .35; cursor: default; }

/* 滚动进度条：仅滑动时淡入（is-scrolling），停手后淡出；不挡分镜框点击 */
.filmstrip__progress {
  position: absolute;
  left: 10px; right: 10px; bottom: 1px;
  height: 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 3;
}
.filmstrip__stripwrap.is-scrolling .filmstrip__progress { opacity: 1; }
.filmstrip__progress > i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: rgba(15, 16, 21, .22);
  transform: translateX(0);
}

.shot__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot__thumb.is-broken { display: none; }

/* 时间码：默认隐藏，悬停/选中时才浮出来 —— 默认观感与 Canva 一致（干净的分镜图） */
.shot__time {
  position: absolute;
  left: 6px; bottom: 6px;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: rgba(15, 16, 21, .72);
  color: #fff;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  /* 只在有真实指针的设备上给 hover 反馈；触摸设备点击后 :hover 会黏住 */
  .shot:not(.is-active):hover .shot__frame { border-color: var(--line); }
  .shot:hover .shot__time { opacity: 1; }
}
.shot.is-active .shot__time { opacity: 1; }

/* —— 详情主体：左列上下两个（视频 + 分镜条），右列一个（信息栏） —— */
.detail__body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* 不拉伸行轨道：否则多余高度会摊到行里，
     在「分镜条」和「标题」之间凭空多出一条空白带 */
  align-content: start;
}

.detail__main {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* stage 高度由 JS 写在 --stage-h 上：横竖屏共用同一高度，
   竖屏视频在框内居中，详情页整体高度不再随画幅变化 */
.stage {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.stage__player {
  position: relative;
  flex: 0 0 auto;
  height: var(--stage-h, 420px);
  width: auto;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #14141a;
}
.stage__player iframe { width: 100%; height: 100%; border: 0; display: block; }
/* [hidden] 会被上面的 display 覆盖，必须显式压回去：否则“无法生成播放链接”占位层
   和切换前的旧 iframe 会一直盖在画面上，挡住 YouTube 播放 */
.stage__ph[hidden],
.stage__player iframe[hidden] { display: none; }
.stage__player--vertical {
  aspect-ratio: 9 / 16;
  height: var(--stage-h, 420px);
  max-width: 100%;
  margin: 0 auto;
}

/* 竖屏放大按钮：只在移动端 + 竖屏视频 + 正在播放时出现（见 ≤720 媒体查询） */
.stage__zoom {
position: absolute;
right: 10px;
bottom: calc(var(--shot-h, 92px) + 22px);
z-index: 5;
width: 40px;
height: 40px;
display: none;
place-items: center;
padding: 0;
border: 0;
border-radius: 50%;
background: rgba(255, 255, 255, .94);
color: var(--ink);
box-shadow: 0 2px 10px rgba(15, 16, 21, .18);
cursor: pointer;
}
.stage__zoom:active { transform: scale(.94); }
.stage__zoom .ic-out { display: none; }
.detail--zoomed .stage__zoom .ic-in { display: none; }
.detail--zoomed .stage__zoom .ic-out { display: block; }

.stage__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .45);
  font-size: 13px;
  letter-spacing: .08em;
}
.stage__ph iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.stage__ph img { width: 100%; height: 100%; object-fit: contain; }

/* 非视频作品（embed/预览图）：高度直接算出（--embed-h，JS 按视口−分镜条），稳定不飞 */
.detail--embed .detail__inner { height: 100%; }
.detail--embed .stage { height: var(--embed-h, 480px); }
.detail--embed .stage__player { width: 100%; max-width: 100%; height: 100%; aspect-ratio: auto; background: transparent; overflow: visible; }
.detail--embed .stage__ph { position: absolute; inset: 0; display: block; }
.detail--embed .stage__ph iframe {
  display: block;
  width: 100%;
  max-width: 720px;
  height: 100%;
  margin: 0 auto;
  border-radius: var(--r-md);
  background: #fff;
}
.detail--embed .stage__ph img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  border-radius: var(--r-md);
}

/* —— 右栏：结构对齐 Canva（大标题 → meta → 创建者行 → 主按钮 → 简介） —— */
.info { min-width: 0; }

.info__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.info__meta {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.info__creator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 16px;
}

.info__avatar {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: contain;
}

.info__by { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.info__by b { font-size: 13.5px; font-weight: 600; }
.info__by small { font-size: 12px; color: var(--ink-3); }

.info__pill {
  margin-left: auto;
  flex: 0 0 auto;
  max-width: 130px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.iconbtn {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
}
.iconbtn:hover { border-color: rgba(15, 16, 21, .25); color: var(--ink); }
.iconbtn.is-done { color: #16a34a; border-color: rgba(22, 163, 74, .4); }

.info__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: filter .15s, transform .15s;
}
.btn--primary { background: var(--brand-lime); color: #0F172A; }
.btn--primary:hover { background: #c9eb93; transform: translateY(-1px); }
/* 主按钮占满右栏宽度（对齐 Canva 的 "Use this template"） */
.info__actions .btn { flex: 1; justify-content: center; }

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1024px) {
  :root { --gap: 20px; }
  .main { padding: 0 24px 64px; }
  .detail__body { grid-template-columns: minmax(0, 1fr) 280px; }
}

/* 视口不足以在面板外容纳关闭按钮时，收回面板内右上角（≥1420px 才悬在面板外） */
@media (max-width: 1415px) {
  .detail__close { top: 12px; right: 12px; }
}

@media (max-width: 720px) {
  :root { --gap: 16px; }

  .app { flex-direction: column; }

  .main { padding: 0 14px 84px; }

  .hero { padding: 22px 0 16px; }
  .hero__title { font-size: 44px; }
  .hero__sub { font-size: 13px; }
  .hero__count { display: none; }

  .tabs {
    margin: 16px -14px 12px;
    padding: 0 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }

  .searchbar { height: 44px; }

  /* 筛选器横向滚动，不再换行 */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 12px -14px 0;
    padding: 0 14px 4px;
  }
  .filters::-webkit-scrollbar { display: none; }

  .card__badge, .card__time { opacity: 1; transform: none; }

  /* 详情层全屏 */
  .detail { padding: 0; }
  .detail__inner { width: 100%; height: 100%; max-height: 100%; }
  .detail__panel { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .detail__close { top: 10px; right: 10px; }

  .info__title { font-size: 17px; -webkit-line-clamp: 2; }
  .info__meta { font-size: 12px; }
  .info__creator { margin: 14px 0 12px; }

  .filmstrip { --shot-h: 64px; margin-top: 10px; }
  .filmstrip__nav {
    width: 28px; height: 28px;
    background: rgba(255, 255, 255, .88);
    opacity: 1;               /* 移动端无 hover，中间箭头常显 */
  }
  .filmstrip__nav--prev { left: 4px; }
  .filmstrip__nav--next { right: 4px; }

  .detail__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
  }

  /* 竖屏视频分镜框窄，时间戳会溢出 → 移动端竖屏详情不显示 */
  .detail--vertical .shot__time,
  .detail--vertical .shot.is-active .shot__time { display: none; }

  /* 竖屏放大入口：仅在播放中显示 */
  .detail--vertical.detail--playing .stage__zoom { display: grid; }

  /* 放大态：预览撑满可用高度，信息栏让位，保留分镜条与关闭键 */
  .detail--zoomed .detail__body {
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }
  .detail--zoomed .info { display: none; }
  .detail--zoomed .stage { flex: 1 1 auto; min-height: 0; align-items: center; }
  /* 高度取「可用高」与「按宽度撑满的 9:16 高」的较小者：既最大化又不变形 */
  .detail--zoomed .stage__player {
    height: min(100%, calc((100vw - 28px) * 16 / 9));
    width: auto;
    max-width: 100%;
    aspect-ratio: 9 / 16;
  }
  /* 筛选下拉改 fixed：.filters 横向滚动会裁剪 absolute 子菜单 */
  .dropdown {
    position: fixed;
    z-index: 200;
  }
}

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

/* ── stage 离线兜底：精选帧轮播层 + 面板底部全宽提示条 ───────────────── */
.stage__shots {
  position: absolute;
  inset: 0;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stage__shots[hidden] { display: none; }
.stage__shots img { width: 100%; height: 100%; object-fit: contain; }

/* YouTube 风格：固定在详情面板底部、全宽、不随内容滚动 */
.detail__offline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  background: #0a0a0c;
  color: #f3f4f6;
  font-size: 11.5px;
  letter-spacing: .2px;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.detail__offline button {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
}
.detail__offline button:hover { background: rgba(255, 255, 255, .24); }

/* ── 标题右侧的快捷链接（普通文档流，滚动即消失） ── */
.hero__links {
display: flex;
align-items: center;
justify-content: flex-start;   /* 左对齐 */
gap: 26px;
margin-top: 20px;
padding-bottom: 0;
}
.hero__links a {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: .1em;
  color: rgba(17, 24, 39, .72);
  text-decoration: none;
  position: relative;
  transition: color .25s ease, letter-spacing .3s ease;
}
.hero__links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -5px; height: 1px;
  background: transparent;
  transition: background .25s ease;
}
.hero__links a:hover { color: #1b6e44; letter-spacing: .16em; }
.hero__links a:hover::after { background: #25965D; }

@media (max-width: 720px) {
  .hero__links { gap: 16px; margin-top: 14px; }
  .hero__links a { font-size: 12.5px; letter-spacing: .08em; }
}
