Skip to content

PRINTFILM: AI short-video marketing and AI short-drama creation platform

111 KB
Raw Blame
/* Drama module styles ? PRINTFILM tokens (lime #b6ff00, white cards, 14px radius) */

.drama-page {
  --drama-lime: #b6ff00;
  --drama-card: #ffffff;
  --drama-radius: 14px;
  --drama-ink: var(--pf-ink, #111);
  --drama-muted: var(--pf-muted, #6b7280);
  --drama-line: var(--pf-line, #e5e7eb);
  --drama-bg: var(--pf-bg, #f7f7f5);
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.drama-agent-page {
  max-width: 960px;
}

.drama-agent-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.drama-agent-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.drama-agent-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f4fce8 0%, #e8f9c8 100%);
  color: #3d5c1f;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(190, 242, 100, 0.45);
}

.drama-agent-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--drama-ink);
}

.drama-agent-hero-sub {
  margin: 0;
  font-size: 14px;
  color: var(--drama-muted);
  line-height: 1.5;
  max-width: 36rem;
}

.drama-agent-hero-sub strong {
  color: var(--drama-ink);
  font-weight: 600;
}

.drama-agent-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.drama-agent-assets-link {
  gap: 8px;
}

.drama-agent-tips {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--drama-line);
  font-size: 13px;
  color: var(--drama-muted);
  line-height: 1.45;
}

.drama-agent-tips strong {
  color: var(--drama-ink);
  font-weight: 600;
}

.drama-agent-panel {
  background: var(--drama-card);
  border: 1px solid var(--drama-line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 12px 32px rgba(15, 23, 42, 0.04);
}

.drama-agent-panel-head {
  padding: 14px 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.drama-agent-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
}

.drama-agent-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--drama-muted);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.drama-agent-tabs button.active {
  background: #fff;
  color: var(--drama-ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.drama-agent-tabs button:not(:disabled):hover {
  color: var(--drama-ink);
}

.drama-agent-tabs button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.drama-agent-ai {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drama-agent-ai-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--drama-ink);
  letter-spacing: 0.01em;
}

.drama-agent-ai-field {
  position: relative;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #fbfbfa 0%, #f7f7f5 100%);
  border: 1px solid rgba(17, 19, 24, 0.08);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.drama-agent-ai-field:hover {
  border-color: rgba(17, 19, 24, 0.14);
}

.drama-agent-ai-field:focus-within {
  background: #fff;
  border-color: color-mix(in srgb, var(--drama-lime) 55%, #c5c9d0);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--drama-lime) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.drama-agent-ai-field.has-value {
  background: #fff;
}

.drama-agent-ai textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 188px;
  max-height: 420px;
  border: none;
  border-radius: 16px;
  padding: 16px 18px 40px;
  font: inherit;
  font-size: 15px;
  line-height: 1.65;
  color: var(--drama-ink);
  resize: vertical;
  background: transparent;
  outline: none;
  box-shadow: none;
  transition: none;
}

.drama-agent-ai textarea::placeholder {
  color: #9aa1ad;
  line-height: 1.55;
}

.drama-agent-ai textarea:disabled {
  opacity: 0.65;
  cursor: wait;
}

.drama-agent-ai textarea:focus {
  outline: none;
  border: none;
  box-shadow: none;
  background: transparent;
}

/* WebKit 滚动条:贴合面板,避免默认粗条抢戏 */
.drama-agent-ai textarea::-webkit-scrollbar {
  width: 10px;
}

.drama-agent-ai textarea::-webkit-scrollbar-track {
  margin: 10px 4px 36px;
  background: transparent;
}

.drama-agent-ai textarea::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: rgba(17, 19, 24, 0.16);
}

.drama-agent-ai textarea::-webkit-scrollbar-thumb:hover {
  background-color: rgba(17, 19, 24, 0.28);
}

.drama-agent-char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  min-width: 4.5em;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #8b929e;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 19, 24, 0.06);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.drama-agent-char-sep {
  opacity: 0.55;
  margin: 0 1px;
}

.drama-agent-char-count.is-ok {
  color: #3f5a22;
  border-color: color-mix(in srgb, var(--drama-lime) 40%, transparent);
  background: color-mix(in srgb, var(--drama-lime) 18%, #fff);
  font-weight: 600;
}

.drama-agent-char-count.is-over {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.22);
  background: #fff5f4;
  font-weight: 600;
}

.drama-agent-ai-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.drama-agent-ai-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--drama-line);
}

.drama-agent-generate-btn {
  gap: 8px;
  min-width: 148px;
  height: 40px;
  font-size: 14px;
}

.drama-agent-opt-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  max-width: 160px;
  padding: 0 12px;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.drama-agent-opt-trigger:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--drama-lime) 55%, var(--drama-line));
  background: #f4fce8;
}

.drama-agent-opt-trigger.is-active {
  color: #3d5c1f;
  border-color: color-mix(in srgb, var(--drama-lime) 70%, var(--drama-ink));
  background: #f4fce8;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--drama-lime) 22%, transparent);
}

.drama-agent-opt-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.drama-agent-opt-trigger svg.is-open {
  transform: rotate(180deg);
}

.drama-agent-opt-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-agent-opt-divider {
  width: 1px;
  height: 16px;
  background: var(--drama-line);
  margin: 0 2px;
}

.drama-style-modal .pf-modal-body {
  padding-top: 0.5rem;
}

.drama-style-modal-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--drama-muted);
}

.drama-style-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: min(58vh, 480px);
  overflow: auto;
  padding-right: 2px;
}

.drama-style-modal-none {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border: 1px solid var(--drama-line);
  border-radius: 12px;
  background: #fff;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.drama-style-modal-none.is-selected {
  border-color: #a78bfa;
  background: #f5f3ff;
  color: #6d28d9;
}

.drama-style-modal-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--drama-line);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #f1f5f9;
}

.drama-style-modal-card.is-selected {
  border-color: #a78bfa;
  box-shadow: 0 0 0 1px #a78bfa;
}

.drama-style-modal-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-style-modal-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 8px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  color: #fff;
  font-size: 12px;
  text-align: center;
  line-height: 1.35;
}

.drama-style-modal-check {
  position: absolute;
  top: 6px;
  right: 6px;
  color: #8b5cf6;
}

.drama-style-modal-check.on-media {
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.drama-ep-count-popover {
  position: relative;
}

.drama-ep-count-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: 280px;
  padding: 14px;
  border: 1px solid var(--drama-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.drama-ep-count-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--drama-ink);
}

.drama-ep-count-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.drama-ep-count-presets button {
  height: 36px;
  border: 1px solid var(--drama-line);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.drama-ep-count-presets button.is-active {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #6d28d9;
  font-weight: 600;
}

.drama-ep-count-custom {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.drama-ep-count-custom > p {
  margin: 0 0 8px;
  font-size: 12px;
  color: #94a3b8;
}

.drama-ep-count-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drama-ep-count-custom-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--drama-line);
  border-radius: 12px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
}

.drama-ep-count-custom-row input.is-custom {
  border-color: #c4b5fd;
}

.drama-ep-count-confirm {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.drama-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: var(--drama-lime);
  color: var(--drama-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.drama-btn-primary:disabled {
  background: #e8e8ec;
  color: #9ca3af;
  cursor: not-allowed;
}

.drama-btn-primary:not(:disabled):hover {
  filter: brightness(0.97);
}

.drama-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--drama-line);
  border-radius: 999px;
  background: transparent;
  color: var(--drama-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.drama-btn-ghost:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.drama-btn-ghost:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.04);
}

.drama-agent-error {
  margin-bottom: 16px;
  text-align: center;
}

.drama-project-section {
  margin-top: 8px;
}

.drama-project-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.drama-project-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drama-project-section-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.drama-project-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--drama-muted);
  font-size: 12px;
  font-weight: 600;
}

.drama-project-section-sub {
  margin: 0;
  font-size: 13px;
  color: var(--drama-muted);
}

.drama-project-section-sub strong {
  color: var(--drama-ink);
  font-weight: 600;
}

.drama-project-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 24px;
  border-radius: var(--drama-radius);
  background: var(--drama-card);
  border: 1px dashed var(--drama-line);
  color: var(--drama-muted);
  text-align: center;
}

.drama-project-empty p {
  margin: 0;
}

.drama-project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drama-project-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px 12px 12px;
  background: var(--drama-card);
  border-radius: 16px;
  border: 1px solid var(--drama-line);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.drama-project-row:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.drama-project-row.is-selected {
  border-color: rgba(15, 23, 42, 0.85);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.85);
}

