/* Shared layout and type scale for the creation workspace. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --bg: #f6f7fa;
  --ink: #232535;
  --muted: #697082;
  --line: #e5e7ee;
  --accent: #7058d5;
  --accent-dark: #5942bb;
  --accent-soft: #efebfc;
  --shadow: 0 2px 6px #22253503;
  --sidebar-width: 208px;
  --radius-control: 8px;
  --radius-panel: 14px;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
body { font-size: 14px; }
[hidden] { display: none !important; }
input:not([type=checkbox]):not([type=range]), select, textarea {
  font-size: 14px; color: var(--ink); border-color: #dfe2eb;
  border-radius: var(--radius-control); padding: 10px 12px;
}
input:not([type=checkbox]):not([type=range]), select { min-height: 42px; }
input::placeholder, textarea::placeholder { color: #8c92a1; }
input[type=checkbox] { accent-color: var(--accent); }
textarea { line-height: 1.8; }
select { height: 42px; }
.primary-button, .secondary-button { min-height: 42px; padding: 10px 16px; font-size: 14px; gap: 8px; border-radius: var(--radius-control); line-height: 1.5; }
.primary-button { font-weight: 600; box-shadow: 0 2px 4px #7058d512; }
.secondary-button { color: #51596b; border-color: #dfe2eb; }
.text-button, .text-link, .help-link, .config-link { font-size: 13px; }
.text-button { padding: 6px 2px; }
.field-label, .field-top>label { color: #485165; font-size: 13px; margin-bottom: 8px; font-weight: 600; }
.field-help, .subtle, .small-label, .file-caption span, .textarea-meta, .advanced summary,
.advanced-grid label, .checkbox-row, .form-error, .notice, .provider-heading p,
.history-row small, .status-pill, .voice-description { font-size: 12px; }
.subtle, .field-help, .small-label { color: var(--muted); }
.status-pill { padding: 5px 10px; }
.checkbox-row { color: #616a7c; gap: 8px; }
.checkbox-row input { width: 16px; height: 16px; }
.advanced summary { font-size: 13px; color: #51596b; font-weight: 500; }
.advanced-grid { gap: 16px; }
.spaced { margin-top: 24px; }
.sidebar { width: var(--sidebar-width); padding: 28px 16px 20px; }
.brand { font-size: 27px; margin: 4px 12px 40px; }
.nav-caption { font-size: 12px; color: #7a8191; margin-bottom: 12px; }
.nav-item { gap: 12px; padding: 12px; margin-bottom: 4px; font-size: 14px; color: #606879; border-radius: 9px; min-height: 46px; }
.nav-item.active { font-weight: 600; }
.nav-item:hover { background: #f6f5fc; }
.sidebar-foot { font-size: 11px; }
.app-shell { margin-left: var(--sidebar-width); }
.topbar { height: 68px; padding: 0 32px; background: #fff; }
.breadcrumb { font-size: 13px; }
.top-actions { gap: 24px; }
.config-link { min-height: 36px; padding: 8px 12px; }
main { max-width: 1640px; padding: 24px 32px 40px; }
.page-heading { gap: 16px; margin-bottom: 24px; }
.page-heading h1, #page-materials .material-heading h1 { font-size: 26px; line-height: 1.4; font-weight: 650; letter-spacing: -.5px; }
.page-heading p { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.panel { border-radius: var(--radius-panel); box-shadow: var(--shadow); }
.panel-title { margin-bottom: 20px; gap: 12px; }
.panel-title h2, .copy-workspace h2 { font-size: 16px; font-weight: 650; }
.workspace-grid { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .9fr); gap: 24px; }
.creation-panel, .output-panel, .recent-panel, .provider-panel { padding: 24px; }
.output-column { gap: 24px; min-width: 0; }
.creation-flow { padding: 6px; margin-bottom: 28px; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.flow-step { padding: 12px; gap: 10px; min-width: 0; border-radius: 8px; }
.flow-step strong { font-size: 13px; }
.flow-step small { display: none; }
.flow-number { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
.flow-arrow { width: 14px; height: 14px; opacity: .5; }
.workflow-context { border-radius: 10px; padding: 12px 16px; margin-bottom: 24px; }
.workflow-step-chip { font-size: 12px; }
.workflow-context>div>span { font-size: 12px; }
.mobile-nav-toggle, .mobile-nav-backdrop, .workspace-switch { display: none; }

/* A compact input rail and one primary document surface. */
.copy-workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.copy-form { padding: 18px; }
.copy-output-column { display: block; min-width: 0; }
.copy-results-shell { overflow: hidden; }
.copy-output, .copy-history-panel { padding: 20px; }
.copy-output .empty-output { min-height: 400px; }
.copy-output .empty-output h3 { font-size: 18px; color: var(--ink); }
.copy-output .empty-output p { font-size: 14px; color: var(--muted); margin-top: 8px; }
.entry-tabs, .workspace-switch { padding: 4px; border: 1px solid var(--line); background: #f5f6fa; border-radius: 10px; gap: 4px; }
.entry-tabs { display: flex; margin-bottom: 18px; }
.entry-tabs button, .workspace-switch button { flex: 1; min-height: 40px; padding: 8px; background: transparent; color: #656d7e; border-radius: 7px; font-size: 14px; font-weight: 500; }
.entry-tabs button[aria-selected=true], .workspace-switch button[aria-pressed=true] { background: #fff; color: var(--accent-dark); box-shadow: 0 1px 4px #21253512; font-weight: 600; }
.result-tabs { display: flex; align-items: center; gap: 24px; padding: 0 20px; border-bottom: 1px solid var(--line); min-height: 52px; }
.result-tabs button { align-self: stretch; background: none; color: var(--muted); padding: 13px 0; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600; }
.result-tabs button[aria-selected=true] { color: var(--accent-dark); border-bottom-color: var(--accent); }
.result-tabs .subtle { margin-left: auto; max-width: 42%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.copy-form .panel-title { margin-bottom: 12px; }
.topic-library-tools { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; margin-top: 0; }
.topic-library-tools input, .topic-library-tools select { font-size: 13px; }
.topic-selection-meta { gap: 8px; margin-top: 8px; align-items: center; }
.topic-selection-meta span { font-size: 12px; color: var(--muted); }
.topic-selection-meta button { font-size: 12px; }
.topic-choices { max-height: 168px; gap: 0; margin: 8px 0 0; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #c9cbd8 transparent; border-block: 1px solid var(--line); }
.topic-choice { border: 0; border-bottom: 1px solid #f0f1f5; border-radius: 0; padding: 8px 4px; gap: 8px; line-height: 1.6; font-size: 13px; }
.topic-choice:hover { background: #f8f7fc; }
.topic-choice.selected { background: #f0edfb; }
.topic-choice input { width: 15px; height: 15px; margin-top: 3px; }
.topic-choice small { display: none; }
.copy-form .spaced { margin-top: 16px; }
.copy-form .advanced { margin: 16px 0; padding-top: 12px; }
.copy-form .custom-topic-entry { margin: 10px 0 16px; padding: 0; border: 0; }
.copy-form .custom-topic-entry summary { color: var(--accent); font-size: 13px; }
.copy-quantity { gap: 8px; margin-top: 16px; }
.copy-quantity label { font-size: 12px; color: #596276; }
.copy-quantity input { padding: 10px; font-size: 14px; }
.copy-shared-options { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.copy-form #copyBrief { height: 300px; min-height: 240px; font-size: 15px; line-height: 1.9; resize: vertical; background: #fff; }
.copy-submit-bar { margin-top: 20px; }
.copy-form .copy-submit-bar .full { margin-top: 0; }
.copy-result-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 6px 12px; padding: 0 0 12px; margin-bottom: 0; color: var(--muted); }
.copy-result-toolbar span, .copy-result-toolbar button, .copy-result-toolbar a { font-size: 12px; }
.copy-result-toolbar [data-copy-download] { margin-left: auto; }
.copy-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; padding: 0 0 10px; background: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.copy-group-heading strong { font-size: 14px; color: #42465a; }
.copy-group-heading>span { font-size: 12px; margin-top: 0; flex-shrink: 0; }
.copy-group-heading p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.copy-card { padding: 0 0 20px; margin: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.copy-card:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.copy-card-heading { margin-bottom: 8px; align-items: center; }
.copy-card-heading strong { font-size: 15px; font-weight: 650; }
.copy-card-heading span { font-size: 12px; color: var(--muted); }
.copy-output .copy-card textarea { display: block; min-height: 112px; max-height: 400px; field-sizing: content; font-size: 15px; line-height: 1.8; padding: 12px; background: #fff; border-color: #dfe2eb; resize: vertical; }
.copy-semantic-scenes { margin-top: 16px; }
.copy-semantic-scenes .grounded-plan { padding: 0; background: transparent; border: 0; border-radius: 0; margin: 0 0 24px; }
.copy-semantic-scenes .grounded-plan>strong { font-size: 13px; color: #4d566b; }
.copy-semantic-scenes .cue-quote { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 8px 0 12px; padding-left: 12px; border-left: 2px solid #cfc6f2; }
.kline-scene-heading { font-size: 13px; gap: 12px; margin: 12px 0; }
.kline-scene-heading .secondary-button { font-size: 12px; min-height: 34px; padding: 6px 10px; }
.kline-chart { margin: 12px 0 0; }
.kline-focus-controls { gap: 6px; }
.kline-focus-controls button { font-size: 12px; padding: 6px 8px; border-color: transparent; color: var(--muted); background: #f6f7fa; }
.copy-knowledge-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin: 20px 0; }
.copy-knowledge-details summary { cursor: pointer; font-size: 13px; color: #5f687b; }
.copy-knowledge-details summary strong { font-size: 13px; color: var(--ink); font-weight: 500; margin-left: 10px; }
.copy-knowledge { background: #f8f7f3; padding: 16px; margin: 16px 0 0; gap: 16px; }
.copy-knowledge span, .copy-knowledge button { font-size: 12px; }
.copy-knowledge strong { font-size: 14px; }
.copy-knowledge-choice { display: flex; gap: 12px; align-items: center; padding: 14px 0; margin-top: 16px; border-top: 1px solid var(--line); }
.copy-knowledge-choice>div { flex: 1; min-width: 0; }.copy-knowledge-choice strong { display: block; font-size: 13px; overflow-wrap: anywhere; margin-top: 3px; }
.copy-knowledge-choice>.secondary-button { font-size: 12px; padding: 8px 10px; flex-shrink: 0; }
.copy-knowledge-thumb { flex-shrink: 0; width: 54px; height: 66px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }.copy-knowledge-thumb img { width: 100%; height: 100%; object-fit: contain; }
.copy-knowledge-picker { width: min(860px,calc(100% - 32px)); }.copy-knowledge-picker>.dialog-content { overflow-y: auto; max-height: calc(100dvh - 200px); }
.copy-knowledge-filters { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 12px; margin-bottom: 16px; }
.copy-knowledge-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.copy-knowledge-option { min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }.copy-knowledge-option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.copy-knowledge-option-image { display: block; width: 100%; height: 200px; padding: 10px; background: #f7f6f2; }.copy-knowledge-option-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.copy-knowledge-option>div { padding: 10px; }.copy-knowledge-option strong { display: block; font-size: 13px; overflow-wrap: anywhere; }.copy-knowledge-option span { display: block; font-size: 12px; color: var(--muted); margin: 4px 0 10px; }.copy-knowledge-option .primary-button,.copy-knowledge-option .secondary-button { width: 100%; min-height: 34px; padding: 6px; font-size: 12px; }
.copy-knowledge-picker .dialog-foot { gap: 12px; margin: 0; padding: 16px 28px; flex-shrink: 0; }.copy-knowledge-picker .dialog-foot>span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (max-width:760px) { .copy-knowledge-filters { grid-template-columns: minmax(0,1fr) 120px; gap: 8px; }.copy-knowledge-choices { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.copy-knowledge-option-image { height: 170px; padding: 5px; }.copy-knowledge-picker>.dialog-content { padding: 16px; }.copy-knowledge-picker .dialog-foot { padding: 14px 16px; }.copy-knowledge-choice { flex-wrap: wrap; }.copy-knowledge-choice>div { min-width: 90px; } }
.copy-card-actions { gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.copy-card-actions button { font-size: 13px; padding: 9px 12px; }
.copy-card-actions [data-copy-clipboard] { margin-right: auto; }
.copy-history .history-row { padding: 16px 0; background: none; border-radius: 0; }
.history-copy strong { font-size: 14px; line-height: 1.6; }
.history-copy small, .history-badge { font-size: 12px; }
.pagination { font-size: 13px; gap: 12px; }

/* Video and its timeline are the primary editing surface. */
#page-render>.workspace-grid { display: block; }
.render-source-picker { padding: 20px 24px; margin-bottom: 24px; display: flex; align-items: center; gap: 20px; }
.render-source-picker .field-label { margin: 0; white-space: nowrap; }
.render-source-picker select { flex: 1; }
#renderForm { padding: 0; border: 0; background: transparent; box-shadow: none; }
#renderEditor { display: grid; grid-template-columns: minmax(300px, 1fr) 340px; gap: 24px; align-items: start; }
.render-preview-column, .render-settings-column { padding: 24px; min-width: 0; }
.render-preview-column { position: sticky; top: 24px; }
#renderForm .spotlight-stage-wrap { margin: 0; padding: 20px; background: #edeff4; border-radius: 10px; }
#renderStage { width: min(100%, 344px); max-width: 100%; border-radius: 8px; }
.render-playback { margin-top: 20px; gap: 12px; }
.render-playback span { font-size: 12px; font-variant-numeric: tabular-nums; color: #4e586b; }
#renderForm .spotlight-preview-caption { margin-top: 12px; font-size: 13px; }
.render-kline-picker { flex-wrap: wrap; gap: 8px; padding: 0 0 20px; margin: 0; border-radius: 0; background: none; border: 0; border-bottom: 1px solid var(--line); }
.render-kline-picker>div { flex: 1 0 100%; }
.render-kline-picker h3, .spotlight-heading h3, .endcard-panel h3 { font-size: 15px; }
#renderKlineSelection { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.render-kline-picker .secondary-button { font-size: 13px; min-height: 38px; }
.spotlight-panel { border: 0; padding-top: 20px; }
.spotlight-heading { flex-wrap: wrap; gap: 12px; }
.spotlight-settings { grid-template-columns: 1fr; gap: 16px; }
.spotlight-settings label, .endcard-settings label { font-size: 13px; color: #596276; }
.spotlight-settings select, .endcard-settings select, .endcard-settings input { font-size: 13px; }
.endcard-panel { margin-top: 24px; padding-top: 24px; }
.endcard-settings { grid-template-columns: minmax(0, 1fr) 76px; gap: 12px; }
#endcardPreview { padding: 12px; gap: 12px; align-items: flex-start; }
#endcardPreview img { width: 72px; }
#endcardPreview strong { font-size: 13px; }
#endcardPreview span, #endcardPreview p { font-size: 12px; }
.render-export-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; padding: 20px 0 24px; }
.render-export-bar .form-error { flex: 1 0 100%; margin: 0; }
.render-export-bar .primary-button { min-width: 240px; }
#page-render .output-column { margin-top: 0; }
#page-render .output-body .result-video { max-height: 500px; width: auto; max-width: 100%; margin: auto; }
#renderEmpty { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-panel); min-height: 340px; }
.studio-step-section, .studio-submit { padding: 24px; }
.studio-form { padding: 0; }
.voice-source-choices { gap: 8px; }
.source-choice strong { font-size: 13px; }
.workflow-script { font-size: 14px; line-height: 1.9; }
.material-toolbar, .knowledge-toolbar, .generation-toolbar { padding: 20px 24px; }
.material-card-info h3, .knowledge-card-info h2, .work-card h3 { font-size: 16px; }
.filter-row button { font-size: 13px; padding: 8px 12px; }
.knowledge-card-info>span, .material-card-info>span { font-size: 12px; }

@media (min-width: 1600px) {
  .copy-workspace { grid-template-columns: 320px minmax(0, 1fr); }
  #renderEditor { grid-template-columns: minmax(0, 1fr) 384px; }
  #renderStage { width: min(100%, 390px); }
}
@media (max-width: 1250px) and (min-width: 761px) {
  :root { --sidebar-width: 184px; }
  .sidebar { padding-inline: 12px; }
  .topbar { padding-inline: 24px; }
  main { padding: 24px; }
  .copy-workspace { grid-template-columns: 288px minmax(0, 1fr); gap: 20px; }
  .copy-form { padding: 16px; }
  .copy-output, .copy-history-panel { padding: 20px; }
  .result-tabs { padding-inline: 20px; gap: 20px; }
  .result-tabs .subtle { display: none; }
  #renderEditor { grid-template-columns: minmax(260px, 1fr) 300px; gap: 20px; }
  .render-preview-column, .render-settings-column { padding: 20px; }
  .flow-step { padding: 10px 8px; gap: 8px; }
  .flow-arrow { display: none; }
  .copy-card-actions .primary-button { flex: 1 0 100%; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr); gap: 20px; }
}
@media (max-width: 1020px) and (min-width: 761px) {
  :root { --sidebar-width: 168px; }
  .sidebar .nav-item { padding-inline: 8px; font-size: 13px; gap: 8px; }
  main { padding: 24px 20px; }
  .copy-workspace, .workspace-grid, #renderEditor { grid-template-columns: minmax(0, 1fr); }
  .copy-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); column-gap: 24px; align-items: start; }
  .entry-tabs, #copyAiFields, #copyCustomFields { grid-column: 1; }
  .copy-shared-options { grid-column: 2; grid-row: 2; margin-top: 0; border: 0; padding-top: 0; }
  .copy-submit-bar { grid-column: 2; grid-row: 3; margin-top: 16px; }
  #copyConfigNotice { grid-column: 2; }
  .render-preview-column { position: static; }
  #renderStage { width: 320px; }
  .render-settings-column { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .render-settings-column>.panel-title, .render-kline-picker { grid-column: 1 / -1; }
  #renderEndcard .endcard-panel { border: 0; margin: 0; padding-top: 20px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 240px; }
  .app-shell { margin-left: 0; padding-top: 0; }
  .sidebar { display: flex; position: fixed; inset: 0 auto 0 0; height: 100dvh; width: var(--sidebar-width); z-index: 90; padding: 28px 16px 20px; transform: translateX(-100%); visibility: hidden; transition: transform .18s ease, visibility .18s; background: #fff; overflow-y: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .sidebar .brand { display: flex; margin: 4px 12px 36px; }
  .sidebar .nav-caption, .sidebar-bottom { display: block; }
  .sidebar nav { display: block; width: 100%; }
  .sidebar .nav-item { display: flex; font-size: 14px; padding: 12px; gap: 12px; margin: 0 0 4px; }
  .sidebar .nav-item svg { display: block; width: 20px; height: 20px; }
  .mobile-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 80; background: #1d24366b; width: 100%; height: 100%; }
  .mobile-nav-toggle { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; color: #4d5668; background: #f4f5f8; }
  .topbar { height: 64px; padding: 0 16px; gap: 12px; }
  .breadcrumb { font-size: 0; flex: 1; min-width: 0; }
  .breadcrumb>span { display: none; }
  .breadcrumb>strong { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-actions { gap: 0; }
  .top-actions .help-link { display: none; }
  .config-link { font-size: 12px; padding: 8px; }
  main { padding: 16px 16px 32px; max-width: none; }
  .page-heading { margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
  .page-heading h1, #page-materials .material-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 12px; }
  #copyModelStatus { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .creation-flow { display: flex; overflow-x: auto; gap: 4px; margin-bottom: 24px; padding: 4px; scrollbar-width: none; }
  .flow-step { flex: 0 0 auto; padding: 10px; gap: 8px; }
  .flow-step strong { font-size: 12px; white-space: nowrap; }
  .flow-step small, .flow-arrow { display: none; }
  .flow-number { width: 24px; height: 24px; font-size: 11px; }
  .workflow-context { padding: 12px; margin-bottom: 20px; gap: 12px; }
  .workflow-context-flow { overflow-x: auto; justify-content: flex-start; gap: 6px; }
  .workflow-step-chip { font-size: 12px; padding: 5px 7px; }
  .workflow-context>div>span { max-width: none; font-size: 12px; }
  .workspace-switch { display: flex; margin-bottom: 16px; }
  .copy-workspace { display: block; }
  #page-copywriting[data-mobile-pane=input] .copy-output-column { display: none; }
  #page-copywriting[data-mobile-pane=output] #copyForm { display: none; }
  .copy-form, .copy-output, .copy-history-panel { padding: 20px; }
  .copy-output .empty-output { min-height: 320px; }
  .entry-tabs { margin-bottom: 20px; }
  .topic-choices { max-height: 200px; }
  .topic-choice { font-size: 14px; }
  .result-tabs { gap: 24px; padding: 0 20px; }
  .result-tabs .subtle { display: none; }
  .copy-result-toolbar { gap: 8px 12px; }
  .copy-result-toolbar [data-copy-download] { margin-left: 0; }
  .copy-card-actions { gap: 8px; }
  .copy-card-actions button { flex: 1 1 auto; font-size: 13px; white-space: normal; }
  .copy-card-actions .primary-button { flex: 1 0 100%; }
  .copy-card-actions [data-copy-clipboard] { margin-right: 0; }
  .copy-output .copy-card textarea { padding: 12px; font-size: 15px; min-height: 148px; }
  .copy-knowledge-details summary { font-size: 13px; }
  .copy-knowledge-details summary strong { margin-left: 6px; }
  .kline-scene-heading { align-items: center; font-size: 13px; }
  .kline-focus-controls button { font-size: 12px; }
  .workspace-grid, #renderEditor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .creation-panel, .output-panel, .recent-panel, .studio-step-section, .studio-submit { padding: 20px; }
  .studio-form { padding: 0; }
  .render-source-picker { display: block; padding: 16px; margin-bottom: 20px; }
  .render-source-picker .field-label { margin-bottom: 8px; }
  .render-preview-column { position: static; padding: 16px; }
  .render-settings-column { padding: 20px; }
  #renderForm .spotlight-stage-wrap { padding: 12px; }
  #renderStage { width: min(100%, 300px); }
  .render-playback { gap: 8px; }
  .render-playback .secondary-button { min-height: 38px; padding: 8px 10px; }
  .render-export-bar .primary-button { width: 100%; }
  .spotlight-settings { grid-template-columns: 1fr 1fr; gap: 12px; }
  .spotlight-cue-times { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 6px; }
  .spotlight-cue-times button { font-size: 11px; }
  .material-heading-actions { display: flex; width: 100%; flex-wrap: wrap; gap: 8px; }
  .material-heading-actions .primary-button, .material-heading-actions .secondary-button { font-size: 13px; padding: 9px 12px; }
  .material-toolbar, .knowledge-toolbar, .generation-toolbar { padding: 16px; }
  .knowledge-toolbar .filter-row button { font-size: 12px; padding: 8px 10px; }
  .material-grid, .generation-grid { gap: 16px; }
  .filter-row { flex-wrap: wrap; }
  .app-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}
.copy-candidate-quantity { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.copy-candidate-quantity .field-label { margin: 0; }
.copy-candidate-quantity input { width: 88px; flex: 0 0 88px; }
.copy-candidate-count { margin-top: 12px; color: #677286; font-size: 12px; }
.copy-chart-candidates { display: flex; gap: 10px; overflow-x: auto; max-width: 100%; padding: 4px 2px 10px; margin-top: 8px; }
.copy-chart-candidate { flex: 0 0 150px; min-width: 0; padding: 5px; border: 1px solid #dce0e8; border-radius: 9px; background: #fff; text-align: left; }
.copy-chart-candidate.selected { border-color: var(--primary, #7755dc); box-shadow: 0 0 0 1px var(--primary, #7755dc); }
.copy-chart-candidate img { display: block; width: 100%; height: 84px; object-fit: contain; border-radius: 5px; background: #f7f8fb; }
.copy-chart-candidate>span { display: flex; justify-content: space-between; gap: 5px; padding: 6px 3px 2px; font-size: 12px; color: #525d70; }
.copy-chart-candidate>span strong { font-weight: 500; }
.copy-chart-candidate.selected>span { color: var(--primary, #7755dc); }
.copy-chart-candidate[aria-busy=true] { opacity: .6; }
#copyTopicPicker { margin-top: 18px; }
.copy-route-quantity { display: flex; gap: 16px; align-items: end; margin-top: 16px; }
.copy-route-quantity label { flex: 0 0 84px; font-size: 13px; color: #485165; }
.copy-route-quantity input { margin-top: 6px; }
.copy-route-quantity>span { color: var(--muted); font-size: 12px; padding-bottom: 9px; }
.knowledge-run { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.knowledge-stages { display: flex; gap: 12px; }
.knowledge-stage { flex: 1; display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #f5f6fa; color: #697082; font-size: 13px; }
.knowledge-stage b { font-weight: 500; }.knowledge-stage.running { background: var(--accent-soft); color: var(--accent-dark); }
.knowledge-stage.succeeded { color: #387d60; }.knowledge-stage.failed { color: #a84659; }
.knowledge-run-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.production-workspace { display: grid; grid-template-columns: minmax(280px,360px) minmax(0,1fr); gap: 24px; align-items: start; }
.production-page-title { display: flex; align-items: center; gap: 12px; }
.testing-badge { display: inline-flex; align-items: center; white-space: nowrap; background: #fff2d6; color: #9b650f; border: 1px solid #f3dca9; border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 500; }
.nav-testing-badge { margin-left: auto; padding: 1px 6px; font-size: 10px; }
.production-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.production-panel-heading h2 { margin: 0; font-size: 17px; }
.production-form { padding: 20px; min-width: 0; }.production-task { padding: 20px; min-width: 0; }
.production-api-status { display: block; font-size: 12px; color: var(--muted); margin-top: 16px; }.production-api-status.ready { color: #387d60; }
.production-records { min-width: 0; }.production-records>.production-panel-heading { margin-bottom: 16px; }
.production-choice-heading { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 8px; }
.production-choice-heading .field-label { margin: 0; }.production-choice-heading .field-label span { color: var(--muted); font-weight: 400; }
.production-copy-choices { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.production-copy-choice { display: flex; align-items: start; gap: 10px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.production-copy-choice:last-child { border-bottom: 0; }.production-copy-choice input { margin-top: 5px; flex-shrink: 0; }
.production-copy-choice>span { min-width: 0; font-size: 13px; }.production-copy-choice strong { font-weight: 500; }
.production-copy-choice>span>span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); overflow-wrap: anywhere; }
.production-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.production-option-grid label { font-size: 13px; color: #485165; }.production-option-grid select { margin-top: 6px; }
.production-tasks { display: grid; gap: 20px; min-width: 0; }.production-task-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.production-task-heading>div { min-width: 0; }.production-task-heading strong { display: block; overflow-wrap: anywhere; font-size: 16px; }
.production-task-heading>div>span { color: var(--muted); font-size: 12px; }.production-task-progress { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 13px; }
.production-task-progress strong { font-weight: 500; }.production-task-progress>span { white-space: nowrap; color: var(--muted); }
.production-items { margin-top: 14px; }.production-item { border-top: 1px solid var(--line); padding: 12px 0; }
.production-item summary { display: flex; gap: 14px; cursor: pointer; font-size: 13px; }.production-item summary strong { white-space: nowrap; font-weight: 500; }
.production-item summary>span { color: var(--muted); overflow-wrap: anywhere; }.production-item-script { color: #667083; font-size: 13px; line-height: 1.8; margin-top: 12px; overflow-wrap: anywhere; }
.production-stage-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.production-stage-list>span { display: block; border-radius: 6px; background: #f5f6fa; padding: 7px 9px; font-size: 12px; color: #798192; }
.production-stage-list small { display: block; font-size: 11px; }.production-stage-list .succeeded { background: #eff8f3; color: #387d60; }
.production-stage-list .running { background: var(--accent-soft); color: var(--accent-dark); }.production-stage-list .failed { background: #fff0f2; color: #a84659; }
.production-item-links,.production-task-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width:1020px) { .production-workspace { grid-template-columns: minmax(0,1fr); } }
@media (max-width:760px) { .production-form,.production-task { padding: 16px; }.production-option-grid { grid-template-columns: minmax(0,1fr); }.knowledge-stages { gap: 8px; }.knowledge-stage { flex-direction: column; gap: 2px; } }
