/* 短视频生成 */
.vg-header-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
}
.vg-header-mid strong {
  font-size: 1rem;
  color: var(--text, #1a1a1a);
}
.vg-header-mid .hint {
  font-size: 0.78rem;
  color: var(--muted, #666);
}
.vg-page-wrap {
  display: block !important;
}
.vg-page-wrap.hidden {
  display: block !important;
}
.vg-workbench .workbench-sub code {
  font-size: 0.9em;
  padding: 0.05em 0.35em;
  border-radius: 4px;
  background: rgba(15, 107, 76, 0.08);
}
.vg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 960px) {
  .vg-grid { grid-template-columns: 1fr; }
}
.vg-editor {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.vg-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.vg-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
}
.vg-img-card {
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.vg-img-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #f3f1eb;
}
.vg-img-card .meta {
  padding: 0.45rem 0.55rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.vg-img-card .tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f6b4c;
}
.vg-img-card input {
  width: 100%;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid #e2ddd2;
  border-radius: 6px;
}
.vg-img-card .row {
  display: flex;
  gap: 0.3rem;
}
.vg-img-card .row .btn {
  flex: 1;
  padding: 0.25rem 0.3rem;
  font-size: 0.75rem;
}
.vg-prompt-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.vg-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
}
.vg-opts label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted, #666);
}
.vg-opts select,
.vg-opts input {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line, #ddd);
}
.vg-comfy-only[hidden] {
  display: none !important;
}
.vg-backend-row {
  margin-bottom: 0.35rem;
  align-items: end;
}
.vg-backend-row #vgBackendHint {
  grid-column: 1 / -1;
}
.vg-comfy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f4f7fb;
  border: 1px dashed var(--line, #c5d0dc);
}
.vg-comfy-bar .hint {
  flex: 1 1 180px;
}
.vg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.vg-jobs {
  border: 1px solid var(--line, #ddd);
  border-radius: 12px;
  background: #fffdf8;
  padding: 0.75rem;
  min-height: 320px;
}
.vg-jobs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}
.vg-jobs-head h3 {
  margin: 0;
  font-size: 1rem;
}
.vg-job-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 70vh;
  overflow: auto;
}
.vg-job {
  border: 1px solid #e8e2d6;
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  background: #fff;
}
.vg-job header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.vg-job header strong {
  font-size: 0.9rem;
}
.vg-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #ece8df;
  color: #444;
}
.vg-badge.queued,
.vg-badge.running { background: #e8f2ec; color: #0f6b4c; }
.vg-badge.succeeded { background: #e6f4ea; color: #137333; }
.vg-badge.failed,
.vg-badge.cancelled { background: #fce8e6; color: #c5221f; }
.vg-job .vg-eta {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  color: #0d9488;
  font-weight: 600;
}
.vg-job .status {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ece8df;
}
.vg-job .status-queued,
.vg-job .status-running {
  background: #e8f2ec;
  color: #0f6b4c;
}
.vg-job .status-succeeded {
  background: #e6f4ea;
  color: #137333;
}
.vg-job .status-failed,
.vg-job .status-cancelled {
  background: #fce8e6;
  color: #c5221f;
}
.vg-job .prompt {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
  margin: 0 0 0.45rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.vg-job video {
  width: 100%;
  max-height: 240px;
  border-radius: 8px;
  background: #111;
  margin-bottom: 0.45rem;
}
.vg-job .err {
  color: #c5221f;
  font-size: 0.82rem;
  margin: 0 0 0.4rem;
}
.vg-job .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* 直播口播成片 */
.vg-live-clip {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid #e8b48a;
  background: linear-gradient(135deg, #fff8f2 0%, #fffdf8 70%);
}
.vg-live-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.85rem;
  margin-bottom: 0.35rem;
}
.vg-live-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.vg-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
  margin: 0.65rem 0;
}
.vg-live-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted, #666);
}
.vg-live-grid input {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line, #ddd);
}
.vg-live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.vg-live-preview {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.vg-live-preview img {
  width: 120px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e8e2d6;
  object-fit: cover;
}