.drama-project-row-skeleton {
  min-height: 88px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e8edf3 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: drama-ep-skeleton 1.2s ease-in-out infinite;
  border-color: transparent;
}

.drama-project-row-poster {
  position: relative;
  width: 88px;
  height: 64px;
  border: none;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
  flex-shrink: 0;
}

.drama-project-row-poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eef2f7 0%, #e2e8f0 100%);
}

.drama-project-row-poster-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #64748b;
  max-height: 52px;
  overflow: hidden;
}

.drama-project-row-check {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.drama-project-row:hover .drama-project-row-check,
.drama-project-row-check.is-visible {
  opacity: 1;
}

.drama-project-row-check input {
  width: 14px;
  height: 14px;
  accent-color: #111;
  cursor: pointer;
}

.drama-project-row-ep-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 11px;
  backdrop-filter: blur(4px);
}

.drama-project-row-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.drama-project-row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--drama-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-project-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--drama-muted);
}

.drama-project-row-meta > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.drama-project-row-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.drama-project-row-tag.is-script {
  background: #f4fce8;
  color: #3d5c1f;
}

.drama-project-row-time {
  color: #94a3b8;
}

.drama-project-row-more {
  position: relative;
  flex-shrink: 0;
}

.drama-project-row-more-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: var(--drama-muted);
}

.drama-project-row-more-btn:hover,
.drama-project-row-more-btn[aria-expanded='true'] {
  background: #f1f5f9;
  color: var(--drama-ink);
}

.drama-project-row-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
  min-width: 120px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--drama-line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.drama-project-row-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}

.drama-project-row-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  color: var(--drama-ink);
}

.drama-project-row-menu button:hover {
  background: #f8fafc;
}

.drama-project-row-menu button.is-danger {
  color: #dc2626;
}

.drama-project-selection-bar {
  pointer-events: none;
  position: fixed;
  inset: auto 0 24px;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.drama-project-selection-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
  font-size: 14px;
}

.drama-project-selection-cancel {
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  padding: 6px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.drama-project-selection-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  background: #ff6b6b;
  color: #fff;
  padding: 6px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.drama-project-selection-cancel:disabled,
.drama-project-selection-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.drama-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--drama-lime) 35%, #fff);
  color: var(--drama-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.drama-style-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--drama-muted);
  font-weight: 600;
}

.drama-style-select select {
  border: 1px solid var(--drama-line);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  background: #fff;
  color: var(--drama-ink);
}

/* 大纲页:项目风格字段触发器(缩略图 + 文案) */
.drama-style-picker-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--drama-muted);
  font-weight: 600;
}

.drama-style-picker-field-label {
  flex-shrink: 0;
}

.drama-style-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(280px, 52vw);
  min-height: 40px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--drama-line);
  border-radius: 12px;
  background: #fff;
  color: var(--drama-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.drama-style-picker-trigger:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--drama-lime) 55%, var(--drama-line));
  background: #f8faf5;
}

.drama-style-picker-trigger.is-active {
  border-color: color-mix(in srgb, var(--drama-lime) 65%, var(--drama-ink));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--drama-lime) 20%, transparent);
}

.drama-style-picker-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.drama-style-picker-trigger svg.is-open {
  transform: rotate(180deg);
}

.drama-style-picker-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid rgba(17, 19, 24, 0.06);
}

.drama-style-picker-thumb.is-empty {
  background:
    linear-gradient(135deg, #f1f5f9 25%, transparent 25%) -6px 0 / 12px 12px,
    linear-gradient(225deg, #f1f5f9 25%, transparent 25%) -6px 0 / 12px 12px,
    linear-gradient(315deg, #f1f5f9 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(45deg, #f1f5f9 25%, #e2e8f0 25%) 0 0 / 12px 12px;
}

.drama-style-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-style-picker-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.drama-hero {
  background: linear-gradient(135deg, #f4ffe6 0%, #ffffff 55%, #f7f7f5 100%);
  border: 1px solid var(--drama-line);
  border-radius: var(--drama-radius);
  padding: 36px 32px;
  margin-bottom: 24px;
}

.drama-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--drama-muted);
  font-weight: 600;
}

.drama-hero h1,
.drama-header h1,
.drama-panel h2,
.drama-create h2,
.drama-list h2 {
  margin: 0 0 8px;
  color: var(--drama-ink);
  font-weight: 700;
}

.drama-lead {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--drama-ink);
  max-width: 36em;
}

.drama-muted {
  color: var(--drama-muted);
  font-size: 14px;
  line-height: 1.5;
}

.drama-cta-row,
.drama-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.drama-chat,
.drama-create,
.drama-panel {
  background: var(--drama-card);
  border: 1px solid var(--drama-line);
  border-radius: var(--drama-radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.drama-chat label,
.drama-create label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.drama-chat textarea,
.drama-create textarea,
.drama-create input,
.drama-frag-card textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--drama-line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  margin-bottom: 12px;
  background: #fff;
  color: var(--drama-ink);
  resize: vertical;
}

.drama-chat textarea:focus,
.drama-create textarea:focus,
.drama-create input:focus,
.drama-frag-card textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--drama-lime) 55%, transparent);
  border-color: var(--drama-lime);
}

.drama-reply {
  margin-top: 14px;
  padding: 14px;
  background: #fafafa;
  border: 1px solid var(--drama-line);
  border-radius: 10px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.55;
  overflow: auto;
}

.drama-error {
  color: #b91c1c;
  font-size: 14px;
  margin: 10px 0 0;
}

.drama-outline-notice {
  color: #166534;
  font-size: 14px;
  margin: 10px 0 0;
}

.drama-project-settings {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 4px 2px 8px;
}

.drama-project-settings-lead {
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
}

.drama-project-settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid #eef0f3;
}

.drama-project-settings-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.drama-project-settings-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #111827;
}

.drama-project-settings-section .drama-muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
}

.drama-project-settings-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drama-project-settings-modal .drama-style-picker-field {
  width: 100%;
  max-width: 320px;
}

.drama-project-settings-modal .drama-style-picker-field-label:empty {
  display: none;
}

.drama-project-settings-modal .drama-style-picker-trigger {
  width: 100%;
  justify-content: flex-start;
}

.fc-gen-opt-btn.is-readonly,
.fc-gen-opt-btn.is-readonly:disabled {
  opacity: 0.92;
  cursor: default;
}

.drama-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.drama-back {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--drama-muted);
  text-decoration: none;
  font-size: 13px;
}

.drama-back:hover {
  color: var(--drama-ink);
}

.drama-list ul,
.drama-episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drama-list li a,
.drama-episode-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--drama-card);
  border: 1px solid var(--drama-line);
  border-radius: var(--drama-radius);
  text-decoration: none;
  color: var(--drama-ink);
}

.drama-list li a:hover,
.drama-episode-list li:hover {
  border-color: color-mix(in srgb, var(--drama-lime) 70%, var(--drama-line));
}

.drama-list li span,
.drama-episode-list li span {
  color: var(--drama-muted);
  font-size: 13px;
}

.drama-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.drama-steps button {
  border: 1px solid var(--drama-line);
  background: var(--drama-card);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  cursor: pointer;
  color: var(--drama-muted);
}

.drama-steps button.active,
.drama-steps button:hover {
  background: var(--drama-lime);
  border-color: var(--drama-lime);
  color: var(--drama-ink);
  font-weight: 600;
}

.drama-assets-page-meta {
  margin: 12px 0 0;
  font-size: 0.875rem;
}

.drama-assets-pagination {
  margin-top: 20px;
}

.drama-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 17, 17, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
}

.drama-modal {
  width: min(440px, 100%);
  background: var(--drama-card);
  border-radius: var(--drama-radius);
  border: 1px solid var(--drama-line);
  padding: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.drama-modal h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.drama-voice-audio {
  width: 100%;
  margin-bottom: 12px;
}

.drama-modal-wide {
  max-width: 560px;
}

.drama-voice-create-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.drama-voice-prompt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drama-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.drama-field input,
.drama-field textarea {
  border: 1px solid var(--drama-line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
}

.drama-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.drama-library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.drama-search-input {
  min-width: 220px;
  border: 1px solid var(--drama-line);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  background: #fff;
  color: var(--drama-ink);
}

.drama-frag-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.drama-frag-card {
  background: var(--drama-card);
  border: 1px solid var(--drama-line);
  border-radius: var(--drama-radius);
  padding: 16px;
}

.drama-frag-card.selected {
  border-color: var(--drama-lime);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--drama-lime) 40%, transparent);
}

.drama-frag-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}

.drama-video {
  width: 100%;
  max-height: 280px;
  border-radius: 10px;
  background: #111;
  margin-top: 8px;
}

