:root {
  /* ponytail: 3层灰底替代5层蓝灰，纯中性灰（Capture One/Lightroom 风格） */
  --bg: #141414;
  --bg-2: #1C1C1C;
  --panel: #1C1C1C;
  --panel-2: #252525;
  --panel-3: #2E2E2E;
  --line: #2E2E2E;
  --line-soft: #252525;
  --line-strong: #3A3A3A;
  --text: #E5E5E5;
  --text-2: #999;
  --muted: #777;
  --muted-soft: #555;

  /* ponytail: 单一强调色，去掉 -soft/-glow 系列 */
  --primary: #4C9EEB;
  --primary-hover: #6AB0F5;
  --primary-soft: rgba(76, 158, 235, 0.1);
  --primary-rgb: 76, 158, 235;
  --primary-glow: transparent;       /* ponytail: 杀掉所有发光 */
  --accent: #D4A039;
  --accent-soft: rgba(212, 160, 57, 0.1);
  --accent-rgb: 212, 160, 57;
  --success: #5CB85C;
  --success-soft: rgba(92, 184, 92, 0.1);
  --warning: #D4A039;
  --warning-soft: rgba(212, 160, 57, 0.1);
  --danger: #D45D5D;
  --danger-soft: rgba(212, 93, 93, 0.1);

  /* ponytail: 圆角收紧 4-8px */
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-float: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: none;                /* ponytail: 杀掉发光阴影 */
  --inner-highlight: none;            /* ponytail: 杀掉玻璃内高光 */

  --gap: 16px;
  --gap-sm: 12px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  /* 三阶段标识色 */
  --phase-prepare: #5CB85C;
  --phase-field: #D4A039;
  --phase-review: #4C9EEB;
}

* { box-sizing: border-box; }

/* 隐藏滚动条但保留滚动能力 */
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}

/* ponytail: 删除 body::before 氛围光，产品级工具用纯色底 */

button, input, textarea, select { font: inherit; color: inherit; }

button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color .15s, background .15s, color .15s;
  box-shadow: none;
  font-weight: 500;
}
button:hover { border-color: var(--line-strong); background: var(--panel-2); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: none; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; box-shadow: none; }
.btn-primary:active { background: #3A8AD4; box-shadow: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { background: var(--panel); border-color: var(--line-strong); }
.btn-mini { padding: 4px 10px; font-size: 12px; min-height: 26px; }
.btn-large { padding: 12px 24px; font-size: 16px; }
.btn-nav { background: var(--panel); border-color: var(--line); color: var(--text-2); }
.btn-temp { background: var(--warning-soft); border-color: rgba(255, 184, 107, 0.45); color: var(--warning); }
.btn-temp:hover { background: rgba(255, 184, 107, 0.22); border-color: var(--warning); }

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--muted-soft);
  border-radius: 4px;
  background: rgba(91, 107, 133, 0.14);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Consolas, monospace;
  letter-spacing: 0;
}
.kbd-light { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); }

input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: none;
  background: var(--panel);
}

textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  line-height: 1.6;
  outline: none;
}

.muted { color: var(--muted); font-size: 12px; }
.card-eyebrow {
  color: var(--primary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ====================== 顶栏 ====================== */
.topbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  flex-shrink: 0;
  position: relative;
}
/* ponytail: 去掉顶栏底部发光线，改为纯色边框已足够 */

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-text { min-width: 0; }
.brand-title, .brand-subtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  position: relative;
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  display: flex;
  align-items: center;
}
/* ponytail: 去掉 CSS 渐变模拟 logo 的伪元素装饰 */
.brand-mark::after { display: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.brand-subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 400; }

