/* 二创工作室 — 与节点编辑器一致的浅色 UI */
:root {
  --st-bg: #eef1f5;
  --st-canvas-bg: #f3f4f6;
  --st-grid: rgba(148, 163, 184, 0.25);
  --st-panel: #ffffff;
  --st-panel2: #f8fafc;
  --st-border: #e2e8f0;
  --st-text: #0f172a;
  --st-muted: #64748b;
  --st-accent: #2563eb;
  --st-accent2: #2563eb;
  --st-accent-soft: #dbeafe;
  --st-pink: #7c3aed;
  --st-green: #16a34a;
  --st-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.studio-app {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--st-bg);
  color: var(--st-text);
  display: flex;
  min-height: 100vh;
}

.studio-nav {
  width: 56px;
  background: var(--st-panel);
  border-right: 1px solid var(--st-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  box-shadow: var(--st-shadow);
}
.studio-nav-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--st-accent), #3b82f6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; text-decoration: none; margin-bottom: 12px;
}
.studio-nav-item {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  color: var(--st-muted);
  text-decoration: none;
  padding: 8px 4px;
  border-radius: 8px;
}
.studio-nav-item.is-active { color: var(--st-accent); background: var(--st-accent-soft); }
.studio-nav-item:hover { color: var(--st-text); }

.studio-shell { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--st-bg); }
.studio-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--st-border);
  background: var(--st-panel);
}
.studio-top h1 { margin: 0; font-size: 1.35rem; font-weight: 600; }
.studio-sub { margin: 4px 0 0; color: var(--st-muted); font-size: 13px; }
.studio-top-right { display: flex; align-items: center; gap: 12px; }

.studio-chat-resume {
  flex-shrink: 0;
  margin: 0 12px 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}
.studio-chat-resume.hidden { display: none; }

.studio-review-progress {
  margin: 0 12px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.studio-review-progress.hidden { display: none; }
.studio-review-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.studio-review-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.studio-review-progress-pct {
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.studio-review-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}
.studio-review-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  transition: width 0.45s ease;
}
.studio-review-progress-detail {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #94a3b8;
}

.studio-chat-resume-text {
  margin: 0 0 10px;
  max-height: 120px;
  overflow-y: auto;
  word-break: break-word;
  white-space: pre-wrap;
}
.studio-mock { font-size: 13px; color: var(--st-muted); display: flex; align-items: center; gap: 6px; }

.studio-steps {
  display: flex; gap: 8px; padding: 12px 24px;
  border-bottom: 1px solid var(--st-border);
  overflow-x: auto;
  background: var(--st-panel);
}
.studio-step {
  flex: 1; min-width: 100px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--st-muted);
  display: flex; align-items: center; gap: 8px;
}
.studio-step span {
  width: 22px; height: 22px; border-radius: 50%;
  background: #e2e8f0; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px;
  color: var(--st-muted);
}
.studio-step.is-active { border-color: var(--st-accent); color: var(--st-text); background: var(--st-accent-soft); }
.studio-step.is-active span { background: var(--st-accent); color: #fff; }
.studio-step.is-done { color: var(--st-green); }
.studio-step.is-done span { background: #dcfce7; color: var(--st-green); }

.studio-main { flex: 1; padding: 0; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; background: var(--st-bg); }

.studio-upload-panel { max-width: 640px; margin: 40px auto; padding: 0 24px; }
.studio-flow-status {
  min-height: 1.25em;
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--st-accent, #a78bfa);
  text-align: center;
}

.studio-import-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.studio-import-tab {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--st-border);
  background: var(--st-panel);
  color: var(--st-muted);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, color 0.15s;
}
.studio-import-tab.is-active {
  border-color: var(--st-accent);
  color: var(--st-text);
  background: var(--st-accent-soft);
}
.studio-upload-tab-panel.hidden { display: none; }

.studio-import-section { margin-bottom: 20px; }
.studio-import-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--st-text);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.studio-import-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-color: #cbd5e1 var(--st-panel2);
  scrollbar-width: thin;
}
.studio-import-list::-webkit-scrollbar { width: 8px; }
.studio-import-list::-webkit-scrollbar-track { background: var(--st-panel2); border-radius: 4px; }
.studio-import-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.studio-import-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.studio-import-row .studio-import-item {
  flex: 1;
  min-width: 0;
}
.studio-import-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--st-border);
  background: var(--st-panel);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.studio-import-delete {
  flex-shrink: 0;
  align-self: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #dc2626;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.studio-import-delete:hover {
  background: #fef2f2;
  border-color: #f87171;
}
.studio-import-item:hover {
  border-color: var(--st-accent);
  background: var(--st-accent-soft);
}
.studio-import-item-main { flex: 1; min-width: 0; }
.studio-import-item-main strong {
  display: block;
  font-size: 13px;
  color: var(--st-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-import-item-main small {
  display: block;
  font-size: 11px;
  color: var(--st-muted);
  margin-top: 2px;
}
.studio-import-item-action {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--st-accent);
  font-weight: 500;
}
.studio-import-empty {
  padding: 12px;
  color: var(--st-muted);
  font-size: 13px;
  border: 1px dashed var(--st-border);
  border-radius: 12px;
  background: var(--st-panel);
}

.studio-upload-drop {
  border: 2px dashed #cbd5e1;
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  background: var(--st-panel);
  box-shadow: var(--st-shadow);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.studio-upload-drop.drag {
  border-color: var(--st-accent);
  border-style: solid;
  background: var(--st-accent-soft);
}
.studio-upload-title { font-size: 1.1rem; margin: 0 0 8px; color: var(--st-text); }
.studio-upload-hint { color: var(--st-muted); font-size: 13px; margin: 0 0 20px; }
.studio-upload-status { font-size: 13px; color: var(--st-muted); margin-top: 12px; min-height: 1.2em; }

.studio-workspace {
  --st-left-w: 340px;
  --st-right-w: 360px;
  --st-ws-h: calc(100vh - 130px);
  --st-split-w: 5px;
  flex: 1;
  display: grid;
  grid-template-columns:
    var(--st-left-w)
    var(--st-split-w)
    minmax(0, 1fr)
    var(--st-split-w)
    var(--st-right-w);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-height: 280px;
  min-width: 0;
  height: var(--st-ws-h);
  max-height: calc(100vh - 80px);
  position: relative;
}

.studio-side-dock {
  display: flex;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--st-panel);
}

.studio-node-panel {
  min-width: 0;
}

.studio-splitter {
  position: relative;
  z-index: 4;
  background: var(--st-border);
  transition: background 0.12s ease;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}
.studio-splitter:hover,
.studio-splitter.is-dragging {
  background: var(--st-accent);
}
.studio-splitter--v {
  cursor: col-resize;
  width: 100%;
  min-height: 0;
}
.studio-splitter--v::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -4px;
  right: -4px;
}
.studio-splitter--h {
  grid-column: 1 / -1;
  grid-row: 1;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--st-split-w);
  width: auto;
  cursor: row-resize;
  z-index: 6;
  justify-self: stretch;
  align-self: end;
}
.studio-splitter--h::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  bottom: -4px;
}
body.studio-resizing-col {
  cursor: col-resize !important;
  user-select: none !important;
}
body.studio-resizing-row {
  cursor: row-resize !important;
  user-select: none !important;
}
body.studio-resizing-col *,
body.studio-resizing-row * {
  cursor: inherit !important;
}

@media (max-width: 900px) {
  .studio-workspace {
    grid-template-columns:
      minmax(0, 1fr)
      var(--st-split-w)
      var(--st-right-w);
  }
  .studio-side-dock,
  .studio-splitter[data-split='left'] {
    display: none;
  }
}

.studio-side-nav {
  width: 52px;
  background: var(--st-panel2);
  border-right: 1px solid var(--st-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 6px;
  flex-shrink: 0;
}
.studio-side-nav-item {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  color: var(--st-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 6px;
  cursor: pointer;
  letter-spacing: 0.06em;
}
.studio-side-nav-item.is-active {
  color: var(--st-accent);
  background: var(--st-accent-soft);
}
.studio-side-nav-item:hover:not(.is-active) { color: var(--st-text); }
.studio-side-body {
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.studio-side-pane {
  position: absolute;
  inset: 0;
  display: none !important;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.studio-side-pane.is-active {
  display: flex !important;
}
.studio-side-pane .studio-chat {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 0;
}
.studio-side-pane .studio-assets-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 0;
}
.studio-side-pane .studio-assets-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 0;
}

.studio-node-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--st-panel);
}
.studio-node-panel .studio-node-inspector {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 24px;
  min-height: 0;
}
.studio-node-panel .studio-node-inspector h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--st-text);
}
.studio-insp-head-meta {
  font-size: 11px;
  color: var(--st-muted);
  margin-bottom: 14px;
}
.studio-insp-section {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--st-border);
}
.studio-insp-section:last-child { border-bottom: none; margin-bottom: 0; }
.studio-insp-section h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-accent);
}
.studio-detail-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.studio-detail-label {
  color: var(--st-muted);
  flex-shrink: 0;
}
.studio-detail-value {
  color: var(--st-text);
  white-space: pre-wrap;
  word-break: break-word;
}
.studio-prompt-block {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  font-size: 11px;
  line-height: 1.55;
  color: var(--st-text);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.studio-prompt-edit {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  font-size: 12px;
  line-height: 1.55;
  color: var(--st-text);
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}
.studio-prompt-edit:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.studio-prompt-edit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
.studio-prompt-panel {
  margin: 0 0 12px;
  padding: 10px 10px 4px;
  border-radius: 12px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
}
.studio-prompt-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}
.studio-prompt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}
.studio-prompt-card {
  padding: 8px 10px 10px;
  border-radius: 10px;
  background: var(--st-panel);
  border: 1px solid var(--st-border);
}
.studio-prompt-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.studio-prompt-card-head strong {
  font-size: 12px;
}
.studio-prompt-card-head small {
  font-size: 10px;
  color: #64748b;
  flex-shrink: 0;
}
.studio-prompt-card .studio-prompt-edit {
  min-height: 88px;
  margin-bottom: 6px;
  font-size: 11px;
}
.studio-insp-shot-card {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  margin-bottom: 10px;
}
.studio-insp-shot-card:last-child { margin-bottom: 0; }
.studio-insp-shot-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--st-text);
}

