/* 原子洗稿页：左边原片和货，右边一格一条复刻片。片子一律放监看黑里看。 */
#atom-root { padding: 20px 24px 40px; }
.aw { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1480px; margin: 0 auto; }

.aw h2 { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.aw-monitor {
  position: relative; aspect-ratio: 9 / 16; width: 100%; overflow: hidden;
  background: var(--monitor); border-radius: var(--radius);
}
.aw-monitor video { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--monitor); }

/* 左栏 */
.aw-src { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 12px; }
.aw-src-h { display: flex; align-items: baseline; justify-content: space-between; }
.aw-src-h span { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.aw-prod {
  display: flex; gap: 12px; align-items: center; padding: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.aw-prod img, .aw-prod-ph { width: 44px; height: 44px; flex: none; object-fit: contain; background: #fff; border-radius: 4px; border: 1px solid var(--line); }
.aw-prod div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aw-prod b { font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-prod span { font-size: var(--fs-xs); color: var(--muted); }
.aw-prod .aw-prod-k { color: var(--faint); }

/* 右栏 */
.aw-out-h { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.aw-out-h p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.aw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-items: start; }

.aw-card {
  display: flex; flex-direction: column; gap: 12px; padding: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.aw-card.failed { border-color: #e6b9b4; }
.aw-card-h { display: flex; align-items: center; gap: 8px; height: 22px; font-size: var(--fs-xs); min-width: 0; }
.aw-no { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.aw-chg { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-chg.plain { background: var(--sunk); color: var(--muted); }
.aw-from { color: var(--faint); flex: none; white-space: nowrap; }

/* 出片中 */
.aw-wait {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: #c9ccd2; font-size: var(--fs-xs); text-align: center; padding: 16px;
}
.aw-wait p { margin: 0; color: #8b8f98; }
.aw-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .18); border-top-color: var(--accent-dim);
  animation: aw-spin 900ms linear infinite;
}
@keyframes aw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aw-spin { animation: none; border-top-color: rgba(255, 255, 255, .18); } }
.aw-steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; align-items: flex-start; }
.aw-steps li { position: relative; padding-left: 20px; color: #6e727b; }
.aw-steps li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; border: 1px solid #6e727b;
}
.aw-steps li.done { color: #aeb2ba; }
.aw-steps li.done::before { background: #aeb2ba; border-color: #aeb2ba; }
.aw-steps li.on { color: #fff; font-weight: 600; }
.aw-steps li.on::before { background: var(--accent-dim); border-color: var(--accent-dim); }

.aw-fail { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 20px; color: #f1c7c2; font-size: var(--fs-sm); }
.aw-fail b { color: #fff; font-size: var(--fs-md); }
.aw-fail p { margin: 0; line-height: 1.5; word-break: break-word; }

/* 操作 */
.aw-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aw-more { margin-left: auto; display: flex; gap: 2px; white-space: nowrap; align-items: center; }
.aw-more a.btn { text-decoration: none; }

/* 再复刻 */
.aw-vary { display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--sunk); border-radius: var(--radius); }
.aw-vary .seg { display: grid; grid-template-columns: repeat(4, 1fr); }
.aw-vary textarea { width: 100%; resize: vertical; min-height: 56px; font-size: var(--fs-sm); }
.aw-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 220px; overflow-y: auto; }
.aw-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; font-size: var(--fs-xs); background: var(--panel); }
.aw-pick img, .aw-pick .aw-prod-ph { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 4px; }
.aw-pick span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-pick.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.aw-vary-f { display: flex; justify-content: flex-end; gap: 8px; }

/* 再出一条 */
.aw-more-tile {
  aspect-ratio: 9 / 16; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 22px); margin: 44px 12px 0; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: transparent; color: var(--muted);
}
.aw-more-tile:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--panel); }
.aw-more-tile b { font-size: var(--fs-md); color: inherit; }
.aw-more-tile span:not(.aw-plus) { font-size: var(--fs-xs); }
.aw-plus { font-size: 28px; line-height: 1; font-weight: 300; } /* 加号大字，无对应 --fs-* 档 */

@media (max-width: 760px) {
  #atom-root { padding: 12px 16px 32px; }
  .aw { grid-template-columns: 1fr; gap: 20px; }
  .aw-src { position: static; }
  .aw-src .aw-monitor { max-width: 240px; }
  .aw-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* 调试页：原子洗稿过程 */

.aw-caution { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--radius); background: var(--run-soft); color: var(--run); font-size: var(--fs-sm); line-height: 1.5; }

/* 批次页：一次批量上传的原子视频，每条原片一行，右边是它的复刻片 */
.bt-rows { display: flex; flex-direction: column; gap: 12px; }
.bt-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
@media (max-width: 720px) { .bt-row { grid-template-columns: minmax(0, 1fr); } }
.bt-src { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bt-src video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: var(--monitor); border-radius: 6px; }
.bt-no { position: absolute; top: 6px; left: 6px; z-index: 1; min-width: 22px; height: 22px; padding: 0 8px; border-radius: 11px; background: rgba(22, 23, 26, .72); color: #fff; font-size: var(--fs-xs); line-height: 22px; text-align: center; }
.bt-src-meta { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); min-width: 0; }
.bt-src-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }
.bt-label { color: var(--muted); }
.bt-src-meta a { color: var(--accent-ink); }
.bt-caution { margin: 0; padding: 8px 8px; border-radius: var(--radius); background: var(--run-soft); color: var(--run); font-size: var(--fs-xs); line-height: 1.4; }
.bt-takes { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 4px; }
.bt-take { margin: 0; flex: none; width: 200px; display: flex; flex-direction: column; gap: 8px; }
.bt-monitor video, .bt-monitor .bt-wait, .bt-monitor .bt-fail { width: 100%; aspect-ratio: 9 / 16; border-radius: 6px; background: var(--monitor); display: block; object-fit: contain; }
.bt-wait { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #c9cbd1; font-size: var(--fs-xs); }
.bt-fail { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; box-sizing: border-box; background: var(--fail-soft) !important; color: var(--fail); font-size: var(--fs-xs); text-align: center; }
.bt-take figcaption { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); min-width: 0; }
.bt-take figcaption span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.bt-take figcaption a { color: var(--accent-ink); flex: none; }
.bt-takes .empty { flex: 1; padding: var(--sp-4); font-size: var(--fs-sm); }

.aw-face-ph { display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); color: var(--muted); }
/* 批量上传进度（批次页顶部） */
.bt-uploads:empty { display: none; }
.bt-uploads { padding: 12px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.bu-head { margin: 0 0 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.bu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.bu-item { display: grid; grid-template-columns: minmax(0, 1fr) 160px 40px; align-items: center; gap: 12px; font-size: var(--fs-xs); }
.bu-item b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bu-item em { font-style: normal; color: var(--muted); }
.bu-wait, .bu-fail { grid-template-columns: minmax(0, 1fr) auto auto; }
.bu-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bu-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.bu-err { color: var(--fail) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