/* ?? Workspace ?? */
.drama-workspace {
  --drama-lime: #b6ff00;
  --drama-card: #ffffff;
  --drama-radius: 14px;
  --drama-ink: #111;
  --drama-muted: #6b7280;
  --drama-line: #e5e7eb;
  min-height: calc(100vh - 64px);
  background: #f5f5f5;
}

.drama-workspace-status {
  display: flex;
  min-height: 40vh;
  align-items: center;
  justify-content: center;
  color: var(--drama-muted, #6b7280);
  font-size: 14px;
}

.drama-workspace-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(245, 245, 245, 0.95);
  backdrop-filter: blur(8px);
}

.drama-workspace-top-left,
.drama-workspace-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.drama-workspace-top-right {
  justify-content: flex-end;
}

.drama-usage-chip {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 280px);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 19, 24, 0.1);
  background: #fff;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drama-project-output-settings {
  flex-shrink: 0;
}

.drama-project-output-btn .drama-project-output-hint {
  margin-left: 2px;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.06);
  color: #6b7280;
  font-size: 0.65rem;
  font-weight: 600;
}

.drama-project-output-note {
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.45;
}

.drama-ep-project-output-readonly {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px dashed rgba(17, 19, 24, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.drama-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  color: #64748b;
}

.drama-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.drama-title-display {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-title-display:hover {
  background: rgba(0, 0, 0, 0.04);
}

.drama-title-input {
  min-width: 180px;
  max-width: 280px;
  border: 1px solid var(--drama-line);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  background: #fff;
  color: var(--drama-ink);
}

.drama-step-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.drama-step-bar-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.drama-step-bar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #94a3b8;
  padding: 4px;
}

.drama-step-bar button.active {
  color: #0f172a;
  font-weight: 600;
}

.drama-step-bar button.done {
  color: #64748b;
}

.drama-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: #f1f5f9;
  color: #94a3b8;
}

.drama-step-bar button.active .drama-step-num {
  background: var(--drama-lime);
  color: #111;
  box-shadow: 0 0 0 2px rgba(182, 255, 0, 0.35);
}

.drama-step-bar button.done .drama-step-num {
  background: #e2e8f0;
  color: #475569;
}

.drama-step-sep {
  color: #cbd5e1;
  font-size: 14px;
  margin: 0 2px;
}

.drama-assets-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(17, 19, 24, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.drama-assets-entry-btn:hover,
.drama-assets-entry-btn.is-active {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.drama-next-btn {
  height: 36px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}

.drama-next-btn:not(:disabled):hover {
  filter: brightness(1.05);
}

.drama-next-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Shared step section headers */
.drama-step-hero-main,
.drama-episodes-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.drama-step-hero-icon,
.drama-episodes-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f4fce8 0%, #e8f9c8 100%);
  color: #3d5c1f;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(190, 242, 100, 0.45);
}

.drama-step-hero-sub,
.drama-episodes-hero-sub {
  margin: 0;
  font-size: 14px;
  color: var(--drama-muted);
  line-height: 1.5;
}

.drama-step-hero-sub strong,
.drama-episodes-hero-sub strong {
  color: var(--drama-ink);
  font-weight: 600;
}

.drama-outline-hero,
.drama-assets-hero,
.drama-episodes-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.drama-outline-hero h2,
.drama-assets-hero h2,
.drama-episodes-hero h2 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.drama-outline-style {
  flex-shrink: 0;
  align-self: flex-start;
}

.drama-episodes-tips {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--drama-line);
  font-size: 13px;
  color: var(--drama-muted);
  line-height: 1.45;
}

.drama-episodes-tips strong {
  color: var(--drama-ink);
  font-weight: 600;
}

.drama-workspace-banner {
  max-width: 920px;
  margin: 12px auto 0;
  padding: 0 16px;
}

.drama-workspace-main {
  padding-bottom: 48px;
}

/* Outline — 对齐截图:左目录卡片 + 右大白底三区 */
.drama-outline-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 28px;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - 72px);
  background: #f4f5f7;
  box-sizing: border-box;
}

.drama-outline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.drama-outline-toolbar-left,
.drama-outline-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.drama-outline-toolbar-meta {
  font-size: 13px;
  color: #6b7280;
}

.drama-outline-pipeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fefce8 0%, #f0fdf4 100%);
  border: 1px solid rgba(202, 138, 4, 0.28);
  border-radius: 14px;
}

.drama-outline-pipeline-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.drama-outline-pipeline-pulse {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #ca8a04;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(202, 138, 4, 0.45);
  animation: drama-outline-pulse 1.4s ease-out infinite;
}

@keyframes drama-outline-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(202, 138, 4, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(202, 138, 4, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(202, 138, 4, 0);
  }
}

.drama-outline-pipeline-main strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #854d0e;
}

.drama-outline-pipeline-main p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #78716c;
  line-height: 1.45;
}

.drama-outline-pipeline-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.drama-outline-pipeline-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eab308, #22c55e);
  transition: width 0.35s ease;
}

.drama-outline-pipeline-bar.is-indeterminate .drama-outline-pipeline-bar-fill {
  width: 36%;
  animation: drama-outline-indeterminate 1.2s ease-in-out infinite;
}

@keyframes drama-outline-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

.drama-outline-chip-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.drama-outline-chip-btn.is-on,
.drama-outline-chip-btn:hover {
  border-color: color-mix(in srgb, var(--drama-lime, #b6ff00) 55%, #e5e7eb);
  background: var(--pf-lime-soft, #eefcc8);
}

.drama-outline-meta-modal-body {
  max-height: min(65vh, 640px);
  overflow: auto;
  padding: 4px 2px 8px;
}

.drama-outline-meta-modal-body .drama-ep-section-textarea {
  min-height: 360px;
}

.drama-outline-meta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drama-outline-v2.drama-outline {
  display: flex;
  gap: 16px;
  align-items: stretch;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 640px;
}

.drama-outline-sidebar {
  flex: 0 0 280px;
  width: 280px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 12px 12px;
  align-self: flex-start;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 100px);
  overflow: auto;
  box-sizing: border-box;
}

.drama-outline-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 12px;
}

.drama-outline-sidebar-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.drama-outline-sidebar-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9ca3af;
}

.drama-outline-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--drama-lime, #b6ff00) 70%, #86efac);
  border-radius: 999px;
  background: #fff;
  color: #166534;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.drama-outline-add-btn:hover:not(:disabled) {
  background: var(--pf-lime-soft, #eefcc8);
}

.drama-outline-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.drama-outline-ep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-outline-ep-card {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.drama-outline-ep-card:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

.drama-outline-ep-card.is-active {
  border-color: var(--drama-lime, #b6ff00);
  background: color-mix(in srgb, var(--drama-lime, #b6ff00) 14%, #fff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--drama-lime, #b6ff00) 35%, transparent);
}

.drama-outline-ep-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eefcc8, #f3f4f6);
  color: #111;
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
}

.drama-outline-ep-thumb img,
.drama-outline-ep-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-outline-ep-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drama-outline-ep-meta strong {
  font-size: 13px;
  color: #111;
}

.drama-outline-ep-meta small {
  font-size: 12px;
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-outline-ep-meta em {
  font-style: normal;
  font-size: 11px;
  color: #9ca3af;
}

.drama-outline-ep-meta em.is-shot {
  color: #059669;
  font-weight: 600;
}

.drama-outline-ep-meta em.is-waiting {
  color: #ca8a04;
  font-weight: 600;
}

.drama-outline-ep-more {
  color: #c0c4cc;
  display: grid;
  place-items: center;
}

.drama-outline-main {
  flex: 1;
  min-width: 0;
}

.drama-outline-detail,
.drama-outline-detail-empty {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 22px 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  min-height: 640px;
}

.drama-outline-detail-empty {
  display: grid;
  place-items: center;
  color: #6b7280;
}

.drama-outline-detail.is-fullscreen {
  position: fixed;
  inset: 64px 16px 16px;
  z-index: 40;
  overflow: auto;
  min-height: 0;
}

.drama-outline-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.drama-outline-detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  flex: 1;
}

.drama-outline-detail-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  color: #0f172a;
  font-weight: 800;
}

.drama-outline-style-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 600;
}

.drama-outline-detail-meta {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.drama-outline-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 11px;
  font-weight: 600;
}

.drama-outline-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.drama-outline-saved {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #9ca3af;
  margin-right: 4px;
}

.drama-outline-saved.is-ready {
  color: #16a34a;
}

.drama-outline-regen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: var(--drama-lime, #b6ff00);
  color: #111;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.drama-outline-regen-btn:hover:not(:disabled) {
  filter: brightness(0.97);
}

.drama-outline-regen-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.drama-outline-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drama-outline-section {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.drama-outline-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  flex-wrap: wrap;
}

.drama-outline-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.drama-outline-section-title strong {
  display: block;
  font-size: 15px;
  color: #111;
}

.drama-outline-section-title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9ca3af;
}

