/* 成品库：客户视角。
 * 与技术后台相反 —— 这里视觉优先、留白舒展，一屏少放几件但每件看得清楚，
 * 因为客户是来挑片和拿素材的，不是来排查故障的。
 */

.search {
  width: 240px; padding: 6px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font: inherit; font-size: 13px; background: var(--bg); color: var(--text);
}
.search:focus { outline: 2px solid var(--primary); outline-offset: -1px; background: var(--panel); }

.hero {
  display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.hero p { margin: 0; font-size: 14px; }

.herostats { margin-left: auto; display: flex; gap: 26px; }
.herostats div { text-align: right; }
.herostats .v {
  font-size: 22px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.herostats .k { font-size: 12px; color: var(--faint); }

/* 今日待发横幅：新片催发。橙色渐变要显眼但不能像报错 */
.freshbar {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 14px; border-radius: 12px;
  background: linear-gradient(100deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa; color: #9a3412;
}
.freshbar b { font-size: 15px; }
.freshbar span { font-size: 12.5px; opacity: .8; }

/* 走 token 而不是写死：orange-600 配页面底色只有 3.40，不过 AA */
.herostats div.hot .v { color: var(--cta-dark); }

/* 爆款分徽章：S 橙红 / A 橙 / B 蓝 / C 灰 */
.score {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  display: inline-flex; align-items: baseline; gap: 3px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 13px; font-weight: 800; color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}
.score i { font-style: normal; font-size: 11px; font-weight: 700; opacity: .92; }
.score.gs { background: linear-gradient(135deg, #f43f5e, #f97316); }
.score.ga { background: linear-gradient(135deg, #f97316, #f59e0b); }
.score.gb { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.score.gc { background: #94a3b8; }
.score.big { position: static; font-size: 19px; padding: 7px 15px; }
.score.big i { font-size: 14px; }

/* 发布状态角标（封面右上） */
.pub {
  position: absolute; right: 8px; top: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}
.pub.new { background: #15803d; }   /* green-700：白字 5.02，600 档只有 3.30 */
.pub.done { background: rgba(15, 23, 42, .78); }
.pub.hot { background: linear-gradient(135deg, #ef4444, #f97316); }

.wwhy {
  font-size: 12.5px; color: #b45309; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--panel);
  font-size: 13px; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { background: var(--bg); color: var(--text); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
/* 选中态是蓝底白字，再压 .7 透明度就成了 #bed0f9 on #2563eb = 3.34，不过 AA。
 * 计数本来就该看得清，用不着靠淡化来「弱化」。 */
.chip .n { margin-left: 4px; font-variant-numeric: tabular-nums; }

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

.wcard {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  /* 只动阴影和边框，不用 transform —— 卡片位移会让整格网格看着在抖 */
  transition: box-shadow .2s, border-color .2s;
}
.wcard:hover { box-shadow: var(--shadow-lg); border-color: var(--line-strong); }

.thumb {
  position: relative; aspect-ratio: 16 / 10;
  background: #0f172a center/cover no-repeat;
  cursor: pointer;
}
.thumb .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #475569; font-size: 12px;
}
.thumb .len {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(15, 23, 42, .82); color: #fff;
  font-size: 11.5px; font-variant-numeric: tabular-nums;
}
/* 整块封面的命中区。做成真 <button> 而不是 role="button" 的 div，是为了
 * 让角标能留在它外面 —— 角标在按钮里会触发 WCAG 2.5.3 的名称不匹配（见 studio.js）。
 * 盖在角标（z-index 2）上面但背景透明，所以角标照样看得见。 */
.thumbhit {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  border: 0; padding: 0; background: transparent; cursor: pointer;
}
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transition: opacity .2s; background: rgba(15, 23, 42, .3);
}
.thumbhit:hover .play, .thumbhit:focus-visible .play { opacity: 1; }
.thumbhit:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.thumb .play svg { width: 44px; height: 44px; fill: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }

.wbody { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.wtitle {
  font-size: 15px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.wmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.wmeta .sep { opacity: .5; }
.wmeta .pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.wmeta .pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.wmeta .pill.warn { background: var(--warn-soft, #fef3c7); color: var(--warn, #b45309); }
.wmeta .pill.err { background: #fee2e2; color: #b91c1c; }
/* 片种徽章：一场直播出好几类片之后，客户扫一眼就要能分清哪条是哪类 */
.wmeta .pill.kind { background: var(--primary-soft, #ffe9e2); color: var(--primary, #e8590c); }
.wmeta .pill.vfx { background: #ede9fe; color: #6d28d9; }
.wtags { display: flex; gap: 5px; flex-wrap: wrap; }
.wtags span {
  padding: 1px 7px; border-radius: 4px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 11.5px;
}
.wfoot {
  display: flex; gap: 6px; padding: 10px 14px;
  border-top: 1px solid var(--line); background: var(--bg);
}
.wfoot .btn { flex: 1; justify-content: center; }

/* 抽屉。层级取自 design-system.css 的那把尺子 —— 详情打开时导航栏必须被盖住，
 * 否则它那条 60px 的带子会拦掉关闭按钮的点击（task-48）。 */
.mask {
  position: fixed; inset: 0; z-index: var(--z-overlay, 1000);
  background: rgba(15, 23, 42, .45);
  display: flex; justify-content: flex-end;
}
.drawer {
  width: min(680px, 100%); height: 100%;
  background: var(--panel); display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(15, 23, 42, .18);
  animation: slide .22s ease-out;
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }

.dhead {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.dhead .right { margin-left: auto; display: flex; gap: 8px; }
.dbody { padding: 18px; overflow: auto; flex: 1; min-height: 0; }

.dsec { margin-bottom: 20px; }
.dsec h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 600;
  color: var(--faint); text-transform: uppercase; letter-spacing: .04em;
}
.dsec .box {
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--bg);
  white-space: pre-wrap; line-height: 1.7;
}
.dsec ul { margin: 0; padding-left: 18px; }
.dsec li { margin-bottom: 4px; }

.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.covers img {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: var(--r-sm); border: 1px solid var(--line);
  cursor: pointer; transition: border-color .2s;
}
.covers img:hover { border-color: var(--primary); }
.covers figure { margin: 0; }
.covers figcaption { font-size: 11px; color: var(--faint); text-align: center; margin-top: 3px; }

/* 成品是 9:16 竖版，铺满宽度会有 1200px 高，把下面的文案全顶出屏幕。
 * 限高并居中，让「预览 + 文案」能同屏看到。 */
.dvideo {
  display: block; max-width: 100%; max-height: 46vh; margin: 0 auto 16px;
  border-radius: var(--r-sm); background: #000;
}

.warnbox {
  padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--warn-soft); color: var(--warn);
  border: 1px solid #fde68a; font-size: 13px; margin-bottom: 16px;
}

/* ------------------------------------------------ 发布工作台（详情增强） */
.scorecard {
  margin: 0 0 14px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(160deg, #fffbf5, #fff);
}
.scoremain { display: flex; align-items: center; gap: 12px; }
.scoremain b { font-size: 16px; }
.scorewhy { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.scorewhy li { margin: 3px 0; }
.expert {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.exhead { font-size: 12.5px; font-weight: 700; color: #6d28d9; margin-bottom: 4px; }
.exwarn { color: #b45309; margin-top: 4px; }

.whenbox {
  margin: 0 0 12px; padding: 11px 14px;
  border: 1px solid #bae6fd; border-radius: var(--r-sm);
  background: #f0f9ff; font-size: 13px;
}
.whenbox b { display: block; font-size: 12px; color: #0369a1; margin-bottom: 3px; }

.pubbox {
  margin: 0 0 16px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel);
}
.btn.big { width: 100%; min-height: 46px; font-size: 15px; }
.raterow { display: flex; gap: 8px; }
.rate {
  flex: 1; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg);
  font: inherit; font-size: 14px; cursor: pointer;
}
.rate.on { border-color: var(--cta); background: #fff7ed; font-weight: 700; }
.linkbtn {
  border: 0; background: none; color: var(--primary); font: inherit;
  font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0 0 0 8px;
}
.copybit {
  float: right; border: 1px solid var(--line-strong); background: var(--bg);
  border-radius: 6px; font: inherit; font-size: 11.5px; padding: 2px 10px;
  cursor: pointer; color: var(--muted); text-transform: none; letter-spacing: 0;
}
.copybit:hover { color: var(--text); background: var(--panel); }

/* 这两个视觉上就该小（行内链接 / 行尾「复制」），但手指得点得到：
   用伪元素把命中区撑到 44px，不改可见尺寸也不挤走版式 */
.linkbtn, .copybit { position: relative; }
.linkbtn::after, .copybit::after {
  content: ''; position: absolute; left: 0; right: 0;
  top: 50%; height: 44px; transform: translateY(-50%);
}

/* 版本时间线：整行是按钮，手机上够 44px 点 */
.vlist { list-style: none; margin: 6px 0 0; padding: 0; }
.vlist li + li { margin-top: 4px; }
.vrow {
  display: block; width: 100%; min-height: 44px; text-align: left;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg); font: inherit; font-size: 12.5px; line-height: 1.5;
  color: var(--muted); cursor: pointer;
}
.vrow b { color: var(--text); margin-right: 6px; }
.vrow:hover { border-color: var(--primary); background: var(--panel); }

/* 带字幕版 */
.ccbox {
  margin: 0 0 14px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel);
}
.ccbox > b { font-size: 14px; }
.ccstyles { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.ccstyle {
  min-height: 44px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg);
  font: inherit; font-size: 13px; cursor: pointer;
}
.ccstyle.on { border-color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.ccdone { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 特效版面板：与 ccbox 同一套骨架，紫色系区分「这是已经做好的」 */
.vfxbox {
  margin: 0 0 14px; padding: 13px 14px;
  border: 1px solid #ddd6fe; border-radius: var(--r);
  background: linear-gradient(180deg, #f5f3ff, var(--panel));
}
.vfxbox > b { font-size: 14px; color: #5b21b6; }

/* =====================================================================
 * 手机层（≤559px）
 * 客户是只有手机的主播，多半从微信里点进来。上面那套是桌面稿，
 * 直接给手机用有三处硬伤：顶栏最小内容宽约 630px 必然横向滚动、
 * 按钮实测才 27px 高按不准、封面 16/10 把竖版素材的脸横切掉。
 * ===================================================================== */

/* 保存引导：按运行环境显示不同说法，文案在 JS 里 */
.savebox {
  margin: 0 0 16px; padding: 14px;
  border: 1px solid #bfdbfe; border-radius: var(--r);
  background: var(--primary-soft);
}
.savebox b { display: block; margin-bottom: 6px; font-size: 15px; color: var(--text); }
.savebox p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.savebox .step {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 10px;
  font-size: 14px; line-height: 1.6;
}
.savebox .step i {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff; font-style: normal;
  font-size: 12px; display: grid; place-items: center; margin-top: 1px;
}

/* 底部常驻操作条：拇指自然落点，动作按重要性从上往下 */
.dbar {
  position: relative; z-index: 2; flex: none;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--line);
}
.dbar .btn { width: 100%; justify-content: center; }
.dbar .primary {
  min-height: 52px; font-size: 16px; font-weight: 600;
  background: var(--cta); border-color: var(--cta); color: #fff;
}
.dbar .primary:hover { background: var(--cta-dark); }

/* ------------------------------------------------------- 视图切换 + 回放 */

.viewtabs { display: flex; gap: 8px; margin-bottom: 16px; }
.vtab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  padding: 8px 18px; border-radius: 999px; font-size: 14px; cursor: pointer;
  min-height: 40px; transition: background-color .2s, color .2s;
}
.vtab svg { width: 16px; height: 16px; }
.vtab.on { background: var(--text); border-color: var(--text); color: #fff; font-weight: 600; }

/* ---------- 场次视图：日期分组 + 场卡 ---------- */
.rlist { display: flex; flex-direction: column; gap: 4px; }
.rday h3 {
  margin: 18px 0 10px; font-size: 14px; color: var(--faint); font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.rday h3::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.rday:first-child h3 { margin-top: 0; }
.rcard {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 12px;
}
.rhead { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.rhead .rthumb {
  flex: 0 0 56px; width: 56px; height: 74px; border-radius: 10px;
  background: #0f172a center/cover no-repeat;
  display: grid; place-items: center;
}
.rthumb svg { width: 22px; height: 22px; fill: rgba(255, 255, 255, .9); filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5)); }
.rmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rmain b { font-size: 15px; }
.rmain .warn { color: #b45309; }
.rarrow { margin-left: auto; width: 18px; height: 18px; color: var(--faint); flex: none; }
.rworks { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.rworks::-webkit-scrollbar { display: none; }
.rchip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--line); background: var(--bg); border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--text);
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rchip .score { position: static; padding: 1px 7px; font-size: 11px; box-shadow: none; }
.rchip .score i { font-size: 10px; }
.rchip:hover { border-color: var(--primary); color: var(--primary); }
/* 场次卡片上的片种小标：多片种矩阵后一场直播会有反差/教学/痛点各一条 */
.rchip .kmini {
  font-style: normal; flex: none; padding: 0 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700;
  background: var(--primary-soft, #ffe9e2); color: var(--primary, #e8590c);
}
.rplayer { margin-top: 12px; }
.rplayer .dvideo { max-height: 60vh; }

/* ---------- 刷片：抖音式全屏竖滑 ---------- */
.feed { position: fixed; inset: 0; z-index: var(--z-overlay, 1000); background: #000; }
.feedtop {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(rgba(0, 0, 0, .5), transparent);
  pointer-events: none;
}
.feedback {
  display: inline-flex; align-items: center; gap: 4px; pointer-events: auto;
  border: 0; background: rgba(0, 0, 0, .35); color: #fff;
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 14px 8px 8px; border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(6px);
}
.feedback svg { width: 18px; height: 18px; }
.feedpos { color: rgba(255, 255, 255, .85); font-size: 13px; font-variant-numeric: tabular-nums; }
.feedscroll {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.feedscroll::-webkit-scrollbar { display: none; }
.fempty { height: 100%; display: grid; place-items: center; color: #94a3b8; }
.fcard {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden;
}
.fcard video {
  width: 100%; height: 100%; object-fit: contain; background: #000;
}
/* 点画面暂停/继续的命中层：让开右栏和底部信息 */
.ftap { position: absolute; inset: 0 76px 170px 0; z-index: 1; cursor: pointer; }
.fpause {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  pointer-events: none;
}
.fpause svg { width: 74px; height: 74px; fill: rgba(255, 255, 255, .75); filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .6)); }
.fprog { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 3px; background: rgba(255, 255, 255, .18); }
.fprog i { display: block; height: 100%; width: 0; background: #fff; }
/* 右侧动作栏：抖音位。底部留出 25% 安全区照顾单手拇指 */
.frail {
  position: absolute; right: 8px; bottom: 150px; z-index: 3;
  display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.fbtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 0; background: none; color: #fff; font: inherit; font-size: 11px;
  cursor: pointer; text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.fbtn svg {
  width: 30px; height: 30px; padding: 9px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px);
  transition: background-color .2s;
}
.fbtn:active svg { background: rgba(255, 255, 255, .3); }
/* 底部信息：标题 + 分数 + 推荐语。渐变垫底保证白字可读 */
.finfo {
  position: absolute; left: 0; right: 72px; bottom: 0; z-index: 2;
  padding: 40px 14px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  color: #fff; pointer-events: none;
}
.fmeta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fmeta .score, .fmeta .pub { position: static; box-shadow: none; }
.fmeta .tiny { color: rgba(255, 255, 255, .8); }
.ftitle {
  font-size: 16px; font-weight: 700; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fwhy { font-size: 12.5px; color: #fdba74; margin-top: 4px; }
.ftags { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.ftags i { font-style: normal; font-size: 12.5px; color: #93c5fd; }
/* 发抖音是右栏的主动作：抖音红黑配色，比其它键大一号 */
.fbtn.dy svg { background: linear-gradient(135deg, #fe2c55, #161823); width: 34px; height: 34px; }

/* ---------- 视频信息弹层（feed 里点「文案」） ---------- */
.fsmask {
  position: fixed; inset: 0; z-index: var(--z-overlay-top, 1100);
  background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end;
}
.fsheet {
  width: 100%; max-height: 78vh; max-height: 78dvh;
  background: var(--panel, #fff); border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column;
  animation: sheetup .22s ease-out;
}
@keyframes sheetup { from { transform: translateY(40px); opacity: .5; } }
.fshandle {
  width: 40px; height: 4px; border-radius: 2px; background: #d1d5db;
  margin: 10px auto 2px; flex: none;
}
.fsbody { overflow-y: auto; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); }
.fstitle { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.fstitle b { font-size: 16.5px; line-height: 1.4; }
.fstitle .score { position: static; box-shadow: none; flex: none; }
.fsmeta { font-size: 12.5px; color: var(--faint); margin-bottom: 8px; }
.fsgrade {
  font-size: 13px; color: #9a3412; background: #fff7ed;
  border: 1px solid #fed7aa; border-radius: 10px; padding: 8px 12px;
}
.fsgrade b { margin-right: 6px; }
.fsacts { display: flex; gap: 10px; margin: 12px 0 8px; }
.fsacts .btn { flex: 1; min-height: 46px; font-size: 15px; }
.fswhen { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.fsitem { border-top: 1px solid var(--line); padding: 12px 0 10px; }
.fsk {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; font-weight: 700; color: var(--faint); margin-bottom: 5px;
}
.fsv { font-size: 14.5px; line-height: 1.65; word-break: break-all; }
.fsv.pre { white-space: pre-wrap; }
.btn.wide { width: 100%; min-height: 46px; margin-top: 14px; }

/* ---------- 两段式分享弹层 ---------- */
.fsheet.sp { max-height: none; }
.fsheet.sp .fsbody { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.spbar {
  height: 8px; border-radius: 4px; background: var(--line);
  overflow: hidden; margin: 12px 0 8px;
}
.spbar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #f97316, #f43f5e);
  transition: width .3s;
}

/* ---------- 微信常驻提示条 ---------- */
.wxbar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; font-size: 12.5px; line-height: 1.5;
  background: #ecfdf5; border-bottom: 1px solid #a7f3d0; color: #065f46;
}
.wxbar span { flex: 1; }
.wxbar .linkbtn { color: #059669; font-weight: 700; flex: none; }
.wxbar-x {
  border: 0; background: none; font-size: 18px; color: #34d399;
  cursor: pointer; padding: 0 4px; flex: none;
}

/* ---------- 微信跳浏览器引导 ---------- */
.wxguide {
  position: fixed; inset: 0; z-index: var(--z-lightbox, 1200);
  background: rgba(0, 0, 0, .78); cursor: pointer;
}
.wxarrow {
  position: absolute; top: 8px; right: 14px; width: 110px; height: 150px;
  animation: wxnudge 1.2s ease-in-out infinite alternate;
}
@keyframes wxnudge { from { transform: translateY(0); } to { transform: translateY(10px); } }
.wxtext {
  position: absolute; top: 190px; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  color: #fff; text-align: center; padding: 0 30px;
}
.wxtext b { font-size: 19px; }
.wxtext span { font-size: 13.5px; color: rgba(255, 255, 255, .75); line-height: 1.7; }
.wxtext .btn { margin-top: 14px; min-height: 44px; padding: 0 34px; }

/* 字幕开关一行 */
.ccrow { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }

/* 外挂字幕行高：竖屏视频窄，默认字号在手机上会叠三行挡脸 */
video::cue { font-size: 15px; line-height: 1.5; background: rgba(0, 0, 0, .55); }

@media (max-width: 559px) {
  /* 顶栏是横向滚动的真凶：品牌+3个导航+240px搜索框，最小宽约 630px。
     主播也不该看见「技术后台」入口。 */
  .topbar .nav, .search { display: none; }
  .topbar { padding: 10px 14px; }
  .wrap { padding: 14px; }

  .hero { gap: 12px; margin-bottom: 14px; }
  .hero h1 { font-size: 20px; }
  .herostats { margin-left: 0; gap: 18px; }
  .herostats .v { font-size: 18px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* 封面来自 1088×1920 竖版成品，16/10 等于从中间横切一条，脸基本都没了。
     4/5 配合偏上的取景点，正好落在人物上半身。 */
  .thumb { aspect-ratio: 4 / 5; background-position: center 22%; }
  .thumb .play { opacity: 1; background: rgba(15, 23, 42, .18); }

  /* 触摸目标：44×44 是下限，.btn.sm 实测才 27px */
  .btn, .btn.sm { min-height: 44px; padding: 10px 16px; font-size: 15px; }
  .chip { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .filters { gap: 10px; }
  .wfoot { flex-direction: column; gap: 10px; }

  /* 抽屉从右滑入是桌面形态。手机上应当从底部升起。 */
  .mask, .fsmask { bottom: auto; height: 100dvh; }
  .mask { justify-content: center; align-items: flex-end; }
  .drawer {
    width: 100%;
    height: 92vh; height: 92dvh;   /* 老 iOS 不认 dvh，vh 写在前面兜底 */
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, .18);
    animation: sheet .24s ease-out;
  }
  @keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
  .dhead { padding: 12px 16px; }
  .dhead .right .btn { display: none; }   /* 动作全下沉到底部操作条 */
  .dbody { padding: 14px 16px; }

  /* 竖版视频铺满宽度会有 1200px 高。限高并居中，让文案能同屏看到；
     svh 避开 iOS 地址栏收缩时的高度跳变。 */
  .dvideo { max-height: 52vh; max-height: 52svh; }
  .covers { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .vtab { flex: 1; min-height: 44px; justify-content: center; padding: 8px 6px; font-size: 13px; }
  .rplayer .dvideo { max-height: 56vh; max-height: 56svh; }
  video::cue { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer { animation: none; }
}

/* ---------------------------------------------------------------- 分享口令区 */
.stok-wrap { margin-top: 12px; }
.stok-done {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
}
.stok-prompt { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.stok-title { font-weight: 700; color: var(--text); }
.stok-tip { color: var(--faint); }
.stok-ta {
  width: 100%; padding: 9px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 13px; line-height: 1.6;
  resize: vertical; min-height: 70px;
  box-sizing: border-box;
}
.stok-ta:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

/* ---------------------------------------------------------------- Lightbox
 * 页面内看大图：不开新标签，避免空 Referer 被 OSS 防盗链拦掉。
 * 支持：鼠标拖拽移动 / 滚轮缩放 / 触摸捏合缩放 / ESC 关闭 / 点遮罩关闭。
 * ---------------------------------------------------------------- */
.lb {
  position: fixed; inset: 0; z-index: var(--z-lightbox, 1200);
  background: rgba(0, 0, 0, .88);
  display: grid; place-items: center;
  animation: lbfadein .18s ease;
}
@keyframes lbfadein { from { opacity: 0; } }
.lb-stage {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  /* 抓取光标提示可拖 */
  cursor: grab;
}
.lb-stage.dragging { cursor: grabbing; }
.lb-img {
  /* transform 由 JS 控制，不要加任何 transition —— 拖拽时延迟 = 手指和图片脱节 */
  display: block; max-width: none;
  user-select: none; -webkit-user-drag: none;
  /* 防 iOS 长按保存 */
  pointer-events: none;
}
.lb-close {
  position: fixed; top: 14px; right: 14px;
  z-index: calc(var(--z-lightbox, 1200) + 1);
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
  transition: background-color .15s;
}
.lb-close:hover { background: rgba(255, 255, 255, .25); }
.lb-hint {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .5); font-size: 12.5px; pointer-events: none;
  white-space: nowrap;
}


/* video-version-picker */
#versionMask,#spMask{z-index:var(--z-overlay-top, 1100)}
.version-sheet{max-width:560px}
.version-hint{margin:4px 0 14px;line-height:1.55}
.version-list{display:grid;gap:10px}
.version-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--panel);
  color:var(--text);text-align:left;cursor:pointer}
.version-option:hover:not(:disabled),.version-option:focus-visible{border-color:var(--primary);box-shadow:0 0 0 3px rgba(249,115,22,.18)}
.version-option span{display:grid;gap:4px}.version-option b{font-size:15px}.version-option small{color:var(--muted);line-height:1.45}
.version-option i{flex:0 0 auto;padding:4px 8px;border-radius:999px;background:var(--primary);color:#fff;font-size:11px;font-style:normal}
.version-option:disabled{cursor:not-allowed;opacity:.55}.version-option:disabled i{background:var(--muted)}
.version-missing{margin:10px 0 0}.version-cancel{display:block;margin:14px auto 0}
@media(max-width:640px){.version-option{align-items:flex-start;padding:13px}.version-option i{margin-top:1px}}



/* ----------------------------------------------------------------
 * Mobile Studio refresh (task-43)
 * ---------------------------------------------------------------- */
html, body { max-width: 100%; overflow-x: hidden; }

@media (min-width: 641px) and (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .wbody { padding: 11px 12px; gap: 7px; }
  .wfoot { padding: 9px 12px; }
  .wfoot .btn { min-width: 0; padding-inline: 8px; font-size: 13px; }
}

@media (max-width: 640px) {
  body { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wcard { border-radius: 14px; }
  .thumb { aspect-ratio: 4 / 3; background-position: center 24%; }
  .wbody { padding: 13px 14px; gap: 9px; }
  .wtitle { font-size: 16px; line-height: 1.45; }
  .wmeta { row-gap: 6px; font-size: 13px; }
  .wtags { max-height: 52px; overflow: hidden; }
  .wtags span { min-height: 28px; display: inline-flex; align-items: center; padding-inline: 9px; font-size: 12px; }
  .wfoot {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  }
  .wfoot .btn {
    min-width: 0; min-height: 46px; padding: 10px 6px;
    font-size: 14px; white-space: nowrap; justify-content: center;
  }
  .wfoot .btn:last-child {
    grid-column: 1 / -1; order: -1; min-height: 50px;
    background: var(--cta); border-color: var(--cta); color: #fff; font-size: 16px;
  }
  .ai-assistant {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .ai-button { width: 48px !important; height: 48px !important; }
  .ai-icon { font-size: 22px !important; }
  .ai-panel { width: min( calc(100vw - 24px), 360px) !important; right: 0 !important; }
}
