
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #111a28;
  --surface-soft: #152133;
  --surface-strong: #1d2d43;
  --line: #2a3a52;
  --line-strong: #3c526e;
  --text: #e9f0f8;
  --text-soft: #b9c6d6;
  --muted: #8493a6;
  --primary: #38bdf8;
  --primary-soft: rgba(56, 189, 248, 0.14);
  --primary-wash: rgba(56, 189, 248, 0.09);
  --accentText: #06121f;
  --green: #2dd4bf;
  --green-soft: rgba(45, 212, 191, 0.13);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.13);
  --purple: #c084fc;
  --purple-soft: rgba(192, 132, 252, 0.14);
  --control: #101927;
  --inset: #0e1724;
  --hover: #18263a;
  --frame-bg: #050a12;
  --header-bg: rgba(11, 18, 32, 0.92);
  --scrim: rgba(2, 6, 12, 0.68);
  --radius: 6px;
  --radius-sm: 4px;
  --pill-radius: 999px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font-ui: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[v-cloak] { display: none; }
body {
  background: var(--bg); color: var(--text);
  font: 13px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); cursor: pointer; text-decoration: none; }
h1 { font-size: 18px; line-height: 1.22; }
h2 { font-size: 14px; line-height: 1.25; }
h3 { font-size: 12px; line-height: 1.3; color: var(--text-soft); }
.mono { font-family: var(--font-mono); }

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.48; }
textarea, input, select {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); background: var(--control); outline: none; padding: 5px 8px;
}
textarea:focus, input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-wash); }
textarea { resize: vertical; }

.btn {
  min-height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--control); color: var(--text);
  padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); }
.btn.primary { border-color: var(--primary); background: var(--primary); color: var(--accentText); }
.btn.quiet { background: var(--surface-soft); border-color: var(--line); }
.btn.tiny { min-height: 24px; padding: 2px 7px; font-size: 12px; }
.btn.danger { border-color: color-mix(in srgb, var(--red) 56%, var(--line)); color: var(--red); }
.btn.big { min-height: 34px; padding: 7px 18px; font-size: 13px; width: 100%; }


.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar-inner {
  width: min(100%, 1800px); margin: 0 auto; padding: 8px 14px;
  display: flex; align-items: center; gap: 18px;
}
.brand-block { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--primary);
  display: grid; place-items: center;
}
.brand-mark span { width: 11px; height: 8px; border: 2px solid #fff; border-radius: 1px; }
.brand-title { font-size: 15px; font-weight: 800; }
.brand-sub { color: var(--muted); font-size: 10.5px; margin-top: 1px; }

.ws-switch { position: relative; flex-shrink: 0; }
.ws-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px;
  background: var(--surface-soft); border: 1px solid var(--line-strong);
  border-radius: var(--radius); color: var(--text); font-weight: 700; font-size: 12.5px;
  cursor: pointer; font-family: var(--font-ui); white-space: nowrap;
}
.ws-btn:hover { border-color: var(--primary); }
.ws-switch.open .ws-btn { border-color: var(--primary); background: var(--primary-wash); }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.ws-name { letter-spacing: .2px; }
.ws-caret { color: var(--muted); font-size: 10px; }
.ws-menu {
  position: absolute; top: 36px; left: 0; z-index: 60; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 5px;
}
.ws-menu-head {
  font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .5px;
  padding: 5px 8px 6px;
}
.ws-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 7px 9px; background: none; border: 1px solid transparent;
  border-radius: var(--radius-sm); color: var(--text-soft); cursor: pointer;
  font-family: var(--font-ui); text-align: left;
}
.ws-item:hover { background: var(--hover); color: var(--text); }
.ws-item.on { background: var(--primary-soft); border-color: var(--primary); color: var(--text); }
.wsi-name { font-size: 13px; font-weight: 700; }
.wsi-stat { font-size: 10.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.wsi-pending { color: var(--amber); font-weight: 700; }
.ws-orphan {
  margin: 4px 3px 2px; padding: 6px 8px; font-size: 11px; line-height: 1.5;
  color: var(--red); background: var(--red-soft); border-radius: var(--radius-sm);
}


.mode-off { opacity: .42; cursor: not-allowed; }
.mode-off:hover { border-color: var(--line) !important; background: none !important; }


.topnav-more { position: relative; margin-left: auto; }
.more-btn {
  height: 28px; padding: 0 10px; background: none; border: 1px solid transparent;
  border-radius: var(--radius-sm); color: var(--muted); cursor: pointer;
  font-size: 15px; line-height: 1; font-family: var(--font-ui);
}
.more-btn:hover { background: var(--hover); color: var(--text); }
.topnav-more.open .more-btn { background: var(--hover); color: var(--text); }
.more-menu {
  position: absolute; top: 33px; right: 0; z-index: 60; min-width: 170px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 4px;
}
.more-menu a {
  display: block; padding: 7px 10px; font-size: 12px; font-weight: 600;
  color: var(--text-soft); border-radius: var(--radius-sm);
}
.more-menu a:hover { background: var(--hover); color: var(--text); }

.topnav { display: flex; gap: 4px; flex: 1; align-items: center; min-width: 0; }
.topnav a {
  padding: 6px 12px; color: var(--text-soft); border: 1px solid transparent;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 12px;
  
  white-space: nowrap; flex-shrink: 0;
}
.topnav a.on { border-color: var(--primary); background: var(--primary); color: var(--accentText); }
.topnav a:not(.on):hover { background: var(--hover); }

.queue-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 26px;
  border: 1px solid var(--line-strong); border-radius: var(--pill-radius);
  background: var(--surface); padding: 3px 12px; font-size: 12px; font-weight: 700;
  color: var(--green);
}
.queue-chip.busy { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); }
.queue-chip.dead { color: var(--red); border-color: color-mix(in srgb, var(--red) 55%, var(--line)); }
.queue-chip .pr { color: var(--amber); }


.page { width: min(100%, 1800px); margin: 0 auto; padding: 14px; display: grid; gap: 12px; }
.page.narrow { width: min(100%, 900px); }
.pagehead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pagehead h1 { font-size: 16px; font-weight: 800; }
.pagehead .spacer { flex: 1; }
.hint { color: var(--muted); font-size: 12px; }
.sub { color: var(--muted); font-size: 11.5px; }
.empty { color: var(--muted); padding: 14px; }
.empty.big { text-align: center; padding: 90px 0; font-size: 13px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.panel-head {
  border-bottom: 1px solid var(--line); padding: 8px 10px;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.panel-head span { color: var(--muted); font-size: 12px; }
.panel-body { padding: 10px; }


.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 18px;
  border-radius: var(--pill-radius); padding: 1px 7px; font-size: 11px; font-weight: 750; white-space: nowrap;
  color: var(--text-soft); background: var(--surface-strong);
}
.pill.green, .audit-可用, .st-已通过, .ps-已完成 { color: var(--green); background: var(--green-soft); }
.pill.amber, .audit-待审, .st-待评审, .ps-待评审, .ps-部分失败·已完成 { color: var(--amber); background: var(--amber-soft); }
.pill.red, .audit-不可用, .st-已拒绝, .st-QC拒收, .st-生成失败, .st-渲染失败, .ps-全部失败 { color: var(--red); background: var(--red-soft); }
.pill.blue, .st-渲染中, .ps-生成中 { color: var(--primary); background: var(--primary-soft); }
.pill.purple, .st-需精修 { color: var(--purple); background: var(--purple-soft); }

.audit-作废 { color: var(--muted); background: var(--surface-strong); text-decoration: line-through; }
.st-排队中, .st-生成spec { color: var(--text-soft); background: var(--surface-strong); }


.segmented { display: flex; flex-wrap: wrap; gap: 4px; }
.segmented button {
  min-height: 26px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--inset); color: var(--text-soft); padding: 3px 9px; font-size: 12px;
}
.segmented button.active {
  border-color: var(--primary); background: var(--primary); color: var(--accentText); font-weight: 750;
}


