/* MovieCap 界面样式：苹果式简洁风格，浅色 / 深色两套配色（<html data-theme>，由 ui.js 按偏好或系统外观设置）。
   颜色一律用下面的变量；新写的样式不要再写死颜色。画面、缩略图上的叠加文字例外（底下是画面，两种外观都一样）。 */

/* ============ 配色 ============ */
:root {
  color-scheme: light;
  --bg: #f5f5f7;                       /* 窗口底色（客户端窗口、ui.js 同步用这个值） */
  --surface: #ffffff;                  /* 卡片、栏 */
  --surface-2: #f5f5f7;                /* 卡片里的二级块 */
  --raised: #ffffff;                   /* 对话框、弹出层 */
  --field: #ffffff;                    /* 输入框 */
  --field-line: rgba(0, 0, 0, .14);
  --seg-on: #ffffff;                   /* 分段控件选中块 */
  --fill: rgba(120, 120, 128, .12);    /* 普通按钮、控件底 */
  --fill-2: rgba(120, 120, 128, .2);
  --fill-3: rgba(120, 120, 128, .07);  /* 悬停、标签底 */
  --line: rgba(0, 0, 0, .08);          /* 分隔线 */
  --line-2: rgba(0, 0, 0, .14);
  --card-line: rgba(0, 0, 0, .05);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 18px rgba(0, 0, 0, .04);
  --pop-shadow: 0 14px 40px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .06);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --accent-tint: rgba(0, 113, 227, .1);
  --accent-line: rgba(0, 113, 227, .35);
  --accent-ring: rgba(0, 113, 227, .28);
  --green: #34c759;  --green-text: #248a3d;  --green-tint: rgba(52, 199, 89, .14);
  --orange: #ff9500; --orange-text: #c93400; --orange-tint: rgba(255, 149, 0, .13);
  --red: #ff3b30;    --red-text: #d70015;    --red-tint: rgba(255, 59, 48, .1);
  --purple: #af52de; --purple-text: #8944ab; --purple-tint: rgba(175, 82, 222, .12);
  --yellow: #ffcc00; --yellow-text: #8a6100; --yellow-tint: rgba(255, 204, 0, .2);
  --blue-tint: rgba(0, 122, 255, .1);
  --toolbar: rgba(245, 245, 247, .8);
  --toolbar-solid: #f5f5f7;
  --sidebar: #ececf0;                  /* 侧边栏 */
  --sidebar-sel: rgba(0, 0, 0, .07);   /* 侧边栏选中项 */
  --menu-bg: rgba(250, 250, 252, .86);
  --hud: rgba(255, 255, 255, .88);
  --backdrop: rgba(0, 0, 0, .2);
  --scroll-thumb: rgba(0, 0, 0, .22);
  --scroll-thumb-hover: rgba(0, 0, 0, .36);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  /* 时间线色块：g 对上 / y 建议看 / r 必看 / o 原片；n 解说 a 空 d 原声 s 字幕 b 留白 */
  --tl-g: #34c759; --tl-y: #ff9f0a; --tl-r: #ff3b30; --tl-o: #af52de;
  --tl-n: #007aff; --tl-a: #c7c7cc; --tl-d: #5856d6; --tl-s: #ffcc00; --tl-b: #8944ab;
  --tl-ink: rgba(255, 255, 255, .95);
  --radius: 12px; --radius-lg: 16px; --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* 旧变量名：app.js 的内联样式里用到 */
  --ok: var(--green-text); --warn: var(--orange-text); --bad: var(--red-text); --pri: var(--accent); --muted: var(--text-2);
  --panel: var(--surface); --panel2: var(--surface-2);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121214;
  --surface: #1c1c1e;
  --surface-2: #252527;
  --raised: #2c2c2e;
  --field: #2a2a2d;
  --field-line: rgba(255, 255, 255, .1);
  --seg-on: #636366;
  --fill: rgba(120, 120, 128, .24);
  --fill-2: rgba(120, 120, 128, .34);
  --fill-3: rgba(120, 120, 128, .14);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --card-line: rgba(255, 255, 255, .07);
  --card-shadow: none;
  --pop-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  --text: #f5f5f7;
  --text-2: #98989d;
  --text-3: #6e6e73;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-text: #409cff;
  --accent-tint: rgba(10, 132, 255, .18);
  --accent-line: rgba(10, 132, 255, .5);
  --accent-ring: rgba(10, 132, 255, .45);
  --green: #30d158;  --green-text: #30d158;  --green-tint: rgba(48, 209, 88, .15);
  --orange: #ff9f0a; --orange-text: #ffb340; --orange-tint: rgba(255, 159, 10, .15);
  --red: #ff453a;    --red-text: #ff6961;    --red-tint: rgba(255, 69, 58, .15);
  --purple: #bf5af2; --purple-text: #da8fff; --purple-tint: rgba(191, 90, 242, .17);
  --yellow: #ffd60a; --yellow-text: #ffd60a; --yellow-tint: rgba(255, 214, 10, .13);
  --blue-tint: rgba(10, 132, 255, .16);
  --toolbar: rgba(18, 18, 20, .78);
  --toolbar-solid: #121214;
  --sidebar: #1a1a1c;
  --sidebar-sel: rgba(255, 255, 255, .08);
  --menu-bg: rgba(44, 44, 46, .86);
  --hud: rgba(44, 44, 46, .9);
  --backdrop: rgba(0, 0, 0, .45);
  --scroll-thumb: rgba(255, 255, 255, .2);
  --scroll-thumb-hover: rgba(255, 255, 255, .34);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398989d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  --tl-g: #248a3d; --tl-y: #c26a00; --tl-r: #c9271e; --tl-o: #8944ab;
  --tl-n: #0a6fd6; --tl-a: #48484a; --tl-d: #4f4dc7; --tl-s: #a88400; --tl-b: #6e3a96;
  --tl-ink: rgba(255, 255, 255, .88);
}