.studio-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--st-border);
  background: var(--st-panel);
}
.studio-panel-head {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--st-muted);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--st-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.studio-canvas-panel {
  background: var(--st-canvas-bg);
  min-width: 0;
  min-height: 0;
  border-right: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.studio-canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--st-border);
  background: var(--st-panel);
  flex-shrink: 0;
  min-width: 0;
}
.studio-canvas-toolbar h2 {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 画布顶栏 · 灵动岛 */
.studio-board-island-slot {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(920px, calc(100% - 28px));
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.studio-board-island-slot.is-dragged {
  width: max-content;
  max-width: min(920px, calc(100vw - 16px));
  transform: none;
}
.studio-board-island-slot.is-dragging {
  z-index: 90;
}
.island-free-drag.is-dragged {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1300;
  pointer-events: auto;
}
.island-free-drag.is-dragging {
  z-index: 1400;
  cursor: grabbing;
}
.island-free-drag.is-dragging .expand-auto-pill,
.island-free-drag.is-dragging .expand-assistant-pill,
.island-free-drag.is-dragging .studio-board-island-pill,
.island-free-drag.is-dragging .expand-auto-head,
.island-free-drag.is-dragging .expand-assistant-head,
.island-free-drag.is-dragging .studio-board-island-head {
  cursor: grabbing;
}
.expand-auto-pill,
.expand-assistant-pill {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.expand-auto-head,
.expand-assistant-head {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.studio-board-island-slot.is-dragging .studio-board-island-pill,
.studio-board-island-slot.is-dragging .studio-board-island-head {
  cursor: grabbing;
}
.studio-board-island {
  --bi-ink: #f5f5f7;
  --bi-muted: rgba(245, 245, 247, 0.62);
  --bi-line: rgba(255, 255, 255, 0.12);
  --bi-soft: rgba(255, 255, 255, 0.1);
  --bi-bg: rgba(22, 22, 24, 0.82);
  --bi-spring: cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  pointer-events: auto;
  color: var(--bi-ink);
  font-family: "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.studio-board-island-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 42px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--bi-line);
  border-radius: 999px;
  background: var(--bi-bg);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition:
    transform 0.35s var(--bi-spring),
    box-shadow 0.35s ease,
    opacity 0.25s ease;
}
.studio-board-island:not(.is-open) .studio-board-island-pill:hover {
  transform: scale(1.03);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.studio-board-island.is-open .studio-board-island-pill {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.92);
  position: absolute;
}
.studio-board-island-orb {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #7eb2ff 38%, #3b82f6 100%);
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
  animation: biOrbPulse 2.2s ease-out infinite;
}
@keyframes biOrbPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.studio-board-island-pill-text {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-board-island-pill-meta {
  font-size: 11.5px;
  color: var(--bi-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.studio-board-island-pill-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.studio-board-island-cta {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--bi-soft);
  color: var(--bi-ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.studio-board-island-cta--primary {
  background: linear-gradient(145deg, #7eb2ff, #3b82f6);
  color: #fff;
}
.studio-board-island-cta.hidden { display: none; }
.studio-board-island-body {
  width: min(920px, 100%);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  border-radius: 22px;
  border: 1px solid transparent;
  background: transparent;
  pointer-events: none;
  transition:
    max-height 0.42s var(--bi-spring),
    opacity 0.28s ease,
    transform 0.42s var(--bi-spring),
    visibility 0s linear 0.3s,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.3s ease;
}
.studio-board-island.is-open .studio-board-island-body {
  max-height: 280px;
  opacity: 1;
  visibility: visible;
  transform: none;
  overflow: visible;
  pointer-events: auto;
  border-color: var(--bi-line);
  background: var(--bi-bg);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    max-height 0.48s var(--bi-spring),
    opacity 0.32s ease 0.06s,
    transform 0.48s var(--bi-spring),
    visibility 0s,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.3s ease;
}
.studio-board-island.is-morphing .studio-board-island-body {
  transition-duration: 0.52s;
}
.studio-board-island-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--bi-line);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.studio-board-island-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.studio-board-island-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: radial-gradient(circle at 35% 30%, #fff 0, #7eb2ff 40%, #3b82f6 100%);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}
.studio-board-island-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--bi-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}
.studio-board-island-sub {
  margin: 3px 0 0;
  line-height: 1.2;
}
.studio-board-island-sub .studio-badge {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--bi-muted);
  font-size: 11px;
}
.studio-board-island-close {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 999px;
  background: var(--bi-soft);
  color: var(--bi-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.studio-board-island-close:hover { background: rgba(255, 255, 255, 0.16); }
.studio-board-island-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 14px 14px;
}
.studio-board-island .studio-canvas-i2v {
  gap: 8px;
  color: var(--bi-muted);
  flex-wrap: wrap;
}
.studio-board-island .studio-canvas-i2v-field span {
  color: var(--bi-muted);
  font-size: 11px;
}
.studio-board-island .studio-canvas-i2v select {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--bi-ink);
  min-width: 96px;
  max-width: 130px;
}
.studio-board-island .studio-canvas-i2v select option {
  color: #111;
  background: #fff;
}
.studio-board-island .studio-canvas-tools {
  gap: 6px;
}
.studio-board-island .studio-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--bi-ink);
}
.studio-board-island .studio-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}
.studio-board-island .studio-batch-video-menu {
  background: rgba(28, 28, 30, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.studio-board-island .studio-batch-video-menu button {
  color: var(--bi-ink);
}
.studio-board-island .studio-batch-video-menu button:hover {
  background: rgba(59, 130, 246, 0.22);
  color: #dbeafe;
}
.studio-board-island .studio-batch-pick-bar {
  background: rgba(59, 130, 246, 0.16);
  color: var(--bi-ink);
}
.studio-board-island .studio-batch-video-progress {
  color: var(--bi-muted);
  font-size: 11px;
}
@media (max-width: 820px) {
  .studio-board-island-pill-meta { max-width: 120px; }
  .studio-board-island.is-open .studio-board-island-body { max-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-board-island-pill,
  .studio-board-island-body,
  .studio-board-island-orb {
    animation: none !important;
    transition: none !important;
  }
}
.studio-canvas-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.studio-batch-video-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.studio-batch-video-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 188px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--st-border);
  background: var(--st-panel);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.studio-batch-video-menu.hidden { display: none; }
.studio-batch-video-menu-level {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.studio-batch-video-menu-level.hidden { display: none; }
.studio-batch-video-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--st-text);
  cursor: pointer;
}
.studio-batch-video-menu button:hover {
  background: var(--st-accent-soft);
  color: var(--st-accent);
}
.studio-batch-video-menu button.studio-batch-video-back {
  color: var(--st-muted);
  font-size: 11px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.studio-batch-pick-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--st-accent-soft);
  border: 1px solid color-mix(in srgb, var(--st-accent) 28%, transparent);
}
.studio-batch-pick-bar.hidden { display: none; }
.studio-batch-pick-hint {
  font-size: 12px;
  color: var(--st-accent);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-batch-video-progress {
  font-size: 12px;
  color: var(--st-muted);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-batch-video-progress.is-busy { color: var(--st-accent); }
.studio-batch-video-progress.is-err { color: #dc2626; }
.studio-batch-video-progress.is-ok { color: #16a34a; }
.studio-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
}
.studio-confirm-overlay.hidden { display: none; }
.studio-confirm-card {
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 14px;
  border-radius: 14px;
  background: var(--st-panel);
  border: 1px solid var(--st-border);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}
.studio-confirm-title {
  margin: 0;
  font-size: 1rem;
  color: var(--st-text);
}
.studio-confirm-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: var(--st-text);
}
.studio-confirm-summary span {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
}
.studio-confirm-summary strong {
  display: block;
  font-size: 16px;
  margin-top: 2px;
  color: var(--st-accent);
}
.studio-confirm-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  font-size: 12px;
  line-height: 1.55;
  color: var(--st-text);
  white-space: pre-wrap;
}
.studio-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.studio-confirm-card--gate {
  width: min(400px, 100%);
  max-height: none;
}
.studio-clipnest-gate-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--st-muted, #64748b);
}
.studio-clipnest-gate-err {
  margin: 0;
  font-size: 12px;
  color: #b91c1c;
}
.studio-clipnest-gate-err.hidden { display: none !important; }
.studio-drama-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px;
}
.studio-drama-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--st-accent) 22%, transparent);
  background: color-mix(in srgb, var(--st-panel, #1a1a1a) 88%, transparent);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.studio-drama-mode-btn strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}
.studio-drama-mode-btn span {
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.72;
}
.studio-drama-mode-btn:hover {
  border-color: color-mix(in srgb, var(--st-accent) 55%, transparent);
}
.studio-drama-mode-btn.is-active {
  border-color: var(--st-accent);
  background: color-mix(in srgb, var(--st-accent) 14%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--st-accent) 35%, transparent);
}
.studio-drama-mode-btn.is-active span {
  opacity: 0.9;
}
@media (max-width: 640px) {
  .studio-drama-mode {
    grid-template-columns: 1fr;
  }
}

.studio-quick-card {
  max-width: 720px;
  margin: 24px auto;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--st-panel);
  border: 1px solid var(--st-border);
}
.studio-expand-card { max-width: 860px; }
.studio-expand-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 900px) {
  .studio-expand-cols { grid-template-columns: 1fr; }
}
.studio-expand-ep {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px !important;
}
.studio-expand-ep.is-active {
  border-left: 3px solid #7c3aed;
  background: #f5f3ff;
}
.studio-expand-ep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-muted { color: var(--st-muted); font-size: 12px; }
.studio-quick-drop {
  margin: 12px 0 0;
  padding: 18px 16px;
  border-radius: 12px;
  border: 1.5px dashed var(--st-border);
  background: var(--st-panel2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.studio-quick-drop:hover,
.studio-quick-drop:focus-visible {
  border-color: var(--st-accent);
  outline: none;
}
.studio-quick-drop.is-dragover {
  border-color: var(--st-accent);
  border-style: solid;
  background: var(--st-accent-soft);
  box-shadow: inset 0 0 0 1px var(--st-accent);
}
.studio-quick-drop-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--st-text);
}
.studio-quick-drop-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--st-muted);
}
.studio-quick-actions {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
  justify-content: center;
  flex-wrap: wrap;
}
.studio-quick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* 约 5 行可见：行高 ≈ 22(序号)+16(padding)+2(边框)，行间距 6 */
  max-height: calc(5 * 40px + 4 * 6px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 var(--st-panel2);
}
.studio-quick-list::-webkit-scrollbar { width: 8px; }
.studio-quick-list::-webkit-scrollbar-track { background: var(--st-panel2); border-radius: 4px; }
.studio-quick-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.studio-quick-list li {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  font-size: 12px;
}
.studio-quick-list li .studio-quick-ord {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--st-accent-soft);
  color: var(--st-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.studio-quick-list li .studio-quick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-quick-list li button {
  border: none;
  background: transparent;
  color: var(--st-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
}
.studio-quick-list li button:hover { color: var(--st-accent); }
.studio-quick-meta, .studio-quick-estimate {
  font-size: 12px;
  color: var(--st-muted);
  margin: 8px 0 0;
}
.studio-quick-estimate strong { color: var(--st-accent); }
.studio-quick-start-row { margin-top: 16px; }
.studio-quick-banner {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #0f172a;
  color: #e2e8f0;
  border-top: 1px solid #334155;
}
.studio-quick-banner.is-error {
  background: #3f1518;
  border-top-color: rgba(248, 113, 113, 0.45);
}
.studio-quick-banner.is-error .studio-quick-banner-fill {
  background: #f87171;
}
.studio-quick-banner.hidden { display: none; }
.studio-quick-banner-spin {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-top-color: #38bdf8;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}
.studio-quick-banner.is-running .studio-quick-banner-spin {
  opacity: 1;
  animation: studio-quick-spin 0.75s linear infinite;
}
.studio-quick-banner.is-waiting .studio-quick-banner-spin {
  opacity: 0.85;
  border-top-color: #94a3b8;
  animation: studio-quick-spin-pulse 1.4s ease-in-out infinite;
}
.studio-quick-banner.is-error .studio-quick-banner-spin {
  border-top-color: #f87171;
  opacity: 0.5;
  animation: none;
}
@keyframes studio-quick-spin {
  to { transform: rotate(360deg); }
}
@keyframes studio-quick-spin-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
.studio-quick-banner.is-running .studio-quick-banner-fill {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #7dd3fc, #38bdf8);
  background-size: 200% 100%;
  animation: studio-quick-bar-shimmer 1.4s ease-in-out infinite;
}
.studio-quick-banner.is-waiting .studio-quick-banner-fill {
  background: #64748b;
}
@keyframes studio-quick-bar-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-quick-banner.is-running .studio-quick-banner-spin,
  .studio-quick-banner.is-running .studio-quick-banner-fill,
  .studio-quick-banner.is-waiting .studio-quick-banner-spin {
    animation: none;
  }
}
.studio-quick-banner-main { flex: 1; min-width: 180px; font-size: 12px; }
.studio-quick-banner-main strong { display: block; font-size: 13px; margin-bottom: 2px; }
.studio-quick-banner-bar {
  flex: 1;
  min-width: 120px;
  height: 6px;
  border-radius: 99px;
  background: #334155;
  overflow: hidden;
}
.studio-quick-banner-fill {
  height: 100%;
  width: 0%;
  background: #38bdf8;
  transition: width 0.25s ease;
}
.studio-quick-banner-actions { display: flex; gap: 8px; }
.studio-char-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.studio-asset-cast-bank-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--st-border) 80%, transparent);
}
.studio-asset-cast-bank-line {
  display: block;
  font-size: 11px;
  color: #0f766e;
  font-weight: 600;
}
.studio-asset-cast-bank-line.is-muted {
  color: #64748b;
  font-weight: 500;
}
.studio-asset-cast-bank-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.studio-asset-dropzone {
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.studio-asset-dropzone.is-empty-photo {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--st-accent) 45%, var(--st-border));
  min-height: 140px;
}
.studio-asset-dropzone.is-dragover {
  border-color: var(--st-accent);
  border-style: solid;
  background: color-mix(in srgb, var(--st-accent) 12%, var(--st-panel2));
  box-shadow: inset 0 0 0 1px var(--st-accent), 0 0 0 2px color-mix(in srgb, var(--st-accent) 28%, transparent);
}
.studio-asset-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
  padding: 18px 12px;
  text-align: center;
  color: var(--st-muted);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--st-accent) 6%, transparent), transparent);
}
.studio-asset-photo-empty strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--st-text);
}
.studio-asset-photo-empty span {
  font-size: 12px;
  line-height: 1.35;
}
.studio-asset-drop-hint--overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  height: min(58%, 160px);
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  background: color-mix(in srgb, var(--st-accent) 55%, rgba(15, 23, 42, 0.72));
  pointer-events: none;
}
.studio-asset-dropzone.is-empty-photo .studio-asset-prompt-thumb {
  display: none;
}
.studio-asset-dropzone.is-dragover .studio-asset-drop-hint--overlay {
  display: flex;
}
.studio-asset-dropzone.is-dragover .studio-asset-photo-empty {
  color: var(--st-text);
}
.studio-canvas-wrap.batch-pick-mode {
  outline: 2px dashed color-mix(in srgb, var(--st-accent) 55%, transparent);
  outline-offset: -2px;
}
.studio-canvas-wrap.batch-pick-mode .canvas-hint {
  color: var(--st-accent);
}
.studio-canvas-wrap .node-card.batch-picked {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.28);
}
.studio-canvas-wrap .node-card.batch-picked::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  z-index: 4;
}
.studio-canvas-i2v {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--st-muted);
  flex-shrink: 0;
}
.studio-canvas-i2v-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.studio-canvas-i2v select {
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--st-border);
  background: #fff;
  min-width: 88px;
  max-width: 120px;
}
.studio-btn--sm { padding: 5px 10px; font-size: 12px; }
.studio-stats-badge {
  font-size: 11px;
  color: var(--st-muted);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--st-border);
}
.studio-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  background:
    linear-gradient(var(--st-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--st-grid) 1px, transparent 1px),
    var(--st-canvas-bg);
  background-size: 24px 24px;
  cursor: grab;
}
.studio-canvas-wrap.dragging { cursor: grabbing; }
body.node-dragging { cursor: grabbing; user-select: none; }
.studio-canvas-wrap .canvas-hint {
  position: absolute; left: 12px; bottom: 10px; z-index: 20;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--st-border);
  font-size: 0.72rem; color: var(--st-muted); pointer-events: none;
  box-shadow: var(--st-shadow);
}
.studio-canvas-wrap .canvas-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.studio-canvas-wrap .edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 3; }
.studio-canvas-wrap .nodes { position: absolute; left: 0; top: 0; z-index: 1; }
.studio-canvas-wrap .canvas-empty {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  color: var(--st-muted);
  background: color-mix(in srgb, var(--st-panel, #f8fafc) 88%, transparent);
  pointer-events: none;
}
.studio-canvas-wrap .canvas-empty:not(.hidden) {
  pointer-events: auto;
}
.studio-canvas-wrap .node-card {
  position: absolute; width: 220px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  overflow: visible;
}
.studio-canvas-wrap .node-card.mainline-node { border-color: #93c5fd; }
.studio-canvas-wrap .node-card.branch-node { background: #fafbfc; border-color: #c4b5fd; }
.studio-canvas-wrap .node-route-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.studio-canvas-wrap .mainline-node .node-route-tag {
  background: #dbeafe;
  color: #1d4ed8;
}
.studio-canvas-wrap .branch-node .node-route-tag {
  background: #ede9fe;
  color: #6d28d9;
}
.studio-canvas-wrap .node-card.fork-node {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.18);
}
.studio-canvas-wrap .node-outcome-badge.is-fork {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}
.studio-canvas-wrap .node-card.terminal-node {
  width: 168px;
  min-height: 76px;
  border-style: dashed;
  border-width: 2px;
}
.studio-canvas-wrap .node-card.terminal-ok {
  border-color: #22c55e;
  background: #f0fdf4;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28), 0 0 0 2px rgba(34, 197, 94, 0.22);
}
.studio-canvas-wrap .node-card.terminal-next-chapter {
  border-color: #8b5cf6;
  background: #f5f3ff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28), 0 0 0 2px rgba(139, 92, 246, 0.22);
}
.studio-canvas-wrap .node-outcome-badge.is-next-chapter {
  background: #ede9fe;
  color: #6d28d9;
}
.studio-canvas-wrap .node-card.terminal-fail {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28), 0 0 0 2px rgba(239, 68, 68, 0.22);
}
.studio-canvas-wrap .node-card.ending-node {
  border-width: 2px;
  border-style: dashed;
}
.studio-canvas-wrap .node-card.ending-node.terminal-ok {
  background: #f0fdf4;
}
.studio-canvas-wrap .node-card.ending-node.terminal-fail {
  background: #fef2f2;
}
.studio-canvas-wrap .node-outcome-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.studio-canvas-wrap .node-outcome-badge.is-clear {
  background: #bbf7d0;
  color: #14532d;
}
.studio-canvas-wrap .node-outcome-badge.is-death {
  background: #fecaca;
  color: #7f1d1d;
}
.studio-canvas-wrap .node-card.terminal-node .node-head { font-size: 0.82rem; padding-bottom: 4px; }
.studio-canvas-wrap .terminal-body { -webkit-line-clamp: 3; font-size: 0.72rem; }
.studio-canvas-wrap .node-card.selected { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }
.studio-canvas-wrap .node-card.dragging-node { z-index: 30; border-color: #93c5fd; }
.studio-canvas-wrap .node-head { padding: 10px 12px 6px; font-weight: 700; font-size: 0.92rem; cursor: grab; color: #0f172a; }
.studio-chapter-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
  background: var(--st-panel, #fff);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.studio-chapter-bar.hidden { display: none !important; }
.studio-chapter-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  font: inherit;
  color: inherit;
  min-width: 120px;
  flex: 0 0 auto;
  text-align: left;
}
.studio-chapter-tab:hover { border-color: #a78bfa; }
.studio-chapter-tab.is-active {
  border-color: #7c3aed;
  background: #ede9fe;
  box-shadow: 0 0 0 1px #7c3aed inset;
}
.studio-chapter-tab.is-empty { opacity: 0.55; }
.studio-chapter-tab.is-empty.is-active { opacity: 1; border-color: #f59e0b; background: #fffbeb; }
.studio-chapter-tab.is-continuing {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb inset;
  animation: studio-continue-pulse 1.6s ease-in-out infinite;
}
.studio-chapter-tab.is-continuing .studio-chapter-tab-num::after {
  content: ' · 生成中';
  color: #2563eb;
}
.studio-continue-banner {
  margin: 0 16px 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  font-size: 0.86rem;
  color: #1e3a8a;
  line-height: 1.45;
}
.studio-continue-banner.hidden { display: none !important; }
.studio-continue-banner strong { color: #1d4ed8; }
.studio-continue-banner small { display: block; margin-top: 4px; color: #475569; font-size: 0.78rem; }
@keyframes studio-continue-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}
.studio-chapter-tab-num { font-size: 0.72rem; font-weight: 700; color: #5b21b6; }
.studio-chapter-tab-title { font-size: 0.82rem; color: #334155; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.studio-canvas-wrap .node-meta { padding: 0 12px 8px; font-size: 0.72rem; color: #64748b; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.studio-canvas-wrap .node-seed-from-select {
  font-size: 0.66rem;
  padding: 1px 3px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  max-width: 132px;
}
.studio-canvas-wrap .node-seed-from-select:focus { outline: 2px solid rgba(37,99,235,0.35); border-color: #93c5fd; }
.studio-canvas-wrap .node-chapter-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 600;
}
.studio-canvas-wrap .node-video-badge {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}
.studio-canvas-wrap .node-video-badge.is-ok { color: #16a34a; }
.studio-canvas-wrap .node-video-badge.is-busy { color: #2563eb; }
.studio-canvas-wrap .node-video-badge.is-err { color: #ef4444; }
.studio-canvas-wrap .node-seed-thumb {
  margin: 8px 10px 0;
  border-radius: 6px;
  overflow: hidden;
  background: #e2e8f0;
  min-height: 64px;
  position: relative;
}
.studio-canvas-wrap .node-seed-thumb:empty { display: none; }
.studio-canvas-wrap .node-seed-thumb img,
.studio-canvas-wrap .node-seed-thumb video {
  width: 100%;
  height: 64px;
  object-fit: cover;
  display: block;
  background: #0f172a;
}
.studio-canvas-wrap .node-video-thumb-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #bbf7d0;
  pointer-events: none;
}
.studio-canvas-wrap .node-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 8px;
}
.studio-canvas-wrap .node-char-tag {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
  line-height: 1.3;
}
.studio-canvas-wrap .node-body { padding: 0 12px 12px; font-size: 0.78rem; color: #334155; -webkit-line-clamp: 4; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.studio-canvas-wrap .node-port {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
  pointer-events: none;
}
.studio-canvas-wrap .node-port-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.studio-canvas-wrap .node-port-name {
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.studio-canvas-wrap .node-port-in {
  left: 0;
  flex-direction: row-reverse;
  transform: translate(0, -50%);
}
.studio-canvas-wrap .node-port-in .node-port-dot {
  background: #64748b;
  box-shadow: 0 0 0 1px #94a3b8;
  transform: translateX(-50%);
}
.studio-canvas-wrap .node-port-in .node-port-name {
  color: #64748b;
  padding-right: 2px;
}
.studio-canvas-wrap .node-port-out {
  left: 100%;
  transform: translate(0, -50%);
}
.studio-canvas-wrap .node-port-out .node-port-dot {
  transform: translateX(50%);
}
.studio-canvas-wrap .node-port-out .node-port-name {
  padding-left: 2px;
}
.studio-canvas-wrap .node-port-out.mainline .node-port-dot {
  background: #2563eb;
  box-shadow: 0 0 0 1px #93c5fd;
}
.studio-canvas-wrap .node-port-out.mainline .node-port-name {
  color: #1d4ed8;
}
.studio-canvas-wrap .node-port-out.branch .node-port-dot {
  background: #7c3aed;
  box-shadow: 0 0 0 1px #c4b5fd;
}
.studio-canvas-wrap .node-port-out.branch .node-port-name {
  color: #6d28d9;
}
.studio-node-inspector {
  flex: 1;
  min-height: 0;
}
.studio-shots-drawer {
  position: absolute; inset: 48px 0 0 0; z-index: 40;
  background: var(--st-panel); border-top: 1px solid var(--st-border);
  display: flex; flex-direction: column;
}
.studio-shots-drawer.hidden { display: none; }
.studio-assets-scroll { flex: 1; overflow-y: auto; padding: 12px; min-height: 0; }

.studio-chat {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.studio-msg {
  background: var(--st-panel);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--st-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.studio-msg-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
.studio-msg-icon { font-size: 18px; }
.studio-msg-role { color: var(--st-accent); }
.studio-msg-time { margin-left: auto; font-size: 11px; color: var(--st-muted); font-weight: 400; }
.studio-msg-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--st-text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.studio-style-picker { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; }

.studio-director-panel {
  padding: 0 12px 10px;
  border-top: 1px solid var(--st-border);
}
.studio-director-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 4px;
}
.studio-qr-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--st-border);
  background: var(--st-panel);
  color: var(--st-text);
  font-size: 12px;
  cursor: pointer;
}
.studio-qr-chip:hover:not(:disabled) { border-color: var(--st-accent); background: var(--st-accent-soft); }
.studio-qr-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.studio-composer.is-busy { opacity: 0.7; pointer-events: none; }
.studio-director-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px 8px;
}
#directorComposer {
  display: flex;
  gap: 8px;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--st-border);
}
#directorComposer .studio-input { flex: 1; }

.studio-board-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.studio-board-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--st-border);
  background: transparent;
  color: var(--st-muted);
  cursor: pointer;
  font-size: 13px;
}
.studio-board-tab.is-active {
  border-color: var(--st-accent);
  color: var(--st-text);
  background: var(--st-accent-soft);
}
.studio-board-panel.hidden { display: none; }

.studio-graph-wrap {
  overflow: auto;
  max-height: 420px;
  border: 1px solid var(--st-border);
  border-radius: 12px;
  background: var(--st-canvas-bg);
  margin-bottom: 12px;
}
.studio-graph-viewport { position: relative; min-height: 280px; }
.studio-graph-edges {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
.studio-graph-nodes { position: relative; }
.studio-node-card {
  position: absolute;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--st-border);
  background: var(--st-panel);
  color: var(--st-text);
  cursor: pointer;
  box-shadow: var(--st-shadow);
}
.studio-node-card:hover, .studio-node-card.is-selected {
  border-color: var(--st-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.studio-node-id {
  display: inline-block;
  font-size: 11px;
  color: var(--st-muted);
  margin-bottom: 4px;
}
.studio-node-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.studio-node-card p {
  margin: 0;
  font-size: 11px;
  color: var(--st-muted);
  line-height: 1.4;
}
.studio-node-fork {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--st-pink);
}
.studio-node-content { white-space: pre-wrap; line-height: 1.55; font-size: 13px; }
.studio-meta { font-size: 12px; color: var(--st-muted); margin: 8px 0; }
.studio-choice-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.studio-choice {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--st-border);
  font-size: 12px;
}
.studio-choice.branch { border-color: #6d28d9; }
.studio-choice span {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--st-muted);
  margin-right: 6px;
}

.studio-style-btn {
  text-align: left;
  background: var(--st-panel);
  border: 1px solid var(--st-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--st-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.studio-style-btn:hover { border-color: var(--st-accent); background: var(--st-accent-soft); }
.studio-style-btn strong { display: block; font-size: 14px; margin-bottom: 4px; }
.studio-style-btn span { font-size: 12px; color: var(--st-muted); }
.studio-style-btn.is-rec { border-color: var(--st-pink); background: #f5f3ff; }

.studio-composer { padding: 12px 16px; border-top: 1px solid var(--st-border); background: var(--st-panel); }

/* 扩写 · 方向确认：上表单 / 下摘要，侧栏全高给操作区 */
.studio-side-pane.is-expand-dir {
  display: flex;
  flex-direction: column;
}
.studio-side-pane.is-expand-dir > .studio-chat,
.studio-side-pane.is-expand-dir > .studio-chat-resume,
.studio-side-pane.is-expand-dir > #directorPanel,
.studio-side-pane.is-expand-dir > #directorComposer,
.studio-side-pane.is-expand-dir > #reviewProgress {
  display: none !important;
}
.studio-expand-dir {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 4px;
}
.studio-expand-dir.hidden { display: none !important; }
.studio-expand-dir-form {
  flex: 0 0 auto;
  margin: 10px 10px 0;
  padding: 14px 12px 16px;
  border: 1px solid var(--st-border);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.studio-expand-dir-hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #475569;
}
.studio-expand-asset-nudge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #fff7ed 100%);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18), 0 8px 20px rgba(245, 158, 11, 0.12);
  animation: studio-expand-asset-nudge-pulse 1.8s ease-in-out infinite;
}
.studio-expand-asset-nudge.hidden { display: none !important; }
.studio-expand-asset-nudge.is-pending {
  border-color: #f59e0b;
}
.studio-expand-asset-nudge.is-busy {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 55%, #ecfeff 100%);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2), 0 8px 20px rgba(14, 165, 233, 0.12);
  animation: studio-expand-asset-nudge-busy 1.4s ease-in-out infinite;
}
.studio-expand-asset-nudge-orb {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #fbbf24 40%, #f59e0b 100%);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
  animation: studio-expand-asset-orb 1.6s ease-out infinite;
}
.studio-expand-asset-nudge.is-busy .studio-expand-asset-nudge-orb {
  background: radial-gradient(circle at 35% 30%, #fff 0, #7dd3fc 40%, #0ea5e9 100%);
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45);
  animation-name: studio-expand-asset-orb-busy;
}
.studio-expand-asset-nudge-main {
  min-width: 0;
  flex: 1;
}
.studio-expand-asset-nudge-main strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  letter-spacing: 0.01em;
  margin-bottom: 3px;
}
.studio-expand-asset-nudge.is-busy .studio-expand-asset-nudge-main strong {
  color: #075985;
}
.studio-expand-asset-nudge-main small {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: #78350f;
}
.studio-expand-asset-nudge.is-busy .studio-expand-asset-nudge-main small {
  color: #0c4a6e;
}
.studio-expand-dir-form.is-assets-mode .studio-expand-dir-hint {
  font-size: 13px;
  font-weight: 600;
  color: #9a3412;
}
.studio-expand-dir-form.is-nodes-locked #expandAppearanceRematch,
.studio-expand-dir-form.is-nodes-locked #expandCastBank,
.studio-expand-dir-form.is-nodes-locked .studio-brief-field:has(#expandProtagonistSelect),
.studio-expand-dir-form.is-nodes-locked .studio-brief-field:has(#expandBranchDirection) {
  pointer-events: none;
  opacity: 0.62;
  filter: grayscale(0.15);
}
.studio-expand-dir-form.is-nodes-locked .studio-expand-dir-hint {
  color: #b45309;
  font-weight: 600;
}
.studio-expand-dir-form.is-assets-mode .studio-expand-dir-submit.studio-btn--primary:not(:disabled) {
  animation: studio-expand-asset-cta-pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), 0 6px 16px rgba(245, 158, 11, 0.2);
}
@keyframes studio-expand-asset-nudge-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18), 0 8px 20px rgba(245, 158, 11, 0.12); }
  50% { transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.28), 0 10px 24px rgba(245, 158, 11, 0.2); }
}
@keyframes studio-expand-asset-nudge-busy {
  0%, 100% { box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2), 0 8px 20px rgba(14, 165, 233, 0.12); }
  50% { box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.32), 0 10px 24px rgba(14, 165, 233, 0.2); }
}
@keyframes studio-expand-asset-orb {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
@keyframes studio-expand-asset-orb-busy {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}
@keyframes studio-expand-asset-cta-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .studio-expand-asset-nudge,
  .studio-expand-asset-nudge-orb,
  .studio-expand-dir-form.is-assets-mode .studio-expand-dir-submit.studio-btn--primary:not(:disabled),
  .expand-auto-island.is-need-assets {
    animation: none;
  }
}
.studio-expand-dir-form .studio-brief-field {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.studio-expand-dir-form .studio-brief-field > span {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.studio-expand-dir-form .studio-brief-field > span small {
  font-weight: 400;
  color: #94a3b8;
}
.studio-expand-cast-bank {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: #fff;
}
.studio-expand-cast-bank-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.studio-expand-cast-bank-head strong {
  font-size: 13px;
  color: #0f172a;
}
.studio-expand-cast-bank-head small {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.studio-expand-cast-bank-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}
.studio-expand-cast-bank-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.studio-expand-cast-bank-count {
  font-size: 12px;
  color: #64748b;
}
.studio-expand-cast-bank-list.is-empty::after {
  content: '尚无素材 — 在下方给角色裁切定妆或选音色后自动入库';
  font-size: 12px;
  color: #94a3b8;
  padding: 4px 0;
}
.studio-expand-cast-bank-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  border-radius: 10px;
  border: 1px solid var(--st-border);
  background: #f8fafc;
  min-width: 0;
  max-width: 100%;
}
.studio-expand-cast-bank-card img {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: #e2e8f0;
  flex: 0 0 auto;
}
.studio-expand-cast-bank-card .thumb-empty {
  width: 40px;
  height: 52px;
  border-radius: 6px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #94a3b8;
  flex: 0 0 auto;
}
.studio-expand-cast-bank-meta {
  min-width: 0;
}
.studio-expand-cast-bank-meta strong {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-expand-cast-bank-meta small {
  font-size: 11px;
  color: #64748b;
}
.studio-expand-cast-bank-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.studio-expand-cast-bank-hint.is-ok { color: #15803d; }
.studio-expand-cast-bank-hint.is-err { color: #b91c1c; }
.studio-expand-cast-pick-btn {
  align-self: flex-start;
  margin-top: 2px;
}
.studio-expand-cast-bank-linked {
  font-size: 11px;
  color: #1d4ed8;
  font-weight: 600;
}
.expand-cast-bank-modal-card {
  width: min(780px, 100%);
}
.expand-cast-bank-modal-grid {
  flex: 1;
  min-height: 160px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 4px 2px 8px;
}
.expand-cast-bank-modal-grid.is-empty::after {
  content: '素材库为空。请先在某集裁切定妆或选取音色，素材会自动入库。';
  grid-column: 1 / -1;
  font-size: 13px;
  color: #94a3b8;
  padding: 28px 8px;
  text-align: center;
}
.expand-cast-bank-modal-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--st-border);
  background: var(--st-panel2);
  cursor: pointer;
  text-align: left;
  color: var(--st-text);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.expand-cast-bank-modal-item-del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.expand-cast-bank-modal-item-del:hover {
  background: #b91c1c;
}
.expand-cast-bank-modal-item:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}
.expand-cast-bank-modal-item.is-selected {
  border-color: var(--st-accent);
  background: var(--st-accent-soft);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) inset;
}
.expand-cast-bank-modal-item img,
.expand-cast-bank-modal-item .thumb-empty {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: #e2e8f0;
}
.expand-cast-bank-modal-item .thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #94a3b8;
}
.expand-cast-bank-modal-item strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}
.expand-cast-bank-modal-item small {
  font-size: 11px;
  color: #64748b;
}
.studio-expand-cast-footer {
  display: none;
}
.studio-expand-cast-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 96px;
}
.studio-expand-cast-save-bank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 68px;
  margin: 0;
  padding: 6px 4px;
  border: 1px solid rgba(37, 99, 235, 0.45);
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}
.studio-expand-cast-save-bank:hover:not(:disabled) {
  background: #1d4ed8;
}
.studio-expand-cast-save-bank:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.studio-expand-cast-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  margin-top: auto;
}
.studio-expand-cast-actions .studio-btn {
  width: 100%;
  min-height: 31px;
  justify-content: center;
}
.studio-expand-cast-voice {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}
.studio-expand-cast-voice-status {
  flex: 0 0 auto;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
}
.studio-expand-cast-voice-status.has-voice { color: #1d4ed8; font-weight: 600; }
.studio-expand-cast-voice .studio-btn {
  flex: 0 0 auto;
}
.studio-asset-cap > .studio-char-voice {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
}
.studio-expand-rematch {
  margin: 0 0 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.9));
}
.studio-expand-rematch.hidden { display: none !important; }
.studio-expand-cast {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 12px;
}
.studio-expand-cast-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.studio-expand-cast-card.is-locate {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}
.studio-expand-cast-main {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 10px;
  background: #e2e8f0;
  display: block;
}
.studio-expand-cast-main.studio-zoomable {
  cursor: zoom-in;
}
.studio-expand-cast-main.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 6px;
}
.studio-expand-cast-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-self: stretch;
}
.studio-expand-cast-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.studio-expand-cast-cands {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.studio-expand-cast-cand {
  flex: 0 0 auto;
  position: relative;
  width: 48px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #f1f5f9;
}
.studio-expand-cast-cand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.studio-expand-cast-cand-num {
  position: absolute;
  left: 2px;
  bottom: 2px;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  pointer-events: none;
}
.studio-expand-cast-cand.is-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}
.studio-expand-cast-cand.is-selected .studio-expand-cast-cand-num {
  background: #2563eb;
}
.studio-expand-cast-cand:disabled {
  cursor: default;
  opacity: 0.85;
}
.studio-expand-cast-badge {
  font-size: 11px;
  color: #1d4ed8;
  font-weight: 600;
}
.studio-expand-cast-meta > .studio-btn {
  align-self: flex-start;
}
.studio-expand-cast-actions .studio-btn {
  margin-top: 0;
  align-self: auto;
}
.studio-expand-cast-crop {
  border-color: rgba(37, 99, 235, 0.35) !important;
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  font-weight: 600;
}
.studio-expand-cast-crop:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.studio-expand-rematch-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.studio-expand-rematch-head strong {
  font-size: 13px;
  color: #0f172a;
}
.studio-expand-rematch-head small {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}
.studio-expand-rematch-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 22px minmax(0, 1.35fr);
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}
.studio-expand-rematch-cols.hidden,
.studio-expand-rematch-list.hidden,
.studio-expand-rematch-actions.hidden {
  display: none !important;
}
.studio-expand-rematch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(420px, 52vh);
  overflow: auto;
  padding-right: 2px;
}
.studio-expand-rematch-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 22px minmax(0, 1.35fr);
  gap: 8px;
  align-items: stretch;
}
.studio-expand-rematch-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 36px;
}
.studio-expand-rematch-name-input {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  min-height: 36px;
  width: 100%;
}
.studio-expand-rematch-name-input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
.studio-expand-rematch-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}
.studio-expand-rematch-row.is-crossed .studio-expand-rematch-link {
  color: #ea580c;
}
.studio-expand-rematch-row select.studio-input {
  font-size: 12.5px;
  padding: 7px 10px;
  min-height: 36px;
  width: 100%;
  min-width: 0;
}
.studio-expand-rematch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.studio-expand-rematch.is-rematch-locked .studio-expand-rematch-cols,
.studio-expand-rematch.is-rematch-locked .studio-expand-rematch-list {
  opacity: 0.55;
  pointer-events: none;
}
.studio-expand-rematch.is-rematch-locked .studio-expand-rematch-actions {
  opacity: 0.55;
}
.studio-expand-rematch-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #64748b;
  min-height: 1.2em;
}
.studio-expand-rematch-hint.is-ok { color: #15803d; }
.studio-expand-rematch-hint.is-err { color: #b91c1c; }
.studio-expand-dir-form .studio-input {
  font-size: 13px;
  padding: 8px 10px;
}
.studio-expand-dir-form .studio-input:disabled,
.studio-expand-dir-form textarea.studio-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f1f5f9;
  color: #64748b;
}
.studio-expand-dir-form textarea.studio-input {
  resize: vertical;
  min-height: 72px;
  max-height: 140px;
}
.studio-expand-dir-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.studio-expand-dir-submit {
  width: 100%;
  margin-top: 0;
}
/* 不再用 is-readonly 藏主按钮/分集/主角（改由 JS 按状态显隐，避免「确认生成没了」） */
.studio-expand-dir-form.is-auto-mode .studio-brief-field:has(#expandProtagonistSelect),
.studio-expand-dir-form.is-auto-mode .studio-brief-field:has(#expandBranchDirection) {
  display: none;
}
.studio-expand-dir-form.is-auto-mode .studio-expand-dir-hint {
  color: #0f766e;
}
.studio-expand-dir-log {
  flex: 0 0 auto;
  max-height: min(320px, 42vh);
  display: flex;
  flex-direction: column;
  margin: 10px 10px 12px;
  border: 1px solid var(--st-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.studio-expand-dir-log-head {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom: 1px solid var(--st-border);
  background: #fafafa;
}
.studio-expand-direction-msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px 14px;
}
.studio-expand-dir-msg {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--st-text);
}
.studio-expand-dir-msg:last-child { margin-bottom: 0; }
.studio-expand-dir-msg.is-user {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.18);
}
.studio-expand-dir-msg.is-assistant {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.studio-expand-dir-msg small {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.studio-expand-dir-msg div {
  white-space: pre-wrap;
  word-break: break-word;
}

.studio-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--st-text);
  font-size: 13px;
}
.studio-input:focus { outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.studio-board-col {
  background: var(--st-panel);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  padding: 16px;
  min-width: 0;
}
.studio-board-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.studio-board-head h2 { margin: 0; font-size: 1rem; }
.studio-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--st-panel2);
  color: var(--st-muted);
  border: 1px solid var(--st-border);
}