.drama-outline-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.drama-outline-section-icon.is-creative {
  background: #fef9c3;
  color: #ca8a04;
}

.drama-outline-section-icon.is-summary {
  background: #dbeafe;
  color: #2563eb;
}

.drama-outline-section-icon.is-body {
  background: #ecfdf5;
  color: #059669;
}

.drama-outline-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.drama-outline-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.drama-outline-text-btn:hover:not(:disabled) {
  background: #f3f4f6;
  color: #111;
}

.drama-outline-text-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.drama-outline-section-body {
  padding: 4px 16px 16px;
}

.drama-outline-section-text,
.drama-outline-section-empty {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  white-space: pre-wrap;
}

.drama-outline-section-empty {
  color: #9ca3af;
}

.drama-outline-scenes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drama-outline-scene {
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #fafafa;
  padding: 12px 14px;
}

.drama-outline-scene-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.drama-outline-scene-duration {
  font-size: 12px;
  font-weight: 650;
  color: #0f766e;
  background: #ccfbf1;
  border-radius: 999px;
  padding: 2px 8px;
}

.drama-outline-script-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.drama-outline-script-summary-hint {
  margin-left: auto;
  font-weight: 500;
  color: #94a3b8;
}

.drama-outline-scene-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.drama-outline-scene-stat {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drama-outline-scene-edit {
  margin-left: auto;
}

.drama-outline-scene-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.drama-outline-scene-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
}

.drama-outline-scene-head strong {
  font-size: 13px;
  color: #111;
}

.drama-outline-scene-body {
  margin: 0;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  color: #4b5563;
  white-space: pre-wrap;
  word-break: break-word;
}

.drama-outline-script-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drama-outline-script-gap {
  height: 6px;
}

.drama-outline-script-meta {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.drama-outline-script-action {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #6b7280;
}

.drama-outline-script-dialogue {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #111;
}

.drama-outline-script-speaker {
  font-weight: 700;
}

.drama-outline-script-colon {
  color: #9ca3af;
}

.drama-outline-script-other {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #374151;
}

.drama-outline-scene-edit-box {
  margin-top: 8px;
}

.drama-outline-script-modal .drama-outline-script-modal-body {
  max-height: min(70vh, 720px);
  overflow: auto;
  padding: 4px 2px 12px;
}

.drama-outline-exit-fs {
  position: sticky;
  bottom: 12px;
  margin-top: 12px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.drama-ep-section-textarea {
  width: 100%;
  min-height: 160px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  box-sizing: border-box;
}

.drama-ep-section-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.drama-outline {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

.drama-episode-dir {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  width: 180px;
  flex-shrink: 0;
  padding: 24px 8px;
}

.drama-episode-dir-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.drama-episode-dir-head h3 {
  margin: 0;
  font-size: 13px;
  color: var(--drama-muted);
}

.drama-episode-dir-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: #ecfdf5;
  color: #047857;
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.drama-episode-dir-add:hover:not(:disabled) {
  background: #d1fae5;
}

.drama-episode-dir-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.drama-episode-dir-empty {
  margin: 0;
  padding: 12px 10px;
  font-size: 12px;
  color: #94a3b8;
}

.drama-episodes-page {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 72px);
  background: #f4f5f7;
}

.drama-episodes-page > .drama-episode-dir {
  flex: 0 0 180px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: calc(100vh - 72px);
}

.drama-episodes-main {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 40px;
}

.drama-episodes-detail {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
}

.drama-episodes-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.drama-episodes-detail-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.drama-episodes-detail-head h2 {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
}

.drama-episodes-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drama-episodes-detail-preview {
  margin-top: 20px;
}

.drama-episodes-preview-btn {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}

.drama-episodes-preview-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}

.drama-episodes-preview-btn span {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.drama-episodes-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #64748b;
  background: #f8fafc;
}

.drama-episodes-preview-empty p {
  margin: 0;
  font-size: 13px;
}

.drama-episodes-frag-strip {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.drama-episodes-frag-chip {
  flex: 0 0 72px;
  height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #f1f5f9;
  cursor: pointer;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.drama-episodes-frag-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-episodes-frag-chip.is-done {
  border-color: #86efac;
}

.drama-episodes-frag-chip.is-failed {
  border-color: #fca5a5;
}

.drama-episode-dir ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.drama-episode-dir button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drama-episode-dir button span {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.drama-episode-dir button small {
  font-size: 11px;
  color: var(--drama-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-episode-dir button.active,
.drama-episode-dir button:hover {
  background: #fff;
}

.drama-outline-main {
  flex: 1;
  min-width: 0;
}

.drama-outline:not(.drama-outline-v2) .drama-outline-main {
  max-width: 920px;
  padding: 28px 12px 48px;
}

.drama-outline-v2 .drama-outline-main {
  max-width: none;
  padding: 0;
}

.drama-accordions {
  background: var(--drama-card);
  border-radius: 18px;
  border: 1px solid var(--drama-line);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.04);
}

.drama-accordion {
  border-bottom: 1px solid var(--drama-line);
}

.drama-accordion-head {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border: none;
  background: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.drama-accordion-head-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
  background: #fff;
}

.drama-accordion-head-row .drama-accordion-head {
  padding-right: 8px;
}

.drama-accordion-head:hover {
  background: #fafafa;
}

.drama-regen-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.drama-regen-btn:not(:disabled):hover {
  filter: brightness(1.08);
}

.drama-regen-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.drama-regen-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.drama-accordion-body {
  padding: 0 18px 18px;
}

.drama-pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
}

.drama-loader {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--drama-muted);
  font-size: 14px;
}

.drama-retry-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.drama-summary-structured {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drama-summary-field h4,
.drama-summary-structured h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.drama-character-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drama-character-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
}

.drama-character-card h5 {
  margin: 0 0 10px;
  font-size: 14px;
}

.drama-character-field {
  margin-bottom: 8px;
}

.drama-character-field span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.drama-outline-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drama-outline-edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.drama-outline-edit-field span {
  color: #64748b;
  font-size: 12px;
}

.drama-outline-edit-field input,
.drama-outline-edit-field textarea,
.drama-outline-edit-body {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.drama-outline-edit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drama-outline-edit-hint {
  margin: 0 0 8px;
  font-size: 12px;
}

.drama-episode-body-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.drama-character-field p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
  white-space: pre-wrap;
}

.drama-episode-bodies {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-episode-body-item {
  border: 1px solid var(--drama-line);
  border-radius: 10px;
  overflow: hidden;
}

.drama-episode-body-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border: none;
  background: #fafafa;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.drama-episode-body-item .drama-pre {
  padding: 12px;
}

/* Assets / Episodes steps */
.drama-assets-step,
.drama-episodes-step {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.drama-episodes-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.drama-episodes-reseed-btn {
  gap: 8px;
}

.drama-episodes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 24px;
  border-radius: var(--drama-radius);
  background: var(--drama-card);
  border: 1px dashed var(--drama-line);
  color: var(--drama-muted);
  text-align: center;
}

.drama-episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.drama-ep-card {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px 12px 12px;
  background: var(--drama-card);
  border-radius: 16px;
  border: 1px solid var(--drama-line);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.drama-ep-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.drama-ep-card.is-planning,
.drama-ep-card.is-generating {
  border-color: rgba(190, 242, 100, 0.55);
  box-shadow: 0 0 0 1px rgba(190, 242, 100, 0.25);
}

.drama-ep-card-skeleton {
  min-height: 108px;
  background: linear-gradient(90deg, #f3f4f6 0%, #eceff3 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: drama-ep-skeleton 1.2s ease-in-out infinite;
}

@keyframes drama-ep-skeleton {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* 分集编辑/画布页首屏骨架:外壳内占位,避免白屏与布局跳动 */
.drama-workspace-skeleton {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 40vh;
  padding: 28px 4px;
}
.drama-workspace-skeleton > span {
  display: block;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f3f4f6 0%, #eceff3 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: drama-ep-skeleton 1.2s ease-in-out infinite;
}
.drama-workspace-skeleton > span:nth-child(1) {
  width: 42%;
  height: 26px;
}
.drama-workspace-skeleton > span:nth-child(2) {
  width: 78%;
}
.drama-workspace-skeleton > span:nth-child(3) {
  width: 64%;
}

.drama-ep-card-poster {
  position: relative;
  width: 88px;
  height: 112px;
  border: none;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #e8eaef;
  flex-shrink: 0;
}

.drama-ep-card-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-ep-card-poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #f8f9fb 0%, #eceff4 55%, #e2e6ee 100%);
}

.drama-ep-card-poster-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #64748b;
  max-height: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-ep-card-ep-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
}

.drama-ep-card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.22);
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.drama-ep-card-poster:hover .drama-ep-card-play {
  opacity: 1;
}

.drama-ep-card-busy {
  position: absolute;
  inset: auto 6px 6px 6px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.drama-ep-card-busy::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--drama-lime);
  animation: drama-ep-busy 1.1s ease-in-out infinite;
}

@keyframes drama-ep-busy {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

.drama-ep-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-ep-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--drama-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.drama-ep-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--drama-muted);
}

.drama-ep-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.drama-ep-card-progress {
  height: 4px;
  border-radius: 999px;
  background: #eceff4;
  overflow: hidden;
}

.drama-ep-card-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #bef264 0%, #a3e635 100%);
  transition: width 0.35s ease;
}