/* ============ 基础 ============ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* 组件自己写了 display 时，hidden 属性也要生效 */
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: var(--accent-ring); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a.btn:hover, .brand:hover, .studio-link:hover, .back:hover, .g-nav a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { color: var(--text); }
h2 { margin: 0 0 14px; font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--text-2); }
code, kbd { font-family: var(--mono); font-size: .92em; background: var(--fill-3); padding: 1px 5px; border-radius: 5px; }
details summary { cursor: pointer; color: var(--text-2); }
details summary:hover { color: var(--text); }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.os-other ::-webkit-scrollbar { width: 12px; height: 12px; }
.os-other ::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 12px; border: 3px solid transparent; background-clip: content-box; }
.os-other ::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
.os-other ::-webkit-scrollbar-track, .os-other ::-webkit-scrollbar-corner { background: transparent; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* 线条图标（ui.js 的 ico()） */
.ico { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.tag .ico { width: 12px; height: 12px; stroke-width: 2; vertical-align: -2px; }
.kv .ico, .hint .ico, .muted .ico, .cast-banner .ico, .tl-warn .ico, .qa-issues .ico, .deliver-files .ico { width: 14px; height: 14px; vertical-align: -2.5px; }

/* ============ 外壳：侧边栏 + 工具栏（桌面应用布局） ============ */
/* 资料库页面（首页、影片、风格库……）：左边侧边栏导航，右边工具栏 + 内容。
   工作区（打开副本，html.ws）：隐藏侧边栏，工具栏横跨整个窗口，放返回、标题、标签和导出——剪映的编辑界面也是这样 */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; width: 220px; flex: 0 0 220px; display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto; z-index: 30; }
.sb-head { height: 52px; flex: 0 0 52px; display: flex; align-items: center; padding: 0 16px; }
.sb-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.sb-brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; display: block; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; }
.sb-nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.sb-nav a:hover { background: var(--fill-3); text-decoration: none; }
.sb-nav a .ico { width: 18px; height: 18px; color: var(--text-2); }
.sb-nav a.on { background: var(--sidebar-sel); }
.sb-nav a.on .ico { color: var(--accent); }
.sb-label { margin: 16px 10px 4px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.sb-foot { padding: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.sb-models { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; font-size: 12px; color: var(--text-2); }
.sb-models:hover { background: var(--fill-3); text-decoration: none; color: var(--text); }
.sb-models .dot { width: 7px; height: 7px; flex: 0 0 7px; }
.sb-me-row { display: flex; align-items: center; gap: 2px; }
.sb-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; }
.sb-me .me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; color: var(--text); }
.sb-me .me:hover { background: var(--fill-3); text-decoration: none; }
.avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6); color: #fff; font-size: 13px; font-weight: 600; }
.sb-me .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sb-me .who b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-me .who small { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sb-conn { font-size: 11px; color: var(--text-3); padding: 0 10px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-conn:empty { display: none; }
.sb-conn .dot { width: 6px; height: 6px; margin-right: 5px; vertical-align: 1px; }
/* 客户端有新版本：侧边栏底部的小提示（点了进账户页“我的电脑”的“本机客户端”） */
.sb-update { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 500;
  color: var(--accent-text); background: var(--accent-tint); white-space: nowrap; overflow: hidden; }
.sb-update[hidden] { display: none; }
.sb-update span { overflow: hidden; text-overflow: ellipsis; }
.sb-update .ico { width: 14px; height: 14px; }
.sb-update:hover { text-decoration: none; filter: brightness(1.06); }
/* 账户页“我的电脑”：本机客户端的版本、检查更新、状态 */
.client-update { margin: 2px 0 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--fill-3); }
.cu-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.cu-status { font-size: 12.5px; color: var(--text-2); min-width: 0; }
.cu-actions { margin-left: auto; display: flex; gap: 8px; }
.cu-status.ok { color: var(--green-text); }
.cu-status.info { color: var(--accent-text); }
.cu-status.warn { color: var(--orange-text); }
.cu-status.bad { color: var(--red-text); }
.cu-progress { margin-top: 8px; max-width: 420px; }
.client-update.flash { animation: cu-flash 1.4s ease-out; }
@keyframes cu-flash { 0% { box-shadow: 0 0 0 3px var(--accent-ring); } 100% { box-shadow: 0 0 0 3px transparent; } }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.toolbar { position: sticky; top: 0; z-index: 20; height: 52px; flex: 0 0 52px; display: flex; align-items: center; gap: 12px; padding: 0 20px 0 24px;
  background: var(--toolbar); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.tb-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 0; }
.tb-center { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tb-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 1 1 0; min-width: 0; }
.tb-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tb-sub { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tb-back { flex: 0 0 auto; }
.tb-crumb { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.tb-crumb:hover { color: var(--text); text-decoration: none; }
.tb-sep { color: var(--text-3); font-size: 13px; }
.tb-right .btn { flex: 0 0 auto; }
main { padding: 24px 28px 56px; width: 100%; max-width: 1680px; margin: 0 auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 30px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); cursor: pointer; transition: background-color .15s, color .15s; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--fill); color: var(--text); text-decoration: none; }
.icon-btn .ico { width: 17px; height: 17px; }
/* 工作区：隐藏侧边栏 */
html.ws .sidebar { display: none; }
html.ws .toolbar { padding-left: 12px; }
/* 桌面客户端：侧边栏顶部和工具栏就是标题栏（可拖动窗口）。
   macOS 红绿灯在侧边栏顶部（工作区里在工具栏左边），Windows 窗口按钮叠在工具栏右边 */
.mc-client .sb-head, .mc-client .toolbar { -webkit-app-region: drag; -webkit-user-select: none; user-select: none; }
.mc-client .sb-head a, .mc-client .toolbar a, .mc-client .toolbar button, .mc-client .toolbar input, .mc-client .toolbar select,
.mc-client .toolbar label, .mc-client .toolbar .badge { -webkit-app-region: no-drag; }
/* 浮层盖到标题栏上时，那一块不能被当成拖窗口的区域 */
.mc-client .mc-menu, .mc-client .mc-sheet-back, .mc-client #toast div, .mc-client .tl-drag-tip { -webkit-app-region: no-drag; }
.mc-client.mc-darwin:not(.mc-fullscreen) .sb-head { padding-left: 84px; }
.mc-client.mc-darwin:not(.mc-fullscreen).ws .toolbar { padding-left: 84px; }
.mc-client.mc-win32 .toolbar { padding-right: 150px; background: var(--toolbar-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ============ 布局 ============ */
.panel:has(> table.vers), .panel:has(> table.mini) { overflow-x: auto; }  /* 宽表格（单元格不换行）在面板里横向滚动，不撑破页面 */
.panel { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--card-shadow); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-lg); padding: 16px; cursor: pointer;
  box-shadow: var(--card-shadow); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--pop-shadow); }
.card .title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.space { flex: 1; }
.form { display: grid; grid-template-columns: 140px 1fr; gap: 14px 16px; align-items: start; max-width: 980px; }
.form label.l { color: var(--text-2); padding-top: 6px; text-align: right; font-size: 13px; }
.hint { color: var(--text-2); font-size: 12px; margin-top: 4px; line-height: 1.55; }
.empty { text-align: center; padding: 72px 20px; color: var(--text-2); line-height: 1.8; }
.hide { display: none !important; }

/* ============ 按钮 ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
  -webkit-user-select: none; user-select: none; transition: background-color .15s, color .15s, box-shadow .15s, opacity .15s; }
.btn:hover { background: var(--fill-2); }
.btn:active { opacity: .82; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--fill); }
.btn.small { height: 26px; padding: 0 11px; font-size: 12px; gap: 4px; }
.btn.danger { color: var(--red-text); }
.btn.destructive { background: var(--red); color: #fff; }
.btn.destructive:hover { background: var(--red); filter: brightness(1.08); }
.btn:disabled, .btn[disabled] { opacity: .4; cursor: default; }
.btn .ico { width: 15px; height: 15px; }
.btn.small .ico { width: 14px; height: 14px; }
label.btn input[type=file] { display: none; }

/* ============ 输入 ============ */
input[type=text], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=email], input[type=url],
input:not([type]), textarea, select {
  width: 100%; background: var(--field); color: var(--text); border: 1px solid var(--field-line); border-radius: var(--radius-sm);
  padding: 6px 10px; font: inherit; font-size: 13px; line-height: 1.45; outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); outline: none; }
