/* v1「口播剪辑」页面样式（方案 docs/plans/2026-09-30-1207pdt-v1-clip-release.md 第 9 件）。
 * 手机优先（iPhone Safari 393 宽起），桌面只是把内容收在 720 宽的一栏里。
 * 分镜卡那一段（.sc-*）从原型 apps/prototype/styles.css 复制裁剪过来，原型文件不改。 */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2b303b;
  --text: #e8ebf2;
  --muted: #98a1b3;
  --accent: #7aa2ff;
  --ok: #5ad1a0;
  --warn: #ffb454;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }
/* 方案 8.15 G5（C 门 P2-6）：带 hidden 的一律不显示 —— 下面 button 的 display:inline-flex 会盖过浏览器默认的 [hidden]，
   登录页上那个「退出」就是这么冒出来的 */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}
body.has-bar { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: .3px; }
.beta { font-size: 11px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 7px; margin-left: 8px; vertical-align: 2px; }
/* 方案 8.14 F11（C 门 P2-7）：能点的东西最小高 44px（苹果的触控下限）—— 原来「退出」40、「← 回首页」42、筛选 / 整句按钮 34、版本页签 36 */
.link { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 8px 4px; min-height: 44px; cursor: pointer; }

main { max-width: 720px; margin: 0 auto; padding: 14px 14px 32px; }
.top-msg { max-width: 720px; margin: 10px auto 0; padding: 0 14px; }
.top-msg[hidden] { display: none; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 14px; }
h1 { font-size: 22px; margin: 0 0 6px; line-height: 1.35; word-break: break-word; }
h2 { font-size: 18px; margin: 0 0 8px; }
p { margin: 6px 0; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.err { color: var(--danger); }
.ok { color: var(--ok); }
.lead { color: var(--text); opacity: .92; }
.back { display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; padding: 0 0 4px; min-height: 44px; }

button, .btn {
  font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 16px; min-height: 44px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--accent); color: #0b0d12; border-color: var(--accent); font-weight: 700; }
.ghost { background: transparent; }
.big { width: 100%; font-size: 18px; min-height: 52px; margin-top: 12px; }
.tiny { padding: 4px 12px; min-height: 44px; font-size: 13px; border-radius: 8px; }
input, select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; width: 100%;
}
/* iOS Safari 的原生 select 是白底灰字、在深色页上看不清（第 2 段 WebKit 截图发现）：去掉原生外观，自己画箭头 */
select {
  width: auto; -webkit-appearance: none; appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.warn-box { border: 1px solid var(--warn); color: var(--text); background: rgba(255, 180, 84, .08); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.ok-box { border: 1px solid var(--ok); background: rgba(90, 209, 160, .08); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.note { color: var(--warn); margin: 4px 0 8px; }

/* 输码 */
.login form { display: flex; gap: 8px; margin-top: 10px; }
.login input { text-transform: uppercase; letter-spacing: 1px; }
.login button { flex: 0 0 auto; }

/* 首页 */
.pick { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; padding: 12px; border: 1px dashed var(--accent); border-radius: 12px; cursor: pointer; }
.pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick-btn { flex: 0 0 auto; background: var(--accent); color: #0b0d12; font-weight: 700; border-radius: 10px; padding: 8px 14px; }
.pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.targets { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.targets legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.seg input:checked + span { border-color: var(--accent); background: rgba(122, 162, 255, .15); color: var(--text); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.target-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.target-custom[hidden] { display: none; }
.target-custom input { flex: 1 1 180px; min-width: 0; width: auto; }
.target-custom .small { flex: 1 1 100%; }
.notes { padding-left: 18px; margin: 14px 0 0; }
.notes li { margin: 3px 0; }

.uprog { margin-top: 12px; }
.warn-box .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bar { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; margin: 8px 0 6px; }
.bar .fill { height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }

.mine-list { list-style: none; margin: 0; padding: 0; }
.mine-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 64px; }
.mine-list li:first-child .mine-item { border-top: 0; }
.mine-thumb { flex: 0 0 auto; width: 54px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.mine-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mine-thumb .ph { color: var(--muted); font-weight: 700; }
.mine-body { display: flex; flex-direction: column; min-width: 0; }
.mine-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.st-failed { color: var(--danger); }
.st-done { color: var(--ok); }
.st-queued, .st-running { color: var(--accent); }

/* 进度 */
.bigstep { font-size: 17px; margin: 10px 0 2px; }
.phases { list-style: none; padding: 0; margin: 10px 0; }
.phases li { display: flex; gap: 8px; align-items: center; padding: 6px 0; color: var(--muted); }
.phases li .ico { width: 20px; text-align: center; }
.phases li.done { color: var(--text); }
.phases li.done .ico { color: var(--ok); }
.phases li.now { color: var(--text); font-weight: 700; }
.phases li.now .ico { color: var(--accent); }
.phases li.failed { color: var(--danger); }

/* 出错 */
.error-card .msg { font-size: 17px; margin: 10px 0 14px; }
.error-card .acts, .result .dl, .cover-side .acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* 成片 */
.result video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 10px; margin: 8px 0 10px; }
.result .dl .btn { flex: 1 1 140px; }
.vtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.vtabs .tab { min-height: 44px; padding: 4px 12px; font-size: 14px; }
.vtabs .tab.on { background: var(--accent); color: #0b0d12; border-color: var(--accent); }
.cover-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cover-img { width: 160px; max-width: 45%; border-radius: 10px; border: 1px solid var(--line); background: #000; align-self: flex-start; }
.cover-side { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cands { display: flex; gap: 8px; }
.cand { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; width: 56px; min-height: 0; height: 84px; background: #000; }
.cand img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand.on { border-color: var(--accent); }
.run-box { border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }

/* 字幕样式（方案 2026-10-02 · 10.14）：缩略图格子横向滑动、一屏两列；格子本身是 ≥ 44px 的按钮；页面不横向滚动 */
.stypick { margin: 12px 0 0; }
.stypick summary { min-height: 44px; display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.stypick summary b { color: var(--accent); }
.sty-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc(50% - 6px); gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory;
  padding: 4px 0 8px; margin: 6px 0; max-width: 100%;
}
.sty-tile {
  scroll-snap-align: start; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px;
  min-height: 44px; min-width: 0; border: 2px solid var(--line); border-radius: 12px; background: var(--panel-2); text-align: left;
}
.sty-tile.on { border-color: var(--accent); background: rgba(122, 162, 255, .12); }
.sty-img { position: relative; display: block; width: 100%; aspect-ratio: 9 / 8; border-radius: 8px; overflow: hidden; background: #000; }
.sty-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.sty-live { opacity: 0; transition: opacity .25s ease; }
.sty-live.ready { opacity: 1; }
.sty-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.sty-cur { font-size: 11px; font-weight: 600; color: var(--ok); border: 1px solid var(--ok); border-radius: 999px; padding: 0 6px; }
.style-card .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.style-card .acts .primary { flex: 1 1 100%; }
@media (min-width: 760px) {
  .sty-grid { grid-auto-columns: calc(25% - 9px); }
  .style-card .acts .primary { flex: 0 0 auto; }
}

/* 分镜卡（复制裁剪自原型） */
.sc-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.sc-filters { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sc-filters .on { background: var(--accent); color: #0b0d12; border-color: var(--accent); }
.sc-wall { position: relative; }
.sc-ro { position: sticky; top: 56px; z-index: 2; background: rgba(15, 17, 21, 0.92); border: 1px solid var(--line); padding: 8px 10px; border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
.sc-group { border-top: 1px solid var(--line); padding: 8px 0; }
.sc-ghead { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 6px 0; min-height: 44px; justify-content: flex-start; }
.sc-idx { color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-gtext { flex: 1; }
.sc-strip { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line); margin: 2px 0 4px; }
.sc-strip i { display: block; height: 100%; }
.sc-strip i.k { background: var(--ok); }
.sc-strip i.d { background: #3a3f4b; }
.sc-strip i.u { box-shadow: inset 0 0 0 1px var(--warn); }
.sc-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.sc-card { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 8px; padding: 6px; }
.sc-card.dropped { border-left-color: #555b68; opacity: 0.8; }
.sc-card.dropped .sc-text { text-decoration: line-through; color: var(--muted); }
.sc-card.pending { border-left-color: var(--warn); }
.sc-card.pending.will-keep .sc-text { text-decoration: none; color: var(--text); }
.sc-card.pending.will-drop .sc-text { text-decoration: line-through; color: var(--muted); }
.sc-card.thin { min-height: 44px; padding: 4px 6px; background: transparent; }
.sc-thumb { flex: 0 0 auto; width: 54px; height: 96px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #222; min-height: 0; }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 12px; }
.sc-body { flex: 1; min-width: 0; }
.sc-text { cursor: pointer; word-break: break-all; }
.sc-meta { color: var(--muted); }
.sc-warn { color: var(--warn); font-size: 13px; }
.sc-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.sc-tag { font-size: 11px; padding: 1px 6px; border-radius: 10px; border: 1px solid var(--line); }
.sc-tag.pend { border-color: var(--warn); color: var(--warn); }
.sc-tag.in { border-color: var(--ok); color: var(--ok); }
.sc-tag.out { color: var(--muted); }
.sc-tag.must { border-color: var(--accent); color: var(--accent); }
.sc-acts { display: flex; flex-direction: column; gap: 4px; }
.sc-btn { min-width: 60px; min-height: 44px; padding: 6px 10px; }
.sc-btn.drop { border-color: var(--danger); color: var(--danger); background: transparent; }
.sc-btn.keep { border-color: var(--ok); color: var(--ok); background: transparent; }
.sc-btn.auto { font-size: 13px; }
.sc-gacts { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.sc-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line);
}
.sc-bar[hidden] { display: none; }
.sc-target-row { margin: 4px 0 10px; }
.sc-target-row:empty { display: none; }
.sc-target-row label { display: flex; align-items: center; gap: 8px; }
.sc-target-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.sc-target-custom input { flex: 1 1 180px; min-width: 0; width: auto; }
.sc-target-custom .small { flex: 1 1 100%; }
.sc-bar label { display: flex; align-items: center; gap: 6px; }
.sc-bar #recutBtn { flex: 1 1 100%; }
@media (min-width: 760px) {
  .sc-bar { justify-content: center; }
  .sc-bar #recutBtn { flex: 0 0 auto; }
  .cover-img { width: 200px; }
}

/* 封面样式网格（P4 界面）：手机优先 2 列、3:4 比例、≥44px 触控；合成中整块上锁 */
.cover-styles-head { display:flex; align-items:baseline; gap:8px; margin:12px 0 6px; }
.cover-styles-head h3 { margin:0; font-size:15px; }
.cover-grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:10px; }
.cover-grid[data-locked="1"] { pointer-events:none; opacity:.55; }
.cover-tile { padding:6px; border:2px solid transparent; border-radius:12px; background:#151a24; color:inherit;
  min-height:44px; cursor:pointer; display:flex; flex-direction:column; gap:6px; }
.cover-tile[aria-disabled="true"] { opacity:.5; cursor:not-allowed; }
.cover-tile[aria-disabled="true"] img { filter:grayscale(1); }
.cover-tile.on { border-color:#f5c451; }
.cover-tile img { width:100%; aspect-ratio:3/4; object-fit:contain; border-radius:8px; background:#0b0e14; }   /* M1-T09：缩略图本身已是 3:4，contain 保证 C06 这种伸到边上的元素不再被网格裁掉 */
.cover-tile .cap { font-size:12px; opacity:.85; }
.cover-titles { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.cover-titles .chip { min-height:44px; padding:8px 12px; border-radius:999px; border:1px solid #2b3242;
  background:#151a24; color:inherit; font-size:13px; }
.cover-titles .chip.on { border-color:#f5c451; }
@media (min-width:560px) { .cover-grid { grid-template-columns:repeat(3, 1fr); } }

/* ===== M2-T03a 段 1 · 结果页 v2 骨架（.rv2 命名空间）=====
 * 结构与交互取自 app/apps/prototype/result-v2/index.html（Jerry 已确认原型第二版）；
 * 颜色不照搬原型的浅色主题，对齐产品现有深色 token（--bg/--panel/--text/--muted/--line/--accent，方案 §3.0②；
 * 主题跟随系统属全局主题策略，不在本卡）。选择器整体挂 .rv2 下：与旧页撞名的 .tab/.bar/.chip/.back 已审计隔离；
 * 底部条复用全局 .sc-bar、按钮自成 .rv2 .btn* 一套（全局是 .btn.primary 老命名，不混用）。
 * 吸顶偏移基准：全局 header.top = env(safe) + 65px（退出按钮 min-height 44 撑起行高 + 20 padding + 1 边框）。 */
main:has(.rv2) { max-width: 1180px; padding: 0 16px 32px; }

.rv2 {
  --top-h: 56px;
  --mini-h: 56px;
  --ph: clamp(150px, 25vh, 230px);
  --r: 12px;
  --fg: var(--text);
  --surface: var(--panel);
  --surface-2: var(--panel-2);
  --faint: #6b7385;
  --accent-soft: rgba(122, 162, 255, .14);
  --accent-text: #9db9ff;
  --accent-ink: #0b1020;
  --danger-soft: rgba(255, 107, 107, .12);
  --stage: #05060a;
  --stage-fg: #e8ebf2;
  --scrim: rgba(0, 0, 0, .62);
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  /* D4 AI 理由标签色（段 2 用；取原型深色主题值） */
  --t-redo: #9dbcff; --t-redo-bg: #1f2b44;
  --t-stumble: #ffbe85; --t-stumble-bg: #3b2a19;
  --t-off: #cdb2ff; --t-off-bg: #2d2342;
  --t-filler: #c3c8d1; --t-filler-bg: #2b2f37;
  --t-pause: #7fd9cf; --t-pause-bg: #17332f;
  color: var(--fg);
}

/* 顶栏 */
.rv2 .topbar {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 65px); z-index: 30;
  margin-inline: -16px; padding-inline: 16px; height: var(--top-h);
  display: flex; align-items: center; gap: 8px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.rv2 .topbar .spacer { flex: 1; }
.rv2 .topbar .back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--muted); font-size: 15px; white-space: nowrap; text-decoration: none; padding: 0; }
.rv2 .topbar .back svg { width: 18px; height: 18px; }
.rv2 .ver-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-inline: 10px; font-weight: 700; font-size: 16px; border-radius: 10px; }
.rv2 .ver-btn svg { width: 14px; height: 14px; color: var(--muted); }
.rv2 .icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 16px; background: none; }
.rv2 .icon-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--fg); }
.rv2 .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding-inline: 18px; border-radius: 10px; font-weight: 700; font-size: 16px; white-space: nowrap; text-decoration: none; cursor: pointer; }
.rv2 .btn-primary { background: var(--accent); color: var(--accent-ink); border: 0; }
.rv2 .btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.rv2 .btn svg { width: 18px; height: 18px; }

/* 操作提示条 */
.rv2 .hint { margin-inline: -16px; padding: 10px 16px; background: var(--accent-soft); color: var(--fg); font-size: 15px; border-bottom: 1px solid var(--line); }
.rv2 .hint b { color: var(--accent-text); }

/* 迷你播放条（手机，播放器滚走后出现；桌面媒体查询里隐藏） */
.rv2 .minibar { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 65px + var(--top-h)); z-index: 35; height: var(--mini-h);
  display: flex; align-items: center; gap: 12px; padding-inline: 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.rv2 .mini-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; min-height: 44px; background: none; border: 0; padding: 0; }
.rv2 .mini-main img { width: 26px; height: 46px; object-fit: cover; border-radius: 4px; background: var(--stage); }
.rv2 .mini-main span { font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv2 .mini-play { width: 40px; height: 40px; border-radius: 50%; background: var(--stage); color: var(--stage-fg); display: grid; place-items: center; border: 0; }
.rv2 .mini-play svg { width: 16px; height: 16px; margin-left: 2px; }

/* 播放器与状态行 */
.rv2 .stage { padding-top: 8px; background: var(--bg); }
.rv2 .stage video { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--ph); margin: 8px auto 0; background: #000; border-radius: var(--r); }
.rv2 .stage [data-testid="evicted"] { margin-top: 10px; }
.rv2 .status { min-height: 40px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; color: var(--muted); }
.rv2 .status .sep { width: 1px; height: 14px; background: var(--line); }

/* Tab 与面板（吸顶基准 = 全局 header + 自家顶栏） */
.rv2 .work { min-width: 0; }
.rv2 .tabs {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 65px + var(--top-h)); z-index: 20;
  margin-inline: -16px; padding-inline: 16px; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
html.mini .rv2 .tabs { top: calc(env(safe-area-inset-top, 0px) + 65px + var(--top-h) + var(--mini-h)); }
.rv2 .tab { min-height: 48px; font-size: 16px; color: var(--muted); position: relative; background: none; border: 0; }
.rv2 .tab[aria-selected="true"] { color: var(--fg); font-weight: 700; }
.rv2 .tab[aria-selected="true"]::after { content: ""; position: absolute; left: 28%; right: 28%; bottom: -1px; height: 3px; border-radius: 3px; background: var(--accent); }
.rv2 .panel { padding-top: 14px; }

/* 下载面板（底部 sheet） */
.rv2 .scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: grid; align-items: end; justify-items: center; }
.rv2 .sheet { width: min(100%, 520px); background: var(--surface); border-radius: 16px 16px 0 0; padding: 18px 16px; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; box-shadow: var(--shadow); }
.rv2 .sheet h2 { margin: 0; font-size: 18px; }
.rv2 .opt { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; text-align: left; min-height: 60px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; }
.rv2 .opt .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--fg); }
.rv2 .opt .ic svg { width: 20px; height: 20px; }
.rv2 .opt b { display: block; font-size: 16px; }
.rv2 .opt span { font-size: 13px; color: var(--muted); }
/* M3-T06：「存到相册」是 <button class="opt">（.opt 原本是按 <a> 写的，补齐按钮需要的属性与禁用态） */
.rv2 button.opt { width: 100%; font: inherit; cursor: pointer; }
.rv2 button.opt:disabled { opacity: .55; cursor: default; }

/* M3-T06：删除片子区与页面内二次确认对话层 */
.rv2 .del-zone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: start; }
.rv2 .btn-danger { background: var(--danger); color: #0b0d12; border: 0; }
.rv2 .sheet .sheet-acts { display: flex; gap: 8px; justify-content: flex-end; }

/* 电脑：左播放器右面板两栏；迷你条不再需要 */
@media (min-width: 900px) {
  .rv2 { --ph: min(calc(100vh - 200px), 640px); }
  .rv2 .layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .rv2 .stage { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 65px + var(--top-h)); padding-top: 16px; }
  .rv2 .tabs { margin-inline: 0; padding-inline: 0; }
  .rv2 .hint { margin-inline: 0; border-radius: 0 0 10px 10px; }
  .rv2 .minibar { display: none; }
}

/* ===== M2-T03a 段 2 · 剪辑 Tab 句子行 / 折叠 / 抽屉 / v2 底部条 =====
 * 结构取原型 .rows/.fold/.drawer/.bar；颜色对齐产品 token；触控高度遵产品 F11 ≥44（原型 .act 32 → 44）。 */
.rv2 .cut-sum { font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.rv2 .cut-sum b { color: var(--fg); }
.rv2 #scWall .rows { list-style: none; margin: 0; padding: 0; }
.rv2 #scWall .rows > li + li { border-top: 1px solid var(--line); }
.rv2 .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.rv2 .row-main { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding-block: 10px; min-height: 64px;
  width: 100%; background: none; border: 0; color: inherit; -webkit-tap-highlight-color: transparent; }
.rv2 .row .thumb { width: 44px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.rv2 .row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv2 .row .body { min-width: 0; display: grid; gap: 2px; }
.rv2 .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--faint); line-height: 1.4; }
.rv2 .txt { font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.rv2 .txt s { color: var(--faint); text-decoration-thickness: 1.5px; }
.rv2 .sent-group.off .thumb img { opacity: .4; filter: grayscale(1); }
.rv2 .act { min-width: 52px; min-height: 44px; display: inline-grid; place-items: center; padding-inline: 10px; border-radius: 22px; border: 1px solid var(--line);
  font-size: 14px; color: var(--muted); background: none; }
.rv2 .sent-group.off .act { border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
/* 入口看得见：提示行 + 句子行右侧「删字 / 花字」小按钮（窄屏换到文字下面一行，宽屏在右侧同一行） */
.rv2 .cut-tip { margin: 2px 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); line-height: 1.5; }
.rv2 .cut-tip.legacy, .rv2 .cut-tip.flash { color: var(--text); border: 1px dashed var(--line); }
.rv2 .row-tools { grid-column: 1 / -1; order: 3; display: flex; gap: 8px; padding-left: 56px; padding-bottom: 8px; }
.rv2 .etab { min-height: 44px; min-width: 56px; padding-inline: 14px; border-radius: 22px; border: 1px solid var(--line); background: none; color: var(--text); font-size: 14px; }
.rv2 .etab.off { color: var(--faint); border-style: dashed; }
@media (min-width: 760px) {
  .rv2 .row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .rv2 .row-tools { display: contents; }
  .rv2 .row-tools .etab { padding-inline: 12px; }
}
.rv2 .tag { display: inline-flex; align-items: center; height: 20px; padding-inline: 6px; border-radius: 5px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.rv2 .tag-reason { color: var(--accent-text); background: var(--accent-soft); }
.rv2 .mark { display: inline-flex; align-items: center; height: 20px; padding-inline: 6px; border-radius: 5px; font-size: 12px; font-weight: 700;
  color: var(--accent-text); border: 1px solid var(--accent); }
.rv2 .fold { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; min-height: 56px; padding-block: 8px; color: var(--muted); font-size: 15px;
  background: none; border: 0; }
.rv2 .fold .stack { width: 42px; height: 40px; flex: none; position: relative; }
.rv2 .fold .stack i { position: absolute; width: 30px; height: 40px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); }
.rv2 .fold .stack i:nth-child(1) { left: 0; }
.rv2 .fold .stack i:nth-child(2) { left: 6px; }
.rv2 .fold .stack i:nth-child(3) { left: 12px; }
.rv2 .fold b { color: var(--fg); }
.rv2 .fold .go { margin-left: auto; color: var(--accent-text); font-weight: 700; white-space: nowrap; }
.rv2 .fold.open { min-height: 44px; font-size: 14px; }
.rv2 .fold-sec { font-size: 13px; color: var(--faint); }

/* 句子详情抽屉（返回键能关、不叠层；实现 js/parts/drawer.js） */
.rv2 .drawer { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top, 0px) + 65px + var(--top-h));
  background: var(--surface); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .4); display: flex; flex-direction: column; }
.rv2 .ed-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 8px; }
.rv2 .ed-head .t { flex: 1; min-width: 0; }
.rv2 .ed-kicker { font-size: 13px; color: var(--faint); }
.rv2 .ed-head h2 { margin: 0; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.rv2 .ed-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 16px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 12px; align-content: start; overscroll-behavior: contain; }
.rv2 .ed-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.rv2 .drawer .thumb { width: 44px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.rv2 .drawer-atoms { display: grid; }
.rv2 .drawer-atom { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; }
.rv2 .drawer-atoms > .drawer-atom + .drawer-atom { border-top: 1px solid var(--line); }
.rv2 .drawer-atom .num { color: var(--faint); min-width: 44px; }
.rv2 .drawer-atom button { margin-left: auto; }

/* 抽屉小 Tab（M2-T03b：「这句 / 删字」；删字 Tab 仅在该句有词表时出现） */
.rv2 .drawer-tabs { display: flex; gap: 8px; }
.rv2 .dtab { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 15px; }
.rv2 .dtab.on { background: var(--surface-2); color: var(--text); border-color: var(--text); }
/* 字块（M2-T03b）：容器禁系统选字 / 长按菜单，只用单击；已删 = 灰色 + 删除线，留在原处 */
.rv2 .wc-blocks { display: flex; flex-wrap: wrap; gap: 8px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rv2 .wc-w { min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: 20px; line-height: 1; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.rv2 .wc-w.cut { color: var(--faint); text-decoration: line-through; background: transparent; border-style: dashed; }
.rv2 .wc-w[data-pending="1"] { border-color: var(--text); }
.rv2 .wc-w:disabled { opacity: .5; }
.rv2 .wc-w.gone { opacity: .35; border-style: dotted; background: transparent; }
/* 花字 Tab（M2-T03c）：选中的词 = 青色描边（霓虹）；已加在这一版上的词 = 淡青底；位置三档沿用小 Tab 的药丸样式 */
.rv2 .em-w.sel { border-color: #3de8ff; color: #3de8ff; box-shadow: 0 0 8px rgba(61, 232, 255, .55); }
.rv2 .em-w.applied { background: rgba(61, 232, 255, .12); }
.rv2 .em-pos-l { align-self: center; padding-right: 4px; }
.rv2 .em-mark { color: #3de8ff; }
.rv2 .wc-sum { font-size: 15px; color: var(--muted); position: sticky; top: 0; z-index: 2; margin: 0 -16px; padding: 8px 16px; background: var(--surface); }   /* 句子很长、字块要往下滚时，「这句从 X 秒变 Y 秒」始终在顶上 */
/* 「显示已删的字」开关（M2-T03b 第二步）；隐藏时字块连起来读（间距收紧） */
.rv2 .wc-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; background: none; border: 0; color: var(--text); font-size: 15px; justify-self: start; }
.rv2 .wc-switch-k { width: 40px; height: 24px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); position: relative; flex: none; }
.rv2 .wc-switch-k::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--faint); }
.rv2 .wc-switch[aria-checked="true"] .wc-switch-k { border-color: var(--text); }
.rv2 .wc-switch[aria-checked="true"] .wc-switch-k::after { left: 18px; background: var(--text); }
.rv2 .wc-blocks.joined { gap: 2px; }
.rv2 .wc-blocks.joined .wc-w { min-width: 36px; border-radius: 6px; }

/* v2 底部条内容（容器用全局 .sc-bar；info/预估/超目标样式在此作用域内） */
.rv2 .sc-bar .info { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rv2 .sc-bar .info b { font-size: 17px; }
.rv2 .sc-bar .sub2 { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.rv2 .sc-bar .over { color: var(--danger); }

/* ===== M2-T03a 段 3 · 字幕大卡+横滑 / 封面摘要行 / 横滑组件（结构取原型；颜色对齐产品 token） ===== */
/* 大卡片（当前 / 预览） */
.rv2 .bigcard { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.rv2 .bigcard .im { border-radius: 8px; overflow: hidden; background: var(--stage); }
.rv2 .bigcard .im img { width: 100%; display: block; aspect-ratio: 9 / 16; object-fit: cover; }
.rv2 .bigcard .info { display: grid; gap: 6px; min-width: 0; justify-items: start; }
.rv2 .bigcard .k { font-size: 13px; color: var(--faint); }
.rv2 .bigcard .v { font-size: 18px; font-weight: 700; }
.rv2 .pill { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.rv2 .pill.grey { background: var(--surface-2); color: var(--muted); }
.rv2 .sty-more { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--accent-text); font-weight: 700; font-size: 15px; }
.rv2 .foot-note { font-size: 13px; color: var(--faint); margin: 8px 0 0; }
.rv2 .soft-hint { font-size: 13px; color: var(--faint); margin: 6px 0 0; }

/* 横滑小卡片条：snap + 两边渐隐 + 左右箭头（parts/minipicker） */
.rv2 .strip-wrap { position: relative; margin-top: 10px; }
.rv2 .strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 8px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%); }
.rv2 .strip::-webkit-scrollbar { display: none; }
.rv2 .strip > .sty-grid { display: contents; }   /* 全局 .sty-grid 是格子布局；在横滑条里让小卡直接参与 flex/snap */
.rv2 .strip .sty-tile { flex: 0 0 80px; scroll-snap-align: start; display: grid; gap: 4px; text-align: left; border-radius: 8px; }
.rv2 .strip .sty-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.rv2 .sarrow { position: absolute; top: calc(50% - 22px); width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow, 0 4px 12px rgba(0,0,0,.3)); display: grid; place-items: center; z-index: 2; color: var(--fg); padding: 0; }
.rv2 .sarrow svg { width: 16px; height: 16px; }
.rv2 .sarrow.l { left: -6px; }
.rv2 .sarrow.r { right: -6px; }
.rv2 .sarrow:disabled { opacity: 0; pointer-events: none; }
.rv2 .mini-card { flex: 0 0 80px; scroll-snap-align: start; display: grid; gap: 4px; text-align: left; transition: transform .15s ease; background: none; border: 0; padding: 0; }
.rv2 .mini-card .im { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); }
.rv2 .mini-card .im img { width: 100%; display: block; aspect-ratio: 3 / 4; object-fit: cover; }
.rv2 .mini-card .nm { font-size: 13px; line-height: 1.3; color: var(--muted); }
.rv2 .mini-card .nm-warn { font-size: 11px; color: var(--faint); }
.rv2 .mini-card[aria-pressed="true"] .im { border-color: var(--accent); }
.rv2 .mini-card[aria-pressed="true"] .nm { color: var(--fg); font-weight: 700; }
.rv2 .mini-card .cur { position: absolute; left: 4px; top: 4px; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 0 4px; }
.rv2 .mini-card:disabled img { opacity: .35; filter: grayscale(1); }
@media (min-width: 900px) {
  .rv2 .mini-card:not(:disabled):hover { transform: scale(1.08); }
}

/* 封面 Tab：hero + 三行摘要 + 选帧 */
.rv2 .cover-hero { display: grid; justify-items: center; gap: 6px; margin-bottom: 14px; }
.rv2 .cover-hero .box { height: 230px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--stage); display: grid; place-items: center; max-width: 100%; }
.rv2 .cover-hero .box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rv2 .cover-hero .cap2 { font-size: 14px; color: var(--muted); }
.rv2 .acc { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; margin-bottom: 16px; }
.rv2 .acc > div + div { border-top: 1px solid var(--line); }
.rv2 .acc-head { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 14px; text-align: left; background: none; border: 0; color: inherit; }
.rv2 .acc-head .k { color: var(--muted); font-size: 15px; white-space: nowrap; }
.rv2 .acc-head .v { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv2 .acc-head .v.empty { color: var(--faint); font-weight: 400; }
.rv2 .acc-head svg { width: 16px; height: 16px; color: var(--faint); transition: transform .15s; flex: none; }
.rv2 .acc-head[aria-expanded="true"] svg { transform: rotate(90deg); }
.rv2 .acc-body { padding: 4px 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rv2 .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rv2 .chip { min-height: 40px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; text-align: left; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: inherit; }
.rv2 .chip[aria-pressed="true"], .rv2 .chip.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.rv2 .chip .rec { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: 0 4px; }
.rv2 .chip.ghost { background: none; }
.rv2 .field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding-inline: 12px; min-height: 46px; }
.rv2 .field span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.rv2 .field input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; padding: 10px 0; color: inherit; }
.rv2 .field input:focus-visible { outline: none; }
.rv2 .field:focus-within { border-color: var(--accent); }
.rv2 .frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 360px; }
.rv2 .fr { position: relative; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); padding: 0; min-height: 44px; }
.rv2 .fr img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; }
.rv2 .fr .lb { position: absolute; left: 6px; bottom: 6px; font-size: 12px; color: var(--stage-fg); background: var(--scrim); padding: 0 6px; border-radius: 4px; }
.rv2 .fr[aria-pressed="true"] { border-color: var(--accent); }
.rv2 .fr.cand.on { border-color: var(--accent); }
.rv2 .c34 { aspect-ratio: 3 / 4; object-fit: contain !important; background: var(--stage); }

/* M1-T12：页脚署名（SenseVoice / FunAudioLLM 模型许可要求） */
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }

/* BILL-B: quote and bill tables remain readable on phones. */
.quote-panel { border: 1px solid var(--border, #bbb); border-radius: 12px; padding: 16px; margin: 16px 0; }
.quote-panel .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bill-scroll { overflow-x: auto; }
.bill-scroll table { border-collapse: collapse; min-width: 560px; width: 100%; }
.bill-scroll th, .bill-scroll td { padding: 12px 8px; text-align: left; border-bottom: 1px solid #ddd; }
#jobCosts pre { overflow: auto; max-height: 400px; font-size: 12px; }
/* Billing links remain readable on the dark application surface. */
.quote-panel a, [data-testid="billing-page"] a, [data-testid="credits-placeholder"] a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* BILL-C2 purchase catalog, within the existing mobile-first page. */
.credit-packs, .credit-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 24px; }
.credit-pack { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg); }
.credit-pack h3 { font-size: 17px; margin: 0 0 8px; }
.credit-pack .credit-price { font-size: 22px; font-weight: 700; }
.credit-pack button { width: 100%; margin-top: 12px; }
.credit-interval { display: flex; align-items: center; gap: 12px; }
/* top-right action group (credit balance link sits left of the account actions). */
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-credits { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.top:has(.header-credits:not([hidden])) { flex-wrap: wrap; }
[data-testid="credits-page"] > a { color: var(--accent); }