.studio-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.studio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.studio-table th {
  text-align: left;
  padding: 10px 8px;
  color: var(--st-muted);
  border-bottom: 1px solid var(--st-border);
  white-space: nowrap;
  font-weight: 500;
}
.studio-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--st-border);
  vertical-align: top;
  max-width: 200px;
  line-height: 1.4;
  color: var(--st-text);
}
.studio-table tbody tr { cursor: pointer; }
.studio-table tbody tr:hover { background: var(--st-accent-soft); }
.studio-table tbody tr.is-selected { background: #eff6ff; outline: 1px solid var(--st-accent); }

.studio-detail {
  background: var(--st-panel2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--st-border);
}
.studio-detail h3 { margin: 0 0 10px; font-size: 14px; }
.studio-detail-empty { color: var(--st-muted); font-size: 13px; margin: 0; }
.studio-kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; font-size: 12px; }
.studio-kv dt { color: var(--st-muted); margin: 0; }
.studio-kv dd { margin: 0; line-height: 1.45; }

.studio-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .studio-assets { grid-template-columns: 1fr; } }
.studio-asset-block h3 { font-size: 13px; margin: 0; color: var(--st-muted); }
.studio-asset-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.studio-asset-hint {
  margin: 0 0 8px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
}
.studio-expand-info-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.studio-expand-info-section h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--st-muted);
  font-weight: 600;
}
.studio-expand-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.studio-expand-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 12px;
  line-height: 1.45;
}
.studio-expand-info-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--st-panel2);
  cursor: zoom-in;
}
.studio-expand-info-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 11px;
  cursor: default;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}
