/* BINGVERSE AI STUDIO — HeyGen-inspired light premium (v3)
   Primary sky #3B82F6 · soft teal secondary · frosted glass · soft glow */
:root {
  --teal: #3B82F6;
  --teal-dark: #2563EB;
  --teal-soft: #EFF6FF;
  --brand-teal: #3A5957;
  --tan: #64748B;
  --tan-soft: #F1F5F9;
  --mist: #E8EEF5;
  --paper: #F7F9FC;
  --ink: #0F172A;
  --muted: #94A3B8;
  --line: #E2E8F0;
  --card: #ffffff;
  --danger: #EF4444;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(59, 130, 246, 0.12);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --serif: -apple-system, "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
  --sans: -apple-system, "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
  --glow-cyan: rgba(56, 189, 248, 0.35);
  --glow-purple: rgba(167, 139, 250, 0.28);
  --glow-blue: rgba(59, 130, 246, 0.32);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 注意：body 不能写死 height:100%——那样侧栏 sticky 的活动范围只有一屏，页面一滚就跟上去。
   html 给 100%，body 用 min-height 跟着内容长高，sticky 才有滚动余量。 */
html { height: 100%; }
body { min-height: 100%; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(900px 520px at 12% -8%, var(--glow-cyan), transparent 55%),
    radial-gradient(820px 480px at 88% 0%, var(--glow-purple), transparent 50%),
    radial-gradient(700px 420px at 55% 110%, var(--glow-blue), transparent 55%),
    linear-gradient(180deg, #FBFCFE 0%, var(--paper) 40%, #F3F6FB 100%);
  color: var(--ink);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(59, 130, 246, 0.18); }

/* ---------- 侧栏 ---------- */
.sidebar {
  width: 248px;
  min-width: 248px;
  margin: 12px 0 12px 12px;
  padding: 18px 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow-sm);
  transition: width .22s ease, min-width .22s ease, padding .22s ease, margin .22s ease, opacity .22s ease;
  position: sticky; top: 12px; height: calc(100vh - 24px); overflow-y: auto;
  align-self: flex-start;
}
.sidebar.collapsed {
  width: 0; min-width: 0; padding: 0; margin: 0; border: none; overflow: hidden; opacity: 0;
  box-shadow: none;
}
.side-top { display: flex; align-items: flex-start; gap: 8px; }
.logo {
  font-family: var(--sans);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; line-height: 1.45;
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--line);
  padding: 12px 14px; display: block; width: 100%;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, #ffffff 0%, #F8FAFF 100%);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.logo:hover {
  border-color: #BFDBFE;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}
.collapse-btn, .expand-btn {
  border: 1px solid var(--line); background: rgba(255,255,255,.85); color: var(--teal);
  width: 28px; height: 28px; border-radius: 999px; cursor: pointer;
  font-size: 15px; line-height: 1; flex: none;
  box-shadow: var(--shadow-sm);
  transition: all .15s ease;
}
.collapse-btn:hover, .expand-btn:hover {
  background: var(--teal); color: #fff; border-color: var(--teal);
}
.collapse-btn { margin-top: 6px; }
.expand-btn { position: fixed; left: 14px; top: 18px; z-index: 30; }

.menu { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; }
.menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  text-align: left; padding: 10px 14px;
  font-size: 13.5px; font-weight: 500; color: #475569; text-decoration: none;
  background: transparent; border: 1px solid transparent;
  border-radius: 999px;
  transition: all .16s ease;
}
.menu a:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.menu a.active {
  background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.32);
}
.menu a.todo { color: #94A3B8; font-weight: 400; }
.menu a.todo:hover { color: #64748B; }
.menu a.todo.active { color: #fff; }
.menu a .menu-badge {
  font-size: 10px; letter-spacing: .02em; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
  background: #F1F5F9; color: #94A3B8; flex: none;
}
.menu a.active .menu-badge {
  background: rgba(255,255,255,.22); color: #fff;
}

/* ---------- 主区 ---------- */
.main {
  flex: 1; min-width: 0; padding: 28px 40px 60px; max-width: 1240px;
  animation: fadein .3s ease;
}
/* 分镜表这类宽页：去掉上限，菜单收起就跟着展宽 */
.main.wide { max-width: none; padding: 28px 26px 60px; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-tag {
  font-size: 12px; color: var(--muted); letter-spacing: .08em; font-weight: 500;
  border-bottom: none; padding-bottom: 0; margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.page-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, #38BDF8, #A78BFA);
}
h2.sec {
  font-family: var(--sans); font-size: 20px; color: var(--ink);
  margin: 36px 0 16px; font-weight: 700; letter-spacing: -.01em;
}
h2.sec:first-of-type { margin-top: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.more-link { font-size: 13px; color: var(--teal); cursor: pointer; text-decoration: none; font-weight: 500; }
.more-link:hover { text-decoration: underline; }

/* 首页 hero */
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 72px 24px; text-align: center; cursor: pointer;
  transition: all .2s ease;
}
.hero::before {
  content: "";
  position: absolute; inset: -20% -10% auto;
  height: 140%;
  background:
    radial-gradient(closest-side at 30% 40%, var(--glow-cyan), transparent 70%),
    radial-gradient(closest-side at 70% 35%, var(--glow-purple), transparent 70%),
    radial-gradient(closest-side at 50% 70%, var(--glow-blue), transparent 75%);
  pointer-events: none; z-index: 0;
  opacity: .9;
}
.hero > * { position: relative; z-index: 1; }
.hero:hover {
  border-color: #BFDBFE;
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.14);
  transform: translateY(-2px);
}
.hero .plus {
  font-size: 42px; color: var(--teal); line-height: 1; font-weight: 300;
  width: 64px; height: 64px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(191, 219, 254, 0.9);
  box-shadow: var(--shadow-sm);
}
.hero .hero-text {
  margin-top: 18px; font-size: 22px; color: var(--ink);
  font-family: var(--sans); font-weight: 700; letter-spacing: -.01em;
}
.hero .hero-sub {
  margin-top: 8px; font-size: 13px; color: var(--muted); letter-spacing: .02em;
}

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.card {
  background: rgba(255,255,255,.9); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); position: relative;
  display: flex; flex-direction: column; cursor: pointer; overflow: hidden;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.card:hover {
  border-color: #BFDBFE; transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.12);
}
.card .thumb {
  height: 118px; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(280px 120px at 30% 20%, rgba(56,189,248,.18), transparent 70%),
    radial-gradient(260px 120px at 80% 80%, rgba(167,139,250,.16), transparent 70%),
    linear-gradient(150deg, #F8FAFC, #EEF4FF);
  color: #94A3B8; font-size: 26px;
  border-bottom: 1px solid var(--mist);
}
.card .card-body { padding: 14px 16px 16px; }
.card .card-type { font-size: 11px; color: var(--teal); letter-spacing: .08em; font-weight: 600; }
.card .card-title { font-size: 14.5px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.card .card-meta { font-size: 12px; color: var(--muted); margin-top: 9px; }
.card .dots {
  position: absolute; top: 10px; right: 10px; color: #94A3B8;
  font-weight: bold; letter-spacing: 1px; padding: 3px 7px; cursor: pointer;
  background: rgba(255,255,255,.88); border: 1px solid var(--line);
  border-radius: 999px; z-index: 2; backdrop-filter: blur(8px);
}
.card .dots:hover { color: var(--teal); border-color: #BFDBFE; }
/* 删除入口（书 / 剧本 / 项目卡片右上角） */
.card .dots.card-del { font-size: 12px; letter-spacing: 0; line-height: 1; color: #a15b50; border-color: rgba(161,91,80,.35); }
.card .dots.card-del:hover { color: #a15b50; border-color: rgba(161,91,80,.55); background: #fff; }
/* 删除类按钮（浅底红字，跟主按钮的实心蓝区分开） */
.btn.btn-del { background: #fff; border-color: rgba(161,91,80,.45); color: #a15b50; box-shadow: none; }
.btn.btn-del:hover { background: #fdf4f2; border-color: #a15b50; box-shadow: none; }
.btn.btn-del:disabled { color: #c9c2bd; border-color: var(--line); background: #fafafa; }
/* 表格里的按钮别竖着断字（手机窄屏） */
.usage-tbl .btn, .usage-tbl .btn-sm { white-space: nowrap; }

.card.add-card {
  align-items: center; justify-content: center; min-height: 176px; color: var(--teal);
  border-style: dashed; background: rgba(255,255,255,.55);
}
.card.add-card .plus { font-size: 40px; font-weight: 300; }
.card.tpl {
  min-height: 156px; align-items: center; justify-content: center;
  font-size: 15px; color: var(--ink); font-family: var(--sans);
  letter-spacing: .02em; font-weight: 600;
}
.card.tpl:hover { color: var(--teal); }
.empty-tip { color: var(--muted); font-size: 13px; padding: 10px 2px; }

/* ---------- 素材获取 ---------- */
.extract-bar { display: flex; gap: 12px; }
.extract-bar input {
  flex: 1; padding: 13px 18px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.9); color: var(--ink); outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.extract-bar input:focus {
  border-color: #93C5FD; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.btn {
  border: 1px solid var(--teal); background: var(--teal); color: #fff;
  padding: 11px 24px; font-size: 14px; cursor: pointer; letter-spacing: .02em;
  border-radius: 999px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
  transition: all .16s ease;
}
.btn:hover {
  background: var(--teal-dark); border-color: var(--teal-dark);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
}
.btn.ghost {
  background: rgba(255,255,255,.65); color: var(--teal);
  border-color: rgba(191, 219, 254, 0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.btn.ghost:hover { background: var(--teal-soft); box-shadow: var(--shadow-sm); }
.btn.small { padding: 6px 14px; font-size: 12px; }
.btn.danger {
  border-color: rgba(239, 68, 68, 0.35); background: rgba(255,255,255,.7);
  color: var(--danger); box-shadow: none;
}
.btn.danger:hover { background: #FEF2F2; box-shadow: none; }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }

table.jobs {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
table.jobs td, table.jobs th { padding: 12px 16px; border-bottom: 1px solid var(--mist); font-size: 13px; text-align: left; }
table.jobs th { color: var(--muted); font-weight: 500; background: #F8FAFC; letter-spacing: .02em; }
table.jobs tr:last-child td { border-bottom: none; }
table.jobs tbody tr { transition: background .12s ease; }
table.jobs tbody tr:hover { background: #F8FAFF; }
.job-title { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-block; font-size: 12px; padding: 3px 11px; border-radius: 20px; letter-spacing: .02em; font-weight: 500; }
.status.queued { background: #F1F5F9; color: #64748B; }
.status.extracting, .status.transcribing { background: var(--teal-soft); color: var(--teal-dark); }
.status.done { background: #ECFDF5; color: #059669; }
.status.failed { background: #FEF2F2; color: var(--danger); }
.link-btn { background: none; border: none; color: var(--teal); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.link-btn.del { color: var(--danger); }
.link-btn.del:hover { background: #FEF2F2; text-decoration: none; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat-card {
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 14px; text-align: center; cursor: pointer; font-size: 14px; min-height: 86px;
  display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover { border-color: #BFDBFE; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(59,130,246,.1); }
.cat-card .count { font-size: 12px; color: var(--muted); }
.cat-card.new-cat { color: var(--teal); font-size: 28px; border-style: dashed; box-shadow: none; background: rgba(255,255,255,.55); }
.cat-card.new-cat div { font-size: 13px; }
.cat-card.active { border-color: #93C5FD; background: var(--teal-soft); }
.cat-card { position: relative; }
.cat-card .cat-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-dots {
  position: absolute; top: 6px; right: 8px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 15px; font-weight: bold; line-height: 1;
  color: var(--muted); opacity: 0; transition: opacity .15s ease, background .15s ease;
}
.cat-card:hover .cat-dots, .cat-dots.open { opacity: 1; }
.cat-dots:hover { background: rgba(59, 130, 246, 0.1); color: var(--teal); }
.cat-menu {
  position: absolute; top: 28px; right: 6px; z-index: 20;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; min-width: 108px; padding: 4px;
  backdrop-filter: blur(12px);
  animation: fadein .12s ease;
}
.cat-menu button {
  border: none; background: none; text-align: left; cursor: pointer;
  padding: 7px 10px; font-size: 13px; border-radius: 8px; color: var(--ink);
}
.cat-menu button:hover { background: var(--tan-soft); }
.cat-menu button.danger { color: var(--danger); }
.cat-menu button.danger:hover { background: #FEF2F2; }
.cat-rename {
  width: 92%; max-width: 130px; text-align: center; font-size: 14px;
  border: 1px solid var(--teal); border-radius: 8px; padding: 3px 6px;
  outline: none; background: #fff; color: inherit;
}

.sec-head .btn.small { padding: 4px 12px; font-size: 12px; }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 30px;
  animation: fadein .2s ease;
}
.modal {
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: min(760px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal.wide { width: min(1120px, 96vw); }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  font-family: var(--sans); font-size: 17px; color: var(--ink); font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 16px;
}
.modal-close {
  background: rgba(255,255,255,.8); border: 1px solid var(--line); font-size: 16px;
  cursor: pointer; color: var(--muted); border-radius: 999px; width: 32px; height: 32px;
}
.modal-close:hover { background: #F1F5F9; color: var(--ink); }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #64748B; margin-bottom: 6px; font-weight: 500; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 14px; font-family: var(--sans); color: var(--ink); background: #fff; outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: #93C5FD; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.form-row textarea { min-height: 180px; resize: vertical; line-height: 1.7; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.transcript { white-space: pre-wrap; line-height: 2; font-size: 14px; font-family: var(--sans); }
.transcript-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.9; }
.transcript-meta a { color: var(--teal); }

/* 左文右视频 双栏 */
.job-detail { display: flex; gap: 22px; align-items: stretch; }
.job-left { flex: 1 1 52%; min-width: 0; overflow-y: auto; max-height: 62vh; padding-right: 8px; }
.job-right {
  flex: 0 0 42%; min-width: 0;
  position: sticky; top: 0; align-self: flex-start;
  display: flex; flex-direction: column; gap: 12px;
}
.job-right video {
  width: 100%; max-height: 46vh; border-radius: var(--r-md);
  background: #0F172A; box-shadow: var(--shadow-sm); display: block;
}
.job-right .right-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.right-note { font-size: 11px; color: var(--muted); line-height: 1.7; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92); color: #fff; font-size: 13px; padding: 11px 24px;
  border-radius: 999px; z-index: 99; opacity: 0; transition: opacity .25s ease;
  pointer-events: none; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px);
}
.toast.show { opacity: .96; }

@media (max-width: 900px) {
  .job-detail { flex-direction: column-reverse; }
  .job-right { position: static; flex-basis: auto; width: 100%; }
  .job-left { max-height: 50vh; }
}
@media (max-width: 760px) {
  .main { padding: 18px 16px 60px; }
  .sidebar {
    position: fixed; z-index: 40; left: 12px; top: 12px;
    background: rgba(255,255,255,.97); height: calc(100vh - 24px);
    box-shadow: 0 18px 48px rgba(15,23,42,.22);
  }
}
/* 手机抽屉模式的蒙层 + 更好点的汉堡钮 */
.side-mask { position: fixed; inset: 0; background: rgba(15,23,42,.38); z-index: 35; }
@media (max-width: 760px) {
  .expand-btn {
    left: 10px; top: 10px; width: 38px; height: 38px;
    font-size: 20px; background: #fff;
    box-shadow: 0 6px 18px rgba(15,23,42,.18);
  }
  .sidebar { width: 232px; min-width: 232px; }
}
/* 横屏矮屏：侧栏照常内联，但默认收起（JS 控制），收放钮加大一点好按 */
@media (orientation: landscape) and (max-height: 500px) {
  .sidebar { width: 210px; min-width: 210px; height: calc(100vh - 16px); margin: 8px 0 8px 8px; padding: 10px 10px; }
  .collapse-btn, .expand-btn { width: 32px; height: 32px; font-size: 16px; }
  .logo { font-size: 11px; padding: 7px 9px; }
  .menu { margin-top: 8px; gap: 2px; }
  .menu a { padding: 6px 11px; font-size: 12.5px; }
  .main { padding: 12px 16px 32px; }
}


/* ---------- 小说板块（工单004） ---------- */
.lit-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 8px; }
.lit-health { display: flex; gap: 18px; background: var(--sage-soft, #EDF2EF); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-size: 13px; margin-bottom: 14px; flex-wrap: wrap; }
.lit-step { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.lit-step.done { border-left: 4px solid var(--teal); }
.lit-step-head { padding: 10px 16px; font-weight: 600; background: var(--sage-soft, #EDF2EF); font-size: 14px; }
.lit-step-body { padding: 14px 16px; }
.quiz-q { margin-bottom: 14px; }
.quiz-opt { display: block; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; cursor: pointer; font-size: 13px; }
.quiz-opt:hover { border-color: var(--teal); }
.quiz-inline { display: inline-block; margin-right: 10px; }
.quiz-ex { color: var(--muted); font-size: 12px; margin-top: 3px; }
.tag-regular { background: var(--tan-soft); color: var(--tan); border-radius: 6px; padding: 1px 7px; font-size: 11px; margin-left: 6px; }
.escape-door details, details.escape-door { margin-top: 6px; font-size: 13px; }
.escape-door summary { cursor: pointer; color: var(--muted); }
.dir-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; font-size: 13px; }
.dir-card.picked { border-color: var(--teal); background: var(--sage-soft, #EDF2EF); }
.usage-box summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.usage-tbl { border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.usage-tbl th, .usage-tbl td { border: 1px solid var(--line); padding: 3px 8px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary { background: var(--teal); color: #fff; }
.desk3 { display: grid; grid-template-columns: 250px 1fr 300px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .desk3 { grid-template-columns: 1fr; } }
.desk-col { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 13px; }
.desk-col-title { font-weight: 600; margin-bottom: 8px; }
.desk-col-sub { font-weight: 600; font-size: 12px; color: var(--muted); margin: 12px 0 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.desk-ch { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.desk-ch:hover { background: var(--sage-soft, #EDF2EF); }
.desk-ch.active { background: var(--sage-soft, #EDF2EF); border: 1px solid var(--teal); }
.health-item { border-left: 3px solid var(--line); padding: 4px 8px; margin: 6px 0; font-size: 12px; }
.health-item.sev-重 { border-color: #c0392b; }
.health-item.sev-中 { border-color: var(--tan); }
.health-item.sev-轻 { border-color: var(--muted); }
.draft-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; line-height: 1.9; font-size: 14px; max-height: 480px; overflow: auto; background: #FDFDFB; }
.ctx-total { font-size: 12px; margin-bottom: 8px; }
.ctx-block { border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; overflow: hidden; }
.ctx-block.over { border-color: #c0392b; }
.ctx-block summary { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: 12px; list-style: none; }
.ctx-name { width: 84px; flex: none; }
.ctx-bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.ctx-bar i { display: block; height: 100%; background: var(--teal); }
.ctx-block.over .ctx-bar i { background: #c0392b; }
.ctx-chars { width: 64px; text-align: right; color: var(--muted); flex: none; }
.ctx-text { font-size: 11px; line-height: 1.6; white-space: pre-wrap; padding: 8px 10px; margin: 0; max-height: 220px; overflow: auto; background: #FAFAF7; }
.busy-mask { position: fixed; inset: 0; background: rgba(40,48,46,.35); display: flex; align-items: center; justify-content: center; z-index: 200; }
.busy-mask[hidden] { display: none; } /* 修复：display:flex 会压过浏览器默认的 [hidden]，导致遮罩常驻转圈 */
/* 面板级生成态：哪块在生成就只灰哪块，其余页面照常可点 */
.gen-busy { position: relative; opacity: .55; filter: grayscale(.7); pointer-events: none; border-radius: 10px; }
.gen-tip { position: absolute; top: 2px; right: 4px; font-size: 12px; color: var(--teal); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
/* 屏1 · 立项输入口（工单007） */
.intake-wrap { max-width: 760px; margin: 0 auto; padding: 26px 10px 60px; position: relative; }
.intake-h1 { font-size: 26px; margin: 14px 0 6px; font-weight: 600; }
.intake-sub { color: var(--ink2, #667); margin-bottom: 14px; }
.intake-raw { width: 100%; min-height: 180px; font-size: 15px; line-height: 1.8; padding: 14px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; font-family: inherit; }
.intake-status { color: var(--teal); font-size: 13px; margin: 4px 0 8px; }
.intake-foot { color: #8a938f; font-size: 12.5px; line-height: 1.9; margin-top: 22px; }
.intake-bucket { margin-bottom: 14px; }
.intake-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 6px 0; background: #fff; }
.intake-line { display: flex; align-items: center; gap: 8px; }
.intake-text { line-height: 1.7; }
.intake-edit { flex: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; }
.tag-pill { border: 1px solid var(--line); border-radius: 999px; background: #FAFAF7; font-size: 12px; padding: 2px 10px; margin-top: 6px; cursor: pointer; }
.tag-pill.tag-hard { border-color: #c0392b; color: #c0392b; }
.tag-pill.tag-soft { border-color: var(--teal); color: var(--teal); }
.tag-pill.tag-material { border-color: #8a938f; color: #8a938f; }
.tag-pill.tag-unsure { border-color: #d48806; color: #d48806; }
.busy-box { background: #fff; border-radius: 14px; padding: 26px 34px; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.busy-spin { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: bspin 0.9s linear infinite; }
@keyframes bspin { to { transform: rotate(360deg); } }
.arch-tbl td { font-size: 12.5px; }
.arch-tbl .arch-fail td { background: #FBEDEB; }
.arch-pre { white-space: pre-wrap; word-break: break-word; background: #FAFAF7; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; max-height: 300px; overflow: auto; font-size: 12.5px; line-height: 1.7; font-family: inherit; margin: 0; }

/* ===== 工单008 · 七屏壳与目录页 ===== */
.start-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.step-badge { font-size: 12px; font-weight: 700; color: var(--teal); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.start-bottom { display: flex; gap: 10px; margin-top: 14px; }
.intake-quote { font-size: 14px; line-height: 1.7; }
.intake-original { font-size: 12px; color: #8a6d3b; margin-top: 4px; }
.intake-line2 { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.intake-bucket-tag { color: #666; }
.tag-select { font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: #fff; }
.q-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; background: #fff; }
.escape-box { margin: 8px 0; font-size: 13px; }
.escape-box summary { cursor: pointer; color: var(--teal); }
.cat-main { margin: 12px 0; }
.cat-go { font-size: 16px; padding: 12px 28px; }
.cat-done { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin: 4px 0; font-size: 13px; background: #fff; }
.cat-done summary { cursor: pointer; }
.cat-todo { color: #999; font-size: 13px; padding: 3px 0; }
.dir-line { line-height: 1.8; font-size: 13px; }
#selBar button { margin: 1px; }
#draftText p { cursor: text; }

/* ===== 工单012 · 阅读视图（只读看全书） ===== */
/* 左栏独立滚动、钉住不动；右栏正文自己滚。高度由 app.js 按视口算。 */
.read-wrap { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 18px; margin-top: 12px; align-items: stretch; }
.read-toc { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; height: 100%; min-height: 0; display: flex; flex-direction: column; }
.read-toc input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; font-size: 13px; font-family: inherit; flex: none; }
.read-toc-list { flex: 1 1 auto; min-height: 0; overflow: auto; }
.read-toc-item { display: flex; gap: 6px; align-items: baseline; padding: 5px 7px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.read-toc-item:hover { background: var(--sage-soft, #EDF2EF); }
.read-toc-item.active { background: var(--sage-soft, #EDF2EF); font-weight: 700; box-shadow: inset 0 0 0 1px var(--teal); }
.read-toc-no { color: var(--muted); flex: 0 0 48px; font-variant-numeric: tabular-nums; }
.read-toc-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-toc-words { color: #b3b8b6; font-size: 11px; flex: none; }
.read-main { border: 1px solid var(--line); border-radius: 10px; padding: 26px 34px 40px; background: #FDFDFB; height: 100%; min-height: 0; overflow: auto; }
.read-chapter-head { text-align: center; margin-bottom: 22px; }
.read-ch-no { color: #9aa39f; font-size: 12.5px; letter-spacing: 3px; }
.read-ch-title { margin: 6px 0 4px; font-size: 21px; font-weight: 600; }
.read-ch-meta { color: #b3b8b6; font-size: 12px; }
.read-body { font-family: Georgia, "Songti SC", "SimSun", serif; font-size: 16.5px; line-height: 2.05; color: #23282a; max-width: 760px; margin: 0 auto; }
.read-body p { margin: 0 0 1em; text-indent: 2em; }
.read-foot { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
@media (max-width: 980px) {
  /* 窄屏回落到整页滚动：两栏上下排，都放开高度 */
  .read-wrap { grid-template-columns: 1fr; height: auto !important; }
  .read-toc { height: auto; max-height: 46vh; }
  .read-toc-list { max-height: none; }
  .read-main { height: auto; }
}

/* ---------- 剧本创作（工单022） ---------- */
.sc-count { font-size: 12px; color: var(--muted); margin-left: 10px; font-family: var(--sans); font-weight: normal; }
.sc-status { font-size: 11px; padding: 2px 9px; border-radius: 20px; background: #eef1ee; color: #6d7973; margin-left: 10px; vertical-align: middle; font-family: var(--sans); font-weight: normal; }
.sc-status.on { background: var(--teal-soft); color: var(--teal); }
.sc-bad { color: var(--danger); font-size: 12px; }
.sc-warn { border: 1px solid rgba(160,120,93,.5); background: var(--tan-soft); color: #7a5a44; border-radius: 10px; padding: 9px 14px; font-size: 13px; margin: 10px 0; }
.sc-progress { border: 1px solid var(--teal); background: var(--teal-soft); color: var(--teal); border-radius: 10px; padding: 9px 14px; font-size: 13px; margin: 8px 0; }
.sc-card:hover { border-color: rgba(160,120,93,.6); }
.sc-desk3 { grid-template-columns: 258px minmax(0,1fr) 330px; }
.sc-toc { max-height: 620px; overflow: auto; }
.sc-toc-item { display: flex; gap: 6px; align-items: baseline; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.sc-toc-item:hover { background: var(--teal-soft); }
.sc-toc-item.active { background: var(--teal-soft); box-shadow: inset 0 0 0 1px var(--teal); }
.sc-toc-no { color: var(--tan); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.sc-toc-dig { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-toc-src { font-size: 10px; color: #b6bcb8; flex: none; }
.sc-hist { font-size: 12px; color: var(--muted); padding: 3px 0; }
.sc-hist span { color: #b6bcb8; margin-right: 6px; }
.sc-pre { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, "Songti SC", monospace; font-size: 13px; line-height: 1.85; max-height: 62vh; overflow: auto; margin: 0; }
.sc-src { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; margin: 6px 0 4px; }
.sc-src-tabs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.sc-src-sum { font-size: 12px; color: var(--tan); margin-left: auto; }
.sc-pane { border-top: 1px dashed var(--line); padding-top: 10px; }
.sc-chlist { max-height: 250px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #FDFDFB; }
.sc-ch { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.sc-ch:hover { background: var(--teal-soft); }
.sc-ch-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-ch-w { color: var(--muted); font-size: 12px; flex: none; }
.sc-ch-w.zero { color: #c0a17f; }
.sc-filelist { margin-top: 8px; }
.sc-file { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line); }

/* 分镜表：10 列，一行一镜 */
/* 2026-11-21 老板口径：表格容器不再限高——内容多长就多长，竖向交给整页滚动，只保留横向滚动 */
.sb-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sb-table { border-collapse: collapse; width: auto; min-width: 100%; font-size: 12px; }
.sb-table th {
  position: sticky; top: 0; z-index: 2;
  background: #fbfcfa; border-bottom: 1px solid var(--line); border-right: 1px solid var(--mist);
  padding: 7px 6px; text-align: left; color: var(--muted); font-weight: normal; white-space: nowrap;
}
.sb-table td { border-bottom: 1px solid var(--mist); border-right: 1px solid var(--mist); padding: 2px; vertical-align: top; }
.sb-table tr:hover td { background: #fcfdfb; }
.sb-in {
  width: 100%; border: none; background: transparent; font: inherit; font-size: 12px;
  padding: 5px 6px; color: var(--ink); outline: none; border-radius: 4px; box-sizing: border-box;
}
.sb-in:focus { background: #fff; box-shadow: inset 0 0 0 2px rgba(58, 89, 87, .22); }
.sb-ta { resize: none; overflow: hidden; min-height: 42px; line-height: 1.55; font-family: inherit; }
.sb-no-wrap { position: relative; display: flex; align-items: center; gap: 2px; }
.sb-no { font-variant-numeric: tabular-nums; width: 66px; flex: none; }
/* 行操作钮常驻占位、悬停才显形：用 visibility 而不是 display，避免鼠标进出时行内容左右挪动 */
.sb-ops { display: flex; gap: 2px; visibility: hidden; }
.sb-table tr:hover .sb-ops { visibility: visible; }
.sb-op { border: 1px solid var(--line); background: #fff; border-radius: 5px; font-size: 10px; line-height: 1; padding: 3px 4px; cursor: pointer; color: var(--teal); }
.sb-op:hover { background: var(--teal-soft); }
.sb-op.danger { color: var(--danger); }
/* 2026-11-21 新框架 15 列 + 预演列：定宽 + 横向滚动（右列不再被挤丢） */
.sb-h { position: sticky; top: 0; }
/* 列宽拖拽手柄（th 右缘） */
.sb-rs { position: absolute; right: -3px; top: 0; width: 9px; height: 100%; cursor: col-resize; user-select: none; z-index: 3; }
.sb-rs:hover, .sb-rs.on { background: rgba(58, 89, 87, .22); border-radius: 3px; }
.sb-table th:nth-child(1), .sb-table td:nth-child(1) { width: 46px; min-width: 46px; }
.sb-table th:nth-child(2), .sb-table td:nth-child(2) { width: 118px; min-width: 118px; }
.sb-table th:nth-child(3), .sb-table td:nth-child(3) { width: 54px; min-width: 54px; }
.sb-table th:nth-child(4), .sb-table td:nth-child(4) { width: 62px; min-width: 62px; }
.sb-table th:nth-child(5), .sb-table td:nth-child(5) { width: 190px; min-width: 190px; }
.sb-table th:nth-child(6), .sb-table td:nth-child(6) { width: 56px; min-width: 56px; }
.sb-table th:nth-child(7), .sb-table td:nth-child(7) { width: 280px; min-width: 280px; }
.sb-table th:nth-child(8), .sb-table td:nth-child(8) { width: 150px; min-width: 150px; }
.sb-table th:nth-child(9), .sb-table td:nth-child(9) { width: 130px; min-width: 130px; }
.sb-table th:nth-child(10), .sb-table td:nth-child(10) { width: 150px; min-width: 150px; }
.sb-table th:nth-child(11), .sb-table td:nth-child(11) { width: 140px; min-width: 140px; }
.sb-table th:nth-child(12), .sb-table td:nth-child(12) { width: 90px; min-width: 90px; }
.sb-table th:nth-child(13), .sb-table td:nth-child(13) { width: 120px; min-width: 120px; }
.sb-table th:nth-child(14), .sb-table td:nth-child(14) { width: 120px; min-width: 120px; }
.sb-table th:nth-child(15), .sb-table td:nth-child(15) { width: 96px; min-width: 96px; }
.sb-table th:nth-child(16), .sb-table td:nth-child(16) { width: 90px; min-width: 90px; }
.sb-wrap::-webkit-scrollbar { height: 10px; width: 10px; }
.sb-wrap::-webkit-scrollbar-thumb { background: #c8d2ce; border-radius: 6px; }
.sb-wrap::-webkit-scrollbar-track { background: #f1f5f3; }
.sb-readonly td { padding: 5px 7px; font-size: 12px; vertical-align: top; }
@media (max-width: 1100px) {
  .sc-desk3 { grid-template-columns: 1fr; }
  .sc-toc { max-height: 240px; }
}

/* ---------- 工单023 · 图片创作 / 视频创作（两个框体，样式共用，模板各一份） ---------- */
.mk-title { margin: 6px 0 18px; }
.mk-kicker { font-size: 12px; letter-spacing: .18em; color: var(--tan); }
.mk-title h1 { font-family: var(--serif); font-size: 25px; font-weight: 600; margin: 8px 0 8px; letter-spacing: .02em; }
.mk-title p { font-size: 13px; color: var(--muted); line-height: 1.85; max-width: 760px; }
.mk-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.mk-bar .mk-f { margin: 0; }
.mk-hint { font-size: 12px; color: #b0b8b4; margin-left: auto; font-family: ui-monospace, Menlo, monospace; }
.mk-f { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #6d7973; }
.mk-f > span { flex: none; }
.mk-f select {
  padding: 7px 10px; font-size: 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); outline: none; font-family: var(--sans); max-width: 220px;
}
.mk-f select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.mk-box {
  border: 1px solid rgba(59, 130, 246, 0.28);
  outline: 1px solid rgba(59, 130, 246, 0.12); outline-offset: 4px;
  background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  padding: 16px 18px 14px; margin-bottom: 26px;
}
.mk-mats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.mk-mat-list { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-mat { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #eef2ef; display: flex; align-items: center; justify-content: center; }
.mk-mat img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-mat-ico { font-size: 20px; color: var(--teal); }
.mk-mat-x {
  position: absolute; top: 0; right: 0; width: 16px; height: 16px; line-height: 1;
  border: none; border-radius: 0 0 0 6px; background: rgba(51, 56, 55, .62); color: #fff;
  font-size: 10px; cursor: pointer; padding: 0;
}
.mk-add {
  width: 56px; height: 56px; border: 1px dashed var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #a9b6b0; font-size: 20px; background: #fbfcfa; transition: all .15s ease;
}
.mk-add:hover { border-color: var(--teal); color: var(--teal); }
.mk-add input { display: none; }
.mk-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-prompt {
  width: 100%; border: none; outline: none; resize: vertical;
  font-family: var(--sans); font-size: 14.5px; line-height: 1.95; color: var(--ink);
  background: transparent; padding: 14px 2px; min-height: 96px;
}
.mk-prompt::placeholder { color: #b6bfba; }
.mk-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--mist); }
.mk-gen {
  margin-left: auto; border: 1px solid var(--teal); background: var(--teal); color: #fff;
  padding: 10px 22px; font-size: 14px; border-radius: 999px; cursor: pointer; letter-spacing: .05em;
  transition: all .16s ease;
}
.mk-gen:hover { background: var(--teal-dark); box-shadow: 0 4px 14px rgba(59, 130, 246, .3); }
.mk-gen:disabled { opacity: .5; cursor: default; box-shadow: none; }
.mk-tip { font-size: 12px; color: #9aa5a1; line-height: 1.8; margin-top: 10px; }
.mk-sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.mk-sec-head h2.sec { margin: 0 0 14px; }
.mk-stat { font-size: 12px; color: var(--muted); }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.mk-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm);
}
.mk-thumb { position: relative; background: linear-gradient(150deg, #edf2ef, #dfe8e4); cursor: pointer; }
.mk-thumb img { width: 100%; display: block; height: auto; max-height: 320px; object-fit: contain; background: #fff; }
.mk-thumb .mk-ph { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: #a9b6b0; font-size: 13px; }
.mk-badge {
  position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: #6d7973; border: 1px solid var(--line);
}
.mk-badge.done { color: #4a6d4e; background: #e9f0e9; border-color: #d3e2d4; }
.mk-badge.failed { color: var(--danger); background: #f5e9e7; border-color: #ecd6d2; }
.mk-badge.running, .mk-badge.pending { color: var(--teal); background: var(--teal-soft); border-color: #cfe0de; }
.mk-cbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.mk-cline { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-cprompt { font-size: 12.5px; color: #4a5350; line-height: 1.65; word-break: break-all; }
.mk-err { font-size: 12px; color: var(--danger); line-height: 1.6; }
.mk-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.mk-ops button {
  border: 1px solid var(--line); background: #fff; color: var(--teal); font-size: 12px;
  padding: 4px 9px; border-radius: 6px; cursor: pointer;
}
.mk-ops button:hover { background: var(--teal-soft); border-color: var(--teal); }
.mk-ops button:disabled { opacity: .45; cursor: default; }
.mk-ops button.mk-del { color: var(--danger); }
.mk-ops button.mk-del:hover { background: #f7ece9; border-color: rgba(161, 91, 80, .5); }
.mk-big img, .mk-big video { display: block; max-width: 100%; margin: 0 auto; border-radius: var(--r-md); background: #10201f; }
/* 标签槽：只读，没有加/删/筛入口 */
.tag-slot { display: flex; align-items: center; gap: 5px; min-height: 16px; }
.tag-slot .tag-none { font-size: 11px; color: #c2c9c5; }
.tag-slot .tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tan); opacity: .65; display: inline-block; }


/* ================= 工单024 · 声音创作 ================= */
.vo-tabs { display: flex; gap: 6px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.vo-tab {
  border: none; background: none; padding: 9px 18px; font-size: 14px; color: #7c8781;
  cursor: pointer; border-bottom: 2px solid transparent; font-family: var(--sans);
}
.vo-tab:hover { color: var(--teal); }
.vo-tab.on { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }

.vo-lib { display: grid; grid-template-columns: 268px 1fr; gap: 18px; align-items: start; }
.vo-side { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.vo-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--mist); font-size: 13px; color: #5c6b66; }
.vo-cards { padding: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow: auto; }
.vo-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; cursor: pointer; background: #fcfdfc; transition: all .14s ease; }
.vo-card:hover { border-color: var(--teal); background: #f7faf9; }
.vo-card.on { border-color: var(--teal); background: var(--teal-soft); }
.vo-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vo-card-top .mk-badge { position: static; }
.vo-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.vo-card-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.vo-main { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-sm); padding: 16px 18px; }
.vo-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--mist); }
.vo-detail-name { font-size: 17px; font-weight: 600; font-family: var(--serif); }
.vo-detail-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.vo-detail-ops { display: flex; gap: 8px; flex-wrap: wrap; }
.vo-blocked { color: var(--danger); }
.vo-block-title { font-size: 12px; color: #6d7973; letter-spacing: .04em; margin: 16px 0 8px; }

.vo-samples { display: flex; flex-direction: column; gap: 10px; }
.vo-sample { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: #fcfdfc; }
.vo-sample.ref { border-color: var(--teal); background: #f6faf9; }
.vo-sample-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vo-refpick { font-size: 12px; color: #6d7973; display: inline-flex; align-items: center; gap: 4px; }
.vo-sample-name { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--ink); }
.vo-sample-dur { font-size: 12px; color: var(--muted); }
.vo-sample audio { height: 30px; flex: 1; min-width: 200px; max-width: 320px; }
.vo-qc { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 11.5px; color: #6d7973; }
.vo-qc.running { color: var(--tan); }
.vo-qc-item b { font-weight: 600; color: var(--ink); }
.vo-qc-item.ok { color: #4a6d4e; }
.vo-qc-item.warn { color: #a1743d; }
.vo-qc-item.reject { color: var(--danger); }
.vo-qc-item.auto { color: #7c8781; }
.vo-qc-warn { flex-basis: 100%; color: #a1743d; }
.vo-qc-text { flex-basis: 100%; color: #7c8781; font-size: 11.5px; }
.vo-orig { font-size: 11px; color: var(--muted); margin-top: 6px; }
.vo-orig a { color: var(--teal); }
.vo-upload { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--teal); cursor: pointer; }
.vo-upload input { font-size: 12px; }

.vo-audition { margin-top: 16px; border: 1px dashed var(--teal); border-radius: var(--r-sm); padding: 12px; background: #f7fbfa; }
.vo-audition-head { font-size: 12px; color: #5c6b66; }
.vo-audition-text { font-size: 13px; color: var(--ink); margin: 6px 0 8px; font-family: var(--serif); }
.vo-audition audio { width: 100%; max-width: 420px; height: 32px; }
.vo-audition-ops { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.vo-verdict { font-size: 12px; color: var(--muted); }

.vo-prompt { width: 100%; min-height: 68px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; font-size: 13px; font-family: var(--sans); color: var(--ink); resize: vertical; outline: none; }
.vo-prompt:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.vo-prompt-ops { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.vo-consent { font-size: 12.5px; color: #5c6b66; line-height: 1.9; }
.vo-reject { font-size: 13px; color: var(--danger); margin-bottom: 10px; }

.vo-engineline { font-size: 12px; color: #9aa5a1; letter-spacing: .03em; margin-bottom: 10px; font-family: ui-monospace, Menlo, monospace; }

.vo-results { display: flex; flex-direction: column; gap: 10px; }
.vo-takehead { font-size: 12px; color: #6d7973; margin: 6px 0; }
.vo-result { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: #fff; }
.vo-result.fresh { border-color: var(--teal); background: #f6faf9; }
.vo-result-main { flex: 1; min-width: 0; }
.vo-result-title { font-size: 12.5px; font-family: ui-monospace, Menlo, monospace; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-result-meta { font-size: 11.5px; color: var(--muted); margin: 3px 0 6px; }
.vo-result audio { width: 100%; max-width: 460px; height: 30px; }
.vo-result-ops { display: flex; gap: 6px; flex-wrap: wrap; }

.vo-batchbox { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 16px; background: #fff; }
.vo-batchhead { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.vo-bitlist { max-height: 320px; overflow: auto; border-top: 1px solid var(--mist); margin-top: 8px; }
.vo-bit { display: grid; grid-template-columns: 74px 92px 1fr 76px; gap: 8px; font-size: 12px; padding: 5px 2px; border-bottom: 1px dashed var(--mist); color: #5c6b66; }
.vo-bit.done { color: #4a6d4e; }
.vo-bit.failed { color: var(--danger); }
.vo-bit-no { font-family: ui-monospace, Menlo, monospace; }
.vo-bit-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-bit-st { text-align: right; }
.vo-batchops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.vo-plan-sum { font-size: 13px; color: #5c6b66; margin-bottom: 10px; }
.vo-maptbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.vo-maptbl th, .vo-maptbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--mist); }
.vo-maptbl th { font-size: 12px; color: #6d7973; font-weight: 500; }
.vo-maptbl tr.bad td { background: #fbf1ef; }
.vo-maptbl select { padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; max-width: 260px; }

/* NAS 常驻黄条 */
.storage-bar {
  position: fixed; left: 50%; transform: translateX(-50%); top: 10px; z-index: 9000;
  display: flex; align-items: center; gap: 12px; max-width: min(920px, 94vw);
  background: #fdf6e3; border: 1px solid #e4cf9a; color: #8a6b28;
  padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 12.5px;
}
.storage-bar .sb-main { font-weight: 600; }
.storage-bar .sb-err { color: #a1743d; font-size: 11px; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-bar .btn { padding: 4px 12px; font-size: 12px; }

/* ================= 工单025 · AI 导演台 ================= */
.dr-head-ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dr-head-ops select { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 13px; color: var(--ink); max-width: 340px; }

.dr-gate {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; margin: 8px 0; border-radius: var(--r-sm);
  background: var(--teal-soft); border: 1px solid rgba(59, 130, 246, 0.18);
  font-size: 12px; color: var(--teal-dark);
}
.dr-gate.blocked { background: #fdf4ef; border-color: rgba(160, 120, 93, 0.4); color: #7c4a33; }
.dr-gate-title { font-weight: 600; letter-spacing: .08em; }
.dr-chip { padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid rgba(59,130,246,.16); }
.dr-chip.on { color: var(--teal); font-weight: 600; }
.dr-chip.off { color: var(--danger); }
.dr-gate-why { flex-basis: 100%; color: #8a5a3f; }

.dr-seg { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.dr-seg-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.dr-seg-row select { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 13px; }
.dr-seg-row .btn { padding: 7px 14px; font-size: 13px; }
.dr-seg-info { color: var(--muted); }
.dr-seg-quote { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.dr-seg-quote b { color: var(--teal); }

.dr-editor { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.dr-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dr-tabs { display: flex; gap: 6px; }
.dr-tab { border: 1px solid var(--line); background: #fff; color: var(--teal); padding: 6px 14px; font-size: 12px; border-radius: 999px; cursor: pointer; letter-spacing: .04em; }
.dr-tab.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.dr-editor-meta { font-size: 12px; color: var(--muted); }
.dr-editor-meta b { color: var(--ink); }
.dr-stale { margin-left: 8px; color: #a15b50; font-weight: 600; }

.dr-stage { display: flex; gap: 0; }
.dr-topwrap { position: relative; flex: 1; min-width: 0; background: #f7f9fb; border-right: 1px solid var(--line); }
.dr-top { width: 100%; height: auto; display: block; user-select: none; }
.dr-tophint { position: absolute; left: 10px; bottom: 8px; font-size: 11px; color: #8b95a3; background: rgba(255,255,255,.78); padding: 2px 8px; border-radius: 999px; }
svg .dr-grid { stroke: #e3e9ef; stroke-width: 1; }
.dr-side { width: 268px; min-width: 268px; padding: 10px 12px; font-size: 12px; overflow-y: auto; max-height: 560px; }
.dr-side-title { font-size: 11px; letter-spacing: .12em; color: var(--muted); margin: 10px 0 5px; }
.dr-side-row { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.dr-side-row:hover { background: #f2f6f5; }
.dr-side-row.on { background: var(--teal-soft); }
.dr-side-num { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.dr-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.dr-swatch.cam { border-radius: 2px; background: #c0392b; }
.dr-frame-box { display: flex; gap: 4px; align-items: center; }
.dr-frame-in { width: 70px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.dr-side-note { font-size: 11px; color: var(--muted); margin: 6px 0; line-height: 1.5; }
.dr-check { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 4px 0; }
.dr-side-btns { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.dr-gen { width: 100%; padding: 10px; font-size: 14px; margin: 4px 0; }
.dr-preview img { width: 100%; border-radius: 6px; border: 1px solid var(--line); margin-top: 6px; }

.dr-job-inner { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 6px 0; background: #fbfcfd; font-size: 12px; }
.dr-job-inner.st-failed { border-color: rgba(161,91,80,.5); background: #fdf6f4; }
.dr-job-line { display: flex; justify-content: space-between; gap: 8px; }
.dr-bar { height: 5px; background: #e8edf2; border-radius: 99px; margin: 6px 0 4px; overflow: hidden; }
.dr-bar i { display: block; height: 100%; background: var(--teal); transition: width .3s ease; }
.dr-job-sub { color: var(--muted); font-size: 11px; }
.dr-job-err { color: var(--danger); margin-top: 4px; word-break: break-all; }

.dr-tlwrap { background: #fff; border-top: 1px solid var(--line); }
.dr-tlscroll { overflow-x: auto; overflow-y: hidden; }
.dr-tl { display: block; }
svg .dr-tick { stroke: #eef2f6; }
svg .dr-tick-major { stroke: #dbe3ea; }
svg .dr-cut { stroke: #f0c9be; stroke-dasharray: 3 3; }
svg .dr-key { cursor: ew-resize; }
svg .dr-key:hover rect:first-of-type { fill: #1f5fc0; }

.dr-results { margin-top: 14px; }
.dr-results-head { display: flex; justify-content: space-between; align-items: center; }
.dr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 8px 0; }
.dr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; box-shadow: var(--shadow-sm); }
.dr-card.st-stale { border-color: #e6c07b; background: #fffdf6; }
.dr-card.st-none { opacity: .82; }
.dr-card-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dr-card-size { margin-left: auto; color: var(--muted); font-size: 11px; }
.dr-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef2f5; color: #5b6876; }
.dr-badge.st-done { background: var(--teal-soft); color: var(--teal); }
.dr-badge.st-stale { background: #fdf2d9; color: #9a6b18; }
.dr-badge.st-none { background: #f1f3f5; color: #8b95a3; }
.dr-card-frames { display: flex; gap: 4px; margin: 8px 0 6px; }
.dr-card-frames figure { flex: 1; margin: 0; }
.dr-card-frames img { width: 100%; border-radius: 4px; display: block; border: 1px solid var(--line); }
.dr-card-frames figcaption { font-size: 10px; color: var(--muted); text-align: center; margin-top: 2px; }
.dr-card-noimg { color: var(--muted); font-size: 11px; padding: 14px 0; }
.dr-card-meta { font-size: 11px; color: var(--muted); }
.dr-card-ops { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.dr-video { width: 100%; border-radius: 6px; background: #000; }
.dr-whole { margin: 10px 0; }
.dr-whole video { width: 100%; max-width: 720px; border-radius: 8px; background: #000; }
.dr-whole-empty { font-size: 12px; color: var(--muted); padding: 8px 0; }
.dr-durtable { margin-top: 10px; }
.dr-red td { background: #fdeceb; color: #a12b1f; font-weight: 600; }

.dr-tablewrap { padding: 10px 12px; }
.dr-table-hint { font-size: 11px; color: var(--muted); margin: 6px 0; }
.dr-table-scroll { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.dr-table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
.dr-table th { position: sticky; top: 0; background: #f4f7f6; text-align: left; padding: 6px 8px; font-weight: 600; color: var(--teal-dark); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dr-table td { padding: 3px 6px; border-bottom: 1px solid #f0f3f5; }
.dr-cell { width: 100%; min-width: 56px; padding: 3px 5px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 12px; }
.dr-cell:hover, .dr-cell:focus { border-color: var(--line); background: #fff; outline: none; }

.dr-confirm p { font-size: 13px; line-height: 1.7; }
.dr-confirm-warn { color: #9a6b18; }
.dr-pre { background: #f6f8f7; border: 1px solid var(--line); border-radius: 6px; padding: 8px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }

.sb-pv-h { width: 152px; }
.sb-pv-cell { white-space: nowrap; min-width: 148px; }
.sb-pv-go { margin-left: 4px; padding: 2px 6px !important; font-size: 10px !important; }
.dr-pos { display: flex; gap: 5px; align-items: center; font-size: 11px; }
.dr-pos input { width: 56px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; font-variant-numeric: tabular-nums; }
.dr-zoom { display: flex; gap: 5px; align-items: center; font-size: 11px; color: var(--muted); }
.dr-zoom .btn { padding: 2px 8px !important; }
.dr-keylist { display: flex; flex-wrap: wrap; gap: 4px; max-height: 92px; overflow-y: auto; }
.dr-kf { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; font-variant-numeric: tabular-nums; }
.dr-kf.on { border-color: var(--teal); background: var(--teal-soft); }
.dr-kf i { font-style: normal; color: var(--muted); }
.dr-kf b { font-weight: 400; color: #b0554a; padding-left: 2px; }

/* 工单027 · 分镜表「构图六项」与段级 blocking */
.sb-cp-h { min-width: 200px; }
.sb-cp-cell { font-size: 11px; color: #4a5563; max-width: 260px; line-height: 1.45;
  border-left: 2px solid #eef1f6; padding: 4px 6px; vertical-align: top; }
.sb-blocking { margin: 8px 0 4px; padding: 8px 10px; background: #f7f9fc; border: 1px solid #e3e8ef;
  border-radius: 6px; font-size: 12px; color: #3b4654; line-height: 1.6; }
.sb-blocking b { color: #1f2a37; margin-right: 6px; }

/* ---------- 资产库（图片 / 视频 + 云地同步） ---------- */
.as-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.as-count { font-size: 13px; color: #475569; line-height: 1.7; }
.as-count b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.as-sub { display: block; font-size: 11px; color: var(--muted); }
.as-err { color: var(--danger); font-size: 13px; }
.as-actions { display: flex; gap: 8px; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: #475569; border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.btn-ghost:hover { border-color: #BFDBFE; color: var(--teal-dark); }

.as-syncbar {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  font-size: 12px; color: #475569; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.72); margin-bottom: 12px;
}
.as-syncbar b { color: var(--ink); font-variant-numeric: tabular-nums; }
.as-syncbar code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #64748b; }
.as-syncbar.ok { border-color: #BBF7D0; background: #F0FDF4; }
.as-syncbar.pending { border-color: #FDE68A; background: #FFFBEB; }
.as-syncbar.running { border-color: #BFDBFE; background: #EFF6FF; }
.as-syncbar.bad { border-color: #FECACA; background: #FEF2F2; color: #B91C1C; }

.as-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 14px; align-items: start; }
.as-tree {
  position: sticky; top: 12px; max-height: calc(100vh - 120px); overflow-y: auto;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: rgba(255,255,255,.8); box-shadow: var(--shadow-sm);
}
.as-tree-t { font-size: 11px; color: var(--muted); letter-spacing: .06em; padding: 4px 6px 8px; }
.as-tree-tip { font-size: 12px; color: var(--muted); padding: 10px; }
.as-node {
  display: block; width: 100%; text-align: left; border: 1px solid transparent; background: none;
  border-radius: 9px; padding: 7px 9px; cursor: pointer; font-size: 12.5px; color: #334155;
  transition: background .15s ease, border-color .15s ease;
}
.as-node:hover { background: var(--teal-soft); }
.as-node.on { background: var(--teal-soft); border-color: #BFDBFE; color: var(--teal-dark); font-weight: 600; }
.as-node-n { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-node-c { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }

.as-main { min-width: 0; }
.as-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.as-crumb { font-size: 12.5px; color: #64748b; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.as-crumb a { color: var(--teal-dark); cursor: pointer; }
.as-crumb a:hover { text-decoration: underline; }
.as-filters { display: flex; gap: 8px; align-items: center; }
.as-input {
  width: 210px; padding: 7px 11px; font-size: 12.5px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); outline: none;
}
.as-input:focus { border-color: #93C5FD; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.as-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.as-seg button { border: none; background: none; padding: 7px 12px; font-size: 12px; color: #64748b; cursor: pointer; }
.as-seg button + button { border-left: 1px solid var(--line); }
.as-seg button.on { background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; }

.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.as-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: #fff; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.as-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #BFDBFE; }
.as-thumb { width: 100%; height: 118px; object-fit: cover; display: block; background: #0F172A10; }
.as-play {
  position: absolute; left: 50%; top: 59px; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: rgba(15,23,42,.55); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; pointer-events: none;
}
.as-meta { padding: 7px 9px 8px; display: flex; flex-direction: column; gap: 2px; }
.as-name { font-size: 11.5px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-size { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.as-dir { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 14px; min-height: 118px; background: linear-gradient(160deg,#fff,#F8FAFF); }
.as-dir-ico { font-size: 26px; }
.as-dir-n { font-size: 12.5px; color: #1e293b; margin-top: 6px; word-break: break-all; }
.as-dir-c { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.as-file { display: flex; flex-direction: column; }
.as-file-ico { font-size: 26px; padding: 26px 0 0 14px; }
.as-loading, .as-empty { grid-column: 1 / -1; padding: 40px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.as-more { padding: 12px; text-align: center; }

.as-mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); z-index: 900; }
.as-lbox {
  position: fixed; z-index: 901; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(1040px, 92vw); max-height: 90vh; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.as-lhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.as-lname { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-lops { display: flex; gap: 6px; flex-shrink: 0; }
.as-lops .btn-sm { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: #334155; }
.as-lops .btn-sm:hover { border-color: #BFDBFE; color: var(--teal-dark); }
.as-lbody { background: #0B1220; display: flex; align-items: center; justify-content: center; min-height: 260px; overflow: auto; }
.as-lv { max-width: 100%; max-height: 74vh; display: block; }
.as-li { max-width: 100%; max-height: 74vh; display: block; }
.as-lfoot { padding: 8px 14px; font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; word-break: break-all; border-top: 1px solid var(--line); }


/* ================== 素材库（2026-11-13 重做） ================== */
.mt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 14px; }
.mt-title { font-size: 22px; font-weight: 700; letter-spacing: 0.2px; color: var(--ink); }
.mt-sub { margin-top: 6px; font-size: 12px; color: var(--muted); }
.mt-head-r { display: flex; gap: 8px; align-items: center; }
.mt-search { width: 190px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 12.5px; color: var(--ink); outline: none; }
.mt-search:focus { border-color: #BFDBFE; box-shadow: 0 0 0 3px rgba(59,130,246,.10); }
.mt-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.mt-chip { border: 1px solid var(--line); background: #fff; color: #475569; border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; transition: all .16s ease; }
.mt-chip i { font-style: normal; color: var(--muted); margin-left: 4px; font-size: 12px; }
.mt-chip:hover { border-color: #BFDBFE; color: var(--teal-dark); }
.mt-chip.on { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(59,130,246,.25); }
.mt-chip.on i { color: rgba(255,255,255,.8); }
/* 视角那一排和类型分开：左边是「看哪一层」，右边是「看什么类型」 */
.mt-chips-v, .mt-chips-k { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mt-chips-k { padding-left: 10px; border-left: 1px solid var(--line); }
.mt-chip.view { background: #F8FAFC; color: #334155; }
.mt-chip.view.on { background: #0F172A; border-color: #0F172A; color: #fff; }
/* 过程图 / 重复 这两个视角是「折叠区」，样式压淡一点，别抢主视角 */
.mt-chip.view.dim { border-style: dashed; color: #64748B; }
.mt-chip.view.dim.on { border-style: solid; background: #475569; border-color: #475569; color: #fff; }

.mt-feed { padding-bottom: 60px; }
.mt-day { margin-bottom: 22px; }
.mt-day-h { font-size: 13px; font-weight: 600; color: #475569; margin: 0 0 10px 2px; letter-spacing: .3px; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.mt-card { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #0f172a; cursor: pointer; border: 1px solid rgba(15,23,42,.06); transition: transform .16s ease, box-shadow .16s ease; }
.mt-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .96; transition: transform .3s ease, opacity .2s ease; }
.mt-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mt-card:hover img { transform: scale(1.04); opacity: 1; }
.mt-badge { position: absolute; left: 8px; top: 8px; font-size: 10px; padding: 3px 7px; border-radius: 999px; background: rgba(15,23,42,.62); color: #e2e8f0; backdrop-filter: blur(6px); max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-dur { position: absolute; left: 8px; bottom: 8px; font-size: 10px; padding: 2px 6px; border-radius: 6px; background: rgba(15,23,42,.68); color: #fff; font-variant-numeric: tabular-nums; }
/* 拆帧 / 重复 的角标：让人一眼看出这不是原始素材，只是留档 */
.mt-flag { position: absolute; right: 8px; top: 8px; font-size: 10px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.92); color: #475569; letter-spacing: .3px; }
.mt-play { position: absolute; right: 8px; bottom: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.9); color: #0f172a; font-size: 10px; display: flex; align-items: center; justify-content: center; }
/* 多选模式：选中描边 + 勾 */
.mt-card.pick { outline: 3px solid var(--teal); outline-offset: 2px; }
.mt-card.pick::after { content: "✓"; position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 3; }
.mt-selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 28px; z-index: 80; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: 0 14px 36px rgba(15,23,42,.2); }
.mt-selbar b { font-size: 13px; white-space: nowrap; }
.mt-skel { height: 220px; border-radius: 14px; background: linear-gradient(100deg, #EEF2F7 20%, #F8FAFC 40%, #EEF2F7 60%); background-size: 200% 100%; animation: mtSkel 1.2s linear infinite; }
@keyframes mtSkel { from { background-position: 140% 0; } to { background-position: -40% 0; } }

/* 右侧详情面板 */
.mt-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 396px; max-width: 92vw; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 48px rgba(15,23,42,.10); display: flex; flex-direction: column; z-index: 60; animation: mtIn .18s ease; }
@keyframes mtIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.mt-dr-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mt-dr-head b { font-size: 14px; color: var(--ink); margin-right: 8px; }
.mt-dr-name { font-size: 12px; color: var(--muted); }
.mt-x { border: none; background: transparent; font-size: 15px; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.mt-x:hover { background: var(--tan-soft); color: var(--ink); }
.mt-dr-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; }
.mt-view { width: 100%; border-radius: 12px; background: #0B1220; display: block; max-height: 46vh; object-fit: contain; }
.mt-view-audio { width: 100%; margin: 6px 0 12px; }
.mt-kv { display: grid; grid-template-columns: 62px 1fr; gap: 8px 10px; margin: 14px 0 4px; font-size: 12.5px; }
.mt-kv dt { color: var(--muted); }
.mt-kv dd { color: #334155; margin: 0; }
.mt-kv dd.mt-path { font-size: 11px; color: #64748B; word-break: break-all; line-height: 1.5; max-height: 3.2em; overflow: hidden; }
.mt-note { margin-top: 10px; font-size: 12px; line-height: 1.6; color: #92400E; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; padding: 9px 11px; }
.mt-sec { margin-top: 16px; }
.mt-sec-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mt-sec-h i { font-style: normal; font-size: 11px; color: #94A3B8; }
.mt-copy { margin-left: auto; border: none; background: var(--teal-soft); color: var(--teal-dark); font-size: 11px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.mt-prompt { font-size: 13px; line-height: 1.65; color: #334155; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.mt-none { font-size: 12px; color: var(--muted); line-height: 1.6; }
.mt-genline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mt-genline span { font-size: 11px; color: #475569; background: var(--tan-soft); border-radius: 6px; padding: 3px 7px; font-variant-numeric: tabular-nums; }
.mt-refs { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-ref { position: relative; width: 66px; height: 66px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; background: #0B1220; }
.mt-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-refs-edit .mt-ref { cursor: default; }
.mt-ref-x { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(15,23,42,.66); color: #fff; font-size: 10px; cursor: pointer; line-height: 1; }
.mt-ref-add { width: 66px; height: 66px; border-radius: 10px; border: 1px dashed #CBD5E1; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; font-size: 18px; }
.mt-ref-add:hover { border-color: var(--teal); color: var(--teal); }
.mt-textarea { width: 100%; min-height: 108px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; font-family: inherit; color: #334155; }
.mt-textarea:focus { outline: none; border-color: #BFDBFE; box-shadow: 0 0 0 3px rgba(59,130,246,.10); }
.mt-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.mt-fields select, .mt-fields input, .mt-wide { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; color: #334155; background: #fff; font-family: inherit; }
.mt-wide { width: 100%; margin-bottom: 8px; }
.mt-dr-foot { border-top: 1px solid var(--line); padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.mt-foot-row { display: flex; gap: 8px; }
.mt-btn { flex: 1; border: 1px solid var(--line); background: #fff; color: #334155; border-radius: 10px; padding: 9px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit; transition: all .16s ease; }
.mt-btn:hover { border-color: #BFDBFE; color: var(--teal-dark); }
.mt-btn.full { width: 100%; flex: none; }
.mt-btn:disabled { opacity: .55; cursor: not-allowed; }
.mt-btn.danger { color: #DC2626; border-color: #FEE2E2; }
.mt-btn.danger:hover { background: #FEF2F2; border-color: #FECACA; }
.mt-btn.ghost { background: var(--paper); }
#mtRemake, #mtGo { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
#mtRemake:hover, #mtGo:hover { background: var(--teal-dark); color: #fff; }

.mt-lightbox { position: fixed; inset: 0; background: rgba(8,12,20,.86); display: flex; align-items: center; justify-content: center; z-index: 90; cursor: zoom-out; padding: 5vh 5vw; }
.mt-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }

/* 保存到资产弹层 */
.mt-modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.35); display: flex; align-items: center; justify-content: center; z-index: 95; }
.mt-modal { width: 460px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 18px 18px 14px; box-shadow: var(--shadow-lg); }
.mt-modal h3 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.mt-folders { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; margin: 12px 0; }
.mt-folder { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 13px; color: #334155; }
.mt-folder:hover { border-color: #BFDBFE; background: var(--teal-soft); }
.mt-folder i { font-style: normal; color: var(--muted); font-size: 11px; }
.mt-newfolder { display: flex; gap: 8px; }
.mt-newfolder input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; font-family: inherit; }
.mt-modal-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
/* hidden 属性要压得住 display:flex，否则空面板会盖在页面上 */
.mt-drawer[hidden], .mt-lightbox[hidden] { display: none !important; }
.mt-dr-head > div { min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
.mt-dr-name { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main.mt-pushed { padding-right: 412px; transition: padding-right .18s ease; }
.mt-head-r .btn { white-space: nowrap; }
.mt-more { text-align: center; font-size: 12px; color: var(--muted); padding: 14px 0 4px; }
.mt-more-end { opacity: .7; }

/* ================== 资产库（2026-11-13：人物/场景/道具/声音/3D白膜） ================== */
.ast-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 18px; }
.ast-title { font-size: 22px; font-weight: 700; letter-spacing: .2px; color: var(--ink); }
.ast-sub { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.ast-head-r { display: flex; gap: 8px; align-items: center; }
.ast-head-r .btn { white-space: nowrap; }
.ast-crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.ast-crumb a { color: var(--teal-dark); text-decoration: none; }
.ast-crumb a:hover { text-decoration: underline; }
.ast-crumb b { color: #334155; font-weight: 600; }

/* 待核区：审过才入库 */
.ast-review { background: #fff; border: 1px solid var(--line); border-left: 3px solid #F59E0B; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ast-rv-txt { font-size: 13px; color: #475569; }
.ast-rv-txt b { color: #0F172A; font-size: 15px; }
.ast-rv-acts { margin-left: auto; display: flex; gap: 8px; }
.ast-rv-list { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.ast-rv-row { display: grid; grid-template-columns: 66px 1fr 54px 2fr; gap: 8px; align-items: center; font-size: 12px; color: #475569; padding: 3px 0; }
.ast-rv-id { font-family: ui-monospace, monospace; color: #0F172A; }
.ast-rv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-rv-st { font-size: 11px; text-align: center; border-radius: 6px; padding: 1px 0; background: #F1F5F9; color: #475569; }
.ast-rv-row[data-st="pass"] .ast-rv-st { background: #DCFCE7; color: #15803D; }
.ast-rv-row[data-st="review"] .ast-rv-st { background: #FEF3C7; color: #B45309; }
.ast-rv-row[data-st="reject"] .ast-rv-st { background: #FEE2E2; color: #B91C1C; }
.ast-rv-why { color: #94A3B8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 五个分类大卡 */
.ast-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(278px, 1fr)); gap: 14px; padding-bottom: 40px; }
.ast-cat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; display: flex; flex-direction: column; gap: 9px; }
.ast-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #DBEAFE; }
.ast-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ast-glyph { width: 38px; height: 38px; flex: none; border-radius: 11px; background: linear-gradient(135deg, #EFF6FF, #E0F2FE); color: #2563EB; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ast-cat-covers { display: flex; gap: 5px; }
.ast-mini { width: 42px; height: 42px; border-radius: 9px; overflow: hidden; background: #0F172A; display: flex; align-items: center; justify-content: center; }
.ast-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ast-mini.empty { background: var(--paper); color: #CBD5E1; font-size: 11px; }
.ast-cat-name { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: baseline; gap: 7px; }
.ast-cat-name i { font-style: normal; font-size: 11px; color: #A8B3C4; letter-spacing: .4px; }
.ast-cat-desc { font-size: 12px; color: var(--muted); line-height: 1.55; min-height: 34px; }
.ast-cat-meta { font-size: 11.5px; color: #64748B; border-top: 1px solid var(--line); padding-top: 9px; font-variant-numeric: tabular-nums; }
.ast-cat-meta b { color: #1F2A37; font-size: 13px; margin-right: 2px; }
.ast-cat-meta span { margin: 0 6px; color: #CBD5E1; }

/* 资产网格 */
.ast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 14px; padding-bottom: 60px; }
.ast-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.ast-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #DBEAFE; }
.ast-cover { position: relative; aspect-ratio: 16 / 9; background: #0B1220; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ast-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ast-noimg { color: #475569; font-size: 34px; }
.ast-play { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.92); color: #0F172A; font-size: 11px; display: flex; align-items: center; justify-content: center; }
/* 卡片封面上的下载 / 删除 */
.ast-acts { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 8px; opacity: 0; transform: translateY(4px); transition: opacity .16s ease, transform .16s ease; }
.ast-card:hover .ast-acts, .ast-card:focus-within .ast-acts { opacity: 1; transform: none; }
.ast-act { flex: 1; height: 30px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: rgba(15, 23, 42, .58); color: #fff; cursor: pointer; font-family: inherit; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .14s ease, transform .14s ease; }
.ast-act:hover { background: rgba(15, 23, 42, .82); }
.ast-act:active { transform: scale(.97); }
.ast-act.del { color: #FF8A8A; }
.ast-act.del:hover { background: rgba(185, 28, 28, .78); color: #fff; }
.ast-card.dragging { opacity: .4; transform: scale(.98); }
.ast-card.dropping { border-color: #2563EB; box-shadow: 0 0 0 2px #BFDBFE inset, var(--shadow-md); }
.ast-card.dropping .ast-cover::after { content: "并进这个资产"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; background: rgba(37,99,235,.55); letter-spacing: 1px; }
.ast-thumb-cover { position: absolute; left: 3px; bottom: 3px; border: none; border-radius: 5px; background: rgba(15,23,42,.72); color: #E2E8F0; font-size: 9.5px; padding: 2px 5px; cursor: pointer; font-family: inherit; opacity: 0; transition: opacity .14s ease; z-index: 3; }
.ast-thumb:hover .ast-thumb-cover { opacity: 1; }
.ast-thumb-cover:hover { background: var(--teal); color: #fff; }
@media (hover: none) { .ast-acts { opacity: 1; transform: none; } }
.ast-fileline .ast-mini-btn { margin-left: 0; flex: none; white-space: nowrap; }
.ast-card-b { padding: 10px 12px 11px; }
.ast-name { font-size: 13px; font-weight: 600; color: #1F2A37; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; min-height: 2.7em; }
.ast-meta { margin-top: 3px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ast-src { margin-top: 2px; font-size: 11px; color: #8A94A6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-meta span { margin: 0 5px; color: #CBD5E1; }
.ast-when { margin-top: 2px; font-size: 11px; color: #A8B3C4; font-variant-numeric: tabular-nums; }

/* 资产内页：点开一个资产下探一层，看里面所有文件 */
.ast-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ast-fcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .16s ease, box-shadow .16s ease; }
.ast-fcard:hover { border-color: #DBEAFE; box-shadow: var(--shadow-md); }
.ast-fcover { position: relative; aspect-ratio: 16 / 9; background: #0B1220; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.ast-fcover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ast-fglyph { color: #475569; font-size: 30px; }
.ast-facts { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 6px; opacity: 0; transform: translateY(4px); transition: opacity .16s ease, transform .16s ease; }
.ast-fcard:hover .ast-facts, .ast-fcard:focus-within .ast-facts { opacity: 1; transform: none; }
.ast-fact { flex: 1; height: 28px; border: 0; border-radius: 8px; background: rgba(15,23,42,.6); color: #fff; font-size: 11px; font-family: inherit; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; }
.ast-fact:hover { background: rgba(15,23,42,.85); }
.ast-fact.del { color: #FF8A8A; }
.ast-fact.del:hover { background: rgba(185,28,28,.8); color: #fff; }
.ast-fmark { position: absolute; left: 8px; top: 8px; font-size: 10px; color: #fff; background: rgba(37,99,235,.9); border-radius: 5px; padding: 2px 6px; letter-spacing: .5px; }
.ast-fb { padding: 10px 12px 11px; }
.ast-fname { font-size: 12.5px; font-weight: 600; color: #1F2A37; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-fseq { display: inline-block; min-width: 22px; margin-right: 6px; font-style: normal; font-size: 11px; font-weight: 600; color: #64748B; font-variant-numeric: tabular-nums; }
.ast-fmeta { margin-top: 3px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ast-in-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.ast-in-foot .ast-btn { flex: 0 0 auto; padding: 8px 14px; }
@media (hover: none) { .ast-facts { opacity: 1; transform: none; } }

.ast-empty { grid-column: 1 / -1; background: #fff; border: 1px dashed var(--line); border-radius: 16px; padding: 46px 20px; text-align: center; }
.ast-empty-glyph { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; background: var(--paper); color: #CBD5E1; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.ast-empty-t { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.ast-none { font-size: 12px; color: var(--muted); line-height: 1.7; }

/* 详情抽屉 */
.ast-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 420px; max-width: 94vw; background: #fff; border-left: 1px solid var(--line); box-shadow: -18px 0 48px rgba(15,23,42,.10); display: flex; flex-direction: column; z-index: 60; animation: astIn .18s ease; }
.ast-drawer[hidden] { display: none !important; }
@keyframes astIn { from { transform: translateX(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.ast-dr-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); gap: 10px; }
.ast-dr-head > div { min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
.ast-dr-head b { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-dr-cat { flex: none; font-size: 10.5px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 6px; padding: 2px 6px; }
.ast-x { border: none; background: transparent; font-size: 16px; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.ast-x:hover { background: var(--tan-soft); color: var(--ink); }
.ast-dr-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; }
.ast-stage { background: #0B1220; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 200px; max-height: 44vh; }
.ast-stage-img { max-width: 100%; max-height: 44vh; object-fit: contain; display: block; cursor: zoom-in; }
.ast-stage-video { width: 100%; max-height: 44vh; background: #000; display: block; }
.ast-stage-audio { padding: 26px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.ast-wave { font-size: 40px; color: #3B4A63; }
.ast-stage-audio audio { width: 100%; }
.ast-stage-empty { color: #64748B; font-size: 12.5px; padding: 40px 16px; text-align: center; }
.ast-fileline { margin-top: 8px; font-size: 11.5px; color: #64748B; display: flex; justify-content: space-between; gap: 10px; word-break: break-all; }
.ast-fileline-n { flex: 1; min-width: 0; color: #64748B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ast-fileline-s { color: #A8B3C4; flex: none; }
.ast-sec-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 16px 0 9px; }
.ast-sec-h i { font-style: normal; font-size: 11px; color: #A8B3C4; }
.ast-mini-btn { margin-left: auto; border: 1px solid var(--line); background: #fff; color: #475569; font-size: 11px; padding: 3px 9px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.ast-mini-btn:hover { border-color: #BFDBFE; color: var(--teal-dark); }
.ast-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ast-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #0F172A; cursor: pointer; border: 2px solid transparent; }
.ast-thumb.on { border-color: var(--teal); }
.ast-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ast-thumb-glyph { color: #3B4A63; font-size: 22px; display: flex; align-items: center; justify-content: center; height: 100%; }
.ast-thumb-x { position: absolute; right: 3px; top: 3px; width: 17px; height: 17px; border: none; border-radius: 50%; background: rgba(15,23,42,.7); color: #fff; font-size: 10px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .14s ease; }
.ast-thumb:hover .ast-thumb-x { opacity: 1; }
.ast-cover-mark { position: absolute; left: 3px; bottom: 3px; font-size: 9px; color: #fff; background: rgba(37,99,235,.85); border-radius: 4px; padding: 1px 4px; }
.ast-kv { display: grid; grid-template-columns: 46px 1fr; gap: 7px 10px; margin: 16px 0 0; font-size: 12px; }
.ast-kv dt { color: var(--muted); }
.ast-kv dd { color: #334155; margin: 0; }
.ast-path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #64748B; word-break: break-all; }
.ast-dr-foot { border-top: 1px solid var(--line); padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.ast-foot-row { display: flex; gap: 8px; }
.ast-btn { flex: 1; border: 1px solid var(--line); background: #fff; color: #334155; border-radius: 10px; padding: 9px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit; transition: all .16s ease; }
.ast-btn:hover { border-color: #BFDBFE; color: var(--teal-dark); }
.ast-btn.full { width: 100%; flex: none; }
.ast-btn.danger { color: #DC2626; border-color: #FEE2E2; }
.ast-btn.danger:hover { background: #FEF2F2; border-color: #FECACA; }
.ast-btn.ghost { background: transparent; }
.ast-btn.ghost:hover { background: #FEF2F2; }
.ast-lightbox { position: fixed; inset: 0; background: rgba(8,12,20,.88); display: flex; align-items: center; justify-content: center; z-index: 90; cursor: zoom-out; padding: 5vh 5vw; }
.ast-lightbox[hidden] { display: none !important; }
.ast-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.main.ast-pushed { padding-right: 436px; transition: padding-right .18s ease; }

/* 输入弹层 */
.ast-mask { position: fixed; inset: 0; background: rgba(15,23,42,.35); display: flex; align-items: center; justify-content: center; z-index: 95; }
.ast-modal { width: 420px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 18px; box-shadow: var(--shadow-lg); }
.ast-modal h3 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.ast-input { width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px; font-family: inherit; color: #334155; }
.ast-input:focus { outline: none; border-color: #BFDBFE; box-shadow: 0 0 0 3px rgba(59,130,246,.10); }
.ast-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* 保存到资产：分类条 */
.mt-catrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.mt-catchip { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; color: #475569; border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; font-family: inherit; transition: all .14s ease; }
.mt-catchip span { width: 16px; height: 16px; border-radius: 5px; background: var(--teal-soft); color: var(--teal-dark); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.mt-catchip i { font-style: normal; font-size: 10.5px; color: #A8B3C4; }
.mt-catchip.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; }
.mt-catchip.on i { color: var(--teal-dark); }
.mt-folder { gap: 9px; }
.mt-folder-cv { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; background: #0F172A; flex: none; }
.mt-folder-cv.none { background: var(--paper); }
.mt-folder b { flex: 1; text-align: left; font-weight: 500; }
.mt-catchip i { margin-left: 1px; }
.mt-catchip { padding-right: 10px; }

/* 添加资产：从素材库挑（大选择器） */
.ast-pk-mask { position: fixed; inset: 0; background: rgba(15,23,42,.42); display: flex; align-items: center; justify-content: center; z-index: 96; padding: 3vh 2vw; }
.ast-pk { width: 1180px; max-width: 95vw; height: 88vh; background: #fff; border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(15,23,42,.28); }
.ast-pk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px 18px 12px; border-bottom: 1px solid var(--line); }
.ast-pk-head b { font-size: 15px; color: var(--ink); }
.ast-pk-head span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.ast-pk-bar { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.ast-pk-q { flex: 1; max-width: 320px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 12.5px; font-family: inherit; color: #334155; }
.ast-pk-q:focus { outline: none; border-color: #BFDBFE; box-shadow: 0 0 0 3px rgba(59,130,246,.10); }
.ast-pk-chips { display: flex; gap: 6px; }
.ast-pk-chips button { border: 1px solid var(--line); background: #fff; color: #475569; border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-family: inherit; }
.ast-pk-chips button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.ast-pk-grid { flex: 1; overflow-y: auto; padding: 16px 18px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(162px, 1fr)); grid-auto-rows: 172px; gap: 14px; align-content: start; }
/* 卡片高度写死：之前靠百分比 padding 撑，某些窗口宽度下会被拉成竖条 */
.ast-pk-card { position: relative; height: 172px; border-radius: 11px; overflow: hidden; background: #0F172A; cursor: pointer; border: 2px solid transparent; transition: border-color .12s ease, transform .12s ease; }
.ast-pk-card:hover { transform: translateY(-1px); }
.ast-pk-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: .95; }
.ast-pk-card.on { border-color: var(--teal); }
.ast-pk-card.on img { opacity: 1; }
.ast-pk-card.on::after { content: ""; position: absolute; inset: 0; background: rgba(37,99,235,.16); }
.ast-pk-check { position: absolute; right: 5px; top: 5px; width: 17px; height: 17px; border-radius: 50%; background: rgba(15,23,42,.55); color: transparent; font-size: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.6); z-index: 2; }
.ast-pk-card.on .ast-pk-check { background: var(--teal); color: #fff; border-color: #fff; }
.ast-pk-glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #3B4A63; font-size: 26px; }
.ast-pk-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 7px 5px; font-size: 10.5px; color: #E2E8F0; background: linear-gradient(transparent, rgba(8,12,20,.72)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; z-index: 2; }
.ast-pk-dur { position: absolute; right: 6px; bottom: 5px; font-size: 9.5px; color: #fff; background: rgba(15,23,42,.66); border-radius: 5px; padding: 1px 4px; z-index: 2; }
.ast-pk-more { grid-column: 1 / -1; border: 1px dashed var(--line); background: #fff; color: #64748B; border-radius: 10px; padding: 9px; font-size: 12px; cursor: pointer; font-family: inherit; }
.ast-pk-more:hover { border-color: #BFDBFE; color: var(--teal-dark); }
.ast-pk-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px 14px; border-top: 1px solid var(--line); }
.ast-pk-picked { font-size: 12px; color: #475569; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ast-pk-asset { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; font-family: inherit; color: #334155; }
.ast-pk-asset:focus { outline: none; border-color: #BFDBFE; box-shadow: 0 0 0 3px rgba(59,130,246,.10); }

/* ---------- 沟通记录 · 本机 ↔ 缪子 ---------- */
.mc-wrap { display: flex; flex-direction: column; gap: 14px; height: calc(100vh - 190px); min-height: 520px; }
.mc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mc-title { margin: 0 0 4px; font-size: 19px; font-weight: 650; color: var(--ink); letter-spacing: .01em; }
.mc-sub { font-size: 12.5px; color: var(--muted); }
.mc-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* 心跳：主进程最后一次真跑的时间 */
.mc-beat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mc-beat b { font-weight: 650; color: #475569; }
.mc-beat i { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.mc-beat.off i { background: #CBD5E1; box-shadow: none; }
.mc-badge { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; background: #fff; font-variant-numeric: tabular-nums; }
.mc-badge.on { color: var(--teal-dark); border-color: #BFDBFE; background: var(--teal-soft); }
.mc-btn { font: inherit; font-size: 13px; padding: 8px 16px; border-radius: 10px; border: 1px solid transparent; background: var(--teal); color: #fff; cursor: pointer; transition: .15s; }
.mc-btn:hover { background: var(--teal-dark); }
.mc-btn:disabled { opacity: .55; cursor: default; }
.mc-btn.ghost { background: #fff; color: #334155; border-color: var(--line); }
.mc-btn.ghost:hover { border-color: #BFDBFE; color: var(--teal-dark); background: #F8FBFF; }
.mc-list { flex: 1; overflow-y: auto; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 14px; }
.mc-row { display: flex; flex-direction: column; gap: 5px; max-width: 78%; }
.mc-mine { align-self: flex-end; align-items: flex-end; }
.mc-theirs { align-self: flex-start; align-items: flex-start; }
.mc-meta { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.mc-bubble { padding: 11px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.62; white-space: normal; word-break: break-word; }
.mc-mine .mc-bubble { background: var(--teal-soft); color: #1E3A5F; border: 1px solid #DBEAFE; border-bottom-right-radius: 4px; }
.mc-theirs .mc-bubble { background: #fff; color: #1F2937; border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.mc-ref { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mc-empty { margin: auto; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.9; }
.mc-empty code { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 12px; }
.mc-input { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.mc-input textarea { width: 100%; border: none; resize: none; min-height: 84px; padding: 14px 16px; font: inherit; font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.mc-input textarea:focus { outline: none; }
.mc-input-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: #FCFDFF; }

/* 四个身份：人 / 本机 AI / 缪子 / 采集系统（另一台机） */
.mc-who-human .mc-bubble { background: #F0FDF4; border-color: #86EFAC; color: #14532D; }
.mc-who-caiji .mc-bubble { background: #F0FDFA; border-color: #99F6E4; color: #134E4A; }
.mc-who-human .mc-meta::before, .mc-who-ai .mc-meta::before, .mc-who-muse .mc-meta::before, .mc-who-caiji .mc-meta::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px;
}
.mc-who-human .mc-meta::before { background: #22C55E; }
.mc-who-ai .mc-meta::before { background: #3B82F6; }
.mc-who-muse .mc-meta::before { background: #94A3B8; }
.mc-who-caiji .mc-meta::before { background: #14B8A6; }
.mc-who-caiji .mc-who { color: #0F766E; }
.mc-as { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; flex-wrap: wrap; }
.mc-as-label { font-size: 12px; color: var(--muted); }
.mc-chip { font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #475569; cursor: pointer; transition: .15s; }
.mc-chip:hover { border-color: #BFDBFE; color: var(--teal-dark); }
.mc-chip.on { background: var(--teal-soft); border-color: #BFDBFE; color: var(--teal-dark); font-weight: 600; }
.mc-as-tip { font-size: 11.5px; color: var(--muted); margin-left: auto; }

.mc-status { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.mc-status.warn { color: #B45309; }

.mc-as code { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 11.5px; }

/* ---------- 会议室（替换旧沟通记录样式） ---------- */
.mc-wrap { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 150px); min-height: 480px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mc-title { margin: 0; font-size: 20px; font-weight: 650; color: var(--ink); letter-spacing: .01em; }
.mc-badge { font-size: 12px; color: #B45309; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 999px; padding: 4px 10px; }
.mc-list { flex: 1; overflow-y: auto; padding: 18px 18px 10px; background: #FBFCFE; border: 1px solid var(--line); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 16px; }
.mc-day { align-self: center; font-size: 11.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.mc-row { display: flex; align-items: flex-start; gap: 10px; max-width: 82%; }
.mc-theirs { align-self: flex-start; }
.mc-mine { align-self: flex-end; flex-direction: row-reverse; }
.mc-ava { width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; overflow: hidden; box-shadow: var(--shadow-sm); }
.mc-ava svg { width: 100%; height: 100%; display: block; }
.mc-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mc-mine .mc-col { align-items: flex-end; }
.mc-meta { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.mc-meta .mc-who { color: #475569; font-weight: 600; }
.mc-mine .mc-meta .mc-who { color: #047857; }
.mc-arrow { color: #94A3B8; }
.mc-time { color: #94A3B8; font-variant-numeric: tabular-nums; }
.mc-bubble { padding: 10px 14px; border-radius: 13px; font-size: 13.5px; line-height: 1.62; word-break: break-word; background: #fff; color: #1F2937; border: 1px solid var(--line); border-top-left-radius: 4px; }
.mc-mine .mc-bubble { background: #ECFDF5; border-color: #A7F3D0; color: #14532D; border-top-left-radius: 13px; border-top-right-radius: 4px; }
.mc-empty { margin: auto; font-size: 13px; color: var(--muted); }

/* 任务卡 / 交付卡 */
.mc-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; box-shadow: var(--shadow-sm); min-width: 260px; max-width: 460px; }
.mc-card-result { border-color: #BBF7D0; background: #FCFFFD; }
.mc-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.mc-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #1D4ED8; background: #EFF6FF; border: 1px solid #DBEAFE; border-radius: 6px; padding: 2px 7px; }
.mc-tag.ok { color: #047857; background: #ECFDF5; border-color: #BBF7D0; }
.mc-taskid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: #64748B; }
.mc-state { font-size: 11.5px; color: #64748B; margin-left: auto; }
.mc-state.running { color: #B45309; }
.mc-state.done { color: #047857; }
.mc-state.failed { color: #B91C1C; }
.mc-card-title { font-size: 13.5px; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.mc-card-title.inline { font-weight: 500; color: #475569; margin: 0; }
.mc-card-prompt { font-size: 13px; line-height: 1.65; color: #334155; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; padding: 8px 10px; }
.mc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.mc-chips span { font-size: 11.5px; color: #475569; background: #F1F5F9; border-radius: 999px; padding: 2px 9px; }
.mc-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mc-thumb { margin: 0; width: 84px; }
.mc-thumb img { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: #F1F5F9; }
.mc-thumb figcaption { font-size: 10.5px; color: var(--muted); margin-top: 3px; text-align: center; }
.mc-files { display: flex; gap: 10px; flex-wrap: wrap; }
.mc-file { display: flex; flex-direction: column; gap: 6px; width: 150px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; transition: .15s; }
.mc-file:hover { border-color: #86EFAC; box-shadow: var(--shadow-sm); }
.mc-file-media { width: 100%; height: 96px; border-radius: 8px; overflow: hidden; background: #F1F5F9; display: flex; align-items: center; justify-content: center; }
.mc-file-media img, .mc-file-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-file-ph { font-size: 11.5px; color: #94A3B8; }
.mc-file-name { font-size: 12px; color: #1F2937; word-break: break-all; line-height: 1.4; }
.mc-file-dim { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 输入条 */
.mc-input { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-sm); }
.mc-input textarea { width: 100%; border: none; resize: none; min-height: 78px; padding: 14px 16px 6px; font: inherit; font-size: 13.5px; line-height: 1.6; color: var(--ink); background: transparent; }
.mc-input textarea:focus { outline: none; }
.mc-input-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px 12px; }

/* 真实头像 */
.mc-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-ava { border-radius: 50%; overflow: hidden; background: #fff; border: 1px solid rgba(15,23,42,.06); }

/* @ 选择浮层 */
.mc-input { position: relative; }
.mc-pick { position: absolute; left: 12px; bottom: calc(100% - 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(15,23,42,.12); padding: 6px; min-width: 220px; z-index: 30; }
.mc-pick-hd { font-size: 11px; color: #94A3B8; padding: 4px 10px 4px; letter-spacing: .04em; }
.mc-pick-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.mc-pick-txt b { font-weight: 500; font-size: 13px; color: #1F2937; }
.mc-pick-txt i { font-style: normal; font-size: 11px; color: #94A3B8; }
.mc-pick-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; font-size: 13px; color: #1F2937; cursor: pointer; }
.mc-pick-item.on, .mc-pick-item:hover { background: #F1F5F9; }
.mc-pick-ico { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mc-pick-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-pick-all { background: #FFFBEB; color: #B45309; font-weight: 700; font-size: 13px; border: 1px solid #FDE68A; }
.mc-input { overflow: visible; }

/* ---------- 会议室 · 附件 ---------- */
.mc-tool { font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 9px; border: 1px dashed #CBD5E1; background: #fff; color: #475569; cursor: pointer; transition: .15s; }
.mc-tool:hover { border-color: var(--teal); color: var(--teal-dark); background: #F8FBFF; }
.mc-input-foot { flex-wrap: wrap; }
.mc-input-foot .mc-btn { margin-left: auto; }
.mc-input.mc-drop { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,140,255,.12); }
.mc-attbar { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 14px 0; }
.mc-attp { position: relative; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 24px 6px 6px; background: #fff; max-width: 260px; }
.mc-attp.bad { border-color: #FECACA; background: #FEF2F2; }
.mc-attp.up { opacity: .75; }
.mc-attp-media { width: 46px; height: 46px; border-radius: 7px; overflow: hidden; background: #F1F5F9; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.mc-attp-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-attp-ico { font-size: 16px; color: #64748B; }
.mc-attp-mask { position: absolute; inset: 0; background: rgba(15,23,42,.45); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.mc-attp-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-attp-name { font-size: 12px; color: #1F2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.mc-attp-size { font-size: 11px; color: var(--muted); }
.mc-attp.bad .mc-attp-size { color: #B91C1C; }
.mc-attp-x { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; border: none; border-radius: 50%; background: #E2E8F0; color: #475569; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }
.mc-attp-x:hover { background: #CBD5E1; }

/* 消息里的附件 */
.mc-atts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; align-items: flex-start; }
.mc-att { border-radius: 11px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.mc-att-i { width: 168px; cursor: zoom-in; }
.mc-att-i img { width: 100%; height: 118px; object-fit: cover; display: block; background: #F1F5F9; }
.mc-att-v { width: 240px; }
.mc-att-v video { width: 100%; display: block; background: #0F172A; max-height: 200px; }
.mc-att-cap { font-size: 11px; color: var(--muted); padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-att-f { display: flex; align-items: center; gap: 8px; padding: 9px 12px; text-decoration: none; color: inherit; }
.mc-att-f:hover { background: #F8FAFC; }
.mc-att-glyph { font-size: 10.5px; font-weight: 700; color: #475569; background: #F1F5F9; border-radius: 5px; padding: 3px 6px; letter-spacing: .04em; }
.mc-att-name { font-size: 12.5px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-att-size { background: transparent; color: var(--muted); font-weight: 400; }

/* 看大图 */
.mc-light { position: fixed; inset: 0; background: rgba(8,15,30,.82); display: flex; align-items: center; justify-content: center; z-index: 999; cursor: zoom-out; padding: 40px; }
.mc-light[hidden] { display: none; }
.mc-light figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mc-light img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.mc-light figcaption { color: #CBD5E1; font-size: 12.5px; }

.mc-open { font-size: 12.5px; color: #475569; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: #fff; transition: .15s; }
.mc-open:hover { border-color: #BFDBFE; color: var(--teal-dark); background: #F8FBFF; }

/* 手机竖屏：素材库这类「标题+工具条」头部改为上下两行；页面标签给左上的呼出钮让位 */
@media (max-width: 760px) {
  .page-tag { margin-left: 46px; }
  .mt-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .mt-head-l { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
  .mt-sub { margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
  .mt-head-r { flex-wrap: wrap; }
  .mt-search { flex: 1 1 100%; width: auto; min-width: 0; }
  .mt-title { font-size: 19px; }
  .mt-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .mt-selbar { left: 10px; right: 10px; transform: none; justify-content: space-between; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 8px 10px; gap: 6px; }
  .mt-chip { padding: 6px 11px; font-size: 12.5px; }
  .mt-chips-v, .mt-chips-k { border-left: none; padding-left: 0; }
}
/* 横屏矮屏：页面标签同样给呼出钮让位 */
@media (orientation: landscape) and (max-height: 500px) {
  .page-tag { margin-left: 42px; }
  .mt-head { flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
  .mt-head-l { flex-direction: row; display: flex; align-items: baseline; gap: 8px; }
  .mt-sub { margin-top: 0; }
  .mt-search { width: 150px; }
  .mt-title { font-size: 18px; }
  .mt-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .mt-selbar { bottom: 10px; }
}

/* 兜底：hidden 属性必须真的藏起来（有些 display:flex 的浮条会盖掉它） */
[hidden] { display: none !important; }

/* 手机：素材获取的任务表自己内部横滑，不撑破页面 */
@media (max-width: 760px) {
  #jobTable { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .job-title { max-width: 200px; }
  table.jobs td, table.jobs th { padding: 9px 10px; }
  table.jobs { min-width: 340px; }
}

/* 手机窄屏：书工作台的章节表横向滚动，别把标题挤成竖排 */
@media (max-width: 640px) {
  .desk-col { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .usage-tbl { min-width: 520px; }
}

/* 新建剧本：素材来源二选一（选一本书 / 直接写） */
.sc-origin { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .sc-origin-opt {
  display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.form-row .sc-origin-opt input {
  width: auto; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; flex: 0 0 auto;
}
.form-row .sc-origin-opt:has(input:checked) {
  border-color: var(--teal); color: var(--teal); background: #F5F9FF; font-weight: 600;
}
/* 素材弹层里的文本域撑满，别缩成一小条 */
.sc-src textarea { width: 100%; box-sizing: border-box; }

/* 新建剧本 · 直接写：就是一个空白大框 + 字数统计 */
.sc-src textarea#scPaste { line-height: 1.75; font-size: 14px; resize: vertical; }
.sc-pane > .quiz-ex { margin-top: 6px; }

/* 剧本页右侧：剧本信息 / 本集分镜脚本 两个页签（老板 2026-11-15） */
.sc-side-tabs { display: flex; gap: 6px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sc-side-tab {
  border: 1px solid var(--line); background: #fff; color: #6b7280;
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.sc-side-tab.on { background: #F5F9FF; border-color: var(--teal); color: var(--teal); font-weight: 600; }
.sbp-top {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #FBFCFB;
}
.sbp-dur-box { display: flex; align-items: baseline; gap: 8px; }
.sbp-lbl { font-size: 12px; color: #6b7280; }
.sbp-dur-box b { font-size: 21px; color: var(--teal); font-weight: 700; font-variant-numeric: tabular-nums; }
.sbp-list { display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow-y: auto; }
.sbp-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sbp-no { flex: 0 0 auto; min-width: 34px; font-size: 12px; font-weight: 700; color: #374151; background: #F3F4F6; border-radius: 6px; padding: 3px 6px; text-align: center; }
.sbp-body { flex: 1 1 auto; min-width: 0; }
.sbp-hd { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.sbp-size { font-size: 11.5px; color: #fff; background: #9aa5a1; border-radius: 4px; padding: 1px 6px; }
.sbp-move { font-size: 11.5px; color: #6b7280; }
.sbp-desc { font-size: 12.5px; line-height: 1.55; color: #1f2937; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sbp-line { font-size: 12px; color: #8a6d3b; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbp-dur-wrap { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.sbp-dur { width: 46px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.sbp-unit { font-size: 11.5px; color: #6b7280; }
/* 逐镜锁定：锁住满意的镜头，重生成时原地不动 */
.sbp-lockcount { margin-left: auto; font-size: 11.5px; color: #6b7280; font-variant-numeric: tabular-nums; }
.sbp-lockcount.on { color: var(--teal); font-weight: 600; }
.sbp-lockbar { display: flex; gap: 6px; margin-top: 6px; }
.sbp-lockbar .btn { padding: 3px 9px; font-size: 11.5px; }
.sbp-lock {
  flex: 0 0 auto; align-self: center; min-width: 34px; padding: 4px 4px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: #8a9490; font-size: 11.5px; cursor: pointer; white-space: nowrap;
}
.sbp-lock:hover { border-color: var(--teal); color: var(--teal); }
.sbp-lock.on { background: #EEF7F4; border-color: var(--teal); color: var(--teal); font-weight: 600; }
.sbp-lock[disabled] { cursor: default; opacity: .6; }
.sbp-row.locked { border-color: #CFE5DD; background: #F7FBFA; }
.sbp-row.locked .sbp-desc { color: #4b5563; }
.sbp-row.locked .sbp-no { background: #E4F1EC; color: #2f6b5c; }
/* 分镜表里的「锁」按钮与锁住的行 */
.sb-locked td { background: #F7FBFA; }
.sb-locked .sb-in { color: #4b5563; background: transparent; }
.sb-op.on { background: #EEF7F4; border-color: var(--teal); color: var(--teal); font-weight: 600; }
.sb-op[disabled] { cursor: default; opacity: .65; }
/* 锁按钮常显（↑↓✕ 仍是 hover 才出，锁的状态必须一眼看到） */
.sb-op-lock { display: inline-block; flex: 0 0 auto; }
.sb-op-lock.on { background: #EEF7F4; border-color: #CFE5DD; color: #2f6b5c; font-weight: 600; }
.sc-warn.sb-ready { background: #EEF7F4; border-color: #CFE5DD; color: #2f6b5c; font-weight: 600; }
/* 分镜表顶部两行工具栏：主操作一行，版本与锁一行，避免按钮挤成三行 */
.sb-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.sb-toolbar-sub { margin-bottom: 10px; }
.sb-toolbar-sub select { max-width: 320px; }
.sb-lockstat { font-size: 12.5px; color: #6b7280; font-variant-numeric: tabular-nums; }
.sb-lockstat b { color: var(--teal); }
.sc-status { white-space: nowrap; }
/* 分镜定稿后的「下一阶段」条：分镜 = 拍摄依据 */
.sb-nextbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 0 0 10px; padding: 9px 12px; border: 1px solid #CFE5DD; border-radius: 10px;
  background: #EEF7F4; color: #2f6b5c; font-size: 12.5px;
}
.sb-nextbar b { font-variant-numeric: tabular-nums; }
.sb-nextbar .btn { margin-left: 0; }
@media (max-width: 640px) {
  .sbp-list { max-height: none; }
  .sc-side-tab { flex: 1 1 auto; text-align: center; }
}

/* ---------- 剧本页：集目录 + 场内切换 chips（老板：左边应该是集数，场是集里面的） ---------- */
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.sc-chip {
  display: inline-flex; align-items: baseline; gap: 4px; cursor: pointer;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 12px; color: #4b5563; white-space: nowrap;
}
.sc-chip:hover { border-color: var(--teal); color: var(--teal); }
.sc-chip.active { background: #EEF7F4; border-color: var(--teal); color: #2f6b5c; font-weight: 600; }
.sc-chip-no { font-variant-numeric: tabular-nums; }
.sc-chip-w { font-size: 11px; color: #9aa5a1; }
.sc-chip.active .sc-chip-w { color: #2f6b5c; }
.sc-hintbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 8px; padding: 8px 10px; border: 1px solid #F0DCB4; border-radius: 10px;
  background: #FDF8EC; color: #8a6d3b; font-size: 12.5px;
}
.sc-hintbar b { color: #7a5c22; }
.sb-prompt .sc-pre { max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* ---------- 剧本页：正文下方的「生成分镜」主行动条（老板找不到按钮） ---------- */
.sc-genbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(180deg, #F2FAF7, #EAF5F1); border: 1px solid #CFE5DD;
}
.sc-genbar-tip { font-size: 12.5px; color: #4b6b60; line-height: 1.6; flex: 1 1 220px; }
.btn.btn-primary.sc-genb { font-size: 14px; padding: 11px 20px; font-weight: 600; box-shadow: 0 2px 6px rgba(31,122,102,.18); }
.btn.btn-primary.sc-genb[disabled] { opacity: .7; cursor: progress; }
@media (max-width: 720px) {
  .sc-genbar { padding: 10px; }
  .btn.btn-primary.sc-genb { width: 100%; padding: 13px 16px; font-size: 15px; }
  .sc-genbar-tip { flex: 1 1 100%; font-size: 12px; }
}

/* ---------- 剧本页顶栏：只有「生成分镜」是实心主行动，其余改描边，避免一片蓝 ---------- */
.lit-head .btn:not(.btn-primary) {
  background: #fff; color: var(--teal); border-color: #C9DEF5;
  box-shadow: none; font-weight: 500;
}
.lit-head .btn:not(.btn-primary):hover {
  background: #F4F9FF; border-color: var(--teal); box-shadow: none;
}
.lit-head .btn.btn-primary { box-shadow: 0 3px 12px rgba(59, 130, 246, .3); }
@media (max-width: 760px) {
  .lit-head .btn:not(.btn-primary) { font-size: 12.5px; padding: 8px 14px; }
  .lit-head .btn.btn-primary { flex: 1 1 100%; justify-content: center; font-size: 15px; padding: 13px 16px; }
}

/* ================= 剧本页布局 v2：两栏（正文 + 侧栏），集改成正文上方一条 ================= */
.desk2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1080px) { .desk2 { grid-template-columns: 1fr; } }

/* 集：一行胶囊，不再占一栏 */
.sc-epbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); }
.sc-epbar-lbl { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.sc-epchips { margin: 0; gap: 6px; }
.sc-chip.sc-epchip { font-weight: 500; }
.sc-chip.sc-epnew { padding: 4px 10px; font-weight: 700; color: var(--teal); border-style: dashed; }

/* 手机：写剧本 / 分镜脚本 二选一 */
.sc-mobtabs { display: none; }
@media (max-width: 760px) {
  .sc-mobtabs { display: flex; gap: 8px; margin: 0 0 10px; position: sticky; top: 0; z-index: 5; }
  .sc-mobtab {
    flex: 1 1 0; padding: 10px 8px; border: 1px solid #C9DEF5; border-radius: 10px;
    background: #fff; color: var(--teal); font-size: 13.5px; font-weight: 600; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sc-mobtab.on { background: var(--teal); border-color: var(--teal); color: #fff; }
  .sc-desk2[data-pane="mid"] .sc-side { display: none !important; }
  .sc-desk2[data-pane="side"] .desk-mid { display: none !important; }
}

/* 2026-11-21 剧本页砍掉右侧栏后改单栏，正文占满，不留 340px 空列 */
.sc-desk2 { grid-template-columns: minmax(0, 1fr) !important; }

/* 分镜条目：先看画面，标签/秒数/锁 收到底部一行 */
.sbp-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; padding: 9px 10px; }
.sbp-no { align-self: start; }
.sbp-body { min-width: 0; }
.sbp-desc { -webkit-line-clamp: unset; display: block; font-size: 13px; line-height: 1.6; }
.sbp-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: nowrap; }
.sbp-foot .sbp-size { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #EFF2F1; color: #5b6663; }
.sbp-foot .sbp-move { font-size: 11.5px; color: #8a938f; }
.sbp-sp { flex: 1 1 auto; }
.sbp-foot .sbp-dur { width: 46px; text-align: center; }
@media (max-width: 760px) {
  .sbp-desc { font-size: 13.5px; }
  .sbp-foot .sbp-dur { width: 52px; height: 32px; }
  .sbp-foot .sbp-lock { min-width: 44px; padding: 6px 8px; font-size: 12px; }
}

/* 手机顶栏收纳：只留「返回 + 生成分镜 + 更多」 */
.sc-only-mob { display: none !important; }
@media (max-width: 760px) {
  .sc-hide-mob { display: none !important; }
  .sc-only-mob { display: inline-flex !important; }
  .lit-head { align-items: flex-start; gap: 8px; }
  .lit-head h2.sec { font-size: 20px; }
}
.sc-menu { display: flex; flex-direction: column; gap: 8px; }
.sc-menu .btn { width: 100%; justify-content: center; }

/* 桌面：右侧面板跟手，滚正文时一直看得见 */
@media (min-width: 1081px) {
  .sc-desk2 .sc-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
}

/* 手机：外层「写剧本 / 分镜 / 资料」已经管切换，内层页签收起来 */
@media (max-width: 760px) {
  .sc-desk2 .sc-side-tabs { display: none; }
  .sc-mobtab { font-size: 13px; padding: 10px 6px; }
}

/* ---------- 剧本库：一部剧一张卡（集 / 场 / 字 总数） ---------- */
.script-series .card-body { padding-bottom: 12px; }
.series-title { display: flex; align-items: center; gap: 6px; }
.mini-edit {
  border: 1px solid var(--line); background: #fff; color: #9aa5a1;
  border-radius: 6px; padding: 1px 7px; font-size: 12px; line-height: 1.5; cursor: pointer;
}
.mini-edit:hover { color: var(--teal); border-color: var(--teal); }
.series-nums { font-size: 13px; color: #4b5563; margin: 8px 0 9px; }
.series-nums b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-ep-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.sc-ep-pill { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #F2F6F5; color: #5b6663; white-space: nowrap; }
.sc-ep-pill b { margin-left: 4px; font-weight: 600; color: #98a29e; }
/* 分镜库的集胶囊：按分镜状态着色，可点进分镜表 */
.sb-pill { cursor: pointer; }
.sb-pill:hover { filter: brightness(0.95); }
.sb-pill.bd-final { background: #E5F3EC; color: #1f7a4d; }
.sb-pill.bd-final b { color: #1f7a4d; }
.sb-pill.bd-draft { background: #EAF1FA; color: #2c5fa8; }
.sb-pill.bd-draft b { color: #2c5fa8; }
.sb-pill.bd-none { opacity: 0.62; }
.series-acts { display: flex; gap: 8px; margin-top: 10px; }
.series-acts .btn { flex: 1 1 0; justify-content: center; padding: 7px 10px; font-size: 12.5px; box-shadow: none; }
.sc-ep-no { font-size: 13px; color: var(--tan); margin-left: 8px; font-weight: 500; }
@media (max-width: 640px) {
  .series-acts .btn { font-size: 13px; padding: 9px 10px; }
}

/* 顶栏按钮别竖排断字（「← 文学创作」被挤成竖排） */
.lit-head .btn { white-space: nowrap; flex: 0 0 auto; }
.mini-edit { white-space: nowrap; font-weight: 500; }

/* 资产库倒序 + 最新标记（2026-11-19 00:46 老板要求：进库就知道有没有新的） */
.ast-new {
  display: inline-block;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: #1F6FEB;
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  vertical-align: 1px;
  letter-spacing: .5px;
}

/* ================== 素材获取 · 三标签 + 视频采集器（2026-11-22） ================== */
.mat-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.mat-tab {
  padding: 9px 26px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 14px; color: var(--tan);
  transition: all .15s ease;
}
.mat-tab:hover { border-color: var(--teal); color: var(--teal); }
.mat-tab.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.mat-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 14px 4px; }

/* 采集框（初始态） */
.cap-drop {
  border: 2px dashed var(--line); border-radius: var(--r-lg);
  background: #fff; padding: 64px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.cap-drop.hover, .cap-drop:hover { border-color: var(--teal); background: var(--teal-soft); }
.cap-drop-ico { font-size: 40px; color: var(--muted); margin-bottom: 12px; }
.cap-drop-t1 { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.cap-drop-t2 { font-size: 13.5px; color: var(--tan); }
.cap-drop-t3 { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* 播放器 */
.cap-stage { margin-top: 4px; }
.cap-framebox { background: #0b1220; border-radius: var(--r-lg); padding: 18px; display: flex; justify-content: center; }
.cap-aspect { position: relative; max-width: 100%; }
.cap-aspect video { display: block; width: 100%; height: 100%; background: #000; }
.cap-aspect canvas {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
}
.cap-aspect canvas.cropping { cursor: crosshair; }
.cap-mark {
  position: absolute; top: 8px; transform: translateX(-50%);
  background: var(--teal); color: #fff; font-size: 11px; line-height: 1;
  padding: 4px 7px; border-radius: 999px; pointer-events: none; z-index: 3;
}
.cap-mark-end { background: var(--danger); }
.cap-status { font-size: 12.5px; color: var(--muted); margin: 10px 2px; min-height: 18px; }
.cap-controls { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.cap-controls input[type="range"] { flex: 1; accent-color: var(--teal); }
.cap-time { font-size: 12px; color: var(--tan); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cap-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  width: 34px; height: 34px; cursor: pointer; font-size: 13px; color: var(--ink);
}
.cap-btn:hover { border-color: var(--teal); color: var(--teal); }
.cap-btn.sm { width: auto; padding: 0 12px; font-size: 12px; }
.cap-fps { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 12.5px; }

/* 工具行 / 条 */
.cap-tools { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.cap-tool {
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 13.5px; color: var(--ink);
}
.cap-tool:hover { border-color: var(--teal); color: var(--teal); }
.cap-tool.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.cap-tool.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.cap-tool.primary:disabled { background: var(--mist); color: var(--muted); border-color: var(--line); }
.cap-tool.ghost { color: var(--muted); }
.cap-cropbar, .cap-clipbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
}
.cap-bar-label { font-size: 13px; color: var(--tan); }
.cap-bar-info { font-size: 12.5px; color: var(--teal-dark); flex: 1; min-width: 120px; }
.cap-cat {
  padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 12.5px; color: var(--tan);
}
.cap-cat.active { background: var(--tan); color: #fff; border-color: var(--tan); }
.cap-precise { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

/* 本次采集记录 */
.cap-log { margin-top: 18px; }
.cap-log-head { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.cap-log-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cap-log-item {
  width: 150px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; overflow: hidden;
}
.cap-log-item img, .cap-log-item video {
  width: 100%; height: 84px; object-fit: cover; display: block; background: #0b1220;
}
.cap-log-name {
  font-size: 11px; color: var(--tan); padding: 6px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 来源大类行（采集 / AI生成，老板 2026-11-22 定） */
.mt-chips-s { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-left: 10px; border-left: 1px solid var(--line); }
.mt-chips-s .mt-chip.on { background: var(--tan); color: #fff; border-color: var(--tan); }
@media (max-width: 900px) { .mt-chips-s { border-left: none; padding-left: 0; } }

/* 本地上传 · 暂存预览列表 */
.lu-list { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.lu-item {
  width: 168px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; overflow: hidden; position: relative;
}
.lu-item.ok { border-color: #7bc47f; }
.lu-item.fail { border-color: var(--danger); }
.lu-item.sending { opacity: .7; }
.lu-thumb { width: 100%; height: 110px; background: #0b1220; display: flex; align-items: center; justify-content: center; }
.lu-thumb img, .lu-thumb video { width: 100%; height: 110px; object-fit: cover; display: block; }
.lu-audio { font-size: 42px; color: var(--muted); }
.lu-name {
  font-size: 11.5px; color: var(--ink); padding: 6px 8px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lu-size { font-size: 10.5px; color: var(--muted); padding: 2px 8px 8px; }
.lu-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: none; border-radius: 50%; background: rgba(10,14,16,.6); color: #fff;
  cursor: pointer; font-size: 11px; line-height: 1;
}
.lu-del:hover { background: var(--danger); }
.lu-mark {
  position: absolute; top: 6px; right: 6px; font-size: 11px; line-height: 1;
  padding: 4px 8px; border-radius: 999px; background: rgba(10,14,16,.6); color: #fff;
}
.lu-mark.ok { background: #3f9d44; }
.lu-mark.fail { background: var(--danger); }