.drama-ep-card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex-shrink: 0;
}

.drama-ep-card-ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--drama-line);
  border-radius: 999px;
  background: #fff;
  color: var(--drama-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.drama-ep-card-ai-btn:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.04);
}

.drama-ep-card-ai-btn:disabled {
  color: #9ca3af;
  cursor: not-allowed;
}

.drama-ep-card-edit-btn {
  height: 36px;
  padding: 0 18px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .drama-agent-hero {
    flex-direction: column;
  }

  .drama-agent-hero-actions {
    width: 100%;
  }

  .drama-agent-assets-link {
    width: 100%;
    justify-content: center;
  }

  .drama-agent-ai-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .drama-agent-generate-btn {
    width: 100%;
  }

  .drama-project-row {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
  }

  .drama-project-row-poster {
    width: 72px;
    height: 56px;
  }

  .drama-project-row-more {
    grid-column: 2;
    justify-self: end;
  }

  .drama-episodes-hero {
    flex-direction: column;
  }

  .drama-episodes-hero-actions {
    width: 100%;
  }

  .drama-episodes-reseed-btn {
    width: 100%;
  }

  .drama-ep-card {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
  }

  .drama-ep-card-poster {
    width: 72px;
    height: 96px;
  }

  .drama-ep-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .drama-ep-card-edit-btn,
  .drama-ep-card-ai-btn {
    flex: 1;
  }
}

/* legacy episode card (keep for any stale refs) */
.drama-episodes-head {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drama-episodes-head h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.drama-episode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.drama-episode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--drama-card);
  border-radius: var(--drama-radius);
  padding: 14px;
  border: 1px solid var(--drama-line);
}

.drama-episode-card-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #efeff4;
  display: grid;
  place-items: center;
  color: var(--drama-muted);
  flex-shrink: 0;
}

.drama-episode-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drama-episode-card-body span {
  font-size: 13px;
  color: var(--drama-muted);
}

.drama-episode-card-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

/* Episode edit ? manju-style fullscreen workspace */
.drama-ep-fullscreen {
  --ep-bg: #f5f5f5;
  --ep-panel: #ffffff;
  --ep-muted: #6b7280;
  --ep-ink: #0f172a;
  --ep-line: rgba(0, 0, 0, 0.05);
  --ep-soft: #efeff4;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ep-bg);
  color: var(--ep-ink);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.drama-ep-center {
  align-items: center;
  justify-content: center;
  color: var(--ep-muted);
  font-size: 14px;
}

.drama-ep-header {
  position: relative;
  z-index: 200;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--ep-line);
  background: rgba(245, 245, 245, 0.95);
  backdrop-filter: blur(8px);
  overflow: visible;
}

.drama-ep-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drama-ep-header-left h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drama-ep-header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}

.drama-ep-header-controls > .drama-ep-btn-ghost,
.drama-ep-header-controls > .drama-ep-btn-dark {
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.drama-ep-header-gen-all {
  white-space: nowrap;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.drama-ep-header-gen-opts {
  margin-top: 0;
  overflow: visible;
}

.drama-ep-header-gen-opts.fc-gen-opts,
.drama-ep-header-gen-opts .fc-gen-opts {
  margin-top: 0;
}

.drama-ep-header-gen-opts .fc-gen-opts-triggers {
  align-items: center;
}

.drama-ep-header-gen-opts .fc-gen-opt-btn {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  color: var(--ep-ink, #111);
  max-width: 180px;
  height: 34px;
  box-sizing: border-box;
}

.drama-ep-header-gen-opts .fc-gen-opt-btn.active {
  background: #f5f3ff;
  color: #6d28d9;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.28);
}

.drama-ep-header-gen-opts .drama-ep-opt-panel {
  left: auto;
  right: 0;
  bottom: auto;
  top: calc(100% + 8px);
}

.drama-ep-header-gen-opts .drama-seedance-help-btn {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  padding: 0;
  justify-content: center;
  color: #64748b;
}

.drama-ep-header-gen-opts .drama-seedance-help-btn:hover {
  color: #6d28d9;
  background: #f5f3ff;
}

.seedance-rules-modal .seedance-rules-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seedance-rules-modal .seedance-rules-section h4 {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--drama-ink, #111);
}

.seedance-rules-modal .seedance-rules-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--drama-ink, #111);
}

.seedance-rules-modal .seedance-rules-list code,
.seedance-rules-modal .seedance-rules-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(17, 17, 17, 0.06);
}

.seedance-rules-modal .seedance-rules-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--drama-muted, #64748b);
}

.seedance-rules-modal .seedance-rules-examples {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--drama-line, #e2e8f0);
}

.seedance-rules-modal .seedance-rules-examples code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
}

.drama-ep-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.drama-ep-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.drama-ep-icon-btn.solid {
  background: #fff;
  font-size: 18px;
}

.drama-ep-banner {
  padding: 6px 16px;
  font-size: 12px;
  color: var(--ep-muted);
  border-bottom: 1px solid var(--ep-line);
}

.drama-ep-banner-error {
  color: #dc2626;
}

.drama-ep-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
}

.drama-ep-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 420px;
}

.drama-ep-body > .drama-episode-dir {
  border-right: 1px solid var(--ep-line);
  background: #f8fafc;
  max-height: none;
  height: 100%;
  overflow: auto;
}

.drama-ep-body > .drama-episode-dir ul {
  max-height: none;
}

.drama-ep-assets {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--ep-line);
  background: #f7f7f8;
}

.drama-ep-assets-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--ep-line);
}

.drama-ep-scope {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: #fff;
}

.drama-ep-scope button {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
}

.drama-ep-scope button.active {
  background: #0f172a;
  color: #fff;
}

.drama-ep-asset-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
}

.drama-ep-asset-action-btn {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
}

.drama-ep-asset-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.drama-ep-asset-action-btn.is-ghost {
  background: #fff;
  color: #0f172a;
}

.drama-ep-asset-action-btn.is-ghost:hover:not(:disabled) {
  background: #f8fafc;
}

/* 用 padding 占位保证缩略图高度:button + overflow 下 aspect-ratio 易塌成细条 */

.drama-ep-empty {
  grid-column: 1 / -1;
  margin: 24px 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.drama-ep-editor {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 16px;
  background: transparent;
}

.drama-ep-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.drama-ep-editor-head strong {
  display: block;
  font-size: 15px;
}

.drama-ep-editor-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ep-muted);
}

.drama-ep-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ep-muted);
  white-space: nowrap;
}

.drama-ep-duration input {
  width: 56px;
  height: 32px;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: 999px;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  text-align: center;
  background: #fff;
  -moz-appearance: textfield;
}

.drama-ep-duration input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--ep-lime, #b6ff00) 65%, var(--ep-ink, #111));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ep-lime, #b6ff00) 28%, transparent);
}