.studio-expand-info-meta {
  min-width: 0;
  flex: 1;
}
.studio-expand-info-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}
.studio-expand-info-brief {
  color: #64748b;
  font-size: 11px;
}
.studio-asset-gate-hint {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #0f172a;
  background: #fef3c7;
  border-bottom: 1px solid #fde68a;
}
.studio-asset-accordion-item {
  border-radius: 12px;
  border: 1px solid transparent;
}
.studio-asset-accordion-item.is-prompt-expanded {
  border-color: var(--st-border);
  background: var(--st-panel2);
}
.studio-asset-accordion-item.is-prompt-expanded .studio-asset-card {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: transparent;
  box-shadow: none;
}
.studio-asset-accordion-item.is-prompt-expanded .studio-asset-card.is-selected {
  box-shadow: none;
}
.studio-asset-prompt-chevron {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 11px;
  color: #64748b;
  pointer-events: none;
  transition: transform 0.15s;
}
.studio-asset-accordion-item.is-prompt-expanded .studio-asset-prompt-chevron {
  transform: rotate(180deg);
  color: var(--st-accent);
}
.studio-asset-prompt-drawer {
  display: none;
  padding: 0 10px 10px;
}
.studio-asset-prompt-drawer.is-open {
  display: block;
}
.studio-asset-prompt-drawer .studio-prompt-edit {
  min-height: 96px;
  margin-bottom: 8px;
  font-size: 11px;
}
.studio-asset-prompt-drawer-label {
  margin: 0 0 6px;
  font-size: 11px;
  color: #64748b;
}
.studio-asset-prompt-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  margin: 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(59, 130, 246, 0.12));
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: #64748b;
  font-size: 22px;
  font-weight: 700;
}
.studio-video-prompt-acc {
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
}
.studio-video-prompt-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: #f8fafc;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.studio-video-prompt-toggle:hover {
  background: #f1f5f9;
}
.studio-video-prompt-acc .studio-asset-prompt-chevron {
  position: static;
  pointer-events: none;
}
.studio-video-prompt-body {
  padding: 0 10px 10px;
}
.studio-video-prompt-body .studio-video-submit-prompt-text {
  max-height: 280px;
  overflow: auto;
}
.studio-video-prompt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.studio-video-prompt-badge {
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px 8px;
}
.studio-video-prompt-badge.is-override {
  color: #1d4ed8;
  background: #dbeafe;
}
.studio-video-prompt-count {
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.studio-video-prompt-edit {
  width: 100%;
  min-height: 220px;
  max-height: 45vh;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--st-text);
  background: #fff;
  white-space: pre-wrap;
  overflow: auto;
}
.studio-video-prompt-edit:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.studio-video-prompt-part-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.studio-video-prompt-config,
.studio-video-prompt-assembled-text {
  margin: 0;
  padding: 10px 12px;
  max-height: 180px;
  overflow: auto;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}
