* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f5f5f7; }

.layout { height: 100vh; min-width: 0; }
.layout > .el-container, .layout .el-main { min-width: 0; }
.el-main { min-width: 0; overflow-x: hidden; }
.sidebar { background: #1f1f1f; color: #fff; }
.sidebar .logo { font-size: 18px; font-weight: 600; padding: 20px; color: #fff; }
.sidebar .el-menu { background: #1f1f1f; border: none; }
.sidebar .el-menu-item { color: #d4d4d4; }
.sidebar .el-menu-item.is-active { background: #303030; color: #ff9900; }
.sidebar-footer { position: absolute; bottom: 0; left: 0; right: 0; background: #1f1f1f; }
.sidebar-footer .el-button { font-size: 12px; }

.page-title { font-size: 22px; font-weight: 600; margin-bottom: 16px; }

.markdown-body { line-height: 1.8; font-size: 14px; color: #2c3e50; }
.markdown-body h1 { font-size: 24px; margin-top: 24px; }
.markdown-body h2 { font-size: 20px; margin-top: 20px; border-bottom: 1px solid #eaecef; padding-bottom: 6px; }
.markdown-body h3 { font-size: 17px; margin-top: 16px; }
.markdown-body table { border-collapse: collapse; margin: 12px 0; }
.markdown-body th, .markdown-body td { border: 1px solid #d0d7de; padding: 6px 12px; }
.markdown-body code { background: #f6f8fa; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.markdown-body pre { background: #f6f8fa; padding: 12px; border-radius: 6px; overflow-x: auto; }
.markdown-body blockquote { border-left: 4px solid #dfe2e5; padding: 0 16px; color: #6a737d; margin: 12px 0; }
.markdown-body .mermaid { text-align: center; margin: 16px 0; }

/* 项目卡片 */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-card { transition: transform 0.2s; }
.project-card:hover { transform: translateY(-2px); }
.proj-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.proj-tags { margin-bottom: 12px; }
.proj-tags .el-tag { margin-right: 4px; }
.proj-meta { font-size: 13px; color: #606266; line-height: 1.8; }
.proj-actions { margin-top: 12px; display: flex; gap: 8px; }

/* 题材卡片 */
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.genre-card { border: 2px solid #e4e7ed; border-radius: 8px; padding: 14px; cursor: pointer; transition: all 0.2s; text-align: center; }
.genre-card:hover { border-color: #ff9900; }
.genre-card.active { border-color: #ff9900; background: #fff7e6; }
.genre-icon { font-size: 26px; }
.genre-name { font-weight: 600; margin: 6px 0; font-size: 14px; }
.genre-desc { font-size: 12px; color: #909399; }

/* 步骤导航 */
.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
.workspace .header { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 16px 20px; border-radius: 8px; flex-wrap: wrap; gap: 8px; }
.workspace .header > div { min-width: 0; }
.workspace .header .title { font-size: 18px; font-weight: 600; }
.step-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; background: #fff; padding: 14px; border-radius: 8px; overflow-x: auto; min-width: 0; }
.step-item { min-width: 0; min-height: 70px; padding: 10px 8px; border-radius: 6px; text-align: center; cursor: pointer; transition: all 0.2s; border: 1px solid #e4e7ed; }
.step-item:hover { background: #f5f5f7; }
.step-item.active { background: #fff7e6; border-color: #ff9900; }
.step-item.done { color: #67c23a; }
.step-item.done.active { color: #ff9900; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: #e4e7ed; color: #909399; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.step-item.active .step-num { background: #ff9900; color: #fff; }
.step-item.done .step-num { background: #67c23a; color: #fff; }
.step-label { font-size: 13px; line-height: 1.35; }

/* 生成面板 */
.gen-panel { background: #fff; border-radius: 8px; padding: 20px; min-height: 400px; max-height: calc(100vh - 260px); overflow-y: auto; }
.gen-toolbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #eee; flex-wrap: wrap; gap: 12px; }
.gen-subtitle { color: #909399; font-size: 13px; margin-top: 6px; }
.gen-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.streaming-indicator { color: #409eff; font-size: 13px; margin-bottom: 12px; padding: 8px 12px; background: #ecf5ff; border-radius: 6px; }

/* 单集编辑 */
.ep-wrap { display: flex; gap: 16px; height: calc(100vh - 280px); min-height: 600px; }
.ep-list { width: 240px; background: #fff; border-radius: 8px; padding: 12px; flex-shrink: 0; overflow-y: auto; }
.ep-list-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 12px; border-bottom: 1px solid #eee; margin-bottom: 8px; }
.ep-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 6px; cursor: pointer; margin-bottom: 4px; border-left: 3px solid transparent; }
.ep-item:hover { background: #f5f5f7; }
.ep-item.active { background: #fff7e6; border-left-color: #ff9900; }
.ep-item.outlined { border-left-color: #e6a23c; }
.ep-item.done { border-left-color: #67c23a; }
.ep-item-title-mini { font-size: 12px; color: #909399; margin-top: 2px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-main { min-width: 0; flex: 1; background: #fff; border-radius: 8px; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; }
.ep-toolbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eee; gap: 12px; flex-wrap: wrap; }
.ep-toolbar > div { min-width: 0; }
.ep-title-big { font-size: 18px; font-weight: 600; }
.ep-subtitle { font-size: 13px; color: #909399; margin-top: 2px; }

/* 分集大纲与分集正文 */
.episode-stage-page { min-width: 0; display: grid; gap: 16px; }
.episode-stage-header { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; background: #fff; border: 1px solid #e4e7ed; border-radius: 8px; }
.episode-stage-header > div:first-child { min-width: 0; }
.episode-stage-header h1 { margin: 4px 0 8px; font-size: 24px; color: #1f2937; }
.episode-stage-header p { max-width: 760px; margin: 0; color: #6b7280; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.episode-stage-progress { flex: 0 0 auto; min-width: 128px; display: grid; gap: 2px; padding: 12px 16px; border-left: 3px solid #409eff; background: #f5f7fa; }
.episode-stage-progress strong { color: #1f2937; font-size: 20px; }
.episode-stage-progress span { color: #6b7280; font-size: 12px; }
.episode-stage-blocker { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 20px; background: #fff7e6; border: 1px solid #f3d19e; border-radius: 8px; }
.episode-stage-blocker > .el-icon { color: #e6a23c; font-size: 24px; }
.episode-stage-blocker div { min-width: 0; display: grid; gap: 4px; }
.episode-stage-blocker strong { color: #7a4f01; }
.episode-stage-blocker span { color: #8a6d3b; font-size: 13px; overflow-wrap: anywhere; }
.episode-directory-setup { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 22px; background: #fff; border: 1px solid #e4e7ed; border-radius: 8px; }
.episode-directory-setup h2 { margin: 0 0 8px; color: #1f2937; font-size: 18px; }
.episode-directory-setup p { margin: 0; color: #6b7280; font-size: 13px; line-height: 1.7; }
.episode-directory-setup .streaming-indicator, .episode-directory-preview { grid-column: 1 / -1; }
.episode-directory-preview { min-width: 0; max-height: min(620px, 60vh); padding: 18px; overflow: auto; border-top: 1px solid #ebeef5; overflow-wrap: anywhere; }
.episode-stage-page .ep-wrap { height: auto; min-height: min(680px, calc(100vh - 300px)); }
.episode-stage-page .ep-item { width: 100%; appearance: none; font: inherit; color: inherit; background: transparent; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; }
.episode-stage-page .ep-item > span { min-width: 0; display: flex; flex-direction: column; }
.episode-stage-page .ep-item small { max-width: 135px; margin-top: 3px; overflow: hidden; color: #909399; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.episode-outline-workspace, .episode-script-workspace { min-width: 0; }
.episode-toolbar-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.episode-toolbar-actions .el-button + .el-button { margin-left: 0; }
.episode-word-control { display: flex; align-items: center; gap: 8px; color: #606266; font-size: 12px; }
.episode-save-state { margin-bottom: 10px; color: #6b7280; font-size: 12px; }
.episode-reading-pane { min-width: 0; overflow-wrap: anywhere; }
.episode-reading-pane .markdown-body { min-width: 0; overflow-wrap: anywhere; }
.episode-content-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.episode-content-meta .el-button { margin-left: auto; }
.episode-stage-next { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 16px; border-top: 1px solid #ebeef5; }
.episode-stage-next > div { min-width: 0; display: grid; gap: 4px; }
.episode-stage-next strong { color: #1f2937; font-size: 13px; }
.episode-stage-next span { color: #6b7280; font-size: 12px; overflow-wrap: anywhere; }

.rotating { animation: rotate 1s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.empty { padding: 60px 0; text-align: center; color: #909399; }
.hint { color: #888; font-size: 13px; }
.hint-inline { color: #888; margin-left: 12px; font-size: 12px; }

/* 项目列表工具栏 */
.proj-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; padding: 12px; background: #fff; border-radius: 8px; }
.proj-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* 用户区折叠按钮（点击展开下拉菜单） */
.user-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #303030; cursor: pointer; color: #d4d4d4; }
.user-chip:hover { background: #2a2a2a; }
.user-avatar { font-size: 20px; flex-shrink: 0; }
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-credits { font-size: 11px; color: #909399; margin-top: 2px; }
.user-caret { font-size: 12px; color: #909399; }

/* 个人中心 */
.profile-wrap .stat-card { text-align: center; }
.profile-wrap .stat-label { color: #909399; font-size: 13px; margin-bottom: 6px; }
.profile-wrap .stat-num { font-size: 26px; font-weight: 700; color: #303133; }
.profile-wrap .stat-foot { font-size: 11px; color: #c0c4cc; margin-top: 4px; }

/* 移动端 */
.mobile-menu-btn { position: fixed; top: 12px; left: 12px; z-index: 1000; }
.mobile-sidebar { height: 100%; position: relative; padding-bottom: 120px; }
.mobile-sidebar .sidebar-footer { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px; background: #1f1f1f; }

@media (max-width: 767px) {
  .layout > .el-aside { display: none; }
  .el-main { padding: 60px 12px 12px !important; }
  .page-title { font-size: 18px; margin-top: 4px; }

  /* 项目网格压成单列 */
  .project-grid { grid-template-columns: 1fr; gap: 12px; }
  .proj-toolbar { padding: 8px; }
  .proj-toolbar .el-input,
  .proj-toolbar .el-radio-group { width: 100% !important; }

  /* 工作区 header 折行 */
  .workspace .header { padding: 12px; }
  .workspace .header .title { font-size: 16px; }
  .step-nav { grid-template-columns: repeat(6, 112px); padding: 8px; gap: 6px; scroll-snap-type: x proximity; }
  .step-item { min-height: 62px; padding: 8px 4px; scroll-snap-align: start; }
  .step-label { font-size: 12px; }

  /* 生成面板适应小屏 */
  .gen-panel { padding: 12px; max-height: none; }
  .gen-toolbar { flex-direction: column; align-items: stretch; }
  .gen-actions .el-button { flex: 1; }

  /* 单集编辑：垂直布局 */
  .ep-wrap { flex-direction: column; height: auto; }
  .ep-list { width: 100%; max-height: 240px; }
  .ep-main { padding: 12px; }
  .ep-toolbar { flex-direction: column; align-items: stretch; }
  .episode-stage-header, .episode-stage-blocker, .episode-stage-next { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
  .episode-stage-header { padding: 16px 14px; }
  .episode-stage-progress { width: 100%; }
  .episode-stage-blocker .el-button, .episode-stage-next .el-button { width: 100%; }
  .episode-directory-setup { grid-template-columns: 1fr; padding: 16px 14px; }
  .episode-directory-setup .el-button { width: 100%; }
  .episode-toolbar-actions { width: 100%; justify-content: stretch; }
  .episode-toolbar-actions > .el-button { width: 100%; }
  .episode-word-control { width: 100%; justify-content: space-between; }
  .episode-content-meta .el-button { width: 100%; margin-left: 0; }
  .episode-stage-page .ep-wrap { min-height: 0; }

  /* 题材网格更小 */
  .genre-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

/* 市场优先项目向导 */
.project-wizard { max-width: min(1120px, 100%); margin: 0 auto; padding-bottom: 32px; min-width: 0; overflow-x: hidden; }
.wizard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.wizard-heading .page-title { margin-bottom: 4px; }
.wizard-subtitle { color: #606266; font-size: 14px; line-height: 1.6; }
.wizard-steps { margin-bottom: 22px; }
.wizard-panel { background: #fff; border: 1px solid #e4e7ed; border-radius: 8px; padding: 24px; min-height: 340px; min-width: 0; max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
.wizard-loading { display: flex; align-items: center; }
.wizard-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.wizard-section-head h2 { margin: 0 0 6px; font-size: 19px; color: #202124; }
.wizard-section-head p { margin: 0; color: #6b7280; font-size: 13px; line-height: 1.7; }
.market-choice-grid, .region-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.market-choice, .region-choice { appearance: none; width: 100%; border: 1px solid #d8dce5; border-radius: 8px; background: #fff; padding: 20px; text-align: left; color: #303133; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; min-height: 150px; transition: border-color .18s, box-shadow .18s, background .18s; }
.market-choice:hover, .region-choice:hover { border-color: #409eff; box-shadow: 0 4px 14px rgba(31, 41, 55, .08); }
.market-choice.active, .region-choice.active { border-color: #409eff; background: #ecf5ff; box-shadow: inset 0 0 0 1px #409eff; }
.market-choice-title, .region-choice-title { font-size: 18px; font-weight: 700; }
.market-choice-subtitle { margin-top: 7px; color: #409eff; font-size: 13px; font-weight: 600; }
.market-choice-description { margin-top: 14px; color: #606266; font-size: 13px; line-height: 1.7; }
.region-choice { min-height: 126px; }
.region-choice-meta { margin-top: 14px; color: #606266; font-size: 13px; }
.region-choice-version { margin-top: auto; padding-top: 12px; color: #909399; font-size: 12px; }
.market-note { margin-top: 18px; border-left: 3px solid #67c23a; background: #f0f9eb; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; color: #4b5563; font-size: 13px; line-height: 1.6; }
.market-note strong { color: #2f5f25; }
.wizard-field-label { margin-bottom: 10px; color: #303133; font-size: 14px; font-weight: 600; }
.market-genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-genre-grid .genre-card { appearance: none; background: #fff; min-height: 84px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 7px; }
.custom-genre-block, .format-choice-block { margin-top: 24px; }
.custom-genre-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; max-width: 640px; }
.custom-genre-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.aspect-ratio-control { display: flex; }
.format-hint { margin: 10px 0 0; color: #606266; font-size: 13px; line-height: 1.6; }
.project-title-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }
.field-warning { margin-top: 6px; color: #e6a23c; font-size: 12px; }
.market-genre-grid .genre-code { color: #909399; font-size: 11px; overflow-wrap: anywhere; }
.platform-label { margin-top: 24px; }
.platform-control { display: flex; flex-wrap: wrap; }
.project-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.project-settings-grid .el-form-item { min-width: 0; }
.binding-summary { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid #ebeef5; }
.binding-summary span { background: #f4f4f5; color: #4b5563; border-radius: 6px; padding: 5px 9px; font-size: 12px; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 767px) {
  .wizard-heading { align-items: flex-start; }
  .wizard-heading .el-tag { flex-shrink: 0; }
  .wizard-steps .el-step__title { font-size: 11px; line-height: 1.35; }
  .wizard-panel { padding: 16px; min-height: 0; }
  .market-choice-grid, .region-choice-grid, .project-settings-grid { grid-template-columns: 1fr; }
  .market-choice { min-height: 132px; padding: 16px; }
  .market-genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-control { width: 100%; }
  .platform-control .el-radio-button { flex: 1 1 50%; }
  .platform-control .el-radio-button__inner { width: 100%; padding: 10px 8px; white-space: normal; }
  .wizard-actions .el-button { min-width: 96px; }
}
/* 门禁式创作工作台 */
.creation-workbench {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr) 260px;
  min-height: calc(100vh - 220px);
  border: 1px solid #dfe3e8;
  background: #fff;
  overflow: hidden;
}
.workbench-stage-rail {
  border-right: 1px solid #e4e7ed;
  background: #f7f8fa;
  padding: 10px 0;
}
.workbench-stage {
  appearance: none;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  padding: 9px 12px 9px 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  text-align: left;
  cursor: pointer;
}
.workbench-stage:hover:not(:disabled) { background: #eef4fb; color: #1f2937; }
.workbench-stage.active { border-left-color: #2563eb; background: #eaf2ff; color: #1d4ed8; }
.workbench-stage.locked { color: #9ca3af; cursor: not-allowed; }
.workbench-stage.approved .workbench-stage-index { background: #e7f6ec; color: #167844; }
.workbench-stage-index {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.workbench-stage-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.workbench-stage-copy strong { font-size: 13px; line-height: 1.25; }
.workbench-stage-copy small { color: inherit; opacity: .78; font-size: 11px; line-height: 1.25; }
.workbench-editor-pane { min-width: 0; padding: 18px 20px 24px; }
.workbench-editor-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid #ebeef5; padding-bottom: 14px; }
.workbench-title-block h1 { margin: 3px 0 0; font-size: 20px; line-height: 1.3; color: #1f2937; }
.workbench-kicker { color: #6b7280; font-size: 12px; }
.workbench-version-control { display: flex; align-items: center; gap: 8px; }
.workbench-version-control .el-select { width: 150px; }
.workbench-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 0; }
.workbench-toolbar .el-button + .el-button { margin-left: 0; }
.workbench-blocker { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-left: 3px solid #d97706; background: #fff8e8; color: #7c4a03; }
.workbench-blocker div { display: flex; flex-direction: column; gap: 3px; }
.workbench-blocker strong { font-size: 13px; }
.workbench-blocker span { font-size: 12px; }
.workbench-editor-shell { position: relative; }
.workbench-editor-shell .el-textarea__inner {
  min-height: 500px !important;
  border-radius: 4px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}
.workbench-generation-status { min-width: 0; min-height: 38px; display: flex; align-items: center; gap: 8px; margin: 0 16px 12px; padding: 8px 10px; background: #f7f9fc; border: 1px solid #dbe3ee; color: #374151; font-size: 12px; overflow-wrap: anywhere; }
.workbench-generation-status .el-button { margin-left: auto; }
.workbench-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #dfe3e8; min-height: 500px; }
.workbench-compare-column { min-width: 0; overflow: auto; }
.workbench-compare-column + .workbench-compare-column { border-left: 1px solid #dfe3e8; }
.workbench-compare-label { position: sticky; top: 0; padding: 9px 12px; background: #f7f8fa; border-bottom: 1px solid #dfe3e8; color: #4b5563; font-size: 12px; font-weight: 600; }
.workbench-compare pre { margin: 0; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.workbench-review-pane { border-left: 1px solid #e4e7ed; background: #fafbfc; padding: 16px; }
.workbench-status-section { padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid #e4e7ed; }
.workbench-status-section:last-child { border-bottom: 0; }
.workbench-status-section h2 { margin: 0 0 11px; font-size: 13px; color: #374151; }
.workbench-status-section dl { margin: 0; display: grid; gap: 9px; }
.workbench-status-section dl div, .source-version-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 12px; }
.workbench-status-section dt, .source-version-row span { color: #6b7280; }
.workbench-status-section dd, .source-version-row strong { margin: 0; color: #1f2937; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.workbench-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.workbench-section-heading h2 { margin-bottom: 0; }
.review-comment { margin: 10px 0 0; color: #4b5563; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.review-findings { margin: 10px 0 0; padding-left: 18px; color: #b42318; font-size: 12px; line-height: 1.55; }
.workbench-empty-state { color: #9ca3af; font-size: 12px; padding: 8px 0; }

@media (max-width: 1100px) {
  .creation-workbench { grid-template-columns: 172px minmax(0, 1fr) 220px; }
  .workbench-editor-pane { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 767px) {
  .creation-workbench { display: flex; flex-direction: column; min-height: 0; border-left: 0; border-right: 0; }
  .workbench-stage-rail { order: 1; border-right: 0; border-bottom: 1px solid #e4e7ed; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
  .workbench-stage { min-height: 62px; grid-template-columns: 22px minmax(0, 1fr); padding: 8px 6px; border-left: 0; border-bottom: 3px solid transparent; gap: 5px; }
  .workbench-stage.active { border-bottom-color: #2563eb; }
  .workbench-stage > .el-icon { display: none; }
  .workbench-stage-index { width: 21px; height: 21px; font-size: 10px; }
  .workbench-stage-copy strong { font-size: 11px; }
  .workbench-stage-copy small { font-size: 9px; }
  .workbench-editor-pane { order: 2; padding: 14px 12px 18px; }
  .workbench-editor-header { flex-direction: column; align-items: stretch; }
  .workbench-version-control { justify-content: space-between; }
  .workbench-version-control .el-select { width: min(210px, 68vw); }
  .workbench-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-toolbar .el-button { width: 100%; margin: 0; }
  .workbench-toolbar .el-button.is-circle { width: 32px; justify-self: end; }
  .workbench-editor-shell .el-textarea__inner { min-height: 430px !important; font-size: 12px; padding: 12px; }
  .workbench-compare { grid-template-columns: 1fr; min-height: 0; }
  .workbench-compare-column + .workbench-compare-column { border-left: 0; border-top: 1px solid #dfe3e8; }
  .workbench-review-pane { order: 3; border-left: 0; border-top: 1px solid #e4e7ed; padding: 14px 12px; }
}

/* Full-page writing workspace: each creative stage gets the full reading width. */
.creation-workbench-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  overflow: hidden;
  border: 0;
  background: transparent;
  box-sizing: border-box;
}
.workbench-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 18px;
}
.workbench-page-header h1 { margin: 5px 0 7px; color: #1f2937; font-size: 26px; line-height: 1.25; }
.workbench-page-header p { max-width: 760px; margin: 0; color: #6b7280; font-size: 14px; line-height: 1.65; }
.workbench-page-meta { display: flex; align-items: center; gap: 10px; color: #4b5563; font-size: 13px; white-space: nowrap; }
.workbench-stage-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.workbench-stage-nav-item {
  appearance: none;
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  text-align: left;
  cursor: pointer;
}
.workbench-stage-nav-item:hover:not(:disabled) { border-color: #93b4e8; background: #f8fbff; }
.workbench-stage-nav-item.active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.workbench-stage-nav-item.locked { color: #9ca3af; cursor: not-allowed; }
.workbench-stage-nav-item > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.workbench-stage-nav-item strong { font-size: 14px; line-height: 1.25; }
.workbench-stage-nav-item small { color: inherit; opacity: .75; font-size: 11px; }
.workbench-stage-nav-index { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e5e7eb; font-size: 12px; font-weight: 700; }
.workbench-stage-nav-item.active .workbench-stage-nav-index { background: #2563eb; color: #fff; }
.workbench-stage-nav-item > .el-icon { margin-left: auto; flex: 0 0 auto; }
.workbench-large-panel {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 24px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}
.workbench-large-panel > .workbench-blocker,
.workbench-large-panel > .workbench-large-toolbar,
.workbench-large-panel > .workbench-editor-intro,
.workbench-large-panel > .workbench-next-actions {
  flex: 0 0 auto;
}
.workbench-large-panel > .workbench-editor-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.workbench-loading { min-height: min(520px, calc(100vh - 280px)); }
.workbench-large-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid #ebeef5; }
.workbench-toolbar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.workbench-toolbar-group .el-button + .el-button { margin-left: 0; }
.workbench-save-state { color: #6b7280; font-size: 12px; }
.workbench-save-state.saving { color: #2563eb; }
.workbench-editor-intro { display: flex; align-items: baseline; gap: 10px; padding: 15px 0 10px; color: #6b7280; font-size: 12px; }
.workbench-editor-intro strong { color: #374151; font-size: 14px; }
.workbench-editor-shell-large {
  min-height: 0;
}
.workbench-editor-shell-large .el-textarea {
  height: 100%;
}
.workbench-editor-shell-large .el-textarea__inner {
  min-height: 280px !important;
  height: 100% !important;
  max-height: none !important;
  padding: 18px;
  border-radius: 5px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.85;
  overflow-y: auto !important;
  box-sizing: border-box;
}
.workbench-next-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #ebeef5; }
.workbench-next-actions > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.workbench-next-actions strong { color: #1f2937; font-size: 14px; }
.workbench-next-actions span { color: #6b7280; font-size: 12px; line-height: 1.5; }
.workbench-next-actions .el-button span { color: inherit; }

@media (max-width: 1100px) {
  .ep-wrap { flex-direction: column; height: auto; min-height: 0; }
  .ep-list { width: auto; max-height: 260px; }
  .ep-main { min-height: 620px; overflow: visible; }
}

@media (max-width: 767px) {
  .creation-workbench-page { min-height: 0; border: 0; }
  .workbench-page-header { flex-direction: column; gap: 10px; padding: 0 0 14px; }
  .workbench-page-header h1 { font-size: 22px; }
  .workbench-page-meta { white-space: normal; }
  .workbench-stage-nav { grid-template-columns: 1fr; gap: 7px; }
  .workbench-stage-nav-item { min-height: 58px; }
  .workbench-large-panel { padding: 14px 12px 18px; border-left: 0; border-right: 0; border-radius: 0; }
  .workbench-large-toolbar { align-items: flex-start; flex-direction: column; }
  .workbench-save-state { align-self: flex-end; }
  .workbench-editor-intro { flex-direction: column; gap: 4px; }
  .workbench-editor-shell-large .el-textarea__inner { min-height: 520px !important; padding: 13px; font-size: 13px; }
  .workbench-next-actions { align-items: stretch; flex-direction: column; }
  .workbench-next-actions .el-button { width: 100%; }
  .ep-main { min-height: 0; }
}


@media (max-width: 1280px) {
  .step-nav { grid-template-columns: repeat(6, minmax(96px, 1fr)); gap: 6px; padding: 10px; }
  .step-item { min-height: 64px; padding: 8px 4px; }
  .step-label { font-size: 12px; }
  .workbench-page-header { flex-wrap: wrap; gap: 12px; }
  .workbench-page-meta { white-space: normal; }
  .workbench-large-toolbar { flex-wrap: wrap; align-items: flex-start; }
  .workbench-editor-shell-large .el-textarea__inner { min-height: min(480px, calc(100vh - 300px)) !important; }
  .production-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .production-controlbar { flex-wrap: wrap; align-items: stretch; }
  .production-header { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .step-nav { grid-template-columns: repeat(6, minmax(108px, 1fr)); }
  .creation-workbench-page { min-height: 0; }
  .workbench-large-panel { padding: 14px 12px 18px; }
  .workbench-next-actions { flex-direction: column; align-items: stretch; }
  .workbench-editor-shell-large .el-textarea__inner { min-height: min(420px, calc(100vh - 260px)) !important; }
  .gen-panel { min-height: 0; max-height: none; }
  .ep-wrap { min-height: 0; height: auto; }
  .production-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 12px; }
  .production-task-panel, .production-shot-panel, .production-rules-panel { margin-left: 12px; margin-right: 12px; }
  .production-controlbar { padding: 12px; }
  .production-header { padding: 16px; }
}

/* AI video production package */
.production-export { min-width: 0; background: #fff; border: 1px solid #dfe3e8; }
.production-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 24px; border-bottom: 1px solid #e4e7ed; background: #fafbfc; }
.production-eyebrow { margin-bottom: 5px; color: #2563eb; font-size: 11px; font-weight: 700; }
.production-header h1 { margin: 0; color: #1f2937; font-size: 22px; letter-spacing: 0; }
.production-header p { max-width: 720px; margin: 7px 0 0; color: #6b7280; font-size: 13px; line-height: 1.6; }
.production-project-actions, .production-episode-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.production-project-actions .el-button + .el-button, .production-episode-actions .el-button + .el-button { margin-left: 0; }
.production-controlbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid #e4e7ed; }
.production-episode-picker { display: grid; grid-template-columns: auto 132px; align-items: center; gap: 10px; }
.production-episode-picker label { color: #4b5563; font-size: 12px; font-weight: 600; }
.production-error { margin: 14px 24px 0; width: auto; }
.production-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 18px 24px; border: 1px solid #dfe3e8; }
.production-summary div { min-width: 0; padding: 11px 13px; }
.production-summary div + div { border-left: 1px solid #dfe3e8; }
.production-summary dt { margin-bottom: 5px; color: #6b7280; font-size: 11px; }
.production-summary dd { margin: 0; color: #1f2937; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }

.production-task-panel { min-width: 0; margin: 0 24px 18px; border: 1px solid #dfe3e8; background: #fbfcfe; }
.production-task-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid #e4e7ed; }
.production-task-header h2 { margin: 0; color: #1f2937; font-size: 16px; }
.production-task-header p { max-width: 680px; margin: 6px 0 0; color: #6b7280; font-size: 12px; line-height: 1.5; }
.production-task-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.production-task-actions .el-button { margin-left: 0; }
.production-provider-select { width: 145px; }
.production-task-table-shell { min-width: 0; overflow-x: auto; }
.production-task-table { min-width: 920px; }
.production-task-table .el-table__cell { vertical-align: top; }
.production-task-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 18px; color: #6b7280; font-size: 12px; text-align: center; }
.production-task-prompt { display: block; max-width: 360px; overflow: hidden; color: #374151; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.production-asset-link { color: #2563eb; font-size: 12px; }

@media (max-width: 900px) {
  .production-task-header { flex-direction: column; }
  .production-task-actions { justify-content: flex-start; }
}

@media (max-width: 767px) {
  .production-task-panel { margin-left: 12px; margin-right: 12px; }
  .production-task-header { padding: 14px 12px; }
  .production-task-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .production-provider-select { width: 100%; }
  .production-task-actions .el-button:not(.is-circle) { width: 100%; margin: 0; }
  .production-task-actions .el-button.is-circle { justify-self: end; }
}
.production-table-shell { min-width: 0; margin: 0 24px; overflow-x: auto; border: 1px solid #dfe3e8; }
.production-shot-table { min-width: 1180px; }
.production-prompt-preview { padding: 12px 18px 18px; background: #f8fafc; }
.production-prompt-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; color: #374151; font-size: 12px; }
.production-prompt-heading span { color: #6b7280; text-align: right; }
.production-prompt-preview pre { margin: 0; padding: 14px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #dbe3ee; background: #fff; color: #111827; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.production-continuity { padding: 22px 24px 26px; }
.production-continuity h2 { margin: 0 0 12px; color: #1f2937; font-size: 16px; }
.continuity-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dfe3e8; }
.continuity-columns > div { min-width: 0; padding: 14px; }
.continuity-columns > div + div { border-left: 1px solid #dfe3e8; }
.continuity-columns h3 { margin: 0 0 10px; color: #4b5563; font-size: 12px; }
.continuity-columns p { display: grid; gap: 4px; margin: 0 0 10px; color: #4b5563; font-size: 12px; line-height: 1.5; }
.continuity-columns code { color: #1d4ed8; font-size: 11px; overflow-wrap: anywhere; }
.production-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 360px; color: #6b7280; font-size: 13px; }

@media (max-width: 900px) {
  .production-header, .production-controlbar { align-items: stretch; flex-direction: column; }
  .production-project-actions .el-button, .production-episode-actions .el-button:not(.is-circle) { flex: 1; }
  .production-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-summary div + div { border-left: 0; }
  .production-summary div:nth-child(even) { border-left: 1px solid #dfe3e8; }
  .production-summary div:nth-child(n+3) { border-top: 1px solid #dfe3e8; }
  .continuity-columns { grid-template-columns: 1fr; }
  .continuity-columns > div + div { border-left: 0; border-top: 1px solid #dfe3e8; }
}

@media (max-width: 767px) {
  .production-export { border-left: 0; border-right: 0; }
  .production-header, .production-controlbar { padding-left: 12px; padding-right: 12px; }
  .production-header h1 { font-size: 19px; }
  .production-episode-picker { grid-template-columns: 1fr; }
  .production-episode-picker .el-select { width: 100%; }
  .production-error { margin-left: 12px; margin-right: 12px; }
  .production-summary { margin-left: 12px; margin-right: 12px; grid-template-columns: 1fr; }
  .production-summary div:nth-child(even) { border-left: 0; }
  .production-summary div + div { border-top: 1px solid #dfe3e8; }
  .production-table-shell { margin-left: 12px; margin-right: 12px; }
  .production-continuity { padding-left: 12px; padding-right: 12px; }
  .production-prompt-heading { flex-direction: column; }
  .production-prompt-heading span { text-align: left; }
}


/* Team review queue */
.review-queue, .workspace-admin {
  min-width: 0;
  background: #fff;
  border: 1px solid #dfe3e8;
}
.review-queue-header, .workspace-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e4e7ed;
  background: #fafbfc;
}
.review-queue-subtitle, .workspace-admin-subtitle {
  max-width: 760px;
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
}
.review-filters, .workspace-admin-toolbar, .workspace-invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 24px;
}
.review-filters .el-select,
.review-filters .el-input,
.workspace-admin-toolbar .el-select,
.workspace-invite-form .el-input,
.workspace-invite-form .el-select {
  min-width: 160px;
}
.review-table-shell, .workspace-table-shell {
  min-width: 0;
  margin: 0 24px 24px;
  overflow-x: auto;
  border: 1px solid #dfe3e8;
}
.review-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}
.review-detail-panel,
.review-decision-panel {
  min-width: 0;
  border: 1px solid #e4e7ed;
  background: #fafbfc;
  padding: 14px;
}
.review-detail-panel h3,
.review-decision-panel h3 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 14px;
}
.review-meta-list,
.review-findings {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.review-meta-list li,
.review-findings li {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.5;
}
.review-content-preview,
.review-json-preview {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #111827;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.review-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.workspace-admin-alert,
.workspace-invite-card {
  margin: 0 24px 16px;
}
.workspace-invite-card .el-card__header {
  padding: 12px 16px;
}
.workspace-invite-card .el-card__body {
  padding: 14px 16px;
}
.workspace-role-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .review-detail-grid { grid-template-columns: 1fr; }
  .review-filters, .workspace-admin-toolbar, .workspace-invite-form { align-items: stretch; }
  .review-filters .el-select,
  .review-filters .el-input,
  .workspace-admin-toolbar .el-select,
  .workspace-invite-form .el-input,
  .workspace-invite-form .el-select { width: 100%; min-width: 0; }
}

@media (max-width: 767px) {
  .review-queue, .workspace-admin { border-left: 0; border-right: 0; }
  .review-queue-header, .workspace-admin-header,
  .review-filters, .workspace-admin-toolbar,
  .workspace-admin-alert, .workspace-invite-card,
  .review-table-shell, .workspace-table-shell {
    margin-left: 0;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.review-detail { display: grid; gap: 14px; }
.review-detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0 0 4px; }
.review-detail-meta dt { color: #6b7280; font-size: 11px; }
.review-detail-meta dd { margin: 2px 0 0; color: #1f2937; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.review-detail-section { border: 1px solid #e4e7ed; background: #fafbfc; padding: 12px 14px; }
.review-detail-section h4 { margin: 0 0 8px; color: #1f2937; font-size: 13px; }
.review-json { margin: 0; max-height: 280px; overflow: auto; padding: 12px; border: 1px solid #dbe3ee; background: #fff; color: #111827; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.review-assign-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.muted { color: #9ca3af; }
@media (max-width: 767px) {
  .review-detail-meta { grid-template-columns: 1fr; }
}


/* 新建项目：大纲候选与时长推荐 */
.outline-candidate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 12px;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 1100px) {
  .outline-candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.outline-candidate-card {
  appearance: none;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  text-align: left;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  padding: 16px 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  box-sizing: border-box;
}
.outline-candidate-card:hover { border-color: #93b4e8; background: #f8fbff; }
.outline-candidate-card.active { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px #2563eb; }
.outline-candidate-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #4b5563; font-size: 12px; }
.outline-candidate-card h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.outline-candidate-card p {
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.outline-candidate-card ul { margin: 0; padding-left: 18px; color: #4b5563; font-size: 12px; line-height: 1.6; }
.wizard-inline-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.duration-recommend { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.duration-recommend-note { color: #6b7280; font-size: 12px; line-height: 1.5; }


/* Seedance shot generation panels */
.production-rules-panel,
.production-shot-panel {
  min-width: 0;
  margin: 0 24px 18px;
  border: 1px solid #dfe3e8;
  background: #fff;
}
.production-rules-panel { background: #fbfcfe; }
.production-rules-header,
.production-shot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e4e7ed;
}
.production-rules-header h2,
.production-shot-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
}
.production-rules-header p,
.production-shot-header p {
  max-width: 720px;
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.55;
}
.production-rules-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px 18px;
}
.production-rules-body .el-form-item { margin-bottom: 12px; }
.production-rules-actions,
.production-shot-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.production-rules-actions .el-button,
.production-shot-actions .el-button { margin-left: 0; }
.production-shot-body { padding: 14px 18px 18px; }
.production-shot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
  color: #4b5563;
  font-size: 12px;
}
.production-prompt-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #1f2937;
}
.production-empty-state {
  margin: 18px 24px;
  padding: 28px 22px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  background: #fafbfc;
  color: #4b5563;
  line-height: 1.7;
}
@media (max-width: 1100px) {
  .production-rules-body { grid-template-columns: 1fr; }
}


.production-rules-body-single {
  display: block;
  grid-template-columns: none;
  padding: 16px 18px 18px;
}
.production-rules-body-single .el-textarea__inner {
  min-height: 280px;
  font-size: 14px;
  line-height: 1.75;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}


.production-export,
.production-rules-panel,
.production-shot-panel,
.production-controlbar,
.production-header {
  max-width: 100%;
  box-sizing: border-box;
}
.production-rules-header,
.production-shot-header,
.production-controlbar,
.production-header {
  flex-wrap: wrap;
}
.production-rules-actions {
  max-width: 100%;
}
.production-preset-select {
  width: min(280px, 100%);
  min-width: 180px;
}
.production-preset-dropdown {
  max-width: min(420px, 92vw);
}
.production-preset-dropdown .el-select-dropdown__item {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-rules-body-single {
  min-width: 0;
}
.production-rules-body-single .el-textarea,
.production-rules-body-single .el-textarea__inner {
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .production-rules-header,
  .production-shot-header {
    flex-direction: column;
    align-items: stretch;
  }
  .production-rules-actions,
  .production-shot-actions,
  .production-episode-actions,
  .production-project-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .production-preset-select {
    width: 100%;
  }
}

.outline-candidate-title-zh {
  margin-top: -2px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.outline-candidate-plot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  max-height: 260px;
  overflow: auto;
}
.outline-candidate-plot p {
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.outline-candidate-beats {
  min-width: 0;
  padding-top: 4px;
  border-top: 1px dashed #e5e7eb;
}
.outline-candidate-beats-label {
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}
.outline-candidate-card h3 { letter-spacing: 0; }

.outline-source-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 600;
}
.outline-source-tag.local {
  background: #f3f4f6;
  color: #4b5563;
}
.outline-loading {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
}

.outline-empty {
  margin: 0 0 12px;
  padding: 14px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
}