input:disabled, textarea:disabled, select:disabled { opacity: .55; }
textarea { resize: vertical; line-height: 1.6; }
textarea.drop { border-color: var(--accent); background: var(--accent-tint); }
select { -webkit-appearance: none; appearance: none; padding-right: 28px; cursor: pointer;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 8px center; background-size: 13px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input[type=file] { font: inherit; font-size: 12px; color: var(--text-2); }
input[type=file]::file-selector-button { margin-right: 10px; height: 28px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--fill);
  color: var(--text); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--fill-2); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 220px; height: 22px; background: transparent; vertical-align: middle; cursor: pointer; padding: 0; border: 0; }
input[type=range]:focus { box-shadow: none; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent)) 0 / var(--range-pct, 0%) 100% no-repeat, var(--fill-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .15), 0 2px 5px rgba(0, 0, 0, .22); }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent-ring), 0 2px 5px rgba(0, 0, 0, .22); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill-2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .15), 0 2px 5px rgba(0, 0, 0, .22); }

/* 分段控件 */
.seg-tabs { display: inline-flex; padding: 2px; gap: 2px; background: var(--fill); border-radius: 9px; }
.seg-tabs button { background: transparent; color: var(--text); border: 0; padding: 4px 14px; border-radius: 7px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: background-color .15s, box-shadow .15s; }
.seg-tabs button:hover:not(.on) { background: var(--fill-3); }
.seg-tabs button.on { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }

/* ============ 状态 ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: var(--fill-3); color: var(--text-2); white-space: nowrap; border: 0; line-height: 1; }
.badge.ok { background: var(--green-tint); color: var(--green-text); }
.badge.off { background: var(--orange-tint); color: var(--orange-text); }
.badge.warn { background: var(--orange-tint); color: var(--orange-text); }  /* 等待客户端上线 */
.badge.bad { background: var(--red-tint); color: var(--red-text); }
.progress { height: 6px; background: var(--fill); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.stages { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stage { display: grid; grid-template-columns: 22px 110px 1fr; gap: 8px; align-items: center; padding: 5px 0; }
.stage .msg { grid-column: 3; font-size: 12px; color: var(--text-2); }
.stage .err { grid-column: 2 / 4; font-size: 12px; color: var(--red-text); white-space: pre-wrap; word-break: break-all; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--fill-2); }
.dot.done { background: var(--green); }
.dot.running { background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
.dot.error { background: var(--red); }
.dot.stale { background: var(--orange); }
.dot.waiting { background: var(--orange); animation: pulse 1.6s ease-in-out infinite; }  /* 等待客户端上线 */
@keyframes pulse { 50% { opacity: .35; } }
.err-line { color: var(--red-text); }
.banner { display: block; padding: 11px 14px; border-radius: var(--radius); background: var(--orange-tint); border: 0; color: var(--text);
  margin-bottom: 14px; font-size: 13px; line-height: 1.6; }
.banner.bad { background: var(--red-tint); }
.banner.info { background: var(--accent-tint); }
.banner.ok { background: var(--green-tint); }
.banner .btn { margin-left: 6px; vertical-align: middle; }

/* 提示条（右下角浮出） */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 900; pointer-events: none; }
#toast div { max-width: min(640px, calc(100vw - 40px)); background: var(--hud); color: var(--text); border: 1px solid var(--line); padding: 9px 16px; border-radius: 12px;
  box-shadow: var(--pop-shadow); font-size: 13px; font-weight: 500; line-height: 1.5; pointer-events: auto;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); animation: mc-pop-in .22s ease-out; }