.studio-video-prompt-assembled {
  margin-top: 10px;
}
.studio-video-prompt-assembled > summary {
  cursor: pointer;
  font-size: 12px;
  color: #64748b;
  user-select: none;
}
.studio-video-prompt-assembled-text {
  margin-top: 6px;
  max-height: 280px;
}
.studio-video-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.studio-asset-grid { display: flex; flex-direction: column; gap: 10px; }
.studio-asset-card {
  position: relative;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.studio-asset-card:hover { border-color: #94a3b8; }
.studio-asset-card.is-selected {
  border-color: var(--st-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.studio-turnaround-grid figure {
  cursor: pointer;
  margin: 0;
  transition: opacity 0.15s;
}
.studio-turnaround-grid figure.is-selected-view { outline: 2px solid var(--st-accent); border-radius: 6px; }
.studio-insp-preview {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--st-border);
  background: var(--st-panel2);
}
.studio-insp-preview img { width: 100%; display: block; }
.studio-scene-ref-list { display: flex; flex-direction: column; gap: 10px; }
.studio-scene-ref {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--st-border);
  border-radius: 10px;
  background: var(--st-panel2);
}
.studio-scene-ref.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.studio-scene-ref.is-clickable:hover,
.studio-scene-ref.is-clickable:focus-visible {
  border-color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
  outline: none;
}
.studio-scene-ref.is-compact { padding: 6px 8px; gap: 10px; }
.studio-scene-ref-thumb {
  flex: 0 0 88px;
  width: 88px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--st-panel);
  border: 1px solid var(--st-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.studio-scene-ref.is-compact .studio-scene-ref-thumb {
  flex-basis: 72px;
  width: 72px;
}
.studio-scene-ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-scene-ref-empty {
  font-size: 11px;
  color: var(--st-muted);
  text-align: center;
  padding: 4px;
  line-height: 1.35;
}
.studio-scene-ref-info { flex: 1; min-width: 0; }
.studio-scene-ref-info strong { display: block; font-size: 13px; margin-bottom: 4px; }
.studio-scene-ref-info small { display: block; color: var(--st-muted); font-size: 11px; word-break: break-all; }
.studio-scene-ref-info .studio-meta { margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.studio-video-gen-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.studio-video-regen-btn {
  min-width: 36px;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
}
.studio-video-gen-status { font-size: 12px; color: var(--st-muted); }
.studio-video-gen-status.is-busy { color: #2563eb; }
.studio-video-gen-status.is-ok { color: #16a34a; }
.studio-video-gen-status.is-err { color: #f87171; }
.studio-node-seed-section {
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  border-radius: 10px;
  padding: 10px 12px 12px;
  margin-bottom: 14px;
}
.studio-node-seed-section h4 { color: var(--st-text); margin: 0; }
.studio-node-seed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.studio-seed-refresh-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}
.studio-seed-refresh-btn:disabled { opacity: 0.6; cursor: wait; }
.studio-video-gen-meta { font-size: 12px; color: var(--st-muted); margin: 0 0 8px; }
.studio-video-gen-meta.studio-video-gen-warn { color: #b45309; }
.studio-video-seed-host { margin-bottom: 0; }
.studio-video-seed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.studio-video-seed-item { margin: 0; }
.studio-video-seed-item figcaption { margin-bottom: 6px; }
.studio-video-seed-img img { border-radius: 8px; }
.studio-video-submit-preview-host {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--st-border);
}
.studio-video-submit-preview-host.hidden { display: none; }
.studio-video-submit-panel { margin-top: 4px; }
.studio-video-submit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 8px 0 10px;
}
.studio-video-submit-item { margin: 0; }
.studio-video-submit-item figcaption { margin-bottom: 6px; line-height: 1.45; }
.studio-video-submit-prompt { margin-top: 8px; }
.studio-video-submit-prompt summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--st-muted);
  user-select: none;
}
.studio-video-submit-prompt-text {
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
}
.studio-video-preview {
  margin: 0 0 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--st-border);
}
.studio-video-preview video {
  width: 100%;
  max-height: min(52vh, 420px);
  display: block;
  background: #000;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  margin: 0 auto;
}
.studio-btn-primary {
  background: var(--st-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.studio-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.studio-palette-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.studio-palette-swatches i {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--st-border);
  font-style: normal;
}
.studio-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.studio-tag {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--st-panel2);
  border: 1px solid var(--st-border);
  color: var(--st-text);
}
.studio-asset-card img { width: 100%; display: block; background: var(--st-panel2); }
/* 角色定妆主图：统一 9:16，与裁切/抽帧一致 */
.studio-asset-card[data-asset-type="character"] > img.studio-zoomable {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}
.studio-zoomable {
  cursor: zoom-in;
}
.studio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.studio-lightbox.hidden { display: none; }
.studio-lightbox-inner {
  position: relative;
  max-width: min(94vw, 960px);
  max-height: 92vh;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.studio-lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 72px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 8px;
  background: #020617;
}
.studio-lightbox-cap {
  margin: 10px 4px 2px;
  font-size: 0.85rem;
  color: #cbd5e1;
  text-align: center;
}
.studio-lightbox-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.studio-lightbox-close:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #fff;
}
.studio-asset-cap { padding: 8px 10px 36px; font-size: 12px; }
.studio-asset-cap small { display: block; color: var(--st-muted); margin-top: 4px; word-break: break-all; }
.studio-asset-sync-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  border: 1px solid #93c5fd;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.studio-asset-card.is-selected .studio-asset-sync-btn {
  opacity: 1;
  pointer-events: auto;
}
.studio-asset-card.is-selected .studio-asset-sync-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}
.studio-asset-card.is-selected .studio-asset-sync-btn:disabled,
.studio-asset-sync-btn.is-disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}
.studio-asset-card:not(.is-selected) .studio-asset-sync-btn {
  /* 未选中：可见但不可点，点卡片其它区域选中后再入库 */
  pointer-events: none;
}
.studio-asset-lib-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.studio-asset-card > .studio-asset-lib-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}
.studio-asset-card > .studio-asset-lib-badge ~ .studio-asset-prompt-chevron {
  top: 36px;
}
.studio-asset-lib-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.studio-asset-lib-detail {
  font-weight: 400;
  color: var(--st-muted);
  word-break: break-all;
}
.studio-asset-lib-badge--in {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}
.studio-asset-lib-badge--pending {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}
.studio-asset-lib-badge--failed,
.studio-asset-lib-badge--out {
  color: #9f1239;
  background: #ffe4e6;
  border-color: #fda4af;
}
.studio-asset-lib-line--err {
  color: #be123c !important;
}
.studio-asset-regen-icon {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.85);
  background: rgba(15, 23, 42, 0.72); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.studio-asset-card:hover .studio-asset-regen-icon,