.workbench-shell {
  width: min(100%, 1800px); margin: 0 auto; padding: 10px 12px 18px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 8px; align-items: start;
}
.workbench-shell.review { grid-template-columns: 260px minmax(0, 1fr) 330px; }

.workbench-shell.side-folded { grid-template-columns: 44px minmax(0, 1fr); }
.side-panel {
  position: sticky; top: 54px; max-height: calc(100vh - 66px); overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.sidebar-controls {
  position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line);
  background: var(--surface); padding: 7px; display: grid; gap: 6px;
}
.lib-list { padding: 7px; display: grid; gap: 5px; }
.lib-row {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--control); padding: 7px 9px; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  color: var(--text);
}
.lib-row.active { border-color: var(--primary); background: var(--primary-soft); }
.lib-row .n { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.lib-row strong { font-size: 12.5px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-row.folder-row {
  margin-left: 14px; width: calc(100% - 14px); padding-left: 10px;
  background: var(--inset); color: var(--text-soft); position: relative;
}
.lib-row.folder-row::before {
  content: ""; position: absolute; left: -8px; top: 50%; width: 8px; height: 1px;
  background: var(--line-strong);
}
.lib-row.folder-row strong { font-size: 12px; font-weight: 650; }
.lib-row strong { flex: 1 1 auto; }
.lib-row .caret {
  flex: 0 0 12px; text-align: center; font-size: 10px; line-height: 1;
  color: var(--muted); cursor: pointer; user-select: none; border-radius: 3px;
}
.lib-row .caret:hover:not(.caret-empty) { color: var(--primary); background: var(--primary-soft); }
.lib-row .caret.caret-empty { cursor: default; visibility: hidden; }
.lib-sep { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 6px 3px 1px; }


.main-col { min-width: 0; display: grid; gap: 8px; }
.filters-bar {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 7px 9px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.filters-bar select { min-height: 26px; padding: 2px 6px; font-size: 12px; }

.filters-bar .hint { flex: 1 1 60px; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.filters-bar .count { margin-left: 0; flex: none; }
@media (max-width: 1180px) { .filters-bar .hint { display: none; } }
.chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text-soft); font-size: 12px; }
.count { color: var(--muted); font-size: 12px; margin-left: auto; font-family: var(--font-mono); }

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


.clip-search { flex: 1 1 200px; min-width: 150px; max-width: 320px;
  background: var(--control); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius); padding: 4px 9px; font: 12.5px inherit; font-family: inherit; outline: none; }
.clip-search:focus { border-color: var(--primary); }


.cmeta { margin: 3px 0 1px; }
.cprod { display: inline-block; font-size: 10.5px; color: var(--primary);
  background: var(--primary-soft); border-radius: var(--radius-sm); padding: 1px 6px; }
.cprod.none { color: var(--muted); background: var(--surface-soft); }

.cfile { font-size: 11px; color: var(--text-soft); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); }
.cspec { font-size: 10.5px; color: var(--muted); margin-top: 1px; font-family: var(--font-mono); }
.clip-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; min-width: 0;
}
.clip-card.sel { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.clip-card.off { opacity: .55; }
.thumbwrap { position: relative; aspect-ratio: 9/12; background: var(--frame-bg); cursor: zoom-in; }

.thumbwrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nothumb { color: var(--muted); display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; }
.frame-badge {
  position: absolute; left: 5px; top: 5px; z-index: 1;
  border: 1px solid rgba(255,255,255,.22); background: rgba(2,6,12,.78); color: #fff;
  padding: 1px 5px; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
}
.frame-time {
  position: absolute; right: 5px; bottom: 5px; z-index: 1;
  border: 1px solid rgba(255,255,255,.22); background: rgba(2,6,12,.78); color: #fff;
  padding: 1px 5px; font-family: var(--font-mono); font-size: 11px;
}
.kind-badge {
  position: absolute; right: 5px; top: 5px; z-index: 1;
  background: var(--purple); color: var(--accentText); border-radius: var(--radius-sm);
  padding: 1px 5px; font-size: 10.5px; font-weight: 800;
}
.clip-body { padding: 7px 8px 8px; display: grid; gap: 5px; }
.cid { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cid strong { font-family: var(--font-mono); font-size: 12px; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 10.5px; border-radius: var(--radius-sm); padding: 1px 5px; background: var(--surface-strong); color: var(--text-soft); }
.tag.folder-tag { background: var(--purple-soft); color: var(--purple); }
.tag.t1 { background: var(--primary-soft); color: var(--primary); }
.tag.t2 { background: var(--green-soft); color: var(--green); }
.tag.t3 { background: var(--amber-soft); color: var(--amber); }
.desc { font-size: 11px; color: var(--muted); height: 32px; overflow: hidden; line-height: 1.45; }
.clip-actions { display: flex; gap: 4px; flex-wrap: wrap; }


.selbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 20;
  display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--pill-radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 8px 16px; box-shadow: var(--shadow-lg); font-size: 12px;
}
.selbar b { color: var(--primary); font-family: var(--font-mono); }


.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: middle; }
.tbl th {
  background: var(--surface-soft); color: var(--text-soft);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  position: sticky; top: 0;
}
.tbl tr:last-child td { border-bottom: 0; }
.rowlink { cursor: pointer; }
.rowlink:hover { background: var(--hover); }
.sumchips { display: flex; gap: 4px; flex-wrap: wrap; }
.acts { display: flex; gap: 5px; flex-wrap: wrap; }
.qc-ok { color: var(--green); } .qc-warn { color: var(--amber); } .qc-bad { color: var(--red); }


.formrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.formrow .lab { width: 64px; color: var(--text-soft); font-weight: 750; font-size: 12px; flex: none; }
.mini-clips { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.mini-clip {
  background: var(--primary-soft); color: var(--primary); border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 2px 7px; font-size: 11.5px; font-family: var(--font-mono);
}
.mini-clip a { color: var(--primary); margin-left: 3px; }
.voice-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.voice-row audio { height: 30px; filter: invert(.9) hue-rotate(180deg); }
.check { border-radius: var(--radius-sm); padding: 6px 10px; font-size: 12px; }
.check.err { background: var(--red-soft); color: var(--red); }
.check.warn { background: var(--amber-soft); color: var(--amber); }
.check.ok { background: var(--green-soft); color: var(--green); }
.submitrow { display: flex; gap: 10px; justify-content: flex-end; }
.submitrow .btn.big { width: auto; }


.upload-form { display: grid; gap: 10px; }
.filebox {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--inset); padding: 14px; display: grid; gap: 4px;
  cursor: pointer; color: var(--text-soft);
}
.filebox:hover { border-color: var(--primary); background: var(--primary-wash); }
.filebox input { padding: 0; border: 0; background: transparent; }
.filebox span { color: var(--text); font-weight: 800; font-size: 12.5px; }
.filebox small { color: var(--muted); font-size: 11.5px; }
.filebox.compact { padding: 10px; }

.voice-list { display: grid; gap: 7px; }
.voice-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--control); padding: 8px;
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 320px) auto auto;
  gap: 10px; align-items: center;
}
.voice-card.off { opacity: .55; }
.voice-card b { font-size: 12.5px; }
.voice-card audio { width: 100%; height: 30px; filter: invert(.9) hue-rotate(180deg); }


.queue-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 10px; align-items: start; }
.queue-grid .panel:first-child { grid-row: span 2; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.metric-grid div {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--inset); padding: 10px; display: grid; gap: 2px;
}
.metric-grid b { color: var(--primary); font-family: var(--font-mono); font-size: 18px; }
.metric-grid span { color: var(--muted); font-size: 11.5px; }
.job-list { display: grid; gap: 6px; }
.job-row {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--control); padding: 7px 8px;
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr) auto auto;
  gap: 8px; align-items: center; font-size: 12px;
}


.rq-row {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--control); padding: 7px 8px; text-align: left; color: var(--text);
  display: grid; gap: 2px;
}
.rq-row.active { border-color: var(--primary); background: var(--primary-soft); }
.rq-row.loading { box-shadow: inset 3px 0 0 var(--primary); }
.rq-row.loading strong::after {
  content: "加载中"; margin-left: 7px; color: var(--primary);
  font: 700 10px/1 var(--font-ui);
}