.stage-nav {
  display: flex;
  gap: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

/* ponytail: 阶段色带 — 顶栏下方2px线，颜色跟随当前阶段 */
.phase-indicator {
  height: 2px;
  background: var(--phase-prepare);
  transition: background 300ms ease;
  flex-shrink: 0;
}
[data-stage="field"] .phase-indicator { background: var(--phase-field); }
[data-stage="review"] .phase-indicator { background: var(--phase-review); }

/* ponytail: 尊重用户减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.stage-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  min-height: 48px;
  transition: color .15s ease;
  box-shadow: none;
  position: relative;
}
.stage-tab:hover { background: transparent; color: var(--text-2); }
.stage-tab[aria-selected="true"] {
  background: transparent;
  color: var(--text);
  font-weight: 600;
  box-shadow: none;
}
/* ponytail: 选中态用底部细线指示，不用渐变发光 */
.stage-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.stage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}
.stage-tab[aria-selected="true"] .stage-num { background: rgba(10, 13, 18, 0.15); color: #0a0d12; }
.stage-name { font-weight: 600; }

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}
.icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 16px;
  color: var(--muted);
}
.status-light { width: auto; padding: 0 10px; gap: 6px; }

/* 协作按钮 - 醒目样式 */
.collab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(var(--accent-rgb, 10 13 18), 0.08);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.collab-btn:hover {
  background: var(--accent);
  color: #fff;
}
.collab-btn .collab-icon { font-size: 16px; }
.collab-btn .collab-label { font-size: 13px; white-space: nowrap; }
.status-light .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-soft);
  display: inline-block;
}
.status-light .dot[data-status="ok"] { background: var(--success); box-shadow: none; }
.status-light .dot[data-status="warn"] { background: var(--warning); }
.status-light .dot[data-status="error"] { background: var(--danger); }
.status-light .status-label { font-size: 11px; color: var(--muted); }

/* ====================== 阶段视图 ====================== */
.stage-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stage-view[hidden] { display: none; }

/* ====================== ① 准备 ====================== */
.prepare-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  align-items: start;
  gap: clamp(16px, 1.5vw, 28px);
  padding: clamp(20px, 2vw, 36px);
  overflow: auto;
  width: 100%;
  max-width: min(1680px, 100%);
  margin: 0 auto;
}