.studio-asset-regen-icon:focus { opacity: 1; }
.studio-asset-regen-icon:hover { background: rgba(37, 99, 235, 0.92); border-color: #93c5fd; }
.studio-insp-actions { margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.studio-voice-ref .studio-voice-audio {
  width: 100%;
  margin: 8px 0 10px;
  height: 36px;
}
.studio-voice-actions { margin-bottom: 6px; }

.studio-insp-fold-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.studio-insp-fold-toggle h4 {
  margin: 0;
  flex: 1;
}
.studio-insp-fold-chevron {
  flex-shrink: 0;
  font-size: 12px;
  color: #64748b;
}
.studio-turnaround-fold.is-folded {
  padding-bottom: 10px;
}
.studio-insp-fold-body[hidden] {
  display: none !important;
}
.studio-insp-fold-body {
  margin-top: 10px;
}

.voice-pick-card .voice-pick-stage {
  position: relative;
}
.voice-pick-range {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--st-accent) 0%, var(--st-accent) var(--voice-pick-end, 0%), transparent var(--voice-pick-end, 0%));
  opacity: 0.85;
  pointer-events: none;
}

.studio-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}
.studio-btn--primary {
  background: var(--st-accent);
  color: #fff;
}
.studio-btn--primary:hover { filter: brightness(1.06); }
.studio-btn--ghost {
  background: #fff;
  border: 1px solid var(--st-border);
  color: var(--st-text);
}
.studio-btn--ghost:hover { border-color: var(--st-accent); color: var(--st-accent); }
.studio-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.studio-turnaround-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
}
.studio-turnaround-grid:has(> figure:only-child) {
  grid-template-columns: 1fr;
}
.studio-turnaround-grid figure { margin: 0; }
.studio-turnaround-grid img { width: 100%; display: block; border-radius: 6px; object-fit: contain; background: #0f172a; }
.studio-turnaround-grid figcaption {
  font-size: 10px;
  text-align: center;
  color: var(--st-muted);
  padding: 2px 0;
}

.hidden { display: none !important; }

.studio-brief-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 24px;
  text-align: left;
}
.studio-brief-card--flow {
  max-width: 720px;
}
.studio-brief-title { margin: 0 0 8px; font-size: 1.25rem; }
.studio-brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin: 20px 0 24px;
}
.studio-brief-grid--flow {
  grid-template-columns: 1fr 1fr;
}
.studio-brief-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.studio-brief-field--full { grid-column: 1 / -1; }
.studio-brief-field select,
.studio-brief-field textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--st-border);
  background: var(--st-panel);
  color: inherit;
  font: inherit;
}
.studio-brief-field textarea { resize: vertical; min-height: 72px; }
.studio-brief-field-hint { font-weight: 400; color: #64748b; font-size: 0.78rem; }
.studio-brief-field input[type="range"] {
  width: 100%;
  accent-color: #2563eb;
}
.studio-brief-field #expandBranchRatioLabel {
  font-style: normal;
  font-weight: 700;
  color: #0f172a;
}
.studio-brief-field.is-recommended #expandBranchRatioLabel {
  color: #15803d;
}
.expand-ratio-rec {
  font-weight: 400;
  color: #64748b;
  font-size: 0.8em;
}
.studio-brief-field.is-recommended .expand-ratio-rec {
  color: #15803d;
}
.studio-brief-auto-hint {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--studio-muted, #9ca3af);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.studio-brief-dialogue {
  padding: 14px 14px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.studio-brief-dialogue > span:first-child {
  font-weight: 600;
}
.studio-brief-dialogue textarea {
  min-height: 220px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}
.studio-brief-dialogue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}
@media (max-width: 720px) {
  .studio-brief-grid--flow {
    grid-template-columns: 1fr;
  }
}

.studio-system-line {
  text-align: center;
  font-size: 12px;
  color: var(--st-muted);
  padding: 4px 0;
}

/* ── 创意首页 · 对齐分析台布局 + 灵动动效 ── */
body.studio-landing-on {
  --st-bg: #f3efe8;
  --st-canvas-bg: #faf8f4;
  --st-panel: #ffffff;
  --st-panel2: #f7f4ef;
  --st-border: #e8e2d8;
  --st-text: #2a2622;
  --st-muted: #8a8278;
  --st-accent: #3d5a80;
  --st-accent2: #5c7a9e;
  --st-accent-soft: #e8eef5;
  --st-shadow: 0 12px 40px rgba(42, 38, 34, 0.08);
}
body.studio-landing-on .studio-shell { background: var(--st-bg); }
body.studio-landing-on .studio-nav {
  background: #faf8f4;
  border-right-color: var(--st-border);
  box-shadow: none;
}
body.studio-landing-on .studio-nav-logo {
  background: linear-gradient(135deg, #8ec5fc, #e0c3fc);
  border-radius: 50%;
}
body.studio-landing-on:has(#uploadPanel:not(.hidden)) .studio-top,
body.studio-landing-on:has(#uploadPanel:not(.hidden)) .studio-steps {
  display: none;
}
body.studio-landing-on:has(#uploadPanel:not(.hidden)) .studio-main {
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.studio-landing-on .studio-upload-panel {
  max-width: none;
  margin: 0;
  padding: 0;
  height: auto;
  min-height: 100%;
}

.studio-landing {
  position: relative;
  height: auto;
  min-height: 100%;
  overflow: visible;
  padding: 28px 32px 32px;
}
.studio-landing-ambient {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.studio-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  animation: studioOrbFloat 12s ease-in-out infinite;
}
.studio-orb--a {
  width: 280px; height: 280px;
  left: -60px; top: 8%;
  background: radial-gradient(circle, #b8d4f0 0%, transparent 70%);
}
.studio-orb--b {
  width: 220px; height: 220px;
  right: 18%; top: 42%;
  background: radial-gradient(circle, #d8c8f0 0%, transparent 70%);
  animation-delay: -4s;
  animation-duration: 15s;
}
.studio-orb--c {
  width: 180px; height: 180px;
  right: -40px; bottom: 10%;
  background: radial-gradient(circle, #c8e8d8 0%, transparent 70%);
  animation-delay: -7s;
  animation-duration: 18s;
}
@keyframes studioOrbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -22px, 0) scale(1.06); }
}

.studio-landing-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(220px, 0.95fr) 260px;
  gap: 22px;
  align-items: start;
  height: auto;
  min-height: calc(100vh - 56px);
  max-width: 1280px;
  margin: 0 auto;
}

.studio-landing-col--main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-height: calc(100vh - 56px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #c5bdb0 transparent;
  animation: studioRiseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.studio-landing-col--main::-webkit-scrollbar { width: 8px; }
.studio-landing-col--main::-webkit-scrollbar-thumb {
  background: #c5bdb0;
  border-radius: 4px;
}
.studio-landing-col--gallery {
  animation: studioRiseIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 56px);
}
.studio-landing-col--rail {
  animation: studioRiseIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@keyframes studioRiseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.studio-landing-hero { margin-bottom: 4px; }
.studio-landing-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--st-muted);
  font-weight: 600;
}
.studio-landing-title {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--st-text);
}
.studio-landing-lead {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--st-muted);
  max-width: 36em;
}
.studio-landing-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.studio-landing-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--st-border);
  font-size: 0.82rem;
  color: var(--st-muted);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.studio-landing-pill.is-on {
  background: #2a2622;
  color: #faf8f4;
  border-color: #2a2622;
  box-shadow: 0 8px 20px rgba(42, 38, 34, 0.18);
  animation: studioPillPulse 2.8s ease-in-out infinite;
}
.studio-landing-arrow {
  color: var(--st-muted);
  font-size: 0.85rem;
  opacity: 0.7;
}
@keyframes studioPillPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(42, 38, 34, 0.16); }
  50% { box-shadow: 0 10px 28px rgba(61, 90, 128, 0.28); }
}

.studio-landing-on .studio-flow-status {
  text-align: left;
  color: var(--st-accent);
  min-height: 0;
  margin: 0;
  font-size: 0.85rem;
}
.studio-landing-on .studio-import-tabs {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--st-border);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  backdrop-filter: blur(8px);
}
.studio-landing-on .studio-import-tab {
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.82rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.studio-landing-on .studio-import-tab:hover {
  color: var(--st-text);
  background: rgba(255, 255, 255, 0.8);
}
.studio-landing-on .studio-import-tab.is-active {
  background: #2a2622;
  color: #faf8f4;
  box-shadow: 0 6px 16px rgba(42, 38, 34, 0.16);
  transform: translateY(-1px);
}

.studio-landing-on .studio-upload-drop,
.studio-landing-on .studio-quick-card,
.studio-landing-on .studio-brief-card {
  border-radius: 18px;
  border: 1px solid var(--st-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--st-shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
}
.studio-landing-on .studio-upload-drop {
  padding: 36px 28px 28px;
  border-style: dashed;
  border-width: 1.5px;
}
.studio-landing-on .studio-upload-drop:hover,
.studio-landing-on .studio-upload-drop.drag {
  transform: translateY(-2px);
  border-color: var(--st-accent);
  border-style: solid;
  box-shadow: 0 16px 40px rgba(61, 90, 128, 0.14);
  background: #fff;
}
.studio-upload-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #eef4fb, #f4eefb);
  color: var(--st-accent);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  animation: studioIconBob 2.4s ease-in-out infinite;
  box-shadow: inset 0 0 0 1px rgba(61, 90, 128, 0.12);
}
@keyframes studioIconBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.studio-landing-on .studio-btn--primary {
  background: #2a2622;
  border-color: #2a2622;
  color: #faf8f4;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}
.studio-landing-on .studio-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(42, 38, 34, 0.2);
  opacity: 1;
}

.studio-landing-gallery-label {
  margin: 8px 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--st-muted);
}
.studio-landing-gallery {
  flex: 1;
  min-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
}
.studio-landing-gallery-empty {
  flex: 1;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 28px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed var(--st-border);
  color: var(--st-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  animation: studioBreath 3.6s ease-in-out infinite;
}
.studio-landing-gallery-empty span {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--st-muted);
}
@keyframes studioBreath {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(61, 90, 128, 0); }
  50% { transform: scale(1.01); box-shadow: 0 12px 28px rgba(61, 90, 128, 0.08); }
}
.studio-landing-card-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--st-border);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: studioRiseIn 0.45s ease both;
}
.studio-landing-card-item:hover {
  transform: translateY(-3px);
  border-color: #c5d4e6;
  box-shadow: 0 12px 28px rgba(42, 38, 34, 0.1);
}
.studio-landing-card-item strong {
  font-size: 0.9rem;
  color: var(--st-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-landing-card-item small {
  font-size: 0.75rem;
  color: var(--st-muted);
}
.studio-landing-card-item .studio-landing-card-action {
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--st-accent);
}
.studio-landing-gallery-more {
  margin-top: 12px;
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--st-accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s;
}
.studio-landing-gallery-more:hover {
  transform: translateX(3px);
  opacity: 0.85;
}

.studio-landing-card {
  border-radius: 16px;
  border: 1px solid var(--st-border);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(42, 38, 34, 0.06);
  padding: 14px 14px 12px;
  backdrop-filter: blur(8px);
}
.studio-landing-card h3 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--st-text);
}
.studio-landing-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-landing-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 10px;
  color: var(--st-muted);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.studio-landing-flow-item .title {
  font-size: 0.84rem;
  font-weight: 600;
  color: inherit;
}
.studio-landing-flow-item .desc {
  font-size: 0.72rem;
  opacity: 0.85;
  margin-top: 1px;
}
.studio-landing-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #d4cdc2;
  flex-shrink: 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.studio-landing-flow-item.is-active {
  background: var(--st-accent-soft);
  color: var(--st-text);
  transform: translateX(2px);
}
.studio-landing-flow-item.is-active .studio-landing-dot {
  background: var(--st-accent);
  box-shadow: 0 0 0 4px rgba(61, 90, 128, 0.18);
  animation: studioDotPulse 1.6s ease-in-out infinite;
}
.studio-landing-flow-item.is-done .studio-landing-dot {
  background: #3d8b6e;
}
@keyframes studioDotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(61, 90, 128, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(61, 90, 128, 0.08); }
}
.studio-landing-log {
  min-height: 64px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--st-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .studio-orb,
  .studio-upload-icon,
  .studio-landing-pill.is-on,
  .studio-landing-gallery-empty,
  .studio-landing-flow-item.is-active .studio-landing-dot,
  .studio-landing-col--main,
  .studio-landing-col--gallery,
  .studio-landing-col--rail,
  .studio-landing-card-item {
    animation: none !important;
  }
}