.rq-row strong { font-family: var(--font-mono); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rq-row small { color: var(--muted); font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-row .warnline { color: var(--amber); font-size: 11px; }

.mode-tabs {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 5px; display: flex; gap: 5px; flex-wrap: wrap;
}

.mode-tabs button {
  min-height: 30px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-soft); padding: 4px 12px; font-weight: 700; font-size: 12px;
  flex: none; white-space: nowrap;
}
.mode-tabs button.active { border-color: var(--primary); background: var(--primary); color: var(--accentText); }

.mode-tabs .meta { margin-left: auto; align-self: center; color: var(--muted);
  font-size: 11.5px; font-family: var(--font-mono);
  flex: 1 1 200px; min-width: 0; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 4px; }

.frame-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px;
  padding: 5px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--frame-bg);
  max-height: calc(100vh - 200px); overflow: auto;
}

.frame-tile {
  position: relative; display: block; width: 100%; padding: 0; line-height: 0;
  border: 1px solid rgba(255,255,255,.13); background: #000;
}
.frame-tile img {
  display: block; width: 100%; height: auto; background: #000;
  opacity: 0; transition: opacity .16s ease-out;
}
.frame-tile img.loaded { opacity: 1; }
.frame-tile.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.review-loading-panel { display: grid; gap: 8px; }
.loading-tabs { min-height: 42px; align-items: center; }
.sk-tab {
  width: 78px; height: 28px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-soft), var(--surface-strong), var(--surface-soft));
  background-size: 220% 100%; animation: skeleton-shift 1.1s linear infinite;
}
.frame-skeleton {
  aspect-ratio: 9 / 16; min-height: 210px;
  background: linear-gradient(90deg, #050a12, #111a28, #050a12);
  background-size: 220% 100%; animation: skeleton-shift 1.1s linear infinite;
}
@keyframes skeleton-shift {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
.frame-zoom-trigger {
  position: absolute; right: 5px; bottom: 5px; z-index: 2; display: inline-grid; place-items: center;
  width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.32);
  background: rgba(2,6,12,.78); color: #fff; font-size: 13px;
}
.frame-zoom-trigger:hover { border-color: var(--primary); color: var(--primary); }

.player-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--frame-bg); padding: 8px; display: grid; gap: 8px; justify-items: center; }
.player-wrap video { width: min(100%, 380px); aspect-ratio: 9/16; background: #000; border: 1px solid var(--line); }
.timeline-readout { color: var(--text-soft); font-size: 12px; }
.timeline-readout strong { color: var(--primary); font-family: var(--font-mono); }

.block {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  padding: 8px 10px; cursor: pointer; display: grid; gap: 3px;
}
.block:hover { border-color: var(--primary); background: var(--hover); }
.bhead { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.bhead b { font-size: 12.5px; }
.btext { font-size: 12px; color: var(--text); }
.btext .sent { display: flex; gap: 7px; align-items: baseline; line-height: 1.7; padding: 1px 0; }
.btext .sent-i { flex: 0 0 auto; min-width: 15px; text-align: right; color: var(--muted); font-family: var(--font-mono); font-size: 10px; opacity: .7; }
.btext .sent-tx { flex: 1 1 auto; }
.btext .sent-t { flex: 0 0 auto; color: var(--primary); font-family: var(--font-mono); font-size: 10px; opacity: 0; white-space: nowrap; }
.btext .sent-jump { cursor: pointer; border-radius: 5px; padding: 2px 6px; margin: 0 -6px; }
.btext .sent-jump:hover { background: var(--primary-soft); }
.btext .sent-jump:hover .sent-t { opacity: 1; }
.btext .sent-jump:hover .sent-i { opacity: 1; color: var(--primary); }
.bsub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.seg-adjust { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.seg-adjust .k { font-size: 11px; color: var(--muted); font-weight: 700; }
.seg-adjust .nudge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-soft); }
.seg-adjust .nudge button { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 5px; background: var(--control); color: var(--text); cursor: pointer; font-size: 13px; line-height: 1; }
.seg-adjust .nudge button:hover { border-color: var(--primary); color: var(--primary); }
.seg-adjust .nudge b { min-width: 34px; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.seg-adjust .nudge b.on { color: var(--primary); }
.blocks-col { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: calc(100vh - 200px); overflow: auto; }


.annotation-panel { padding: 8px; display: grid; gap: 8px; }
.annotation-module { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 8px; }
.annotation-module summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: var(--text); font-weight: 750; font-size: 12px; }
.annotation-module summary::-webkit-details-marker { display: none; }
.annotation-module summary::after { content: "+"; color: var(--muted); font-family: var(--font-mono); }
.annotation-module[open] summary::after { content: "-"; }
.annotation-module[open] summary { margin-bottom: 7px; }
.qc-line { display: grid; grid-template-columns: 64px 1fr; gap: 6px; font-size: 12px; color: var(--text-soft); padding: 2px 0; }
.qc-line b { color: var(--text); font-family: var(--font-mono); }

.ratio-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.rid { width: 52px; font-family: var(--font-mono); font-size: 11px; }
.bar { flex: 1; height: 10px; background: var(--inset); border-radius: 5px; overflow: hidden; }
.fill { height: 100%; background: var(--green); }
.fill.over { background: var(--red); }
.rv { width: 92px; text-align: right; font-size: 11px; color: var(--text-soft); font-family: var(--font-mono); }
.source-ratio-list { display: grid; gap: 8px; }
.source-ratio-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}
.source-thumb {
  width: 56px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  background: var(--inset);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.source-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.source-ratio-main { min-width: 0; display: grid; gap: 4px; }
.source-ratio-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.source-ratio-card .rid { width: auto; color: var(--text); background: transparent; }
.source-ratio-card .rv { width: auto; white-space: nowrap; }
.source-title {
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-meta { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-cloud button {
  border: 1px solid var(--line); border-radius: var(--pill-radius);
  background: var(--surface-soft); color: var(--text-soft); padding: 3px 8px; font-size: 12px;
}
.tag-cloud button.active { border-color: var(--red); background: var(--red-soft); color: var(--red); font-weight: 800; }

.score-row { display: grid; grid-template-columns: minmax(60px, 1fr) auto; align-items: center; gap: 8px; }
.score-row span { color: var(--text-soft); font-size: 12px; }
.score-row div { display: flex; gap: 4px; }
.score-row button {
  width: 28px; height: 28px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--control); color: var(--text-soft);
}
.score-row button.active { border-color: var(--primary); background: var(--primary); color: var(--accentText); font-weight: 800; }

.comment-box { width: 100%; min-height: 60px; padding: 6px 8px; font-size: 12px; }

.vbtns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.vbtns .v {
  min-height: 34px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--control); color: var(--text-soft); font-weight: 750; font-size: 12.5px;
}
.v.ok.sel { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.v.fix.sel { border-color: var(--purple); background: var(--purple-soft); color: var(--purple); }
.v.bad.sel { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.rev-hist { font-size: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); color: var(--text-soft); }


.image-viewer { position: fixed; inset: 0; z-index: 120; background: rgba(8,13,20,.94); display: grid; grid-template-rows: auto 1fr; }
.image-viewer-head {
  min-height: 44px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.16); font-family: var(--font-mono); font-size: 12px;
}
.image-viewer-body { overflow: auto; padding: 12px; display: grid; place-items: center; }
.image-viewer-body img { max-height: 88vh; max-width: 96vw; border: 1px solid rgba(255,255,255,.2); background: #000; }
.image-viewer-body video { max-height: 88vh; max-width: 96vw; background: #000; }


.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.asset-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.asset-card video { width: 100%; aspect-ratio: 9/16; background: var(--frame-bg); display: block; }
.abody { padding: 8px 10px; display: grid; gap: 5px; justify-items: start; }
.abody b { font-family: var(--font-mono); font-size: 12px; }


.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: var(--scrim); }
.modal-panel {
  width: min(680px, 96vw); max-height: 92vh; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-lg); padding: 16px; display: grid; gap: 12px;
}
.modal-panel h2 { font-size: 14px; }
.modal-panel.wide { width: min(1080px, 96vw); }
.tag.vbad { background: var(--red-soft); color: var(--red); }
.reviewer-head { display: flex; align-items: center; gap: 10px; }
.reviewer-frames {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 4px;
  padding: 4px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--frame-bg); max-height: 52vh; overflow: auto;
}
.reviewer-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vsr-form { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); padding: 10px; display: grid; gap: 8px; }
.region-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.region-row input { width: 76px; min-height: 26px; padding: 2px 6px; font-family: var(--font-mono); font-size: 12px; }
.modal-panel video { width: 100%; max-height: 60vh; background: #000; border-radius: var(--radius-sm); }
.errlog {
  background: var(--frame-bg); color: #ffd6d6; border-radius: var(--radius-sm); padding: 10px;
  font-family: var(--font-mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-all;
  max-height: 40vh; overflow-y: auto;
}
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 200;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface-strong); color: var(--text); padding: 8px 18px; font-size: 12.5px;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 1080px) {
  .workbench-shell.review { grid-template-columns: 220px minmax(0, 1fr); }
  .workbench-shell.review .annotation-panel-wrap { grid-column: 1 / -1; position: static; max-height: none; }
  .queue-grid { grid-template-columns: 1fr; }
  .queue-grid .panel:first-child { grid-row: auto; }
}
@media (max-width: 920px) {
  .workbench-shell, .workbench-shell.review { grid-template-columns: 1fr; }
  .side-panel { position: static; max-height: none; }
  .voice-card, .job-row { grid-template-columns: 1fr; }
}


