:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e3e8f0;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 10px; font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 20px; height: 56px;
}
.brand { font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; }
.brand span { color: var(--primary); }
.nav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav-links a {
  color: var(--muted); padding: 7px 11px; border-radius: 8px; white-space: nowrap; font-size: 13.5px;
}
.nav-links a:hover { background: #f1f5ff; color: var(--primary); text-decoration: none; }
.nav-links a.active { background: #e8efff; color: var(--primary); font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.topbar-user b { color: var(--text); font-weight: 600; }
.menu-toggle {
  display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  width: 38px; height: 36px; font-size: 18px; cursor: pointer;
}

.page { max-width: 1280px; margin: 0 auto; padding: 20px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 卡片 / 统计 ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; flex-wrap: wrap; }
.card-title h2, .card-title h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat .value.green { color: var(--green); }
.stat .value.blue { color: var(--primary); }
.stat .value.amber { color: var(--amber); }
.stat .value.red { color: var(--red); }
.stat .value.purple { color: var(--purple); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 8px;
  padding: 7px 14px; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #c9d4e8; background: #f8faff; text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c7c7; }
.btn-danger:hover { background: #fff5f5; border-color: var(--red); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #12853c; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.tbl th, table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.tbl th { color: var(--muted); font-weight: 500; font-size: 12.5px; white-space: nowrap; background: #fafbfe; }
table.tbl tr:hover td { background: #fafcff; }
table.tbl td.nowrap, table.tbl th.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }

/* ---------------- 角色筛选标签 ---------------- */
.role-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.role-tab {
  border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px;
  padding: 4px 13px; font-size: 13px; cursor: pointer;
}
.role-tab:hover { border-color: #c9d4e8; color: var(--primary); }
.role-tab.active { background: #e8efff; border-color: #c7d7fb; color: var(--primary); font-weight: 600; }
.role-tab b { font-weight: 600; }

/* ---------------- 徽章 ---------------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; }
.badge-unassigned, .badge-draft { background: #eef1f6; color: #4b5563; }
.badge-assigned { background: #e8efff; color: #1d4ed8; }
.badge-in_progress { background: #e0f2fe; color: #0369a1; }
.badge-pending_review { background: #fef3c7; color: #b45309; }
.badge-revising { background: #fee2e2; color: #b91c1c; }
.badge-completed, .badge-online { background: #dcfce7; color: #15803d; }
.badge-offline { background: #eef1f6; color: #6b7280; }
.badge-role { background: #f3e8ff; color: #7c3aed; }
.badge-role.annotator { background: #e0f2fe; color: #0369a1; }
.badge-role.reviewer { background: #fef3c7; color: #b45309; }
.badge-role.leader { background: #dcfce7; color: #15803d; }
.badge-self { background: #fef3c7; color: #b45309; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input[type=text], .field input[type=password], .field input[type=number],
.field select, .field textarea, .input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 180px; }
.inline { display: inline-flex; align-items: center; gap: 8px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filter-bar .field { margin-bottom: 0; min-width: 150px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }

/* ---------------- 弹窗 ---------------- */
dialog { border: none; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(16, 24, 40, .25); }
dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog-head { padding: 15px 18px; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.dialog-body { padding: 16px 18px; }
.dialog-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.dialog-close { border: none; background: none; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }

/* ---------------- 登录 ---------------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #eef3ff 0%, #f7f9fc 55%, #eefaf3 100%); }
.login-card { width: min(390px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(30, 64, 175, .12); padding: 30px 28px; }
.login-card .logo { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.login-card .logo span { color: var(--primary); }
.login-card .tip { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.alert { background: #fff5f5; border: 1px solid #f3c7c7; color: #b91c1c; padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/* ---------------- 工作台 ---------------- */
.work-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.work-head .names { min-width: 0; }
.work-head .names h1 { font-size: 17px; word-break: break-all; margin-bottom: 4px; }
.work-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12.5px; }
.work-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.video-box { background: #0b1220; border-radius: var(--radius); overflow: hidden; }
.video-box video { width: 100%; max-height: 62vh; display: block; background: #000; }
.video-fallback { color: #cbd5e1; font-size: 13px; padding: 10px 14px; }
.editor-pane { display: flex; flex-direction: column; min-height: 0; }
#editor { height: 540px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#editor textarea { width: 100%; height: 100%; border: none; outline: none; resize: none; padding: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; }
.editor-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-top: 10px; }
.editor-toolbar .left, .editor-toolbar .right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.editor-status { font-size: 12px; color: var(--muted); }
.editor-status.err { color: var(--red); }
.editor-status.ok { color: var(--green); }
.review-panel { border: 1px solid #fde68a; background: #fffbeb; border-radius: var(--radius); padding: 14px; margin-top: 14px; }
.review-panel h3 { margin-bottom: 8px; }
.review-panel textarea { min-height: 70px; }
.self-warn { background: #fef3c7; color: #92400e; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-top: 10px; }
.tl-panel { background: #0b1220; border-top: 1px solid #1e293b; padding: 10px 12px 12px; color: #cbd5e1; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-bottom: 8px; }
.tl-head b { color: #e2e8f0; font-size: 12.5px; font-weight: 600; }
.tl-info { color: #64748b; }
.tl-frame-no { color: #fbbf24; font-variant-numeric: tabular-nums; }
.tl-now { margin-left: auto; color: #93c5fd; font-variant-numeric: tabular-nums; }
.tl-step { border: 1px solid #334155; background: #16213a; color: #cbd5e1; font-size: 12px; padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.tl-step:hover { border-color: #3b82f6; color: #93c5fd; }
.tl-step:active { background: #1e2d4d; }
.tl-locate { border: 1px solid #334155; background: #16213a; color: #cbd5e1; font-size: 12px; padding: 3px 10px; border-radius: 6px; cursor: pointer; }
.tl-locate:hover { border-color: #3b82f6; color: #93c5fd; }
.tl-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; scrollbar-width: thin; }
.tl-track { position: relative; display: flex; align-items: flex-end; gap: 0; min-width: 100%; height: 40px; padding-bottom: 4px; }
.tl-progress { position: absolute; left: 0; bottom: 0; height: 3px; background: #3b82f6; border-radius: 2px; width: 0; pointer-events: none; }
.tl-tick { position: relative; flex: 1 1 0; min-width: 12px; height: 22px; border: 1px solid #334155; background: #16213a; border-radius: 3px 3px 0 0; cursor: pointer; padding: 0; }
.tl-tick:hover { background: #1e2d4d; border-color: #475569; }
.tl-tick.active { background: #2563eb; border-color: #60a5fa; height: 32px; }
.tl-tick span { position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); font-size: 9px; line-height: 1; color: #64748b; pointer-events: none; }
.tl-tick.active span { color: #dbeafe; }
.tl-sec-track { display: flex; align-items: stretch; gap: 0; margin-top: 4px; min-width: 100%; }
.tl-sec { position: relative; flex: 1 1 0; min-width: 8px; height: 18px; border: 0; border-right: 1px solid #0b1220; background: #111c30; cursor: pointer; padding: 0; }
.tl-sec.alt { background: #17243d; }
.tl-sec:hover { background: #1e2d4d; }
.tl-sec.active { background: #2563eb; }
.tl-sec span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 8.5px; line-height: 1; color: #64748b; pointer-events: none; }
.tl-sec.active span { color: #dbeafe; }
.tl-sec.mark::after { content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: #f59e0b; }
.tl-sec.active.mark::after { background: #fde68a; }
.tl-frame { margin-top: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.5; color: #94a3b8; background: #0f172a; border: 1px solid #1e293b; border-radius: 6px; padding: 6px 8px; max-height: 64px; overflow: auto; word-break: break-all; white-space: pre-wrap; }
.tl-detect { margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: #bae6fd; background: #0b2338; border: 1px solid #1e3a5f; border-radius: 6px; padding: 5px 8px; }
.tl-detect.ok { color: #bbf7d0; border-color: #14532d; background: #0c2b1b; }
.tl-detect.bad { color: #fecaca; border-color: #7f1d1d; background: #2a1215; }
.tl-detect.stale { opacity: .55; }
.tl-detect.tl-draft { box-shadow: inset 3px 0 0 #7c3aed; }
.tl-detect.tl-check { box-shadow: inset 3px 0 0 #d97706; }
.tl-check-head { font-weight: 600; margin-bottom: 3px; }
.tl-check-item { margin-top: 2px; padding: 1px 4px; border-radius: 4px; cursor: pointer; }
.tl-check-item:hover { background: rgba(148, 163, 184, .14); }
.tl-check-item.err { color: #fca5a5; }
.tl-check-item.warn { color: #fcd34d; }
.tl-check-item mark { background: #facc15; color: #1f2937; padding: 0 2px; border-radius: 2px; }
.tl-check-item.err mark { background: #ef4444; color: #fff; }
.tl-check-more { margin-top: 3px; color: #94a3b8; }
.tl-copy { margin-left: 6px; border: 1px solid #475569; background: #1e293b; color: #e2e8f0; font-size: 11px; padding: 1px 7px; border-radius: 5px; cursor: pointer; }
.tl-copy:hover { border-color: #3b82f6; color: #93c5fd; }
.tl-json-hop { background: rgba(37, 99, 235, .16); }
.tl-json-live { background: rgba(37, 99, 235, .22); }
.tl-time-link { border-bottom: 1px dashed rgba(37, 99, 235, .55); cursor: pointer; }
.tl-speed { border: 1px solid #334155; background: #16213a; color: #cbd5e1; font-size: 12px; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.tl-speed:hover { border-color: #3b82f6; color: #93c5fd; }

/* ---------------- 时间轴多轨 ---------------- */
.tl-lanes { margin-top: 5px; }
.tl-lane { position: relative; height: 20px; margin-top: 3px; }
.tl-lane-label {
  position: absolute; left: 2px; top: 50%; transform: translateY(-50%); z-index: 2;
  font-size: 9.5px; line-height: 1; color: #94a3b8; background: rgba(11, 18, 32, .72);
  padding: 1px 3px; border-radius: 3px; pointer-events: none;
}
.tl-lane-body { position: relative; width: 100%; height: 100%; background: #0f172a; border: 1px solid #1e293b; border-radius: 4px; }
.tl-block {
  position: absolute; top: 2px; bottom: 2px; border-radius: 3px; border: 1px solid transparent;
  font-size: 9.5px; line-height: 1; color: #e2e8f0; padding: 3px 3px; overflow: hidden;
  white-space: nowrap; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none;
}
.tl-block:hover { filter: brightness(1.3); }
.tl-block.readonly { cursor: pointer; }
.tl-block-pages { background: rgba(37, 99, 235, .55); border-color: #60a5fa; }
.tl-block-shots { background: rgba(124, 58, 237, .5); border-color: #a78bfa; }
.tl-block-dialogue { background: rgba(22, 163, 74, .5); border-color: #4ade80; }
.tl-block-points { top: 5px; bottom: 5px; padding: 0; border-radius: 50%; background: #f59e0b; border-color: #fbbf24; }
.tl-drag-tip {
  position: fixed; z-index: 900; background: rgba(15, 23, 42, .94); color: #f8fafc;
  font-size: 11.5px; padding: 4px 8px; border-radius: 6px; pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 问题清单 ---------------- */
.issues { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.issues-head {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: #fafbfe;
  padding: 7px 10px; cursor: pointer; font-size: 12.5px; text-align: left; color: var(--text);
}
.issues-head:hover { background: #f3f7ff; }
.issues-title { font-weight: 600; }
.issues-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; text-align: center; background: #eef1f6; color: #475569; }
.issues-count.err { background: #fee2e2; color: #b91c1c; }
.issues-count.warn { background: #fef3c7; color: #b45309; }
.issues-count.sug { background: #e0f2fe; color: #0369a1; }
.issues-count.ok { background: #dcfce7; color: #15803d; }
.issues-summary { flex: 1 1 auto; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issues-arrow { color: var(--primary); }
.issues-body { max-height: 190px; overflow: auto; border-top: 1px solid var(--line); }
.issue-row {
  display: flex; gap: 8px; align-items: flex-start; width: 100%; border: 0;
  border-bottom: 1px solid #f1f4f9; background: #fff; padding: 6px 10px;
  font-size: 12.5px; text-align: left; cursor: pointer; color: var(--text);
}
.issue-row:hover { background: #f7faff; }
.issue-row:last-child { border-bottom: 0; }
.issue-tag { flex: 0 0 auto; padding: 0 6px; border-radius: 5px; font-size: 11px; line-height: 17px; background: #eef1f6; color: #475569; }
.issue-row.err .issue-tag { background: #fee2e2; color: #b91c1c; }
.issue-row.warn .issue-tag { background: #fef3c7; color: #b45309; }
.issue-pos { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.issue-msg { flex: 1 1 auto; word-break: break-all; }
.issue-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ---------------- 修改记录 ---------------- */
.diff-list { margin: 6px 0 0; padding-left: 16px; }
.diff-list li { margin: 3px 0; line-height: 1.5; }
.diff-line { padding: 3px 0; border-bottom: 1px dashed #eef1f6; font-size: 12.5px; line-height: 1.5; }
.diff-line:last-child { border-bottom: 0; }
.diff-where { color: var(--muted); margin-right: 6px; white-space: nowrap; }
.diff-before { color: #b91c1c; text-decoration: line-through; }
.diff-after { color: #15803d; }
.diff-more summary { cursor: pointer; color: var(--primary); white-space: nowrap; }

/* ---------------- 快捷键表 ---------------- */
table.keys { width: 100%; border-collapse: collapse; font-size: 13px; }
table.keys td { padding: 5px 4px; border-bottom: 1px solid #f1f4f9; vertical-align: top; }
table.keys tr:last-child td { border-bottom: 0; }
table.keys td:first-child { width: 150px; white-space: nowrap; color: var(--muted); }
kbd {
  display: inline-block; padding: 0 5px; border: 1px solid #d4dbe8; border-bottom-width: 2px;
  border-radius: 5px; background: #f8fafc; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 17px; color: #334155;
}
.batch-prog { color: #b45309; }
.empty { padding: 28px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.batch-status-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dropzone { border: 2px dashed #c7d5ee; border-radius: var(--radius); padding: 26px 16px; text-align: center; color: var(--muted); background: #fafcff; cursor: pointer; }
.dropzone.drag { border-color: var(--primary); background: #eef4ff; }
.import-result { margin-top: 12px; }
.import-result li { margin-bottom: 4px; font-size: 13px; }
.import-result .ok { color: var(--green); }
.import-result .bad { color: var(--red); }
.file-list { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.file-list li { margin-bottom: 2px; word-break: break-all; }
.progress { height: 6px; background: #eef1f6; border-radius: 999px; overflow: hidden; min-width: 70px; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.kv { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.kv b { color: var(--text); font-weight: 500; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; flex-wrap: wrap; }
.pager a, .pager span.cur { padding: 5px 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); }
.pager span.cur { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .info { color: var(--muted); margin-right: auto; }

/* ---------------- toast ---------------- */
#toast-box { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #111827; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: 86vw; }
.toast.err { background: #b91c1c; }
.toast.ok { background: #15803d; }

/* ---------------- 手机端 ---------------- */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
  #editor { height: 46vh; min-height: 280px; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 8px; height: 54px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none; position: fixed; top: 54px; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; flex-direction: column; padding: 12px 14px 28px; overflow-y: auto; gap: 2px;
    border-top: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 12px; font-size: 15px; border-radius: 8px; }
  .topbar-user .uname { display: none; }
  .page { padding: 14px 12px 30px; }
  .page-head { margin-bottom: 12px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  h1 { font-size: 18px; }
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 11px 12px; }
  .stat .value { font-size: 22px; }
  .card { padding: 12px; border-radius: 9px; }
  table.tbl { min-width: 560px; }
  .filter-bar .field { min-width: 0; flex: 1 1 45%; }
  .filter-bar .btn { flex: 1; }
  .work-head .work-actions { width: 100%; }
  .work-head .work-actions .btn { flex: 1; }
  .video-box video { max-height: 42vh; }
  .editor-toolbar .left, .editor-toolbar .right { width: 100%; }
  .editor-toolbar .right .btn { flex: 1; }
  .review-panel { padding: 12px; }
  .issues-body { max-height: 150px; }
  .tl-lane-label { display: none; }
  table.keys td:first-child { width: 118px; }
  .tl-now { margin-left: 0; }
  .tl-tick { min-width: 14px; }
  .tl-sec { min-width: 10px; }
  .tl-step { padding: 3px 6px; }
  .dialog-foot .btn { flex: 1; }
  .kv { gap: 4px 10px; }
  .pager .info { width: 100%; margin-bottom: 4px; }
}
@media (max-width: 420px) {
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 20px; }
  .badge { font-size: 11px; padding: 1px 7px; }
}