.prepare-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
}
.prepare-card-head { margin-bottom: 28px; }
.prepare-card-head h2 { margin: 6px 0 6px; font-size: 26px; font-weight: 700; letter-spacing: 0.01em; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.checklist li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  transition: border-color .2s, background .2s;
}
.checklist li:hover { border-color: var(--line); background: rgba(29, 35, 48, 0.5); }
.check-bubble {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--muted-soft);
  margin-top: 2px;
  position: relative;
  transition: all .25s ease;
}
.check-bubble[data-done="true"] {
  background: var(--success);
  border-color: var(--success);
  box-shadow: none;
}
.check-bubble[data-done="true"]::after {
  content: "✓";
  color: #0a0d12;
  font-weight: 800;
  font-size: 14px;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.check-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.check-required, .check-optional {
  font-size: 11px;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.check-required { background: var(--danger-soft); color: var(--danger); }
.check-optional { background: var(--primary-soft); color: var(--primary); }
.check-desc { color: var(--muted); margin-bottom: 12px; }
.check-body { flex: 1; }
.check-action {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.check-action input[type="text"] { flex: 1; min-width: 240px; }
#topic-input {
  flex: 0 1 420px;
  width: min(420px, 100%);
  max-width: 420px;
}
#confirm-topic-btn { margin-right: auto; }

.prepare-cta { text-align: center; }

.prepare-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.side-card h3 { margin: 0 0 12px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.prepare-scene-list, .prepare-question-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}
.placeholder { color: var(--muted); font-size: 13px; padding: 12px 0; }
.list-row {
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.list-row .row-tag { color: var(--muted); font-size: 11px; }

/* ====================== ② 现场 ====================== */
.field-grid {
  flex: 1;
  display: grid;
  grid-template-columns: clamp(148px, 10vw, 192px) minmax(0, 1fr) clamp(260px, 19vw, 348px);
  gap: 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns .18s ease;
}
.field-grid.scene-rail-collapsed {
  grid-template-columns: 48px minmax(0, 1fr) clamp(260px, 19vw, 348px);
}

.scene-rail {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.rail-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 9px;
  border-bottom: 1px solid var(--line-soft);
}
.scene-rail-toggle {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}
.scene-rail .rail-head .card-eyebrow {
  flex: 1;
  min-width: 0;
}
.scene-rail.collapsed .rail-head {
  justify-content: center;
  padding: 10px 6px;
}
.scene-rail.collapsed .rail-head .card-eyebrow,
.scene-rail.collapsed #undo-btn {
  display: none;
}
.scene-rail.collapsed .rail-regroup {
  display: none;
}
.rail-regroup {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.rail-regroup button {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
}
.scene-list {
  flex: 1;
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scene-item {
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  font-size: 13px;
  transition: all .18s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.scene-item:hover { border-color: var(--line-strong); background: var(--panel-2); transform: none; }
.scene-item.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: none;
}
.scene-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
}
.scene-text {
  min-width: 0;
  overflow: hidden;
}
.scene-item strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-item .scene-cat { color: var(--muted); font-size: 12px; }
.scene-rail.collapsed .scene-list {
  padding: 8px 6px;
  align-items: center;
}
.scene-rail.collapsed .scene-item {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}
.scene-rail.collapsed .scene-text {
  display: none;
}
.scene-rail.collapsed .scene-num {
  flex-basis: 28px;
}

.stage-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.completeness-rail {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
}
.completeness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--line-soft);
}
.completeness-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}
.completeness-summary {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}
.research-readiness-hint,
.research-readiness-ok {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--line-soft);
  font-size: 11px;
}
.research-readiness-hint summary {
  cursor: pointer;
  color: #d5b36c;
}
.research-readiness-hint[data-ready="true"] summary { color: var(--success); }
.research-readiness-hint ul {
  margin: 5px 0 0;
  padding-left: 16px;
}
.research-readiness-form {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}
.research-readiness-form label {
  display: grid;
  gap: 3px;
  color: var(--muted);
}
.research-readiness-form textarea {
  width: 100%;
  resize: vertical;
  box-sizing: border-box;
  padding: 5px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text-2);
  font: inherit;
}
.research-readiness-form .readiness-check {
  display: flex;
  align-items: center;
  gap: 6px;
}
.research-readiness-ok { color: var(--success); }
.completeness-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}
.completeness-scene {
  margin-bottom: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.completeness-scene > summary,
.completeness-question > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.completeness-scene > summary::-webkit-details-marker,
.completeness-question > summary::-webkit-details-marker { display: none; }
.completeness-scene > summary {
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 700;
}
.completeness-scene > summary .completion-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.completeness-question {
  border-top: 1px solid var(--line-soft);
}
.completeness-question > summary {
  padding: 8px 10px;
  color: var(--text-2);
  font-size: 12px;
}
.completeness-question.active > summary { background: var(--primary-soft); }
.completion-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.completion-dot[data-status="complete"] { background: var(--success); }
.completion-dot[data-status="complete_provisional"] { background: #67c587; box-shadow: 0 0 0 2px rgba(103,197,135,.17); }
.completion-dot[data-status="needs_completion"] { background: #e3a83f; }
.completion-dot[data-status="blocked"] { background: var(--danger); }
.completion-dot[data-status="not_started"] { background: #666; }
.completion-question-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.completion-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}
.completion-users {
  padding: 0 10px 9px 26px;
}
.completion-user {
  padding: 7px 0;
  border-top: 1px dashed var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.completion-user:first-child { border-top: 0; }
.completion-user-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}
.completion-user-head strong { flex: 1; color: var(--text-2); }
.completion-reasons,
.completion-followups {
  margin: 5px 0 0;
  padding-left: 16px;
}
.completion-followups { color: #d5b36c; }
.completeness-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 9px 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
}

.live-caption-card {
  margin: 0 0 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.live-caption-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
}

.live-caption-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.live-caption-status[data-status="listening"] { color: #2f9e66; }
.live-caption-status[data-status="transcribing"] { color: var(--accent); }
.live-caption-status[data-status="error"] { color: #d64b4b; }

.live-caption-text {
  min-height: 44px;
  max-height: 96px;
  overflow: auto;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.completeness-legend span { display: inline-flex; align-items: center; gap: 5px; }
.completeness-legend i { width: 7px; height: 7px; border-radius: 50%; background: #666; }
.completeness-legend i[data-status="complete"] { background: var(--success); }
.completeness-legend i[data-status="needs_completion"] { background: #e3a83f; }
.completeness-legend i[data-status="blocked"] { background: var(--danger); }

.question-block {
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.question-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.question-tag {
  display: inline-flex;
  padding: 2px 10px;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
  .question-card {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  padding: 4px 0 12px;
  letter-spacing: 0.01em;
}
.question-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.question-tools .btn-nav { font-size: 13px; }
.question-tools .btn-temp { margin-left: auto; font-size: 12px; padding: 6px 12px; }

.image-grid {
  flex: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding: 16px 24px;
  min-height: 0;
}
.image-grid.compare-mode {
  display: block;
  overflow: hidden;
}
.compare-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
}
.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.compare-kicker {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.compare-head h3 {
  margin: 0;
  font-size: 18px;
}
.compare-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-height: 0;
  height: 100%;
}
.compare-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.compare-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-2);
  font-weight: 700;
  font-size: 12px;
}
.compare-param-toggle {
  padding: 3px 7px;
  min-height: 22px;
  font-size: 11px;
}
.compare-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px;
  background: #050608;
  overflow: hidden;
}
.compare-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}
.compare-placeholder {
  display: grid;
  gap: 8px;
  max-width: 360px;
  padding: 18px;
  color: var(--text-2);
  text-align: center;
}
.compare-placeholder strong {
  color: var(--text);
  font-size: 14px;
}
.compare-placeholder span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.compare-param-panel {
  position: absolute;
  right: 10px;
  top: 10px;
  max-width: min(260px, 70%);
  max-height: calc(100% - 20px);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(91, 155, 245, 0.4);
  border-radius: 6px;
  background: rgba(5, 8, 12, 0.88);
  color: #d8e7ff;
  font-size: 11px;
  line-height: 1.6;
  backdrop-filter: none;
}
.compare-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
}
.compare-foot {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}
.empty-state-inner h1 { color: var(--text-2); font-size: 24px; margin: 0 0 8px; font-weight: 700; letter-spacing: 0.02em; }
.empty-state-inner p { color: var(--muted); }

.image-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color .15s;
}
.image-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.image-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.param-toggle { font-size: 11px; padding: 4px 8px; min-height: 24px; }

.image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050608;
  min-height: 180px;
  cursor: pointer;
}
.image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.image-wrap .editor-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 4px;
}
.editor-chip {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
  background: rgba(10, 13, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-2);
  backdrop-filter: none;
  cursor: pointer;
  min-height: 22px;
}
.editor-chip:hover { background: rgba(91, 155, 245, 0.3); border-color: var(--primary); }

.param-panel {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: 240px;
  padding: 10px;
  border: 1px solid rgba(91, 155, 245, 0.4);
  border-radius: 6px;
  background: rgba(5, 8, 12, 0.85);
  color: #d8e7ff;
  font-size: 11px;
  line-height: 1.6;
  backdrop-filter: none;
  z-index: 2;
}

.candidate-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px 0;
}
.candidate {
  width: 50px;
  height: 50px;
  border: 2px solid transparent;
  border-radius: 4px;
  object-fit: cover;
  cursor: pointer;
  background: #050608;
  flex-shrink: 0;
}
.candidate.selected { border-color: var(--success); }