@media (max-width: 1100px) {
  .studio-landing-grid {
    grid-template-columns: 1fr 240px;
  }
  .studio-landing-col--gallery {
    grid-column: 1 / -1;
    max-height: 220px;
    order: 3;
  }
}
@media (max-width: 780px) {
  .studio-landing { padding: 18px 16px 20px; }
  .studio-landing-grid { grid-template-columns: 1fr; }
  .studio-landing-col--rail { order: 2; }
  .studio-landing-col--gallery { order: 3; max-height: none; }
}


/* ── 原片扩写 · 自动出片岛 ── */
.expand-auto {
  --ea-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
  --ea-spring-out: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ea-ink: #f5f5f7;
  --ea-muted: rgba(245, 245, 247, 0.55);
  --ea-line: rgba(255, 255, 255, 0.1);
  --ea-soft: rgba(255, 255, 255, 0.08);
  position: relative;
  pointer-events: none;
}
.expand-auto-island {
  pointer-events: auto;
  position: relative;
  width: 142px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  color: var(--ea-ink);
  background:
    linear-gradient(160deg, rgba(42, 58, 72, 0.94) 0%, rgba(12, 18, 24, 0.97) 52%, rgba(8, 12, 16, 0.98) 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  transform-origin: bottom right;
  transition:
    width 0.52s var(--ea-spring),
    height 0.52s var(--ea-spring),
    border-radius 0.48s var(--ea-spring),
    box-shadow 0.35s ease,
    transform 0.45s var(--ea-spring-out);
  animation: eaIslandIdle 3.6s ease-in-out infinite;
  animation-delay: 0.4s;
}
.expand-auto-island:hover:not(.is-open) {
  transform: scale(1.04);
}
.expand-auto-island.is-open {
  width: min(320px, calc(100vw - 28px));
  height: min(420px, calc(100vh - 88px));
  border-radius: 28px;
  animation: none;
  transform: none;
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.expand-auto-island.is-morphing { pointer-events: none; }
.expand-auto-island.is-need-assets:not(.is-open) {
  width: 156px;
  animation: eaNeedAssetsPulse 1.5s ease-in-out infinite;
  box-shadow:
    0 0 0 2px rgba(245, 158, 11, 0.55),
    0 12px 32px rgba(245, 158, 11, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.expand-auto-island.is-need-assets .expand-auto-orb {
  background: radial-gradient(circle at 35% 30%, #fff 0, #fbbf24 38%, #f59e0b 100%);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  animation: studio-expand-asset-orb 1.2s ease-out infinite;
}
.expand-auto-island.is-need-assets .expand-auto-pill-text {
  color: #fde68a;
  font-weight: 700;
}
.expand-auto-island.is-ingesting:not(.is-open) {
  animation: eaIngestingPulse 1.3s ease-in-out infinite;
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.5),
    0 12px 32px rgba(14, 165, 233, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.expand-auto-island.is-ingesting .expand-auto-orb {
  background: radial-gradient(circle at 35% 30%, #fff 0, #7dd3fc 38%, #0ea5e9 100%);
  animation: studio-expand-asset-orb-busy 1.1s ease-out infinite;
}
.expand-auto-btn.is-asset-nudge {
  outline: 2px solid rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
@keyframes eaNeedAssetsPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes eaIngestingPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.92; }
}
.expand-auto-pill {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 16px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.22s ease, transform 0.35s var(--ea-spring);
}
.expand-auto-island.is-open .expand-auto-pill {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.86);
}
.expand-auto-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #7dd3fc 38%, #22d3ee 100%);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45);
  animation: eaAutoOrb 2.2s ease-out infinite;
}
@keyframes eaAutoOrb {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}
.expand-auto-pill-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.expand-auto-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.expand-auto-ep-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: rgba(245, 245, 247, 0.92);
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.35);
  line-height: 1.35;
}
.expand-auto-ep-badge.hidden {
  display: none;
}
.expand-auto-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.28s ease 0.08s, transform 0.42s var(--ea-spring) 0.05s, visibility 0s linear 0.3s;
  pointer-events: none;
}
.expand-auto-island.is-open .expand-auto-body {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.32s ease 0.14s, transform 0.48s var(--ea-spring) 0.1s, visibility 0s;
  pointer-events: auto;
}
.expand-auto-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 8px 14px;
  border-bottom: 1px solid var(--ea-line);
}
.expand-auto-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.expand-auto-logo {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #7dd3fc 40%, #22d3ee 100%);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}
.expand-auto-head strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--ea-ink);
  line-height: 1.2;
}
.expand-auto-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ea-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.expand-auto-close {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: var(--ea-soft);
  color: var(--ea-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.expand-auto-close:hover { background: rgba(255, 255, 255, 0.16); }

.expand-auto-live {
  margin: 0 12px 4px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.expand-auto-live.is-busy {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08) inset;
}
.expand-auto-live.is-ok {
  border-color: rgba(52, 211, 153, 0.35);
}
.expand-auto-live.is-err {
  border-color: rgba(248, 113, 113, 0.4);
}
.expand-auto-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.expand-auto-live-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  text-transform: none;
}
.expand-auto-live.is-ok .expand-auto-live-phase { color: #6ee7b7; }
.expand-auto-live.is-err .expand-auto-live-phase { color: #fca5a5; }
.expand-auto-live-count {
  font-size: 11px;
  color: rgba(245, 245, 247, 0.55);
  white-space: nowrap;
}
.expand-auto-live-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}
.expand-auto-live-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  transition: width 0.35s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.expand-auto-live.is-busy .expand-auto-live-fill {
  background-size: 200% 100%;
  animation: eaAutoFillShine 1.6s linear infinite;
}
@keyframes eaAutoFillShine {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
  100% { filter: brightness(1); }
}
.expand-auto-live-step {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #f5f5f7;
  line-height: 1.35;
  word-break: break-word;
}
.expand-auto-live-detail {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(245, 245, 247, 0.55);
  line-height: 1.4;
  min-height: 1.4em;
  word-break: break-word;
  white-space: pre-wrap;
}

/* 多集一键 · 浅色大弹窗 */
.expand-batch-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.expand-batch-modal.hidden { display: none !important; }
.expand-batch-modal-card {
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--st-border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  color: var(--st-text);
  overflow: hidden;
}
.expand-batch-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.expand-batch-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--st-text);
}
.expand-batch-modal-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}
.expand-batch-modal-close {
  border: 0;
  background: var(--st-panel2);
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
  border: 1px solid var(--st-border);
}
.expand-batch-modal-close:hover {
  background: #f1f5f9;
  color: var(--st-text);
}
.expand-batch-modal-summary {
  padding: 14px 16px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.expand-batch-modal-summary-main {
  font-size: 16px;
  font-weight: 700;
  color: #1e40af;
}
.expand-batch-modal-summary-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #475569;
}
.expand-batch-modal-toolbar {
  display: flex;
  gap: 14px;
}
.expand-batch-modal-link {
  border: 0;
  background: transparent;
  color: var(--st-accent);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.expand-batch-modal-link:hover { text-decoration: underline; }
.expand-batch-modal-grid {
  flex: 1;
  min-height: 120px;
  max-height: min(42vh, 360px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
  padding: 4px 2px;
}
.expand-batch-modal-grid.is-empty::after {
  content: '暂无可选分集，请先确认方向并生成节点';
  grid-column: 1 / -1;
  font-size: 13px;
  color: #94a3b8;
  padding: 24px 8px;
  text-align: center;
}
.expand-batch-modal-ep {
  min-height: 56px;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--st-border);
  background: var(--st-panel2);
  color: var(--st-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.expand-batch-modal-ep:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}
.expand-batch-modal-ep.is-selected {
  border-color: var(--st-accent);
  background: var(--st-accent-soft);
  color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) inset;
}
.expand-batch-modal-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--st-border);
}
.expand-batch-modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}
.expand-batch-modal-field .studio-input {
  font-size: 13px;
}
.expand-batch-modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--st-text);
  cursor: pointer;
}
.expand-batch-modal-check input { accent-color: var(--st-accent); margin: 0; }
.expand-batch-modal-i2v {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.expand-batch-modal-i2v.is-minimax { grid-template-columns: 1fr; }
.expand-batch-modal-i2v.is-minimax .expand-batch-modal-field:first-child { display: none; }
.expand-batch-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.expand-batch-modal-actions .studio-btn--primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 148px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.expand-batch-run-title { font-size: 14px; font-weight: 600; }
.expand-batch-run-desc {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
}

/* 多集一键 · 右下角入口 pill */
.expand-batch {
  position: relative;
  pointer-events: none;
}
.expand-batch.hidden { display: none !important; }
.expand-batch-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 142px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: #f5f5f7;
  cursor: pointer;
  background:
    linear-gradient(160deg, rgba(42, 58, 72, 0.94) 0%, rgba(12, 18, 24, 0.97) 52%, rgba(8, 12, 16, 0.98) 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.expand-batch-pill:hover {
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.expand-batch-orb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.65);
}
.expand-batch-pill-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.expand-auto-actions {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.expand-auto-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--ea-line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ea-ink);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s var(--ea-spring), background 0.2s ease, border-color 0.2s ease;
}
.expand-auto-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(125, 211, 252, 0.35);
  transform: translateY(-1px);
}
.expand-auto-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.expand-auto-btn--primary {
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.18));
  border-color: rgba(125, 211, 252, 0.35);
}
.expand-auto-btn--export {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.2), rgba(16, 185, 129, 0.12));
  border-color: rgba(110, 231, 183, 0.4);
}
.expand-auto-btn--export:hover:not(:disabled) {
  border-color: rgba(110, 231, 183, 0.7);
}
.expand-auto-btn-title {
  font-size: 13px;
  font-weight: 650;
}
.expand-auto-btn-desc {
  font-size: 11px;
  color: var(--ea-muted);
  line-height: 1.35;
}
.expand-auto-hint {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 10px;
  color: var(--ea-muted);
  text-align: center;
}
.expand-auto.is-busy .expand-auto-pill,
.expand-auto.is-busy .expand-auto-btn {
  opacity: 0.65;
  pointer-events: none;
}
.expand-auto.is-busy .expand-auto-orb {
  animation-duration: 0.85s;
}
@media (prefers-reduced-motion: reduce) {
  .expand-auto-island,
  .expand-auto-pill,
  .expand-auto-body,
  .expand-auto-orb {
    animation: none !important;
    transition: none !important;
  }
}

/* ── 原片扩写 · 右下角支线助手（苹果灵动岛形变） ── */
.expand-corner-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
.expand-corner-dock.hidden { display: none !important; }