.review-center { display: grid; gap: 8px; align-content: start; }
.review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-top .rname { font-family: var(--font-mono); font-size: 13px; }
.review-top .legend { color: var(--muted); font-size: 11px; }
.review-player video { width: 100%; max-height: 46vh; aspect-ratio: auto; }
.tl-label { color: var(--muted); font-size: 10.5px; margin-top: 2px; }


.timeline { display: flex; gap: 2px; height: 48px; background: var(--frame-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.tlseg { position: relative; min-width: 26px; border: 1px solid transparent; background: var(--surface-strong);
  cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center;
  color: var(--text-soft); overflow: hidden; padding: 2px; transition: .1s; }
.tlseg.orig { background: #17351f; } .tlseg.tts { background: #241f30; }
.tlseg:hover { filter: brightness(1.35); }
.tlseg.active { border-color: var(--primary); color: #fff; box-shadow: inset 0 0 0 1px var(--primary); }
.tlseg b { font-size: 9.5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tlseg small { font-size: 8px; opacity: .7; }
.tlseg .tl-dot { position: absolute; top: 2px; right: 3px; color: var(--amber); font-size: 8px; }


.film-groups { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 12px; }
.grp { padding: 8px 0; border-bottom: 1px solid var(--line); }
.grp:last-child { border-bottom: 0; }
.grphead { display: flex; align-items: center; gap: 8px; }
.gname { width: 130px; flex-shrink: 0; font-size: 12.5px; font-weight: 700; }
.gnote { flex: 1; min-height: 26px; font-size: 11.5px; padding: 3px 7px; }
.gels { margin-top: 4px; padding-left: 138px; }
.gels span { display: inline-block; background: var(--inset); border-radius: 8px; padding: 1px 7px; margin: 2px 4px 0 0; font-size: 10.5px; color: var(--muted); }


.tri { display: inline-flex; gap: 2px; flex-shrink: 0; }
.tri button { padding: 3px 8px; font-size: 12px; background: var(--control); color: var(--text-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tri button.on-p { background: #1f6b3a; color: #fff; border-color: #1f6b3a; }
.tri button.on-w { background: #b5851f; color: #fff; border-color: #b5851f; }
.tri button.on-f { background: #b53a2f; color: #fff; border-color: #b53a2f; }


.seg-head h3 { color: var(--primary); }
.seg-head .sub { margin-bottom: 8px; }
.shot-meta { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); padding: 8px; display: grid; gap: 3px; }
.sm-row { display: grid; grid-template-columns: 54px 1fr; gap: 8px; font-size: 11.5px; }
.sm-row .k { color: var(--muted); }
.sm-row b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.sm-row b.orig-c { color: var(--green); } .sm-row b.tts-c { color: var(--purple); }
.sm-row b.q-low { color: var(--red); }
.voice-line b { color: #c7cdd6; font-weight: 500; }


.seg-tags { display: grid; gap: 6px; }
.tagcat { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.catname { font-size: 10.5px; color: var(--muted); width: 32px; flex-shrink: 0; }
.segtag { position: relative; border: 1px solid var(--line); border-radius: var(--pill-radius); background: var(--surface-soft); color: var(--text-soft); padding: 3px 8px; font-size: 11.5px; }
.segtag.star { border-color: var(--line-strong); }
.segtag.on { border-color: var(--red); background: var(--red-soft); color: var(--red); font-weight: 700; }
.segtag kbd { margin-left: 4px; }
kbd { display: inline-block; min-width: 14px; text-align: center; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 3px; background: var(--inset); color: var(--text-soft); font-family: var(--font-mono); font-size: 10px; padding: 0 3px; line-height: 15px; }


.seg-items { display: grid; gap: 6px; }
.seg-items .item { border-top: 1px solid var(--line); padding-top: 7px; }
.seg-items .item.memo { border-top: 1px solid color-mix(in srgb, var(--amber) 40%, var(--line)); }
.seg-items .item.memo .ik b { color: var(--amber); }
.seg-items .ik b { font-size: 12px; } .seg-items .ik small { display: block; color: var(--muted); font-size: 9.5px; margin-bottom: 4px; }
.seg-items .frow { display: flex; gap: 8px; align-items: center; }
.seg-items .note { flex: 1; min-height: 28px; font-size: 11.5px; padding: 4px 7px; }

.verdict-box { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 8px; }
.verdict-box h3 { color: var(--primary); }
.verdict-box .vbtns .v kbd { margin-left: 3px; }


.export-text { width: 100%; min-height: 320px; font-size: 11.5px; padding: 10px; }
.modal-panel.shortcuts { width: min(760px, 96vw); }
.sc-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; }
.sc-cols h3 { color: var(--primary); margin-bottom: 6px; }
.sc { font-size: 12px; color: var(--text-soft); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sc b { color: var(--muted); width: 34px; }
.sc-tag { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; }


.story-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 14px; max-height: calc(100vh - 240px); overflow: auto; }
.story-text { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.7 var(--font-ui); color: var(--text-soft); margin-top: 6px; }


.workbench-shell.review { grid-template-columns: 196px minmax(0, 1fr) 300px; }

.review-mid { min-width: 0; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.review-mid > .review-body { flex: 1 1 auto; min-height: 0; }

.review-body { display: grid; grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  gap: 10px; align-items: stretch; min-width: 0; min-height: 0; }

.review-body.wide { grid-template-columns: minmax(0, 1fr) minmax(320px, 360px); }

.mid-video { display: grid; gap: 6px; min-width: 0; min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; overflow: hidden; }

.mid-video .player-wrap { min-height: 0; overflow: hidden; display: flex; }

.review-body.wide .mid-video { grid-template-rows: auto auto; align-content: start; }
.review-body.wide .mid-video .player-wrap { align-items: flex-start; }
.review-body.wide .mid-video .review-player video { flex: 0 1 auto; height: auto; }



.rv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px 8px 0; }
.rv-actions .btn { justify-content: center; text-align: center; white-space: nowrap;
  padding-left: 6px; padding-right: 6px; }
.mid-video .review-player { padding: 6px; }
.mid-video .review-player video { flex: 1 1 auto; width: 100%; height: auto;
  min-height: 0; max-height: none; aspect-ratio: auto; object-fit: contain; background: #000; }


.mid-tabs { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; }
.mid-tabs > .mode-tabs { align-self: start; }
.mid-tabs > :not(.mode-tabs) { overflow: auto; min-height: 0; padding-right: 4px; }
.mid-tabs .film-groups, .mid-tabs .blocks-col, .mid-tabs .story-panel, .mid-tabs .frame-grid { max-height: none; }
.review-top .rname { font-family: var(--font-mono); font-size: 13px; }
.tl-label .lg-o { color: var(--green); } .tl-label .lg-t { color: var(--purple); }


#vpBtn { display: none !important; }




.workbench-shell.review {
  height: calc(100vh - 54px - 16px);
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: stretch;
}
.workbench-shell.review > .side-panel { grid-row: 1 / 4; position: static; max-height: none; }

.rowBoard { grid-column: 2; grid-row: 3; min-width: 0; }
.pkgbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 12px;
}
.pkgbar .lb { font-weight: 700; color: var(--text); flex-shrink: 0; }
.pkgbar .it { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-soft); }
.pkgbar .sub { color: var(--muted); font-size: 11px; }

.rowBoard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px 10px;
}
.rowBoard .bhint {
  display: flex; align-items: center; gap: 12px; font-size: 11px;
  color: var(--muted); margin-bottom: 7px;
}
.rowBoard .dotg { color: var(--green); } .rowBoard .dotp { color: var(--purple); }
.rowBoard .dotm { color: var(--amber); }
.rowBoard .segs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }

.rowBoard .sg {
  flex: 0 0 64px; background: var(--control); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0; cursor: pointer; overflow: hidden;
  display: grid; gap: 0; text-align: left; font-family: var(--font-ui);
}
.rowBoard .sg:hover { border-color: var(--line-strong); }
.rowBoard .sg.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.rowBoard .sg .f { position: relative; display: block; aspect-ratio: 9/16; background: var(--frame-bg); }

.rowBoard .sg .f img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rowBoard .sg .f .noimg { display: block; width: 100%; height: 100%; }
.rowBoard .sg .no {
  position: absolute; left: 3px; top: 3px; z-index: 2; min-width: 14px; text-align: center;
  background: var(--scrim); color: #fff; font-size: 9.5px; font-weight: 700;
  border-radius: 3px; padding: 0 3px;
}

.rowBoard .sg .t {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: center;
  background: var(--scrim); color: #fff; font-size: 9px;
  font-family: var(--font-mono); padding: 1px 0;
}
.rowBoard .sg .bar { height: 3px; display: block; }
.rowBoard .sg .bar.o { background: var(--green); } .rowBoard .sg .bar.t { background: var(--purple); }
.rowBoard .sg .i {
  display: block; padding: 3px 4px 4px; font-size: 9.5px; color: var(--text-soft);
  line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rowBoard .sg .mk { color: var(--amber); margin-left: 3px; }
.rowBoard .sg .pk { color: var(--primary); margin-left: 3px; font-family: var(--font-mono); }


.mid-video .vbar {
  display: flex; align-items: center; gap: 10px; font-size: 11.5px;
  color: var(--text-soft); padding: 0 2px;
}
.mid-video .vbar .q-ok { color: var(--green); } .mid-video .vbar .q-low { color: var(--red); }


.pack-panel { display: grid; gap: 9px; align-content: start; }
.pack-cur { font-size: 12px; color: var(--text-soft); }
.pgroup { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.pgroup .pg-t { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.prow {
  display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px;
  border-top: 1px solid var(--line);
}
.prow:first-of-type { border-top: 0; }
.prow .k { color: var(--text-soft); min-width: 62px; }
.prow .k.bad { color: var(--red); }
.prow .mono { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.prow .sub { color: var(--muted); font-size: 11px; }
.prow input[type=range] { flex: 1; accent-color: var(--primary); min-width: 60px; }
.prow select.k { background: var(--control); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 4px; font-size: 11.5px; }
.sw {
  margin-left: auto; width: 34px; height: 18px; border-radius: 999px; flex-shrink: 0;
  background: var(--line-strong); border: 0; position: relative; cursor: pointer;
}
.sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .12s; }
.sw.on { background: var(--primary); } .sw.on::after { left: 18px; }
.empty.sm { font-size: 11.5px; padding: 6px 0; color: var(--muted); }


.modal-panel.packedit { width: min(1040px, 96vw); }
.pe-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
.pe-canvas {
  position: relative; background: var(--frame-bg); border: 1px solid var(--line-strong);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 9/16; max-height: 62vh;
  margin: 0 auto; cursor: crosshair; user-select: none;
}
.pe-canvas img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.pe-noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.8; }
.pe-box { position: absolute; border: 2px solid var(--red); background: rgba(251,113,133,.16); pointer-events: none; }
.pe-box.drafting { border-style: dashed; border-color: var(--primary); background: var(--primary-soft); }
.pe-box .cap {
  position: absolute; left: 0; top: -17px; white-space: nowrap;
  background: var(--red); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px;
}
.pe-keep {
  position: absolute; right: 6px; bottom: 6px; font-size: 10.5px; color: var(--green);
  background: var(--scrim); padding: 2px 6px; border-radius: 3px; pointer-events: none;
}
.pe-quick { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 9px; justify-content: center; }
.pe-quick .sub { color: var(--muted); font-size: 11.5px; width: 100%; text-align: center; }
.pe-side { display: grid; gap: 10px; align-content: start; }
.pe-note {
  font-size: 11.5px; color: var(--text-soft); line-height: 1.7;
  background: var(--amber-soft); border-radius: var(--radius-sm); padding: 8px 10px;
}


.sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-head h2 { font-size: 14px; margin: 0; }
.sec-head .sub { color: var(--muted); font-size: 11.5px; }
.fields { display: grid; gap: 12px; }
.fld { display: grid; grid-template-columns: 120px auto 1fr; gap: 10px; align-items: start; }
.fld .fk { font-size: 12.5px; color: var(--text); font-weight: 600; padding-top: 1px; }
.fld .sw { margin: 0; }
.fld .num { width: 64px; background: var(--control); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 3px 7px; font-size: 12.5px; font-family: var(--font-mono); }
.fld .fh { font-size: 11.5px; color: var(--muted); line-height: 1.65; }
.fld .fh b { color: var(--text); }

.fld .fh.danger { color: var(--amber); background: var(--amber-soft);
  padding: 6px 9px; border-radius: var(--radius-sm); }
.fld .fh.danger b { color: var(--amber); }
.fld-reason { padding-left: 130px; margin-top: -6px; }
.fld-reason input { width: 100%; max-width: 460px; background: var(--control); color: var(--text-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 8px; font-size: 11.5px; }
.tf-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tf-list .pg-t { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 7px; }
.tf-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.tf { font-size: 11px; padding: 3px 8px; border-radius: var(--pill-radius);
  background: var(--primary-soft); border: 1px solid var(--primary); color: var(--text); }
.tf.off { background: none; border-color: var(--line); color: var(--muted);
  text-decoration: line-through; opacity: .7; }
.sec-acts { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.raw { margin-top: 12px; }
.raw summary { font-size: 11.5px; color: var(--muted); cursor: pointer; }
.raw .story-text { margin-top: 6px; max-height: 260px; }

.arch-toggle { display: flex; align-items: center; gap: 5px; margin-top: 7px;
  font-size: 11px; color: var(--muted); cursor: pointer; }
.arch-toggle input { accent-color: var(--primary); }
.arch-toggle:hover { color: var(--text-soft); }


.seg-adjust-fold {
  display: flex; align-items: center; gap: 8px; padding: 4px 0 0;
  font-size: 11px; color: var(--muted); cursor: pointer;
}
.seg-adjust-fold:hover .sub { color: var(--text-soft); }
.seg-adjust-fold .k { color: var(--muted); }

.seg-adjust-fold .has { color: var(--amber); font-family: var(--font-mono); }


.voice-panel { display: grid; gap: 9px; align-content: start; }
.voice-panel .vsel {
  background: var(--control); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 4px 7px; font-size: 12px; flex: 1; min-width: 0;
  font-family: var(--font-ui);
}
.voice-panel .vsel option:disabled { color: var(--muted); }
.vtext { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.vtext .pg-t { font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.vtext .note { width: 100%; font-size: 12.5px; line-height: 1.7; padding: 7px 9px; }
.vacts { display: flex; gap: 8px; }
.vacts .btn { flex: 1; justify-content: center; }
.vresult { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px; display: grid; gap: 7px; }
.vresult audio { width: 100%; height: 32px; }
.vr-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 11.5px; color: var(--text-soft); }
.vr-row b { color: var(--text); }

.vr-over { color: var(--red) !important; background: var(--red-soft); padding: 3px 8px; border-radius: var(--radius-sm); width: 100%; line-height: 1.6; }
.vr-short { color: var(--amber) !important; }
.vr-ok { color: var(--green) !important; }


.workbench-shell.review > .annotation-panel-wrap { overflow: auto; min-height: 0; }
.annotation-panel { display: grid; gap: 11px; align-content: start; }


.srcprev { display: grid; gap: 7px; }
.sp-head { display: flex; align-items: baseline; gap: 8px; }
.sp-head h3 { margin: 0; font-size: 12.5px; }
.sp-head .sub { color: var(--muted); font-size: 11px; margin-left: auto; }
.sp-video {
  position: relative; width: 100%; aspect-ratio: 9/16; max-height: 224px;
  background: var(--frame-bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; padding: 0; cursor: pointer;
}
.sp-video:disabled { cursor: default; opacity: .7; }
.sp-video img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sp-noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; }
.sp-play {
  position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--scrim); color: #fff; display: grid; place-items: center; font-size: 14px;
}
.sp-info {
  display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 3px 8px;
  font-size: 11.5px; align-items: baseline;
}
.sp-info .k { color: var(--muted); }
.sp-info .v { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.sp-info .v.sub { color: var(--muted); }
.sp-info .v.bad { color: var(--amber); }


.seg-tags .tagwrap { display: flex; flex-wrap: wrap; gap: 5px; }
.seg-tags .segtag.good { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); color: var(--green); }
.seg-tags .segtag.good.on { background: var(--green); color: var(--accentText); }


.taghint { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.seg-note-box { margin-top: 2px; }
.seg-note-box .note { width: 100%; min-height: 46px; font-size: 12px; padding: 6px 8px; }


.modal-panel.manual { width: min(600px, 96vw); }
.manual-body { max-height: 66vh; overflow: auto; padding-right: 4px; }
.manual-body .m-lead { color: var(--text-soft); font-size: 12.5px; line-height: 1.7; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; margin-bottom: 4px; }
.manual-body h3 { color: var(--primary); font-size: 12.5px; margin: 12px 0 3px; }
.manual-body p { color: var(--text-soft); font-size: 12px; line-height: 1.65; }
.manual-body ul { margin: 2px 0 2px 2px; list-style: none; display: grid; gap: 3px; }
.manual-body li { color: var(--text-soft); font-size: 12px; line-height: 1.55; padding-left: 12px; position: relative; }
.manual-body li::before { content: "·"; position: absolute; left: 2px; color: var(--primary); }
.manual-body b { color: var(--text); }
.manual-body .mc-o { color: var(--green); } .manual-body .mc-t { color: var(--purple); }

@media (max-width: 1280px) {
  .workbench-shell.review { grid-template-columns: 180px minmax(0, 1fr) 280px; }
  .review-body { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
  .review-body.wide { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); }
}
@media (max-width: 1024px) {
  .review-body, .review-body.wide { grid-template-columns: 1fr; }
  .mid-video { position: static; }
  .mid-video .review-player video { max-height: 52vh; }
}


@media (max-width: 1180px) {
  .workbench-shell.review { height: auto; grid-template-rows: none; }
  .workbench-shell.review > .side-panel { grid-row: auto; }
  .workbench-shell.review > .review-mid,
  .workbench-shell.review > .main-col { grid-column: auto; grid-row: auto; }
  .rowPkg, .rowBoard { grid-column: 1 / -1; grid-row: auto; }
  .workbench-shell.review > .annotation-panel-wrap { overflow: visible; }
  .mid-tabs { grid-template-rows: none; }
  .mid-tabs > :not(.mode-tabs) { overflow: visible; }
  .mid-video { overflow: visible; }
}


.user-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #14243a 0%, var(--bg) 60%); overflow: auto; }
.user-gate-box { width: min(560px, 100%); }
.ug-head { text-align: center; margin-bottom: 26px; display: grid; justify-items: center; gap: 6px; }
.ug-head .brand-mark { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 4px; }
.ug-head .brand-mark span { width: 18px; height: 13px; }
.ug-head h1 { font-size: 24px; font-weight: 800; }
.ug-head p { color: var(--muted); font-size: 13px; }
.user-cards { display: grid; gap: 10px; margin-bottom: 14px; }
.user-card { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px;
  transition: .12s; color: var(--text); }
.user-card:hover { border-color: var(--primary); background: var(--hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-size: 19px; font-weight: 800; }
.avatar.sm { width: 22px; height: 22px; font-size: 12px; }
.uc-main { flex: 1; min-width: 0; }
.uc-name { font-size: 15px; font-weight: 700; }
.uc-role { color: var(--muted); font-size: 12px; margin-top: 1px; }
.uc-count { text-align: right; }
.uc-count b { color: var(--primary); font-size: 16px; font-family: var(--font-mono); }
.uc-count small { display: block; color: var(--muted); font-size: 10.5px; }
.uc-arrow { color: var(--line-strong); font-size: 22px; }
.add-user-btn { width: 100%; padding: 14px; border: 2px dashed var(--line); border-radius: 12px;
  background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; transition: .12s; }
.add-user-btn:hover { color: var(--primary); border-color: var(--primary); }
.add-user { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 12px; flex-wrap: wrap; }
.add-user input { flex: 1; min-width: 120px; min-height: 34px; }


.user-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px;
  border: 1px solid var(--line-strong); border-radius: var(--pill-radius); background: var(--surface);
  padding: 2px 6px 2px 3px; color: var(--text); font-size: 12px; font-weight: 700; }
.user-chip:hover { border-color: var(--primary); }
.uchip-name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uchip-sw { color: var(--muted); font-size: 11px; border-left: 1px solid var(--line); padding-left: 6px; }


.rev-filter { width: 100%; }
.rev-filter button { flex: 1; font-size: 11px; padding: 4px 4px; }
.rq-row .pill { font-size: 9.5px; padding: 0 4px; min-height: 15px; margin-left: 2px; }


.batch-select { width: 100%; min-height: 30px; font-size: 12px; font-weight: 700; }


.source-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px; display: grid; gap: 8px; }
.source-seg { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); padding: 8px; }
.ss-thumb { position: relative; width: 84px; flex: 0 0 auto; aspect-ratio: 9/16; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--frame-bg); overflow: hidden; padding: 0; cursor: pointer; }
.ss-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ss-play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--primary); font-size: 22px; }
.ss-role { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(2,6,12,.8); color: #fff; font-size: 10.5px; font-weight: 700; text-align: center; padding: 1px 0; }
.ss-main { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: start; }
.ss-head b { color: var(--primary); }
.ss-id { color: var(--muted); font-size: 11px; }
.ss-acts { display: flex; gap: 6px; margin-top: 2px; }



.workbench-shell.review.q-off { grid-template-columns: 26px minmax(0, 1fr) 300px; }
.workbench-shell.review.p-off { grid-template-columns: 196px minmax(0, 1fr) 26px; }
.workbench-shell.review.q-off.p-off { grid-template-columns: 26px minmax(0, 1fr) 26px; }
.workbench-shell.review.q-off > .side-panel:first-of-type > :not(.col-toggle):not(.col-stub),
.workbench-shell.review.p-off > .annotation-panel-wrap > :not(.col-toggle):not(.col-stub) { display: none; }

.workbench-shell.review > .side-panel { position: relative; top: 0; }
.col-toggle {
  position: absolute; top: 6px; z-index: 3; width: 18px; height: 22px; padding: 0;
  background: var(--surface-strong); border: 1px solid var(--line-strong); color: var(--text-soft);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; line-height: 1;
}
.col-toggle:hover { border-color: var(--primary); color: var(--text); }
.col-toggle.left { right: 4px; } .col-toggle.right { left: 4px; }

.workbench-shell.review > .annotation-panel-wrap { padding-left: 24px; }
.workbench-shell.review > .side-panel:first-of-type .sidebar-controls { padding-right: 24px; }
.workbench-shell.review.p-off > .annotation-panel-wrap,
.workbench-shell.review.q-off > .side-panel:first-of-type .sidebar-controls { padding: 0; }
.col-stub {
  writing-mode: vertical-rl; text-orientation: mixed; padding: 34px 4px 8px;
  font-size: 11px; color: var(--muted); cursor: pointer; letter-spacing: 1px;
  height: 100%; white-space: nowrap; overflow: hidden;
}
.col-stub:hover { color: var(--text); }


.workbench-shell.review.theater { grid-template-columns: minmax(0, 1fr); }
.workbench-shell.review.theater > .side-panel,
.workbench-shell.review.theater .rowPkg,
.workbench-shell.review.theater .rowBoard,
.workbench-shell.review.theater .mid-tabs { display: none; }
.workbench-shell.review.theater > .review-mid { grid-column: 1; }
.workbench-shell.review.theater .review-body { grid-template-columns: minmax(0, 1fr); }
.workbench-shell.review.theater .mid-video .review-player video { max-height: calc(100vh - 190px); }
.workbench-shell.review > .review-mid,
.workbench-shell.review > .main-col { grid-column: 2; grid-row: 1; min-height: 0; }
.rowPkg  { grid-column: 2; grid-row: 2; min-width: 0; }




.mat-side { display: flex; flex-direction: column; }
.mat-side .sh { display: flex; align-items: center; gap: 7px; padding: 10px 11px;
  border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.mat-side .sh .fold-btn { margin-left: auto; cursor: pointer; font-size: 13px; }
.mat-side .sh .fold-btn:hover { color: var(--primary); }

.mat-side.fold .sh > span:first-child,
.mat-side.fold .fd .nm, .mat-side.fold .fd .n, .mat-side.fold .fd .bub,
.mat-side.fold .sf { display: none; }
.mat-side.fold .sh { justify-content: center; padding: 10px 0; }
.mat-side.fold .sh .fold-btn { margin: 0; }
.mat-side .fds { overflow: auto; flex: 1; min-height: 0; padding: 5px 0; }
.mat-side .sf { border-top: 1px solid var(--line); padding: 8px 11px;
  font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.fd { display: flex; align-items: center; gap: 8px; padding: 7px 11px; cursor: pointer;
  font-size: 12.5px; position: relative; color: var(--text-soft); }
.fd:hover { background: var(--surface-soft); }
.fd.on { background: var(--primary-soft); box-shadow: inset 2px 0 0 var(--primary); color: var(--primary); }
.fd .ic { flex: 0 0 auto; opacity: .75; }
.fd .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd .n { color: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.fd.on .n { color: var(--primary); }

.fd .bub { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 6px;
  background: var(--frame-bg); border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 5px 9px; font-size: 11px; color: var(--text-soft); white-space: nowrap;
  z-index: 30; box-shadow: 0 6px 18px rgba(0,0,0,.45); pointer-events: none; }

.mat-bar { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 7px 9px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.mat-bar .sel { min-height: 26px; padding: 2px 6px; font-size: 12px; background: var(--control);
  border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); }
.mat-bar .spacer { flex: 1 1 auto; }


.picked-bar { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft);
  padding: 6px 9px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 8px; font-size: 12px; color: var(--text-soft); }
.picked-bar b { color: var(--primary); }
.picked-bar .spacer { flex: 1 1 auto; }
.picked-bar .hint { color: var(--muted); }

.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  overflow: hidden; cursor: pointer; }
.mat-card:hover { border-color: var(--line-strong); }
.mat-card.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }


.mat-thumb { position: relative; background: var(--frame-bg); }
.mat-thumb img { width: 100%; aspect-ratio: 3/4; height: auto; object-fit: contain; display: block; }
.mat-thumb .nothumb { aspect-ratio: 3/4; display: grid; place-items: center;
  color: var(--muted); font-size: 12px; }
.mat-thumb .pick { position: absolute; top: 7px; left: 7px; z-index: 3; width: 16px; height: 16px; cursor: pointer; }
.mat-thumb .pick:disabled { opacity: .3; cursor: not-allowed; }
.mat-thumb .dur { position: absolute; right: 6px; bottom: 6px; z-index: 2; font-size: 11px;
  background: rgba(6,14,24,.8); color: var(--text-soft); padding: 1px 6px; border-radius: 4px; }

.mat-thumb.dim img { opacity: .32; }
.mat-thumb .overlay { position: absolute; inset: 0; z-index: 2; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; }
.mat-thumb .overlay .txt { font-size: 11px; color: var(--text-soft); text-align: center; }
.mat-thumb .overlay .txt.mono { font-family: var(--font-mono); }

.mat-body { padding: 8px 9px 9px; display: grid; gap: 3px; }
.mat-body .crow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }

.stg { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px;
  padding: 1px 7px; border-radius: 5px; border: 1px solid transparent; white-space: nowrap; }
.stg i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.stg-ok   { color: var(--green); background: var(--green-soft); border-color: rgba(45,212,191,.35); }
.stg-run  { color: var(--primary); background: var(--primary-soft); border-color: rgba(56,189,248,.35); }
.stg-wait { color: var(--muted); background: var(--surface-soft); border-color: var(--line); }
.stg-up   { color: var(--cyan, #22d3ee); background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.35); }
.stg-bad  { color: var(--red); background: var(--red-soft); border-color: rgba(251,113,133,.35); }

.ckind { font-size: 10.5px; color: var(--muted); background: var(--surface-soft);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; white-space: nowrap; }

.prog { height: 4px; border-radius: 3px; background: var(--surface-soft); overflow: hidden; margin-top: 3px; }
.prog i { display: block; height: 100%; background: var(--primary); }
.prog.cyan { width: 76%; }
.prog.cyan i { background: var(--cyan, #22d3ee); }
.cstep { font-size: 10.5px; color: var(--muted); margin-top: 1px; line-height: 1.45; }
.cstep.bad { color: var(--red); }
.ctags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.ctag { font-size: 10.5px; color: var(--text-soft); background: var(--surface-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.cextra { display: flex; gap: 10px; font-size: 10.5px; color: var(--muted);
  margin-top: 3px; font-family: var(--font-mono); }
.cextra .good { color: var(--green); }


.dwrap { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; }
.dplayer { background: var(--frame-bg); border-radius: 9px; max-height: 440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dplayer video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.frow { padding: 9px 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: none; }
.frow .k { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.frow .v { font-size: 13px; }
.frow .v.mono { font-family: var(--font-mono); }
.inp2 { width: 100%; height: 30px; padding: 0 9px; border: 1px solid var(--line-strong);
  border-radius: 7px; background: var(--control); color: var(--text); font-size: 13px; }
.inp2:focus { outline: none; border-color: var(--primary); }
.sel.wide { width: 100%; }
.tagedit { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.tagedit .ctag { display: flex; align-items: center; gap: 5px; }
.tagedit .ctag b { color: var(--muted); cursor: pointer; font-weight: 400; }
.tagedit .ctag b:hover { color: var(--red); }
.tagedit .add { border: 1px dashed var(--line-strong); border-radius: 5px; padding: 1px 8px;
  font-size: 10.5px; color: var(--muted); cursor: pointer; }
.tagedit .add:hover { color: var(--primary); border-color: var(--primary); }
.tagedit .taginp { height: 22px; width: 120px; padding: 0 7px; font-size: 11px;
  border: 1px solid var(--primary); border-radius: 5px; background: var(--control); color: var(--text); }
.tagedit .taginp:focus { outline: none; }

.log { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px;
  padding: 8px 10px; font-size: 11.5px; font-family: var(--font-mono); color: var(--text-soft);
  line-height: 1.75; max-height: 132px; overflow: auto; }
.log.muted { color: var(--muted); font-family: inherit; line-height: 1.6; }
.log .ok { color: var(--green); } .log .bad { color: var(--red); } .log .t { color: var(--muted); }


.sub-panel { display: grid; gap: 8px; min-width: 0;
  
  align-content: start; }
.sub-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sub-bar .spacer { flex: 1 1 auto; }
.sub-bar select { background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px 6px; margin-left: 4px; }
.sub-rows { display: grid; gap: 4px; min-width: 0; align-content: start; }

.sub-panel { container-type: inline-size; }
.sub-row { display: grid; gap: 5px 5px; align-items: center; min-width: 0;
  grid-template-columns: 26px 68px 12px 68px auto auto;
  grid-template-areas: "idx t0 arrow t1 src del" "tx tx tx tx tx tx";
  align-content: start; }
.sub-row .idx { grid-area: idx; } .sub-row .t0 { grid-area: t0; }
.sub-row .arrow { grid-area: arrow; } .sub-row .t1 { grid-area: t1; }
.sub-row .tx { grid-area: tx; } .sub-row .src { grid-area: src; }
.sub-row > button { grid-area: del; }
@container (min-width: 420px) {
  .sub-row { grid-template-columns: 26px 68px 12px 68px minmax(0, 1fr) auto auto;
    grid-template-areas: "idx t0 arrow t1 tx src del"; }
}
.sub-row .idx { color: var(--muted); font-size: 11px; text-align: right; font-family: var(--font-mono); }
.sub-row .arrow { color: var(--muted); font-size: 11px; text-align: center; }
.sub-row input { background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 4px 6px; font-size: 12px; min-width: 0; }
.sub-row .t0, .sub-row .t1 { font-family: var(--font-mono); font-size: 11px; }
.sub-row .src { font-size: 10px; padding: 1px 5px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.sub-row .src.s-manual { color: var(--purple); border-color: var(--purple); }
.sub-row .src.s-tts { color: var(--green); border-color: var(--green); }
.sub-row .src.s-asr { color: var(--primary); border-color: var(--primary); }
.sub-row.edited .tx { border-color: var(--purple); }


.del-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; margin-top: 10px; border-color: var(--red); }
.del-bar .spacer { flex: 1 1 auto; }
.del-reason { flex: 1 1 260px; min-width: 180px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 5px 8px; font-size: 12px; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger:not(:disabled):hover { background: var(--red); color: #fff; }

.cutcheck { margin-top: 12px; padding: 12px; }
.pagehead.sm { margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pagehead.sm h2 { font-size: 14px; margin: 0; }
.cutfilm { margin-top: 10px; }
.cf-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.cf-head .pill.warn { border-color: var(--amber, #d19a30); color: var(--amber, #d19a30); }
.tbl.sm td, .tbl.sm th { font-size: 12px; padding: 4px 8px; }

.tbl.sm tr.bad td { background: rgba(209, 154, 48, 0.08); }
.warnnum { color: var(--amber, #d19a30); font-weight: 700; }


.drill { margin: 10px 0 0 18px; border-left: 2px solid var(--line); padding-left: 12px; }
.drill-head { display: flex; gap: 8px; align-items: baseline; width: 100%; flex-wrap: wrap;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 6px 0; font-size: 13px; text-align: left; }
.drill-head:hover b { color: var(--primary); }
.drill-head .caret { color: var(--muted); width: 12px; }
.drill-head .spacer { flex: 1 1 auto; }
.drill-body { padding: 4px 0 8px; }


.checkup { border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 8px; overflow: hidden; }
.checkup.lv-bad { border-color: var(--red); }
.checkup.lv-warn { border-color: var(--amber, #d19a30); }
.ck-head { display: flex; gap: 8px; align-items: center; padding: 7px 10px;
  cursor: pointer; font-size: 12.5px; }
.ck-head .spacer { flex: 1 1 auto; }
.ck-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--green); }
.checkup.lv-bad .ck-dot { background: var(--red); }
.checkup.lv-warn .ck-dot { background: var(--amber, #d19a30); }
.ck-body { border-top: 1px solid var(--line); padding: 4px 10px 8px; }
.ck-item { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ck-item:last-child { border-bottom: none; }
.ck-what { font-weight: 700; font-size: 12.5px; }
.ck-item.lv-bad .ck-what { color: var(--red); }
.ck-item.lv-warn .ck-what { color: var(--amber, #d19a30); }
.ck-item.lv-info .ck-what { color: var(--muted); }
.ck-why { color: var(--text-soft); font-size: 12px; line-height: 1.65; margin-top: 2px; }

.ck-how { font-size: 12px; line-height: 1.6; margin-top: 3px; color: var(--text); }


.ck-badge { display: inline-block; min-width: 15px; padding: 0 4px; margin-left: 4px;
  border-radius: 999px; font-size: 10px; line-height: 15px; text-align: center;
  font-weight: 700; color: #fff; vertical-align: middle; }
.ck-badge.lv-bad { background: var(--red); }
.ck-badge.lv-warn { background: var(--amber, #d19a30); }
.q-ck { font-size: 11.5px; color: var(--amber, #d19a30); margin: 4px 0 2px; }



.mask { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 90;
  display: grid; place-items: center; }

.modal { background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); width: min(980px, 92vw); max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 18px 60px rgba(0,0,0,.5); }
.modal.sm { width: min(620px, 92vw); }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); }
.modal .mh .t { font-weight: 700; font-size: 14px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.modal .mh .sub, .modal .mb .sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.modal .mh .x { margin-left: auto; cursor: pointer; color: var(--muted); padding: 0 4px; }
.modal .mb { padding: 12px 14px; overflow: auto; min-height: 0; }
.modal .mf { display: flex; gap: 10px; align-items: center; padding: 10px 14px;
  border-top: 1px solid var(--line); }
.modal .mf .spacer { flex: 1 1 auto; }

.modal .mf .err { color: var(--red); font-size: 12px; }

@media (max-width: 860px) { .dwrap { grid-template-columns: minmax(0,1fr); } }

.up-dead { background: rgba(251,113,133,.12); border: 1px solid var(--red);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 10px;
  font-size: 12px; line-height: 1.6; color: var(--text); }
.up-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.up-tabs button { flex: 1; padding: 7px 10px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-soft); cursor: pointer; }
.up-tabs button.on { border-color: var(--primary); background: var(--primary); color: var(--accentText); }
.up-tabs button .n { margin-left: 5px; font-family: var(--font-mono); font-size: 11px; opacity: .8; }

.up-jobs .jt { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.up-jobs .jt button { padding: 4px 10px; font-size: 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: transparent; color: var(--text-soft); cursor: pointer; }
.up-jobs .jt button.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.up-jobs .jt button .n { font-family: var(--font-mono); opacity: .75; margin-left: 3px; }
.up-jobs .jt .spacer { flex: 1 1 auto; }
.up-jobs .jt .auto { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.up-jobs .parsed { max-height: 340px; overflow: auto; }
.up-jobs .prog { margin: 4px 0 2px; }
.up-jobs .empty { padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; }

.modal .fld { display: flex; gap: 10px; align-items: center; padding: 9px 0;
  border-bottom: 1px solid var(--line); grid-template-columns: none; }
.modal .fld .lab { width: 62px; flex: 0 0 auto; font-size: 12.5px; color: var(--text-soft); }
.modal .inp, .modal .ta { flex: 1; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 6px 9px; font-size: 12.5px; min-width: 0; }
.modal .ta { width: 100%; font-family: var(--font-mono); line-height: 1.6; resize: vertical; }
.modal .note { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.parsed { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: auto; max-height: 200px; }
.parsed tr.bad td { background: rgba(251,113,133,.08); }

.up-got { font-size: 12px; margin: 6px 0 2px; padding-left: 72px; line-height: 1.7; }
.up-got .ok { color: var(--green); font-weight: 700; }
.up-got .bad { color: var(--red); font-weight: 700; }