.image-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
}
.vote-btn {
  flex: 1;
  background: var(--success-soft);
  border-color: rgba(77, 212, 148, 0.4);
  color: var(--success);
  font-weight: 600;
  position: relative;
}
.vote-btn:hover { background: rgba(77, 212, 148, 0.24); border-color: var(--success); }
.vote-btn .vote-count { font-weight: 800; }
.vote-btn .vote-key {
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(77, 212, 148, 0.22);
  border: 1px solid rgba(77, 212, 148, 0.4);
  border-radius: 3px;
  color: var(--success);
}

.scene-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.scene-nav .muted { font-size: 12px; }

/* 录音条 */
.record-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.record-bar.recording {
  background: var(--panel);
  border-top-color: var(--danger);
  animation: none; /* ponytail: 去掉脉冲全栏发光 */
}
/* ponytail: pulse-bar 已删除，录音状态只改边框色 */

.record-left {
  display: flex;
  gap: 16px;
  align-items: center;
}
.record-center {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.record-center-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.kbd-large {
  min-width: 48px;
  height: 32px;
  font-size: 14px;
  font-weight: 700;
  padding: 0 12px;
  border-width: 2px;
}
.record-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
  min-height: 44px;
  box-shadow: none;
}
.record-btn:hover { background: #E07070; border-color: #E07070; box-shadow: none; }
.record-btn .rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}
.rec-label { font-size: 13px; font-weight: 600; }
.record-btn.recording .rec-dot {
  background: #fff;
  animation: blink 1.4s ease-in-out infinite; /* ponytail: 简单闪烁替代扩散圆环 */
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.record-btn.blink-prompt {
  animation: blink-prompt 0.8s ease-in-out infinite;
  border-color: var(--warning);
  box-shadow: 0 0 0 2px var(--warning-soft);
}
@keyframes blink-prompt {
  0%, 100% { background: var(--danger); }
  50% { background: var(--warning); }
}
.record-meta {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
}
.record-status { font-weight: 700; font-size: 14px; }
.record-bar.recording .record-status { color: var(--danger); }
.record-health {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.record-health span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.record-health[data-status="ok"] span {
  background: var(--success);
  box-shadow: none;
}
.record-health[data-status="warn"] span { background: var(--warning); }
.record-health[data-status="error"] span {
  background: var(--danger);
  box-shadow: none;
}
.record-scope,
#record-context,
.marker-timeline {
  grid-column: 1 / -1;
}
.record-timer {
  font-size: 36px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.record-wave {
  width: 120px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.marker-timeline {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: min(720px, 52vw);
  min-height: 20px;
}
.marker-chip {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg-2);
  white-space: nowrap;
}
.marker-chip strong {
  color: var(--text);
  font-weight: 600;
}
.record-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  justify-content: flex-end;
}
.field-user-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.field-user-chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  box-shadow: none;
}
.field-user-chip:hover { border-color: var(--line-strong); background: var(--panel-2); }
.field-user-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

/* ====================== ③ 复盘 ====================== */
.review-grid {
  flex: 1;
  display: grid;
  grid-template-columns: clamp(220px, 15vw, 288px) minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.review-rail {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}
.review-steps {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.review-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  align-items: center;
  transition: all .18s ease;
  position: relative;
}
.review-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 23px;
  bottom: -2px;
  width: 2px;
  height: 2px;
  background: var(--line-strong);
}
.review-steps li:hover { background: var(--panel); }
.review-steps li.active { background: var(--primary-soft); border-color: var(--primary); }
.review-steps li.active .step-num { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: none; }
.review-steps li[data-done="true"] .step-num { background: var(--success); color: #fff; border-color: var(--success); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}
.review-steps li.active .step-num { background: var(--primary); color: #0a0d12; border-color: var(--primary); }
.step-title { font-size: 13px; font-weight: 600; }
.step-desc { font-size: 11px; }

.review-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line-soft);
}
.review-actions hr { width: 100%; border: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.review-actions button {
  justify-content: flex-start;
  min-height: 38px;
  font-size: 13px;
}
.export-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.export-check input { width: 18px; height: 18px; }

.review-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.review-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.review-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  min-width: 200px;
}
.review-tab {
  padding: 6px 14px;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .18s ease;
}
.review-tab:hover { border-color: var(--line-strong); background: var(--panel-2); }
.review-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: none; }