.drama-ep-duration input::-webkit-outer-spin-button,
.drama-ep-duration input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.drama-ep-editor-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.drama-ep-editor-box.editing {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

.drama-ep-script-issues {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: none;
  gap: 6px;
}

.drama-ep-script-issue {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.drama-ep-script-issue.is-error {
  color: #9f1239;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.22);
}

.drama-ep-script-issue.is-warn {
  color: #92400e;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.drama-ep-link-last-frame {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #0f172a;
  cursor: pointer;
}

.drama-ep-link-last-frame input {
  margin-top: 2px;
}

.drama-ep-link-last-frame span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drama-ep-link-last-frame em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}

.drama-ep-continuity-hint {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.drama-ep-continuity-hint.is-ready {
  color: #065f46;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.drama-ep-continuity-hint.is-wait {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.drama-ep-ref-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 10px;
}

.drama-ep-ref-strip.is-empty {
  min-height: 28px;
  align-items: center;
}

.drama-ep-ref-strip-hint {
  font-size: 12px;
  color: var(--drama-muted, #888);
}

.drama-ep-ref-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: 64px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
}

.drama-ep-ref-chip:hover {
  border-color: #111;
}

.drama-ep-ref-chip img,
.drama-ep-ref-chip-fallback {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #efeff4;
}

.drama-ep-ref-chip-fallback {
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #888;
}

.drama-ep-ref-chip em {
  display: block;
  margin: 0;
  padding: 4px 6px;
  font-style: normal;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.drama-ep-ref-chip.is-character {
  position: relative;
}

.drama-ep-ref-voice-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  font-size: 9px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(185, 28, 28, 0.88);
  color: #fff;
}

.drama-ep-ref-voice-badge.bound {
  background: rgba(17, 17, 17, 0.82);
  color: #b7f34a;
}

.drama-ep-voice-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 10px;
}

.drama-ep-voice-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drama-ep-voice-row-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--drama-muted, #888);
}

.drama-ep-voice-row-stat {
  font-size: 11px;
  color: var(--drama-muted, #888);
}

.drama-ep-voice-row-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.drama-ep-voice-card {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fafafa;
}

.drama-ep-voice-card.is-bound {
  border-color: #86efac;
  background: #f0fdf4;
}

.drama-ep-voice-card.is-unbound {
  border-color: #fcd34d;
  background: #fffbeb;
}

.drama-ep-voice-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drama-ep-voice-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  background: #efeff4;
}

.drama-ep-voice-avatar img,
.drama-ep-voice-avatar span {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
}

.drama-ep-voice-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drama-ep-voice-meta strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-ep-voice-meta span {
  font-size: 11px;
}

.drama-ep-voice-meta span.is-bound {
  color: #166534;
}

.drama-ep-voice-meta span.is-unbound {
  color: #b45309;
}

.drama-ep-voice-audio {
  width: 100%;
  height: 28px;
}

.drama-ep-voice-actions {
  display: flex;
  gap: 6px;
}

.drama-ep-voice-btn {
  flex: 1;
  font-size: 11px !important;
  padding: 4px 8px !important;
  min-height: 28px;
}

.drama-ep-voice-btn-full {
  width: 100%;
}

.drama-ep-asset-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.drama-ep-asset-op-btn {
  flex: 1;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 10px;
  padding: 5px 8px;
  cursor: pointer;
}