#toast div.err { color: var(--red-text); }
@keyframes mc-pop-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ============ 弹出菜单、对话框（ui.js） ============ */
.mc-menu { position: fixed; z-index: 950; min-width: 172px; padding: 5px; background: var(--menu-bg); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: var(--pop-shadow); font-size: 13px; -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  animation: mc-menu-in .12s ease-out; }
@keyframes mc-menu-in { from { opacity: 0; transform: translateY(-4px); } }
.mc-menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 10px 0 6px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: default; outline: none; }
.mc-menu button:hover, .mc-menu button:focus-visible { background: var(--accent); color: #fff; }
.mc-menu .mi-check { display: inline-flex; width: 14px; visibility: hidden; }
.mc-menu .mi-check .ico { width: 13px; height: 13px; stroke-width: 2.4; }
.mc-menu [aria-checked="true"] .mi-check { visibility: visible; }
.mc-menu .mi-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.mc-menu .mi-title { padding: 4px 10px 3px 26px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.mc-sheet-back { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 16vh 20px 20px;
  background: var(--backdrop); opacity: 0; transition: opacity .16s ease; }
.mc-sheet-back.on { opacity: 1; }
.mc-sheet { width: min(420px, 100%); background: var(--raised); border-radius: 14px; padding: 20px 20px 16px; box-shadow: var(--pop-shadow), 0 0 0 1px var(--line);
  transform: scale(.96); transition: transform .18s cubic-bezier(.2, .9, .3, 1.2); }
.mc-sheet-back.on .mc-sheet { transform: none; }
.mc-sheet-title { font-size: 15px; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; word-break: break-word; }
.mc-sheet-msg { margin-top: 6px; font-size: 13px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.mc-sheet-input { margin-top: 14px; }
.mc-sheet-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.mc-sheet-btns .btn { min-width: 76px; }

/* ============ 处理阶段 ============ */
details.mstages { font-size: 12px; margin-top: 2px; }
details.mstages summary { width: fit-content; }
.stages-one { max-width: 640px; padding-top: 4px; }
.analyzing { display: flex; gap: 10px; align-items: center; }
.analyzing .progress { flex: 0 1 260px; }

/* ============ 剪辑台 ============ */
/* 高度填满窗口：工具栏 52 + 上边距 14 + 副本参数栏约 86 + 间距 12，下面留 16（窄窗口参数栏折成三行，见窄屏规则） */
.editor { display: grid; grid-template-columns: 400px 1fr 440px; gap: 16px; height: calc(100vh - 180px); min-height: 520px; }
.col { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 0;
  box-shadow: var(--card-shadow); overflow: hidden; }
.col-head { padding: 9px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 48px; }
.col-head b, .col-head strong { font-weight: 600; }
.col-body { overflow: auto; flex: 1; padding: 8px; }
.seg { padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; margin-bottom: 2px; display: grid;
  grid-template-columns: 12px 1fr; gap: 8px; transition: background-color .12s; }
.seg:hover { background: var(--fill-3); }
.seg.sel { background: var(--accent-tint); border-color: var(--accent-line); }
.seg.playing { box-shadow: inset 3px 0 0 var(--accent); }
.seg .meta { font-size: 11px; color: var(--text-2); display: flex; gap: 6px; margin-top: 3px; flex-wrap: wrap; align-items: center; }
.seg.removed-breath { opacity: .55; border-style: dashed; border-color: var(--line-2); cursor: default; }
.seg.removed-breath .restore-breath { margin-left: 6px; }
.conf { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; }
.conf.g { background: var(--green); } .conf.y { background: var(--orange); } .conf.r { background: var(--red); } .conf.o { background: var(--purple); }
.tag { display: inline-flex; align-items: center; gap: 3px; height: 18px; font-size: 11px; font-weight: 500; padding: 0 7px; border-radius: 999px;
  background: var(--fill-3); color: var(--text-2); white-space: nowrap; line-height: 1; }
.tag.hook { background: var(--yellow-tint); color: var(--yellow-text); }
.tag.orig { background: var(--purple-tint); color: var(--purple-text); }
.tag.lock { background: var(--green-tint); color: var(--green-text); }
.tag.follow { background: var(--blue-tint); color: var(--accent-text); }
.tag.used { background: var(--orange-tint); color: var(--orange-text); }
.tag.comp { background: var(--red-tint); color: var(--red-text); }
.player { background: #000; border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.player .ov-sub { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-size: 22px; font-weight: 700;
  color: #fff; text-shadow: 0 0 4px #000, 0 0 2px #000, 1px 1px 2px #000; pointer-events: none; padding: 0 20px; }
.player .ov-tc { position: absolute; left: 10px; top: 8px; font-size: 12px; color: #fff; background: rgba(0, 0, 0, .5); padding: 2px 8px; border-radius: 6px;
  font-variant-numeric: tabular-nums; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.thumb { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; position: relative;
  transition: box-shadow .15s, border-color .15s; }
.thumb:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumb.cur { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.thumb.unusable img { opacity: .45; }
.thumb img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; background: #000; }
.thumb .cap { padding: 5px 7px; font-size: 11px; color: var(--text-2); line-height: 1.4; }
.thumb .tc, .bthumb .tc { position: absolute; top: 4px; left: 4px; font-size: 10px; color: #fff; background: rgba(0, 0, 0, .6); padding: 0 5px; border-radius: 4px;
  font-variant-numeric: tabular-nums; }
.thumb .sc, .bthumb .sc { position: absolute; top: 4px; right: 4px; font-size: 10px; color: #fff; background: rgba(10, 132, 255, .88); padding: 0 5px; border-radius: 4px; }
.thumb .use { position: absolute; right: 5px; bottom: 34px; display: none; }
.thumb:hover .use { display: inline-flex; }
.section { border-top: 1px solid var(--line); padding: 12px 2px; }
.section:first-child { border-top: 0; }
.kv { font-size: 12px; color: var(--text-2); margin: 3px 0; line-height: 1.6; }
.kv b { color: var(--text); font-weight: 500; }
details.kv summary { cursor: pointer; }
.flag-why { font-size: 12px; padding: 6px 10px; border-radius: 8px; margin-top: 6px; line-height: 1.55; }
.flag-why.red { background: var(--red-tint); color: var(--red-text); }
.flag-why.yellow { background: var(--yellow-tint); color: var(--yellow-text); }
.qa-issues { font-size: 12px; max-height: 120px; overflow: auto; }
.qa-issues div { padding: 2px 0; cursor: pointer; }
.qa-issues div:hover { color: var(--accent-text); }
video.rendered { width: 100%; max-height: 70vh; background: #000; border-radius: var(--radius); }

/* 剪辑台底部的小时间线（每句一段） */
.tl-bar { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.tl-col { flex: 1; min-width: 0; }
.tl-mini { position: relative; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--fill); cursor: pointer; visibility: hidden; touch-action: none; }
.tl-mini.on { visibility: visible; }
.tl-mini > div { position: absolute; top: 0; bottom: 0; min-width: 4px; border-radius: 3px; background: var(--text-3); cursor: grab; }
.tl-mini.grabbing > div { cursor: grabbing; background: var(--text-2); }
/* 不显示原生滚动条：macOS 的覆盖式滚动条会盖住片段下半截，点那里变成“翻页”而不是选句。
   左右移动靠拖动、滚轮/触控板和下方总览条（可点、可拖） */
.tl-wrap { position: relative; min-width: 0; overflow-x: auto; overflow-y: hidden; border-radius: 8px; user-select: none; scrollbar-width: none; background: var(--fill-3); }
.tl-wrap::-webkit-scrollbar, .os-other .tl-wrap::-webkit-scrollbar { display: none; }
.tl-wrap.zoomed { cursor: grab; }
.tl-wrap.grabbing, .tl-wrap.grabbing .timeline div { cursor: grabbing; }
.tl-ctrl { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.tl-ctrl .btn { padding: 0 8px; }
.tl-ctrl #tlz { font-size: 12px; min-width: 32px; text-align: center; color: var(--text-2); font-variant-numeric: tabular-nums; }
.timeline { display: flex; height: 26px; min-width: 100%; }
/* 每段宽度只按时长分配（min-width:0 + 容器查询），段内编号放得下才显示 */
.timeline div { height: 100%; min-width: 0; overflow: hidden; border-right: 1px solid var(--surface); cursor: pointer; container-type: inline-size; }
.timeline div span { display: block; margin-left: 4px; font-size: 10px; line-height: 26px; color: var(--tl-ink); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
@container (max-width: 34px) { .timeline div span { display: none; } }
.timeline div.g { background: var(--tl-g); } .timeline div.y { background: var(--tl-y); } .timeline div.r { background: var(--tl-r); }
.timeline div.o { background: var(--tl-o); } .timeline div.sel { outline: 2px solid var(--text); outline-offset: -2px; }

/* 分镜：一条完整时间轴，中间竖条可拖拽调整相邻两段时长 */
.split-bar { position: relative; display: flex; width: 100%; height: 96px; margin-top: 8px; border-radius: 10px; overflow: hidden; background: #000;
  border: 1px solid var(--line); user-select: none; }
.sp-piece { position: relative; height: 100%; overflow: hidden; }
.sp-piece img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.sp-tc { position: absolute; left: 5px; top: 4px; font-size: 10px; color: #fff; background: rgba(0, 0, 0, .6); padding: 0 5px; border-radius: 4px; }
.sp-dur { position: absolute; left: 5px; bottom: 4px; font-size: 11px; background: rgba(0, 0, 0, .6); padding: 0 5px; border-radius: 4px; color: #ffd60a; }
.sp-drop { position: absolute; right: 4px; top: 4px; border: 0; border-radius: 5px; padding: 0 6px; cursor: pointer;
  background: rgba(0, 0, 0, .6); color: #ff8a80; font-size: 12px; line-height: 18px; }
.sp-drop:hover { background: #ff453a; color: #fff; }
.sp-bar { position: absolute; top: 0; bottom: 0; width: 14px; margin-left: -7px; cursor: col-resize; z-index: 3;
  display: flex; align-items: center; justify-content: center; touch-action: none; }
.sp-bar::after { content: ""; width: 4px; height: 100%; background: #ffd60a; box-shadow: 0 0 6px rgba(0, 0, 0, .8); border-radius: 2px; }
.sp-bar:hover::after, .sp-bar:active::after { width: 6px; background: #fff; }
/* 原片自己的镜头切换（画面接着放）：细虚线，和剪辑切点区分开 */
.sp-bar.sp-cont::after { width: 0; background: none; box-shadow: none; border-left: 2px dashed rgba(255, 255, 255, .55); border-radius: 0; }
.sp-bar.sp-cont:hover::after, .sp-bar.sp-cont:active::after { width: 0; border-left-color: #fff; }
.sp-tiny .sp-tc, .sp-tiny .sp-dur { display: none; }

/* 逐句预览：本句进度条（可拖动） */
.segbar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.segbar .sb-id { font-size: 12px; min-width: 38px; color: var(--text-2); }
.segbar .sb-time { font-size: 12px; min-width: 78px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.sb-track { position: relative; flex: 1; height: 18px; cursor: pointer; touch-action: none; user-select: none; }
.sb-rail { position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--fill-2); }
.sb-fill { position: absolute; left: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--accent); width: 0; }
.sb-cut { position: absolute; top: 3px; width: 2px; height: 12px; margin-left: -1px; background: var(--orange); opacity: .9; pointer-events: none; border-radius: 1px; }
.sb-knob { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .15), 0 1px 4px rgba(0, 0, 0, .3); left: 0; pointer-events: none; }
.sb-track:hover .sb-rail { background: var(--line-2); }

/* ============ 页面通用 ============ */
.studio-page { max-width: 1680px; margin: 0 auto; }
.page-intro { margin: -2px 0 16px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.page-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head .muted { font-size: 12.5px; }
.steps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; color: var(--text-2); }
.steps .ico { width: 14px; height: 14px; color: var(--text-3); }
.steps .on { color: var(--text); font-weight: 600; }
.sib-sel { width: auto; font-size: 13px; font-weight: 600; padding: 3px 28px 3px 8px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 20px; color: var(--text-2); text-align: center;
  border: 1.5px dashed var(--line-2); border-radius: var(--radius-lg); line-height: 1.6; }
.empty-state .ico { width: 34px; height: 34px; color: var(--text-3); stroke-width: 1.5; }
.empty-state b { color: var(--text); font-size: 15px; }
.empty-state .btn { margin-top: 6px; }
.empty-state.small { padding: 28px 20px; }
.search { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--fill); color: var(--text-2);
  transition: box-shadow .15s; cursor: text; }
.search:focus-within { box-shadow: 0 0 0 3px var(--accent-ring); }
.search .ico { width: 15px; height: 15px; }
.search input[type=search] { width: 180px; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 13px; }
.search input[type=search]:focus { box-shadow: none; }
select.compact { width: auto; height: 30px; padding: 0 28px 0 10px; border: 0; border-radius: 8px; background-color: var(--fill); font-size: 12.5px; }
.seg-tabs a { display: inline-flex; align-items: center; padding: 4px 14px; border-radius: 7px; color: var(--text); font-size: 12.5px; font-weight: 500;
  white-space: nowrap; transition: background-color .15s, box-shadow .15s; }
.seg-tabs a:hover { text-decoration: none; }
.seg-tabs a:hover:not(.on) { background: var(--fill-3); }
.seg-tabs a.on { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.seg-tabs .cnt { color: var(--text-2); font-weight: 400; font-variant-numeric: tabular-nums; }
.icon-tabs button { display: inline-flex; padding: 4px 8px; }
.icon-tabs .ico { width: 15px; height: 15px; }
.btn.large { height: 38px; padding: 0 22px; font-size: 14px; }
.avatar .ico { width: 16px; height: 16px; stroke-width: 2; }
.home-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.home-stats div { background: var(--surface-2); border-radius: 14px; padding: 10px 18px; min-width: 86px; text-align: center; }
.home-stats b { display: block; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.home-stats span { color: var(--text-2); font-size: 11px; }
table.vers { width: 100%; border-collapse: collapse; font-size: 13px; }
table.vers th { text-align: left; color: var(--text-3); font-weight: 500; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.vers td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.vers tr:last-child td { border-bottom: 0; }

/* ============ 首页（剪映式）：开始创作 + 最近影片 + 我的副本 ============ */
.home { display: flex; flex-direction: column; gap: 30px; }
.home > .banner { margin-bottom: -14px; }
.create { display: grid; grid-template-columns: minmax(320px, 1.1fr) minmax(0, 2fr); gap: 16px; }
.create-main { display: flex; align-items: center; gap: 18px; min-height: 156px; padding: 24px 28px; border-radius: 18px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 100%); box-shadow: 0 10px 30px rgba(10, 132, 255, .22); transition: box-shadow .2s, transform .15s; }
.create-main:hover { box-shadow: 0 14px 38px rgba(10, 132, 255, .32); }
.create-main:active { transform: scale(.995); }
.create-main:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 3px; }
.create-main.dragover { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9), 0 14px 38px rgba(10, 132, 255, .4); }
.cm-icon { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 17px; background: rgba(255, 255, 255, .2); display: inline-flex; align-items: center; justify-content: center; }
.cm-icon .ico { width: 30px; height: 30px; stroke-width: 2.2; }
.cm-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-text b { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.cm-text small { font-size: 13px; line-height: 1.55; opacity: .88; }
.create-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--card-line);
  box-shadow: var(--card-shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .2s, background-color .15s; min-width: 0; }
.tool:hover { text-decoration: none; box-shadow: var(--pop-shadow); }
.tool[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent-ring); }
.tool-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; }
.tool-ico .ico { width: 21px; height: 21px; }
.t-blue { background: var(--accent-tint); color: var(--accent-text); }
.t-purple { background: var(--purple-tint); color: var(--purple-text); }
.t-orange { background: var(--orange-tint); color: var(--orange-text); }
.t-green { background: var(--green-tint); color: var(--green-text); }
.tool-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool-text b { font-size: 14px; font-weight: 600; }
.tool-text small { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-head { display: flex; align-items: center; gap: 10px 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 17px; }
.sec-note { color: var(--text-2); font-size: 12.5px; }
.sec-more { display: inline-flex; align-items: center; gap: 1px; font-size: 13px; }
.sec-more .ico { width: 14px; height: 14px; }

/* 影片卡片、副本卡片：16:9 封面 + 两行文字 */
.film-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }  /* 列数由 app.js 的 fitFilmRow 按宽度设 */
.film-grid, .draft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 16px; }  /* 和最近影片一行同样的列宽 */
.film, .draft { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--text); cursor: pointer; outline: none; }
.film:hover, .draft:hover { text-decoration: none; }
.film-cover, .draft-cover { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--fill-2);
  box-shadow: 0 0 0 1px var(--card-line); transition: box-shadow .18s; }
.film-cover img, .draft-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film:hover .film-cover, .draft:hover .draft-cover { box-shadow: 0 0 0 1px var(--card-line), 0 10px 26px rgba(0, 0, 0, .2); }
.film:focus-visible .film-cover, .draft:focus-visible .draft-cover { box-shadow: 0 0 0 3px var(--accent-ring); }
.film-info, .draft-info { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; min-width: 0; }
.film-title, .draft-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-meta, .draft-meta { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 封面上的叠加信息（底下是画面，两种外观都用深色底白字） */
.chip-br { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px;
  font-variant-numeric: tabular-nums; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.chip-tl { position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 5px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; font-weight: 600; }
.chip-tl.bad { background: rgba(255, 59, 48, .92); }
.chip-tl.warn { background: rgba(255, 149, 0, .92); }  /* 等待客户端上线 */
.cover-busy { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 8px 7px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff;
  font-size: 11.5px; font-weight: 500; }
.cover-busy span { display: block; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-busy .bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.cover-busy .bar > div { height: 100%; border-radius: 2px; background: #fff; transition: width .4s; }
.draft-more, .film-add { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; justify-content: center; border: 0; color: #fff;
  background: rgba(0, 0, 0, .55); cursor: pointer; opacity: 0; transition: opacity .15s, background-color .15s; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.draft-more { width: 28px; height: 28px; border-radius: 8px; }
.film-add { height: 26px; padding: 0 9px 0 6px; gap: 3px; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 500; }
.draft-more:hover, .film-add:hover { background: rgba(0, 0, 0, .75); }
.draft:hover .draft-more, .draft:focus-within .draft-more, .draft-more[aria-expanded="true"],
.film:hover .film-add, .film:focus-within .film-add { opacity: 1; }
.draft-more .ico { width: 16px; height: 16px; }
.film-add .ico { width: 14px; height: 14px; stroke-width: 2.2; }
.draft-new .draft-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: transparent;
  border: 1.5px dashed var(--line-2); box-shadow: none; color: var(--text-2); font-size: 13px; }
.draft-new:hover .draft-cover { border-color: var(--accent); color: var(--accent-text); box-shadow: none; }
.dn-plus .ico { width: 26px; height: 26px; }
/* 列表视图 */
.draft-list { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; background: var(--surface); border: 1px solid var(--card-line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--card-shadow); }
.draft-list th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-3); padding: 9px 10px; border-bottom: 1px solid var(--line); }
.draft-list td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.draft-list tr:last-child td { border-bottom: 0; }
.draft-list tbody tr { cursor: pointer; outline: none; }
.draft-list tbody tr:hover td, .draft-list tbody tr:focus-visible td { background: var(--fill-3); }
.dl-name { display: flex; align-items: center; gap: 10px; }
.dl-name img, .dl-ph { width: 64px; height: 36px; flex: 0 0 64px; object-fit: cover; border-radius: 6px; background: var(--fill-2); display: block; }

/* ============ 影片详情 ============ */
.film-hero { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 28px; }
.fh-cover { width: 320px; flex: 0 0 320px; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--fill-2); }
.fh-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fh-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fh-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fh-title h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.fh-facts { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* 影片留在用户电脑上：在哪台电脑、找不到文件时重新找到 */
.film-where { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.film-where:empty { display: none; }
.film-where .ico { width: 15px; height: 15px; vertical-align: -3px; }

/* ============ 导入影片 ============ */
.import { max-width: 760px; margin: 0 auto; }
.dropzone { display: flex; align-items: center; justify-content: center; min-height: 230px; padding: 28px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line-2); border-radius: 18px; background: var(--surface); transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-tint); }
.dropzone.has-file { min-height: 0; padding: 16px 18px; cursor: default; justify-content: flex-start; text-align: left; border-style: solid; border-color: var(--card-line);
  box-shadow: var(--card-shadow); }
.dropzone.has-file:hover { border-color: var(--card-line); background: var(--surface); }
.dropzone.has-file.dragover { border-color: var(--accent); background: var(--accent-tint); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dz-empty b { font-size: 17px; font-weight: 600; }
.dz-empty small { color: var(--text-3); font-size: 12px; }
.dz-or { color: var(--text-3); font-size: 12px; }
.dz-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-tint); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; }
.dz-icon .ico { width: 32px; height: 32px; stroke-width: 1.6; }
.dz-icon.sm { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; }
.dz-icon.sm .ico { width: 22px; height: 22px; }
.dz-file { display: flex; align-items: center; gap: 14px; width: 100%; }
.dz-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dz-meta b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-meta small { font-size: 12px; color: var(--text-2); }
.dz-meta .progress { margin-top: 5px; }
.dz-path { margin: 12px 2px 0; font-size: 13px; }
.dz-path input { margin-top: 8px; }
.import-more { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.field { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; }
.field > label { color: var(--text-2); font-size: 13px; padding-top: 6px; }
.import-go { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.import-go .hint { margin: 0; }
/* 长表单（写新副本）：按钮贴在窗口底部 */
.form-page { max-width: 1040px; }
.form-foot { grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  margin: 6px -18px -18px; padding: 12px 18px; background: var(--toolbar); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.form-foot .hint { margin: 0; }

/* ============ 工作区（打开副本） ============ */
html.ws main { max-width: none; padding: 14px 16px 16px; }
.tb-tabs a { padding: 4px 13px; }
.projbar { margin-bottom: 12px; padding: 4px 12px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.pb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 38px; }
.pb-row + .pb-row { border-top: 1px solid var(--line); }
.pb-info { margin-left: 4px; font-size: 12px; color: var(--text-2); }
.projbar .studio-config { gap: 16px; margin: 0; padding: 0; }
.studio-config { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.cfg { display: flex; gap: 6px; align-items: center; color: var(--text-2); }
.cfg select { width: auto; padding: 3px 26px 3px 9px; font-size: 12px; background-position: right 7px center; background-size: 12px; }
.cfg b { color: var(--text); font-weight: 500; }
.cfg.check { cursor: pointer; }
.cfg.check input { accent-color: var(--accent); }
.cfg .ico { width: 14px; height: 14px; }
.projbar .btn.small .ico { width: 14px; height: 14px; }

/* ============ 设置 ============ */
.settings-sec { margin-bottom: 18px; }
.settings-sec .form { grid-template-columns: 90px 1fr; }
.acc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1300px) { .acc-grid { grid-template-columns: 1fr 1fr; } }
.acc { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.acc .form { margin-top: 10px; }
.cap-row { display: grid; grid-template-columns: 1.4fr 170px 1.6fr 60px; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.cap-row .adv { grid-column: 2 / 5; font-size: 12px; color: var(--text-2); }
.cap-row .adv input { margin-top: 6px; }
.cap-row .effort { grid-column: 2 / 5; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-2); }

/* ============ 影片解读 ============ */
.graph-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.graph-side { position: sticky; top: 68px; background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--card-shadow); }
.graph-side input { width: 100%; margin-bottom: 2px; }
.g-side-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); margin: 14px 4px 6px; text-transform: uppercase; }
.g-chips { display: flex; flex-wrap: wrap; gap: 4px; max-height: 240px; overflow: auto; }
.g-chip { font: inherit; font-size: 11.5px; padding: 3px 9px; border-radius: 99px; border: 0; background: var(--fill-3); color: var(--text); cursor: pointer; }
.g-chip:hover { background: var(--accent-tint); color: var(--accent-text); }
.g-nav { display: flex; flex-direction: column; gap: 1px; }
.g-nav a { padding: 4px 8px; border-radius: 7px; color: var(--text-2); font-size: 12.5px; }
.g-nav a:hover { background: var(--fill-3); color: var(--text); }
.graph-main { min-width: 0; }
.graph-section { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px; scroll-margin-top: 80px; box-shadow: var(--card-shadow); }
.section-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.g-logline { font-size: 16px; line-height: 1.75; margin: 0 0 12px; color: var(--text); }
.g-themes { display: flex; gap: 6px; flex-wrap: wrap; }
.g-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.g-act { display: flex; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.g-act-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; padding-top: 2px; }
.g-char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.g-char-card { display: flex; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.g-char-photo { width: 84px; height: 56px; border-radius: 8px; overflow: hidden; background: #000; flex-shrink: 0; }
.g-char-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-char-body { min-width: 0; }
.g-char-name { font-weight: 600; font-size: 15px; }
.g-char-body p { margin: 4px 0; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.g-meta { font-size: 11px; color: var(--text-3); }
.g-arc { font-size: 11px; color: var(--accent-text); margin-top: 4px; }
.g-scene-list { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.g-scene { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.g-scene:first-child { border-top: 0; }
.g-scene-time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; padding-top: 2px; }
.g-scene-title { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.g-scene-body p { margin: 3px 0; font-size: 12px; color: var(--text-2); }
.g-imp { height: 3px; background: var(--fill); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.g-imp > div { height: 100%; background: var(--accent); }
.g-motif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.g-motif { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.g-quote-list { max-height: 420px; overflow: auto; }
.g-quote { padding: 6px 2px; border-top: 1px solid var(--line); font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.g-quote:first-child { border-top: 0; }
.g-quote-time { color: var(--text-2); font-size: 11px; min-width: 48px; font-variant-numeric: tabular-nums; }
.g-quote-score { margin-left: auto; color: var(--text-3); font-size: 10px; }
.g-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g-rel { padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; }
.g-rel-arrow { color: var(--text-3); margin: 0 6px; }
.g-fact { padding: 5px 0; border-top: 1px solid var(--line); font-size: 12px; }

/* ============ 专业时间线 ============ */
.tl-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.tl-zoom { display: flex; gap: 4px; align-items: center; }
.tl-toolbar input { width: 340px; max-width: 100%; }
.tl-scroll { overflow-x: auto; border: 1px solid var(--card-line); border-radius: var(--radius-lg); background: var(--surface); padding: 12px; box-shadow: var(--card-shadow); }
.tl-canvas { min-width: 100%; }
.tl-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 5px; }
.tl-label { font-size: 11px; color: var(--text-2); text-align: right; position: sticky; left: 0; background: var(--surface); z-index: 2; }
.tl-track { display: flex; height: 30px; background: var(--fill-3); border-radius: 5px; overflow: hidden; }
.tl-track.small { height: 12px; border-radius: 3px; }
.tl-block { position: relative; height: 100%; flex: 0 0 auto; border-right: 1px solid var(--surface); cursor: pointer; min-width: 1px; }
.tl-track.small .tl-block { cursor: default; }
.tl-block.g { background: var(--tl-g); } .tl-block.y { background: var(--tl-y); } .tl-block.r { background: var(--tl-r); }
.tl-block.o { background: var(--tl-o); } .tl-block.n { background: var(--tl-n); } .tl-block.a { background: var(--tl-a); }
.tl-block.d { background: var(--tl-d); } .tl-block.s { background: var(--tl-s); } .tl-block.b { background: var(--tl-b); }
.tl-block:hover { outline: 1px solid var(--text); outline-offset: -1px; }
.tl-block.sel { outline: 2px solid var(--text); outline-offset: -2px; }
.tl-block.multi { outline: 2px solid var(--orange); outline-offset: -2px; }
.tl-block.trimming { outline: 2px solid var(--yellow); outline-offset: -1px; }
.tl-lower { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-top: 16px; align-items: start; }
.tl-table-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--card-line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--card-shadow); }
.tl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tl-table th { position: sticky; top: 0; background: var(--surface); color: var(--text-3); font-weight: 500; text-align: left; padding: 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.tl-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.tl-table tbody tr { cursor: pointer; }
.tl-table tbody tr:hover td { background: var(--fill-3); }
#tl-rows tr.sel td { background: var(--accent-tint); }
#tl-rows tr.multi td { background: var(--orange-tint); }
.tl-reason { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.tl-conf { display: inline-block; min-width: 32px; text-align: center; border-radius: 99px; padding: 1px 7px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-conf.g { background: var(--green-tint); color: var(--green-text); } .tl-conf.y { background: var(--orange-tint); color: var(--orange-text); }
.tl-conf.r { background: var(--red-tint); color: var(--red-text); } .tl-conf.o { background: var(--purple-tint); color: var(--purple-text); }
.tl-side { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--card-shadow); }
.tl-warn { font-size: 12px; padding: 3px 0; color: var(--orange-text); }
.tl-warn.error { color: var(--red-text); }
/* 时间线检查器 / 修剪 / 候选 */
#tl-inspect { min-height: 80px; }
.ti-head { display: flex; align-items: center; gap: 8px; }
.ti-head h3 { margin: 0; font-size: 15px; }
.ti-text { color: var(--text); font-size: 13px; line-height: 1.55; }
.ti-edit { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; margin-top: 6px; }
.ti-edit label { font-size: 11px; color: var(--text-2); display: flex; flex-direction: column; gap: 3px; }
.ti-edit input { width: 100%; padding: 4px 8px; font-size: 12px; }
.ti-edit .btn { height: 30px; }
.ti-cands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 8px; }
.ti-cand { padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); cursor: pointer; overflow: hidden; text-align: left; font: inherit; }
.ti-cand:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ti-cand img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #000; }
.ti-cand span { display: block; padding: 3px 6px; font-size: 10px; color: var(--text-2); }
/* 时间线拖拽修剪 */
.tl-handle { display: none; position: absolute; top: 0; bottom: 0; width: 7px; z-index: 4; cursor: col-resize;
  background: rgba(255, 255, 255, .92); border-radius: 2px; box-shadow: 0 0 3px rgba(0, 0, 0, .6); }
.tl-block.sel .tl-handle { display: block; }
.tl-handle.l { left: -2px; } .tl-handle.r { right: -2px; }
.tl-drag-tip { position: fixed; z-index: 300; background: var(--hud); border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--pop-shadow);
  font-size: 11px; padding: 3px 8px; border-radius: 6px; pointer-events: none; font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
/* 时间线风格体检 */
.tl-style { margin-bottom: 12px; padding: 12px 14px; }
.tl-style select { width: auto; min-width: 210px; }
.tl-style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }
.tl-metric { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.tl-metric.g { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.tl-metric.y { border-color: color-mix(in srgb, var(--orange) 45%, transparent); }
.tl-metric.r { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.tl-metric.neutral { border-color: var(--line); }
.tl-metric-bar { height: 4px; background: var(--fill); border-radius: 2px; margin: 6px 0 3px; overflow: hidden; }
.tl-metric-bar > div { height: 100%; background: var(--accent); border-radius: 2px; }
.tl-metric.g .tl-metric-bar > div { background: var(--green); }
.tl-metric.y .tl-metric-bar > div { background: var(--orange); }
.tl-metric.r .tl-metric-bar > div { background: var(--red); }
/* 时间线多选与批量操作 */
.tl-batch { display: flex; gap: 6px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; }
/* 风格验收 */
.tl-accept { margin-top: 8px; padding: 9px 12px; border: 0; border-radius: var(--radius); background: var(--fill-3); }
.tl-accept.g { background: var(--green-tint); }
.tl-accept.y { background: var(--yellow-tint); }
.tl-accept.r { background: var(--red-tint); }
.tl-accept.g b { color: var(--green-text); }
.tl-accept.y b { color: var(--yellow-text); }
.tl-accept.r b { color: var(--red-text); }

/* ============ 风格库 ============ */
.style-applybar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.style-applybar select { width: auto; min-width: 280px; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.style-card { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--card-shadow); }
.style-metrics { font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-top: 8px; line-height: 1.55; }
.style-create .row { margin-top: 8px; }
.style-create select { width: auto; min-width: 240px; }
.style-create input { width: 260px; }

/* ============ 人物确认 ============ */
.cast-banner { margin-top: 10px; padding: 9px 14px; border: 0; background: var(--orange-tint); border-radius: var(--radius); font-size: 13px; line-height: 1.7; }
.cast-banner .btn { margin-left: 6px; }
.cast-page .cast-tip { margin: 12px 0; font-size: 13px; line-height: 1.7; }
.cast-page .cast-tip ul { margin: 6px 0 0 18px; padding: 0; color: var(--text-2); }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.cast-card .cast-thumbs { display: flex; gap: 4px; overflow: hidden; }
.cast-card .cast-thumbs img { width: 60px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.cast-card .cast-name { width: 100%; margin-top: 8px; }
.cast-card select { width: auto; }
.cast-card .cast-lines { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-actions { margin: 16px 0; gap: 10px; }

/* ============ 速览检查 ============ */
.board-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -8px -4px 12px; padding: 8px 4px; position: sticky; top: 52px; z-index: 5;
  background: var(--bg); }
.board-bar select { width: auto; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.bcard { background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 12px; box-shadow: var(--card-shadow); }
.bcard.r { border-color: color-mix(in srgb, var(--red) 32%, transparent); }
.bcard.y { border-color: color-mix(in srgb, var(--orange) 32%, transparent); }
.bcard.seen { opacity: .55; }
.bhead { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.bhead .conf { margin-top: 0; }
.btext { font-size: 13px; margin: 6px 0 6px; line-height: 1.5; }
.bwhy { font-size: 11px; padding: 3px 8px; border-radius: 6px; margin-bottom: 6px; line-height: 1.5; }
.bwhy.red { background: var(--red-tint); color: var(--red-text); } .bwhy.yellow { background: var(--yellow-tint); color: var(--yellow-text); }
.bstrip, .bcands { display: flex; gap: 4px; overflow-x: auto; align-items: center; }
.bcands { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.bcands > .muted { font-size: 11px; writing-mode: vertical-rl; }
.bthumb { position: relative; flex: 0 0 auto; width: 112px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; background: #000; }
.bstrip .bthumb { width: 132px; }
.bthumb:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bthumb img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.bthumb .warn-dot { position: absolute; bottom: 3px; left: 3px; font-size: 10px; color: #fff; background: rgba(201, 52, 0, .9); padding: 0 5px; border-radius: 4px; }
.bthumb .use { position: absolute; right: 3px; bottom: 3px; display: none; padding: 0 7px; }
.bthumb:hover .use { display: inline-flex; }
.seen-box { font-size: 11px; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; color: var(--text-2); }
.mini-player { position: fixed; right: 20px; bottom: 20px; width: 420px; background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 8px; z-index: 30; box-shadow: var(--pop-shadow); }
.mini-player video { width: 100%; display: block; border-radius: 9px; background: #000; }

/* ============ 出片设置 ============ */
.out-grid { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr); gap: 16px; }
@media (max-width: 1100px) { .out-grid { grid-template-columns: 1fr; } }
.out-grid .panel h3 { margin-bottom: 8px; }
.out-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: center; margin: 9px 0; font-size: 13px; }
.out-row > label { color: var(--text-2); text-align: right; }
.bgm-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bgm-item { display: grid; grid-template-columns: 1fr 110px 90px 28px; gap: 6px; align-items: center; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 12px; }
.bgm-item input { width: 100%; }
.sub-preview { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #000; aspect-ratio: 16/9; object-fit: contain; }
.deliver-files { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 12px; }
.deliver-files a { color: var(--accent-text); }

table.mini { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
table.mini th, table.mini td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
table.mini th { color: var(--text-3); font-weight: 500; }

.script-notes { margin-top: 6px; color: var(--accent-text); }
.script-notes > div { margin: 2px 0 0 4px; }

/* 修改记录（副本页「修改记录」） */
.hist-panel { margin-bottom: 16px; }
.hist-list { max-height: 340px; overflow: auto; }
.hist-row { display: grid; grid-template-columns: 150px 140px 1fr; gap: 10px; padding: 6px 2px; border-top: 1px solid var(--line); font-size: 12px; align-items: baseline; }
.hist-row:first-child { border-top: 0; }
.hist-row .t { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hist-row .a { color: var(--text); font-weight: 500; }
.hist-row.job .a { color: var(--text-2); font-weight: 400; }
.hist-row .d { color: var(--text-2); word-break: break-word; }
.hist-row.legacy { opacity: .7; }

/* ============ 登录 / 注册（server.py 的账号页） ============ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 360px; max-width: 100%; background: var(--surface); border: 1px solid var(--card-line); border-radius: 20px; padding: 32px 28px 24px;
  box-shadow: var(--pop-shadow); }
.auth-card .brand-mark { width: 52px; height: 52px; border-radius: 13px; margin: 0 auto 14px; }
.auth-card h1 { margin: 0; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.auth-card .auth-sub { text-align: center; color: var(--text-2); font-size: 13px; margin: 6px 0 18px; }
.auth-card label { display: block; color: var(--text-2); font-size: 12px; font-weight: 500; margin: 12px 0 5px; }
.auth-card input { height: 36px; font-size: 14px; }
.auth-card .btn.primary { width: 100%; height: 36px; margin-top: 8px; font-size: 14px; }
.auth-card > input + .btn.primary { margin-top: 18px; }
.auth-card .e { color: var(--red-text); font-size: 12px; min-height: 18px; margin-top: 8px; }
.auth-card .s { color: var(--text-2); font-size: 12px; margin-top: 14px; text-align: center; }
.auth-theme { position: fixed; top: 14px; right: 16px; }
.mc-client.mc-darwin .auth-theme { top: 12px; }
.mc-client .auth-drag { position: fixed; top: 0; left: 0; right: 0; height: 52px; -webkit-app-region: drag; }
.mc-client .auth-theme { -webkit-app-region: no-drag; z-index: 2; }
.mc-client.mc-win32 .auth-theme { right: 156px; }

/* ============ 窄屏 ============ */
@media (max-width: 1360px) {
  .create { grid-template-columns: 1fr; }
  .create-main { min-height: 120px; }
  .create-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .graph-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .tl-lower { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 300px minmax(0, 1fr) 340px; gap: 12px; height: calc(100vh - 204px); }
  .create-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-tabs a { padding: 4px 9px; }
}
@media (max-width: 980px) {
  /* 侧边栏收成图标条 */
  .sidebar { width: 64px; flex-basis: 64px; }
  .sb-brand span, .sb-nav a span, .sb-label, .sb-me .who, .sb-conn, .sb-models span:last-child { display: none; }
  .sb-head { justify-content: center; padding: 0; }
  .sb-nav { padding: 8px; }
  .sb-nav a { justify-content: center; padding: 0; }
  .sb-me-row { flex-direction: column; }
  .sb-me .me { padding: 4px; }
  .sb-models { justify-content: center; }
  .graph-layout { grid-template-columns: 1fr; }
  .graph-side { position: static; }
  .g-two-col { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; height: auto; }
  .editor .col { max-height: 80vh; }
  .film-hero { flex-direction: column; }
  .fh-cover { width: 100%; flex-basis: auto; }
  .tb-sub, .pb-info { display: none; }
}
@media (max-width: 700px) {
  main { padding: 16px 14px 40px; }
  .create-tools { grid-template-columns: 1fr; }
  .studio-config { gap: 8px; }
  .studio-config .hint { display: none; }
  .tl-toolbar input { width: 100%; }
  .search input[type=search] { width: 120px; }
}