.expand-assistant {
  --ea-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
  --ea-spring-out: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ea-ink: #f5f5f7;
  --ea-muted: rgba(245, 245, 247, 0.55);
  --ea-line: rgba(255, 255, 255, 0.1);
  --ea-soft: rgba(255, 255, 255, 0.08);
  --ea-blue: #6aa1ff;
  --ea-user: #3b82f6;
  position: relative;
  pointer-events: none;
}
.expand-assistant.hidden { display: none !important; }
.expand-assistant-island {
  pointer-events: auto;
  position: relative;
  width: 142px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  color: var(--ea-ink);
  background:
    linear-gradient(160deg, rgba(58, 58, 62, 0.92) 0%, rgba(18, 18, 20, 0.96) 48%, rgba(10, 10, 12, 0.98) 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  transform-origin: bottom right;
  transition:
    width 0.52s var(--ea-spring),
    height 0.52s var(--ea-spring),
    border-radius 0.48s var(--ea-spring),
    box-shadow 0.35s ease,
    transform 0.45s var(--ea-spring-out);
  animation: eaIslandIdle 3.6s ease-in-out infinite;
}
.expand-assistant-island:hover:not(.is-open) {
  transform: scale(1.04);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.expand-assistant-island.has-target:not(.is-open) {
  width: 152px;
}
.expand-assistant-island.has-target .expand-assistant-orb {
  background: radial-gradient(circle at 35% 30%, #fff 0, #9ad0ff 35%, #34d399 100%);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45);
  animation-name: eaOrbPulseReady;
}
@keyframes eaOrbPulseReady {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.expand-assistant-island.is-open {
  width: min(360px, calc(100vw - 28px));
  height: min(440px, calc(100vh - 88px));
  border-radius: 28px;
  animation: none;
  transform: none;
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}
.expand-assistant-island.is-morphing {
  pointer-events: none;
}

@keyframes eaIslandIdle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.015); }
}
.expand-assistant-pill {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 16px;
  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.22s ease,
    transform 0.35s var(--ea-spring);
}
.expand-assistant-island.is-open .expand-assistant-pill {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.86);
}
.expand-assistant-orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #7eb2ff 38%, #3b82f6 100%);
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
  animation: eaOrbPulse 2.2s ease-out infinite;
}
@keyframes eaOrbPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.expand-assistant-pill-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.expand-assistant-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.28s ease 0.08s,
    transform 0.42s var(--ea-spring) 0.05s,
    visibility 0s linear 0.3s;
  pointer-events: none;
}
.expand-assistant-island.is-open .expand-assistant-body {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.32s ease 0.14s,
    transform 0.48s var(--ea-spring) 0.1s,
    visibility 0s;
  pointer-events: auto;
}
.expand-assistant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 8px 14px;
  border-bottom: 1px solid var(--ea-line);
}
.expand-assistant-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.expand-assistant-logo {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #7eb2ff 40%, #3b82f6 100%);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}
.expand-assistant-head strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--ea-ink);
  line-height: 1.2;
}
.expand-assistant-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ea-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}
.expand-assistant-close {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: var(--ea-soft);
  color: var(--ea-ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.expand-assistant-close:hover { background: rgba(255, 255, 255, 0.16); }
.expand-assistant-live {
  margin: 0 12px 8px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.expand-assistant-live[hidden] { display: none !important; }
.expand-assistant-live.is-busy {
  border-color: rgba(106, 161, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(106, 161, 255, 0.1) inset;
}
.expand-assistant-live.is-ok {
  border-color: rgba(52, 211, 153, 0.35);
}
.expand-assistant-live.is-err {
  border-color: rgba(248, 113, 113, 0.4);
}
.expand-assistant-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.expand-assistant-live-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9ad0ff;
}
.expand-assistant-live.is-ok .expand-assistant-live-phase { color: #6ee7b7; }
.expand-assistant-live.is-err .expand-assistant-live-phase { color: #fca5a5; }
.expand-assistant-live-count {
  font-size: 11px;
  color: rgba(245, 245, 247, 0.55);
  white-space: nowrap;
}
.expand-assistant-live-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}
.expand-assistant-live-fill {
  height: 100%;
  width: 28%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6aa1ff, #3b82f6, #22d3ee);
  background-size: 200% 100%;
  transition: width 0.35s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.expand-assistant-live.is-busy .expand-assistant-live-fill {
  width: 42%;
  animation: eaAssistFillSweep 1.4s ease-in-out infinite;
}
@keyframes eaAssistFillSweep {
  0% { transform: translateX(-40%); filter: brightness(1); }
  50% { transform: translateX(160%); filter: brightness(1.2); }
  100% { transform: translateX(-40%); filter: brightness(1); }
}
.expand-assistant-live-step {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #f5f5f7;
  line-height: 1.35;
  word-break: break-word;
}
.expand-assistant-bubble.is-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  padding: 10px 14px;
  color: var(--ea-muted);
}
.expand-assistant-bubble.is-typing .ea-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ad0ff;
  opacity: 0.35;
  animation: eaTypingDot 1.1s ease-in-out infinite;
}
.expand-assistant-bubble.is-typing .ea-dot:nth-child(2) { animation-delay: 0.15s; }
.expand-assistant-bubble.is-typing .ea-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes eaTypingDot {
  0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.expand-assistant-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  scrollbar-width: thin;
}
.expand-assistant-bubble {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  animation: eaBubbleIn 0.35s var(--ea-spring);
}
@keyframes eaBubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.expand-assistant-bubble.is-user {
  align-self: flex-end;
  background: linear-gradient(145deg, #5b9cff, #3b82f6);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.expand-assistant-bubble.is-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ea-ink);
  border: 1px solid var(--ea-line);
  border-bottom-left-radius: 5px;
}
.expand-assistant-bubble.is-err {
  align-self: stretch;
  background: rgba(255, 69, 58, 0.16);
  color: #ff8a80;
  border: 1px solid rgba(255, 69, 58, 0.28);
}
.expand-assistant-form {
  border-top: 1px solid var(--ea-line);
  padding: 8px 10px 10px;
}
.expand-assistant-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 5px 5px 5px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.expand-assistant-input-wrap:focus-within {
  border-color: rgba(106, 161, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  background: rgba(255, 255, 255, 0.09);
}
.expand-assistant-form textarea {
  flex: 1;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  resize: none;
  min-height: 22px;
  max-height: 64px;
  border: none;
  outline: none;
  background: transparent;
  padding: 4px 0;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ea-ink);
}
.expand-assistant-form textarea::placeholder { color: rgba(245, 245, 247, 0.38); }
.expand-assistant-send {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #7eb2ff, #3b82f6);
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s var(--ea-spring);
}
.expand-assistant-send:hover { transform: scale(1.06); }
.expand-assistant-hint {
  margin: 6px 2px 0;
  font-size: 10px;
  color: var(--ea-muted);
  text-align: center;
}
.expand-assistant-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.expand-assistant-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(245, 245, 247, 0.72);
  cursor: pointer;
  user-select: none;
}
.expand-assistant-tool input {
  accent-color: #7eb2ff;
}
.expand-assistant-toolbar {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}
.expand-assistant-undo {
  border: 1px solid rgba(245, 245, 247, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 245, 247, 0.72);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.expand-assistant-undo:hover {
  color: #fff;
  border-color: rgba(245, 245, 247, 0.28);
}
.expand-assistant-undo:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.expand-assistant.is-busy .expand-assistant-pill,
.expand-assistant.is-busy #expandAssistantSend {
  opacity: 0.65;
  pointer-events: none;
}
.expand-assistant.is-locked .expand-assistant-pill {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.expand-assistant.is-locked .expand-assistant-pill:hover {
  transform: none;
}
.expand-assistant.is-locked .expand-assistant-orb {
  animation: none;
  opacity: 0.55;
}
.expand-assistant.is-busy .expand-assistant-orb {
  animation-duration: 0.9s;
}
@media (prefers-reduced-motion: reduce) {
  .expand-assistant-island,
  .expand-assistant-pill,
  .expand-assistant-body,
  .expand-assistant-bubble,
  .expand-assistant-orb {
    animation: none !important;
    transition: none !important;
  }
}


/* ── 角色定妆 · 从视频裁切 ── */
.studio-still-cands {
  margin: 8px 2px 4px;
  width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.studio-still-cands-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}
.studio-still-cands-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.studio-still-cand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 54px;
  padding: 3px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  pointer-events: auto;
  position: relative;
  z-index: 3;
}
.studio-still-cand img {
  width: 45px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #f1f5f9;
  pointer-events: none;
}
.studio-still-cand span {
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
  pointer-events: none;
}
.studio-still-cand:hover {
  border-color: #94a3b8;
}
.studio-still-cand.is-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}
.studio-still-cand.is-selected span {
  color: #1d4ed8;
  font-weight: 700;
}
.studio-still-cand.is-selected::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px #fff;
}
.char-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}
.char-crop-overlay.hidden { display: none !important; }
.char-crop-card {
  width: min(560px, 100%);
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.char-crop-card:has(.char-crop-stage.is-landscape) {
  width: min(760px, 96vw);
}
.char-crop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.char-crop-head strong { font-size: 15px; }
.char-crop-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}
.char-crop-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.char-crop-stage {
  position: relative;
  background: #020617;
  aspect-ratio: 9 / 16;
  max-height: min(58vh, 560px);
  margin: 0 auto;
  width: min(100%, calc(min(58vh, 560px) * 9 / 16));
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}
/* 原片为横屏时：舞台直接按 16:9 铺满预览（裁切框仍锁定 9:16） */
.char-crop-stage.is-landscape {
  aspect-ratio: 16 / 9;
  max-height: min(52vh, 420px);
  width: min(100%, calc(min(52vh, 420px) * 16 / 9));
}
.char-crop-stage.is-portrait {
  aspect-ratio: 9 / 16;
}
.char-crop-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  pointer-events: none;
}
/* 覆盖「视频真实画面」区域；裁切框百分比相对本层，与屏幕尺寸无关 */
.char-crop-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-sizing: border-box;
}
.char-crop-dim {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  pointer-events: none;
}
.char-crop-box {
  position: absolute;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.45);
  border-radius: 4px;
  pointer-events: auto;
  box-sizing: border-box;
  cursor: move;
  touch-action: none;
}
.char-crop-box::after {
  content: '9:16 · 拖动调整';
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 1;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.72);
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}
.char-crop-controls {
  padding: 10px 16px 4px;
}
.char-crop-controls input[type="range"] {
  width: 100%;
  accent-color: #38bdf8;
}
.char-crop-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}
.char-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 14px;
}

/* —— 用量管理台（Konami） —— */
.usage-admin {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
}
.usage-admin.hidden { display: none !important; }
.usage-admin-panel {
  width: min(1200px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: var(--st-panel, #fff);
  border: 1px solid var(--st-border, #e2e8f0);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}
.usage-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.usage-admin-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--st-text, #0f172a);
}
.usage-admin-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--st-muted, #64748b);
}
.usage-admin-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.usage-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.usage-admin-toolbar .studio-input {
  width: auto;
  min-width: 120px;
  flex: 0 1 auto;
}
.usage-admin-meta {
  font-size: 12px;
  color: #64748b;
  margin-left: auto;
}
.usage-admin-devices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 72px;
  overflow: auto;
}
.usage-admin-device-chip {
  border: 1px solid var(--st-border, #e2e8f0);
  background: var(--st-panel2, #f8fafc);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--st-text, #0f172a);
}
.usage-admin-device-chip:hover { border-color: var(--st-accent, #2563eb); }
.usage-admin-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--st-border, #e2e8f0);
  border-radius: 10px;
}
.usage-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.usage-admin-table th,
.usage-admin-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--st-border, #e2e8f0);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.usage-admin-table th {
  position: sticky;
  top: 0;
  background: var(--st-panel2, #f8fafc);
  z-index: 1;
  font-weight: 600;
}
.usage-admin-table tr {
  cursor: pointer;
}
.usage-admin-table tr:hover td {
  background: rgba(37, 99, 235, 0.06);
}
.usage-admin-table tr.is-selected td {
  background: rgba(37, 99, 235, 0.1);
}
.usage-admin-table .col-text {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.usage-admin-detail {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--st-panel2, #f8fafc);
  border: 1px solid var(--st-border, #e2e8f0);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.usage-admin-detail.hidden { display: none !important; }