.review-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.speaker-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.speaker-chip {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  font-weight: 600;
}
.speaker-chip.active { background: var(--primary); border-color: var(--primary); color: #0a0d12; }
.speaker-chip[title] { cursor: pointer; }

.review-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 0;
  overflow: hidden;
}
.transcript-pane, .analysis-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px;
}
.transcript-pane { border-right: 1px solid var(--line-soft); }
.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.pane-head h3 { margin: 0; font-size: 14px; color: var(--primary); }
.pane-actions { display: flex; gap: 6px; align-items: center; }

.transcript-segments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.transcript-segment {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  padding: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
}
.transcript-segment.selected { border-color: var(--primary); background: var(--primary-soft); }
.transcript-segment .seg-speaker {
  font-weight: 700;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
}
.transcript-segment .seg-text { color: var(--text-2); }

.analysis-output {
  min-height: min(180px, 22vh);
  max-height: min(320px, 40vh);
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.65;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #dce6f2;
  font-size: 13px;
  margin-bottom: 16px;
}

#skill-editor { min-height: 110px; margin-bottom: 8px; font-size: 12px; }

.past-research-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.past-research-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.past-research-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.past-research-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.past-research-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}
.past-research-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.past-research-actions button {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
}
.past-research-conclusion {
  grid-column: 1 / -1;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

/* ====================== Modal & Toast ====================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: none;
  z-index: 1000;
  animation: overlay-in .2s ease;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(720px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: modal-in .2s cubic-bezier(.16, 1, .3, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal h2 { margin: 0 0 16px; font-size: 20px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.settings-section {
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.settings-section h3 {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
}

/* 操作指南 */
.manual {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.manual-stage {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.manual-stage:first-child { padding-top: 2px; }
.manual-stage:last-of-type { border-bottom: none; padding-bottom: 6px; }
.manual-stage-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.manual-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}
.manual-stage-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.manual-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 23px;
}
.manual-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.5;
}
.manual-label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.manual-val {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.manual-val .kbd { margin-right: 2px; }

.manual-row-flat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 0 23px;
  font-size: 12px;
  color: var(--muted);
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.settings-grid .field { margin-bottom: 0; }
.settings-grid .field.wide { grid-column: 1 / -1; }

/* 音频测试组件 */
.audio-test-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.audio-test-meter {
  flex: 1;
  height: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  overflow: hidden;
}
.audio-test-bar {
  height: 100%;
  width: 0%;
  background: var(--success); /* ponytail: 录音电平用纯色，不用三色渐变 */
  border-radius: 5px;
  transition: width .05s linear;
}

/* AI 模式切换 */
.ai-mode-switch {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.ai-mode-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 2px solid var(--line-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.ai-mode-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ai-mode-option.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 67, 97, 238), 0.06);
}
.ai-mode-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.ai-mode-option.active .ai-mode-label {
  color: var(--primary);
}
.ai-mode-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.cloud-only-fields, .local-only-fields {
  display: contents;
}
.service-status-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--line-soft);
  color: var(--muted);
}
.service-status-badge.running {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.path-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.inline-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.editor-row {
  display: grid;
  grid-template-columns: 24px 110px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.editor-row input[type="text"] { padding: 6px 8px; }
.editor-row .editor-name { font-weight: 600; font-size: 13px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.burst-modal-body,
.split-image-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
}
.burst-group {
  padding: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}
.burst-group h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--primary);
}
.burst-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}
.burst-choice {
  display: grid;
  grid-template-rows: auto 96px auto;
  gap: 6px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.burst-choice img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg);
}
.burst-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.split-ai-panel {
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}
.split-ai-bar {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}
.split-ai-count span,
.split-name-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}
.split-ai-count input { width: 92px; }
.split-name-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.split-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 180px;
  gap: 8px;
  align-items: center;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
}
.split-index {
  color: var(--muted);
  font-size: 11px;
}
.split-shot {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.toast-root {
  position: fixed;
  top: 70px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}
.toast {
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: var(--shadow-float);
  animation: toast-in .25s cubic-bezier(.16, 1, .3, 1);
  pointer-events: auto;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
.toast.warn { border-left-color: var(--warning); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ====================== Hint bar ====================== */
.hint-bar {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: rgba(16, 20, 28, 0.95);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 20px;
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: var(--shadow-float);
  backdrop-filter: none;
  z-index: 100;
  pointer-events: none;
  animation: hint-fade 5s forwards;
}
.hint-bar .kbd { margin-right: 4px; }
@keyframes hint-fade {
  0% { opacity: 0; }
  10%, 70% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.hidden { display: none !important; }

/* ====================== 5 星评分 ====================== */
.rating {
  display: flex;
  gap: 2px;
  align-items: center;
  font-size: 18px;
  line-height: 1;
}
.rating .star {
  cursor: pointer;
  color: var(--muted-soft);
  user-select: none;
  transition: color .1s, transform .1s;
}
.rating .star:hover { transform: scale(1.15); }
.rating .star.filled { color: #ffce4e; }
.rating-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-top: 1px solid var(--line-soft);
}
.rating-row .rating-label {
  min-width: 74px;
  font-size: 12px;
  color: var(--muted);
}
.rating-row .rating-key {
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(91, 107, 133, 0.18);
  border: 1px solid var(--muted-soft);
  border-radius: 3px;
  color: var(--muted);
}
.rating-undo {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 11px;
}
.rating-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 7px 36px;
  min-height: 20px;
  color: var(--muted);
  font-size: 11px;
}
.rating-pill {
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  border-radius: 10px;
  padding: 2px 6px;
}

/* ====================== 修图版本切换 ====================== */
.version-strip {
  display: flex;
  gap: 4px;
  padding: 6px 12px;
  border-top: 1px solid var(--line-soft);
  overflow-x: auto;
  align-items: center;
}
.version-chip {
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  white-space: nowrap;
  min-height: 24px;
  flex-shrink: 0;
}
.version-chip.active { background: var(--primary); border-color: var(--primary); color: #0a0d12; font-weight: 600; }
.version-chip.original { background: rgba(143, 196, 255, 0.12); border-color: rgba(143, 196, 255, 0.4); color: var(--primary); }
.version-chip.pending { border-color: rgba(255, 196, 87, 0.45); color: var(--warning); }

/* ====================== 景别标签 ====================== */
.shot-tags {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 3px;
  z-index: 2;
}
.shot-tag {
  padding: 2px 7px;
  font-size: 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 13, 18, 0.7);
  color: var(--text-2);
  cursor: pointer;
  backdrop-filter: none;
  min-height: 0;
}
.shot-tag.active { background: var(--primary); border-color: var(--primary); color: #0a0d12; font-weight: 700; }

.exif-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  cursor: pointer;
}
.exif-toggle input { margin: 0; }

/* ====================== 用户作业 ====================== */
.user-works-card { padding-bottom: 14px; }
.user-works-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 440px;
  overflow: auto;
}
.user-work-row {
  padding: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.user-work-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.user-work-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.drag-handle {
  color: var(--muted);
  cursor: grab;
  line-height: 1;
}
.user-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  flex: 0 0 auto;
}
.user-work-name { font-weight: 700; font-size: 13px; }
.user-work-row.dragging { opacity: .55; }
.user-work-row.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.user-profile-grid {
  display: grid;
  grid-template-columns: 72px 96px 1fr 1fr auto;
  gap: 6px;
  align-items: center;
}
.user-profile-grid input,
.user-profile-grid select {
  min-width: 0;
  height: 30px;
  padding: 4px 7px;
  font-size: 11px;
}
.user-profile-grid .uw-assignment-summary {
  grid-column: 1 / -2;
}
.user-profile-grid [data-act="save-profile"] {
  grid-column: -2 / -1;
  grid-row: 2;
}
.user-work-summary {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  min-height: 18px;
}
.user-work-keywords {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.user-work-keyword {
  padding: 1px 6px;
  font-size: 10px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(91, 155, 245, 0.4);
}
.user-work-files {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.user-work-file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  background: var(--panel);
  border-radius: 4px;
  cursor: pointer;
}
.user-work-file:hover { background: var(--panel-2); }
.user-work-file .uw-actions { display: flex; gap: 4px; }
.user-work-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.user-work-actions button { font-size: 11px; padding: 4px 8px; min-height: 22px; }

/* ====================== 设备列表（准备阶段） ====================== */
.device-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.device-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.device-row .device-info { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.device-row .device-info strong { font-size: 13px; }
.device-row .device-meta { color: var(--muted); font-size: 11px; }
.device-row .device-path {
  color: var(--muted-soft);
  font-size: 11px;
  font-family: -apple-system, "SF Mono", Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.device-row button { font-size: 11px; padding: 4px 8px; min-height: 22px; }

@media (max-width: 1100px) {
  .topbar { padding-inline: 14px; gap: 10px; }
  .brand-subtitle { display: none; }
  .stage-tab { padding-inline: 10px; }
  .prepare-card { padding: 24px; }
}

@media (max-width: 900px) {
  .topbar { padding-inline: 10px; }
  .status-light .status-label,
  .collab-btn .collab-label { display: none; }
  .status-light { width: 36px; padding: 0; }
  .collab-btn { width: 36px; min-width: 36px; padding: 0; justify-content: center; }
  .topbar-actions { gap: 4px; }
  .stage-tab { padding-inline: 8px; }
}

@media (max-width: 720px) {
  .brand-title { display: none; }
  .brand { width: 36px; }
  .stage-name { display: none; }
  .stage-tab { width: 42px; justify-content: center; }
  .prepare-wrap { padding: 14px; }
  .prepare-card { padding: 20px 16px; }
  .check-action input[type="text"] { min-width: min(240px, 100%); }
}

@media (max-width: 980px) {
  .prepare-wrap { grid-template-columns: 1fr; }
}

@media (max-height: 820px) {
  .prepare-wrap {
    padding: 16px clamp(18px, 2vw, 28px);
    align-items: start;
  }
  .semantic-followup-hints {
    min-height: 16px;
    margin: -7px 0 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    opacity: 0.72;
  }
  .semantic-followup-hints:empty { display: none; }
  .prepare-card { padding: 20px 24px; }
  .prepare-card-head { margin-bottom: 18px; }
  .prepare-card-head h2 { font-size: 23px; }
  .checklist { gap: 10px; margin-bottom: 18px; }
  .checklist li { padding: 14px 16px; }
  .prepare-side { gap: 12px; }
  .side-card { padding: 14px 16px; }
}

@media (max-width: 900px) {
  .field-grid { grid-template-columns: 48px minmax(0, 1fr) 220px; }
  .field-grid.scene-rail-collapsed { grid-template-columns: 48px minmax(0, 1fr) 220px; }
  .review-grid { grid-template-columns: 1fr; }
  .review-body { grid-template-columns: 1fr; }
  .transcript-pane { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .field-grid { grid-template-columns: 48px minmax(0, 1fr) 240px; }
  .field-grid.scene-rail-collapsed { grid-template-columns: 48px minmax(0, 1fr) 240px; }
  .review-grid { grid-template-columns: clamp(200px, 13vw, 240px) minmax(0, 1fr); }
}

.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--panel-3);
  overflow: hidden;
  box-shadow: none;
}
.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .4s cubic-bezier(.16, 1, .3, 1);
  box-shadow: none;
}