.drama-ep-asset-op-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.drama-ep-asset-voice-btn {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 10px;
  padding: 5px 8px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-ep-asset-voice-btn.is-bound {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}

.drama-ep-asset-voice-btn:hover {
  background: #333;
}

.drama-ep-asset-voice-btn.is-bound:hover {
  background: #dcfce7;
  color: #14532d;
}

.drama-voice-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.drama-voice-preview-btn.is-playing {
  background: var(--pf-lime-soft, #eefcc8);
  border-color: var(--pf-lime, #b6ff00);
}

.drama-ep-content-view {
  min-height: 280px;
  height: 100%;
  overflow: auto;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ep-ink, #222);
  word-break: break-word;
}

.drama-ep-content-empty {
  margin: 0;
  padding: 12px 0;
  color: var(--drama-muted, #888);
  font-size: 13px;
}

.drama-ep-prompt-editor {
  flex: 1;
  min-height: 160px;
  height: auto;
  overflow: auto;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ep-ink, #222);
}

.drama-ep-prompt-editor.is-editing:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.drama-ep-editor-chip {
  user-select: none;
  vertical-align: middle;
  margin: 0 2px;
}

.drama-ep-mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0 2px;
  padding: 2px 8px 2px 2px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  vertical-align: middle;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.drama-ep-mention-chip:hover {
  border-color: #111;
}

.drama-ep-mention-chip img,
.drama-ep-mention-chip-thumb,
.drama-ep-mention-chip-fallback {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: cover;
  background: #efeff4;
  flex-shrink: 0;
}

.drama-ep-mention-chip-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.drama-ep-mention-chip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drama-ep-mention-chip-thumb.is-fallback,
.drama-ep-mention-chip-fallback {
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #888;
}

.drama-ep-mention-chip-label {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.drama-ep-duration-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #efeff4;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  vertical-align: middle;
}

.drama-ep-prompt-editor.is-editing .drama-ep-duration-chip {
  cursor: pointer;
}

.drama-ep-prompt-editor.is-editing .drama-ep-duration-chip:hover {
  border-color: #94a3b8;
  background: #e2e8f0;
}

.drama-ep-chip-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.drama-ep-chip-icon svg {
  display: block;
}

.drama-ep-editor-box textarea {
  display: none;
}

.drama-ep-mention-pop {
  position: fixed;
  z-index: 120;
  width: 320px;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.drama-ep-mention-pop-tabs,
.drama-ep-mention-pop-scopes {
  display: flex;
  gap: 4px;
  padding: 10px 10px 0;
}

.drama-ep-mention-pop-tabs button,
.drama-ep-mention-pop-scopes button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
}

.drama-ep-mention-pop-tabs button.is-active,
.drama-ep-mention-pop-scopes button.is-active {
  background: #efeff4;
  color: #111;
  font-weight: 600;
}

.drama-ep-mention-pop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 10px 0;
  padding: 0 10px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #94a3b8;
}

.drama-ep-mention-pop-search:focus-within {
  border-color: #cbd5e1;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.drama-ep-mention-pop-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}

.drama-ep-mention-pop-search input::placeholder {
  color: #94a3b8;
}

.drama-ep-mention-pop-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.drama-ep-mention-pop-list {
  flex: 1;
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drama-ep-mention-pop-empty {
  margin: 16px 8px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}

.drama-ep-mention-pop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.drama-ep-mention-pop-item.is-active,
.drama-ep-mention-pop-item:hover {
  background: #efeff4;
}

.drama-ep-mention-pop-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: #efeff4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.drama-ep-mention-pop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drama-ep-mention-pop-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drama-ep-mention-pop-meta strong {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drama-ep-mention-pop-meta em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}

.drama-ep-mention-pop-tools {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drama-ep-mention-pop-tools button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

.drama-ep-mention-pop-tools button:hover {
  background: #efeff4;
}

.drama-ep-mention-pop-tools strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.drama-ep-mention-pop-tools em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}

.drama-ep-mention-pop-duration {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drama-ep-mention-pop-duration-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drama-ep-mention-pop-duration-presets button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.drama-ep-mention-pop-duration-presets button:hover:not(:disabled) {
  border-color: #111;
}

.drama-ep-mention-pop-duration-presets button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.drama-ep-mention-pop-duration-custom {
  display: flex;
  gap: 6px;
}

.drama-ep-mention-pop-duration-custom input {
  flex: 1;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.drama-ep-mention-pop-duration-custom button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.drama-ep-mention-pop-back {
  align-self: flex-start;
  border: 0;
  background: transparent;
  padding: 0 2px 4px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
}

.drama-ep-mention-pop-back:hover {
  color: #0f172a;
}

.drama-ep-mention-pop-camera {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.drama-ep-mention-pop-camera-heading {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #64748b;
}

.drama-ep-mention-pop-camera-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.drama-ep-mention-pop-camera-grid button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.drama-ep-mention-pop-camera-grid button:hover {
  border-color: #111;
  background: #f8fafc;
}

.drama-ep-mention-pop-camera-grid strong {
  font-size: 12px;
  color: #0f172a;
}

.drama-ep-mention-pop-camera-grid em {
  font-style: normal;
  font-size: 10px;
  line-height: 1.35;
  color: #64748b;
}

.drama-ep-mention-pop-camera-tips {
  margin: 0;
  padding: 8px 10px;
  list-style: none;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drama-ep-mention-pop-camera-tips li {
  font-size: 10px;
  line-height: 1.4;
  color: #64748b;
}

.drama-ep-editor-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.drama-ep-editor-actions .drama-ep-btn-ghost,
.drama-ep-editor-actions .drama-ep-btn-dark {
  height: 34px;
  min-width: 88px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.drama-ep-btn-ghost,
.drama-ep-btn-dark {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.drama-ep-btn-ghost {
  background: #fff;
  color: var(--ep-ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.drama-ep-btn-dark {
  background: #0f172a;
  color: #fff;
}

.drama-ep-btn-ghost:disabled,
.drama-ep-btn-dark:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.drama-ep-preview {
  min-height: 0;
  border-left: 1px solid var(--ep-line);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.drama-ep-side-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--ep-line);
  background: #fafafa;
}

.drama-ep-side-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  min-width: 0;
}

.drama-ep-side-tabs button {
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.drama-ep-side-tabs button.active {
  background: #0f172a;
  color: #fff;
}

.drama-ep-preview .drama-ep-player,
.drama-ep-preview .drama-ep-empty {
  margin: auto;
}

.drama-ep-preview .drama-ep-player {
  margin-top: 16px;
  margin-bottom: 24px;
}

.drama-ep-preview-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px 16px 20px;
  overflow-y: auto;
}

.drama-ep-segmented-player {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.drama-ep-segmented-screen {
  position: relative;
  margin: 0;
}

.drama-ep-segmented-screen.is-empty {
  border: 1px dashed #e2e8f0;
  background: #efeff4;
}

.drama-ep-video-overlay-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

.drama-ep-video-overlay-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}

.drama-ep-video-overlay-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.drama-ep-segmented-screen:fullscreen,
.drama-ep-segmented-screen.is-fullscreen {
  max-width: none;
  width: 100%;
  height: 100%;
  border-radius: 0;
  aspect-ratio: auto;
}

.drama-ep-segmented-screen:fullscreen video,
.drama-ep-segmented-screen.is-fullscreen video {
  object-fit: contain;
}

.drama-ep-video-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-ep-video-clock {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

.drama-ep-video-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drama-ep-video-icon-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.drama-ep-video-icon-btn:hover:not(:disabled) {
  color: #475569;
}

.drama-ep-video-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.drama-ep-video-icon-btn.is-muted {
  color: #64748b;
}

.drama-ep-video-track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 12px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 4px;
  background: #ececf1;
  cursor: pointer;
}

.drama-ep-video-track.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.drama-ep-video-track-seg {
  position: relative;
  min-width: 0;
  background: #ececf1;
}

.drama-ep-video-track-seg.has-divider {
  border-right: 1px solid #fff;
}

.drama-ep-video-track-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: #0f172a;
}

.drama-ep-video-playhead {
  pointer-events: none;
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: #a78bfa;
}

.drama-ep-video-autolink {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s ease;
}

.drama-ep-video-autolink:hover:not(:disabled) {
  color: #334155;
}

.drama-ep-video-autolink:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.drama-ep-video-autolink-bar {
  width: 20px;
  height: 6px;
  border-radius: 999px;
  background: #d8d8de;
  transition: background 0.15s ease;
}

.drama-ep-video-autolink.is-on .drama-ep-video-autolink-bar {
  background: #10b981;
}

.drama-ep-preview-inner .drama-ep-open-canvas {
  align-self: center;
}

.drama-ep-open-canvas {
  margin-top: 10px;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.drama-ep-compose-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 320px;
  margin: 12px auto 0;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--drama-lime, #b6ff00);
  color: var(--drama-ink, #111318);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.drama-ep-compose-btn--header {
  flex-shrink: 0;
  width: auto;
  max-width: none;
  margin: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.drama-ep-compose-btn:hover:not(:disabled) {
  filter: brightness(0.97);
}

.drama-ep-compose-btn:disabled {
  background: #e8e8ec;
  color: #9ca3af;
  cursor: not-allowed;
}

.drama-ep-compose-btn svg.drama-ep-compose-spin {
  animation: drama-ep-compose-spin 0.8s linear infinite;
}

@keyframes drama-ep-compose-spin {
  to {
    transform: rotate(360deg);
  }
}

.drama-ep-compose-error {
  max-width: 320px;
  margin: 8px auto 0;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.drama-ep-compose-error--header {
  flex-shrink: 0;
  max-width: none;
  margin: 0;
  padding: 6px 12px;
  text-align: left;
  border-bottom: 1px solid #fecaca;
  background: #fef2f2;
}

.drama-ep-body.is-side-canvas .drama-ep-workspace {
  grid-template-columns: 260px minmax(0, 1fr) minmax(420px, 1.15fr);
}

.drama-ep-player {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drama-ep-player.ratio-16x9 {
  max-width: 100%;
  aspect-ratio: 16 / 9;
}

.drama-ep-player.ratio-1x1 {
  max-width: 320px;
  aspect-ratio: 1 / 1;
}

.drama-ep-player video,
.drama-ep-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-ep-player-placeholder {
  color: #94a3b8;
  text-align: center;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.drama-ep-player-placeholder small {
  font-size: 11px;
  opacity: 0.8;
}

.drama-ep-storyboard {
  flex-shrink: 0;
  border-top: 1px solid var(--ep-line);
  background: #fff;
  padding: 12px 16px 16px;
}

.drama-ep-storyboard-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.drama-ep-insert {
  width: 28px;
  height: 28px;
  margin-top: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--ep-soft);
  color: #64748b;
  cursor: pointer;
}

.drama-ep-clip-wrap {
  position: relative;
  flex-shrink: 0;
  padding-right: 28px;
}

.drama-ep-clip-shell {
  position: relative;
  width: 112px;
  border: 2px solid transparent;
  border-radius: 14px;
}

.drama-ep-clip-shell.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #0f172a;
}

.drama-ep-clip-shell.is-generating {
  box-shadow: 0 0 0 2px #2563eb;
}

.drama-ep-clip-shell.is-queued {
  box-shadow: 0 0 0 2px #0ea5e9;
}

.drama-ep-clip-shell.is-generating .drama-ep-clip-empty {
  animation: drama-ep-pulse 1.2s ease-in-out infinite;
}

.drama-ep-clip-shell.is-failed {
  box-shadow: 0 0 0 2px #dc2626;
}

.drama-ep-clip {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.drama-ep-clip-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
  pointer-events: none;
}

.drama-ep-clip-shell.is-queued .drama-ep-clip-badge {
  background: rgba(14, 165, 233, 0.95);
}

.drama-ep-clip-shell.is-generating .drama-ep-clip-badge {
  background: rgba(37, 99, 235, 0.95);
}

.drama-ep-clip-shell.is-failed .drama-ep-clip-badge {
  background: rgba(220, 38, 38, 0.95);
}

.drama-ep-clip-fail-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.drama-ep-clip-fail-btn:hover {
  background: #b91c1c;
}

.drama-ep-clip-empty {
  color: #94a3b8;
}

.drama-ep-clip-shell.is-failed .drama-ep-clip-empty {
  color: #dc2626;
}

.drama-ep-fail-reason-pop {
  position: fixed;
  right: 24px;
  /* 在生成队列 FAB(bottom:96)与微信加群钮之上 */
  bottom: 168px;
  z-index: 80;
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
  background: #fff;
}

.drama-ep-fail-reason-pop .drama-gen-detail {
  max-height: min(70vh, 520px);
}

.drama-ep-versions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--ep-line, #e2e8f0) 80%, transparent);
}

.drama-ep-versions-label {
  flex: none;
  font-size: 12px;
  color: #64748b;
}

.drama-ep-versions-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.drama-ep-version {
  position: relative;
  flex: none;
  width: 72px;
  height: 48px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
}

.drama-ep-version:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.drama-ep-version img,
.drama-ep-version video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drama-ep-version em {
  position: absolute;
  right: 4px;
  bottom: 3px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 10px;
  font-style: normal;
}

.drama-ep-version.is-active,
.drama-ep-version.is-current {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px color-mix(in srgb, #3b82f6 35%, transparent);
}

.drama-ep-version.is-previewing {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px color-mix(in srgb, #f59e0b 45%, transparent);
}

.drama-ep-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 12px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, #f59e0b 12%, #fffbeb);
  border: 1px solid color-mix(in srgb, #f59e0b 35%, #fde68a);
  font-size: 12px;
  color: #92400e;
}

.drama-ep-preview-banner-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.drama-ep-preview-banner-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, #f59e0b 40%, #fcd34d);
  background: #fff;
  color: #b45309;
  font-size: 12px;
  cursor: pointer;
}

.drama-ep-preview-banner-btn.is-ghost {
  background: transparent;
  border-color: transparent;
  color: #78716c;
}

.drama-ep-preview-banner-btn:hover:not(:disabled) {
  background: #fffbeb;
}

@keyframes drama-ep-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.drama-ep-clip img,
.drama-ep-clip video,
.drama-ep-clip-empty {
  width: 112px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ep-soft);
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 18px;
}

.drama-ep-clip em {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  font-style: normal;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.drama-ep-clip-spec {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.drama-ep-clip-ops {
  position: absolute;
  top: 16px;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.drama-ep-clip-wrap:hover .drama-ep-clip-ops {
  display: flex;
}

.drama-ep-clip-ops button {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 8px;
  background: var(--ep-soft);
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
}

.drama-ep-clip-ops button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .drama-ep-workspace {
    grid-template-columns: 240px minmax(0, 1fr) 300px;
  }

  .drama-ep-body {
    grid-template-columns: 140px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .drama-ep-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .drama-ep-workspace {
    grid-template-columns: 1fr;
  }

  .drama-ep-assets,
  .drama-ep-preview {
    border: none;
    max-height: 280px;
  }

  .drama-ep-preview {
    order: -1;
  }

  .drama-episodes-page {
    flex-direction: column;
  }

  .drama-episodes-page > .drama-episode-dir {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .drama-episodes-page > .drama-episode-dir ul {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
  }
}

/* legacy episode edit hooks kept for other pages */
.drama-episode-edit {
  --drama-lime: #b6ff00;
  --drama-card: #ffffff;
  --drama-radius: 14px;
  --drama-ink: #111;
  --drama-muted: #6b7280;
  --drama-line: #e5e7eb;
  min-height: calc(100vh - 64px);
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
}

.drama-episode-edit-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(245, 245, 245, 0.95);
}

.drama-episode-edit-top h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.drama-episode-edit-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 16px;
  flex: 1;
  min-height: 0;
}

.drama-episode-assets {
  background: var(--drama-card);
  border: 1px solid var(--drama-line);
  border-radius: var(--drama-radius);
  padding: 12px;
}

.drama-episode-assets h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--drama-muted);
}

.drama-storyboard-thumbs {
  border-top: 1px solid var(--drama-line);
  background: #fff;
  padding: 12px 16px 20px;
}

.drama-storyboard-thumbs h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--drama-muted);
}

.drama-storyboard-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

@media (max-width: 860px) {
  .drama-workspace-top {
    grid-template-columns: 1fr;
    height: auto;
    padding: 10px 12px;
  }

  .drama-outline {
    flex-direction: column;
  }

  .drama-outline-v2.drama-outline {
    flex-direction: column;
  }

  .drama-outline-sidebar {
    position: static;
    width: 100%;
    flex: none;
    max-height: none;
  }

  .drama-episode-dir {
    position: static;
    width: 100%;
    padding: 12px 0 0;
  }

  .drama-episode-dir ul {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
  }

  .drama-episode-dir button {
    min-width: 110px;
  }

  .drama-episode-edit-layout {
    grid-template-columns: 1fr;
  }
}

/* Global image generation queue ? bottom-right FAB + half-height panel */
.drama-gen-fab-root {
  position: fixed;
  right: 20px;
  /* 抬高,避免挡住全站微信加群浮钮 */
  bottom: 96px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.drama-gen-fab-btn,
.drama-gen-fab-panel {
  pointer-events: auto;
}

.drama-gen-fab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  touch-action: none;
  user-select: none;
}

.drama-gen-fab-btn.is-draggable {
  cursor: grab;
}

.drama-gen-fab-btn.is-draggable:active {
  cursor: grabbing;
}

.drama-gen-fab-btn:hover {
  background: #222;
}

.drama-gen-fab-btn.is-failed {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(239, 68, 68, 0.45);
}

.drama-gen-fab-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  color: #64748b;
  font-size: 11px;
}

.drama-gen-fab-kind em {
  font-style: normal;
  font-weight: 600;
}

.drama-gen-fab-msg {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.drama-gen-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b6ff00;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.drama-gen-fab-panel {
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  height: min(50vh, 520px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--drama-line, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.drama-gen-fab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--drama-line, #e5e7eb);
  flex-shrink: 0;
}

.drama-gen-fab-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.drama-gen-fab-title strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.drama-gen-fab-title span {
  display: block;
  font-size: 12px;
  color: var(--drama-muted, #6b7280);
  margin-top: 2px;
}

.drama-gen-fab-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.drama-gen-fab-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--drama-muted, #6b7280);
  cursor: pointer;
}

.drama-gen-fab-icon-btn:hover {
  background: #f3f4f6;
  color: #111;
}

.drama-gen-fab-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-gen-fab-item {
  padding: 12px;
  border-radius: 12px;
  background: #f7f7f5;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: default;
}

.drama-gen-fab-item.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.drama-gen-fab-item.is-clickable:hover {
  border-color: #d4d4d0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.drama-gen-fab-item.is-running {
  border-color: #b6ff00;
  background: linear-gradient(180deg, #f8ffe8 0%, #f7f7f5 100%);
}

.drama-gen-fab-item.is-failed {
  background: #fff5f5;
  border-color: #fecaca;
}

.drama-gen-fab-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.drama-gen-fab-item-main {
  flex: 1;
  min-width: 0;
}

.drama-gen-fab-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.drama-gen-fab-type {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--drama-muted, #6b7280);
}

.drama-gen-fab-status {
  font-size: 11px;
  color: var(--drama-muted, #6b7280);
  white-space: nowrap;
  flex-shrink: 0;
}

.drama-gen-fab-error-block {
  margin-top: 8px;
}

.drama-gen-fab-error-title {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
}

.drama-gen-fab-error {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #b91c1c;
  word-break: break-word;
}

.drama-gen-fab-error-tip {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #7f1d1d;
}

.drama-gen-fab-open-hint {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: #a3a3a3;
}

.drama-gen-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  flex: 1;
}

.drama-gen-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--drama-line, #e5e7eb);
  flex-shrink: 0;
}

.drama-gen-detail-head strong {
  display: block;
  font-size: 14px;
}

.drama-gen-detail-head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--drama-muted, #6b7280);
  line-height: 1.4;
}

.drama-gen-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drama-gen-detail-card {
  padding: 12px;
  border-radius: 12px;
  background: #f7f7f5;
  border: 1px solid #ecece8;
}

.drama-gen-detail-card.is-error {
  background: #fff5f5;
  border-color: #fecaca;
}

.drama-gen-detail-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.drama-gen-detail-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #404040;
}

.drama-gen-detail-tip {
  margin-top: 8px !important;
  color: #7f1d1d !important;
}

.drama-gen-detail-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
}

.drama-gen-detail-row:first-of-type {
  margin-top: 0;
}

.drama-gen-detail-row em {
  flex: 0 0 4.5em;
  font-style: normal;
  color: var(--drama-muted, #6b7280);
}

.drama-gen-detail-row span {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.drama-gen-detail-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.drama-gen-detail-raw-toggle {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: #b91c1c;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}

.drama-gen-detail-raw {
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #fecaca;
  font-size: 10px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow: auto;
}

.drama-gen-detail-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--drama-muted, #6b7280);
}

.drama-gen-detail-spin {
  animation: drama-gen-fab-pulse 1s linear infinite;
}

.drama-gen-detail-warn {
  margin: 0;
  font-size: 12px;
  color: #a3a3a3;
}

.drama-gen-detail-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drama-gen-detail-events li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
}

.drama-gen-detail-events time {
  color: #a3a3a3;
}

.drama-gen-detail-events span {
  color: #404040;
  line-height: 1.4;
}

.drama-gen-fab-bar {
  margin-top: 10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b6ff00, #dfff80, #b6ff00);
  background-size: 200% 100%;
  animation: drama-gen-queue-slide 1.2s linear infinite;
}

.drama-gen-fab-foot {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--drama-line, #e5e7eb);
  font-size: 11px;
  line-height: 1.45;
  color: var(--drama-muted, #6b7280);
  flex-shrink: 0;
}

.drama-gen-fab-foot-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #b6ff00;
  animation: drama-gen-fab-pulse 1.4s ease-in-out infinite;
}

@keyframes drama-gen-fab-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes drama-gen-queue-slide {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* legacy aliases */
.drama-gen-queue,
.drama-gen-sidebar {
  display: none;
}

.drama-global-picker-modal .pf-modal-body {
  min-height: 280px;
}

.drama-btn-danger-text {
  color: #b91c1c;
}

/* 批量角色音色生成进度 */
.drama-batch-voice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  max-height: 320px;
  overflow: auto;
  list-style: none;
  padding: 0;
}

.drama-batch-voice-item {
  padding: 10px 12px;
  border: 1px solid var(--drama-line);
  border-radius: 10px;
  background: #fafafa;
}

.drama-batch-voice-item.is-done {
  border-color: #86efac;
  background: #f0fdf4;
}

.drama-batch-voice-item.is-error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.drama-batch-voice-item.is-prompt,
.drama-batch-voice-item.is-synth,
.drama-batch-voice-item.is-bind {
  border-color: #fde047;
  background: #fefce8;
}

.drama-batch-voice-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drama-batch-voice-status {
  font-size: 12px;
  color: var(--drama-muted);
}

.drama-batch-voice-prompt {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.drama-batch-voice-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: #b91c1c;
}