/* 爱玛特智能剪辑 - 前端样式（左右布局） */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", -apple-system, sans-serif; background: #f0f2f5; color: #333; }

/* ===== 整体左右布局 ===== */
.layout { display: flex; min-height: 100vh; }

/* ===== 左侧导航 ===== */
.sidebar { width: 220px; background: #1e1e2e; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; }
.sidebar-logo { padding: 22px 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #2e2e3e; }
.logo-icon { width: 24px; height: 24px; display: grid; flex: 0 0 24px; place-items: center; font-size: 22px; }
.logo-icon.has-brand-icon img { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; }
.logo-text { min-width: 0; font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.nav { flex: 1; padding: 16px 0; overflow-x: hidden; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 13px 22px; color: #b0b0c0; cursor: pointer; font-size: 14px; transition: all .15s; text-decoration: none; }
.nav-item:hover { background: #2a2a3e; color: #fff; }
.nav-item.active { background: #4f46e5; color: #fff; border-left: 3px solid #818cf8; padding-left: 19px; }
.nav-icon { font-size: 17px; width: 20px; text-align: center; }
.nav-icon svg { width: 18px; height: 18px; display: block; margin: 0 auto; }
.nav-parent { width: 100%; }
.nav-parent-row { display: flex; align-items: stretch; }
.nav-parent-link { min-width: 0; flex: 1 1 auto; }
.nav-parent-toggle { width: 42px; flex: 0 0 42px; border: 0; background: transparent; color: #94a3b8; font-size: 24px; line-height: 1; cursor: pointer; transform: rotate(0deg); transition: transform .15s ease, background .15s ease; }
.nav-parent-toggle:hover { background: #2a2a3e; color: #fff; }
.nav-parent-toggle.expanded { transform: rotate(90deg); }
.nav-subnav { display: flex; flex-direction: column; gap: 2px; padding: 2px 10px 8px 42px; }
.nav-subitem { width: 100%; min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: #aeb4c6; padding: 8px 12px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.nav-subitem:hover { background: #2a2a3e; color: #fff; }
.nav-subitem.active { background: #373750; color: #fff; box-shadow: inset 3px 0 #818cf8; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid #2e2e3e; }
.user-info { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.user-name { font-size: 14px; font-weight: 500; }
.user-role { font-size: 11px; background: #4f46e5; padding: 2px 8px; border-radius: 10px; }
.sidebar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-settings-button { grid-column: 1 / -1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #3b3b50; border-radius: 6px; background: #29293b; color: #e5e7eb; font: inherit; font-size: 13px; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.sidebar-settings-button svg { width: 18px; height: 18px; flex: 0 0 18px; }
.sidebar-settings-button:hover { border-color: #6366f1; background: #343451; color: #fff; }
.sidebar-settings-button:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.btn-text-sm { background: none; border: 1px solid #444; color: #b0b0c0; cursor: pointer; font-size: 12px; padding: 5px 10px; border-radius: 6px; flex: 1; }
.btn-text-sm:hover { background: #2a2a3e; color: #fff; }

/* ===== 右侧内容区 ===== */
.content { flex: 1; margin-left: 220px; padding: 28px 32px; max-width: calc(100% - 220px); }
.view { display: none; }
.view.active { display: block; }
.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 8px; }
.view-header h1 { font-size: 22px; color: #1a1a1a; }
.view-desc { color: #888; font-size: 13px; margin-top: 4px; }
.generation-tabs { display: flex; gap: 4px; width: fit-content; margin-bottom: 22px; padding: 4px; border: 1px solid #e5e7eb; border-radius: 8px; background: #f3f4f6; }
.generation-tab { min-width: 104px; padding: 9px 18px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.generation-tab:hover { color: #3730a3; }
.generation-tab.active { background: #fff; color: #4338ca; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.generation-tab:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }
.generation-panel { display: none; }
.generation-panel.active { display: block; }
.voice-config-tabs { display: flex; gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid #e5e7eb; border-radius: 8px; background: #f3f4f6; }
.voice-config-tab { min-height: 38px; padding: 8px 16px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.voice-config-tab:hover { color: #3730a3; }
.voice-config-tab.active { background: #fff; color: #4338ca; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.voice-config-tab:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }
.voice-config-panel { display: none; min-height: 178px; }
.voice-config-panel.active { display: block; }
.qwen-toggle-field { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.qwen-toggle-field .system-toggle { margin-bottom: 0; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; color: #1a1a1a; font-weight: 600; }
.muted { color: #999; font-size: 13px; font-weight: 400; }
.hidden { display: none !important; }

body.app-dialog-open { overflow: hidden; }
.app-dialog-overlay { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(17, 24, 39, .48); }
.app-dialog-panel { width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #1f2937; box-shadow: 0 20px 54px rgba(17, 24, 39, .24); }
.app-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 12px; }
.app-dialog-heading { min-width: 0; display: flex; align-items: center; gap: 10px; }
.app-dialog-heading h2 { margin: 0; font-size: 18px; font-weight: 600; }
.app-dialog-icon { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #4f46e5; color: #fff; font-family: Arial, sans-serif; font-size: 17px; font-weight: 700; }
.app-dialog-overlay[data-kind="confirm"] .app-dialog-icon { background: #d97706; }
.app-dialog-close { width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.app-dialog-close:hover { background: #f1f5f9; color: #111827; }
.app-dialog-message { max-height: min(44vh, 320px); margin: 0; overflow-y: auto; padding: 4px 24px 20px; color: #475569; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.app-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 0 24px 22px; }
.app-dialog-actions .btn { min-width: 92px; }

@media (max-width: 520px) {
  .app-dialog-overlay { padding: 12px; }
  .app-dialog-head { padding: 18px 18px 10px; }
  .app-dialog-message { padding: 4px 18px 18px; }
  .app-dialog-actions { padding: 0 18px 18px; }
  .app-dialog-actions .btn { min-width: 0; flex: 1 1 0; }
}

/* 单条生成保留文案编辑区，并与智能模板并排展示。 */
#singleDraftCard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  column-gap: 22px;
  align-items: start;
}
#singleDraftCard > .field,
#singleDraftCard > .create-resource-actions,
#singleDraftCard > .draft-state-row,
#singleDraftCard > .create-parse-anchor { grid-column: 1; }
#singleDraftCard > .smart-clip-picker {
  grid-column: 2;
  grid-row: 1 / span 4;
  margin-top: 0;
  padding: 0 0 0 22px;
  border-top: 0;
  border-left: 1px solid #eef2f7;
}
#singleDraftCard > .cover-picker { grid-column: 1 / -1; }

/* ===== 表单 ===== */
.form-row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.field { flex: 1; margin-bottom: 14px; min-width: 0; }
.field-sm { flex: 0 0 160px; }
.field label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color .2s; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.field textarea { resize: vertical; line-height: 1.6; }
.select-sm { padding: 8px 12px; font-size: 13px; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
.brand-settings-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1fr); gap: 20px; }
.brand-icon-control { display: flex; min-height: 64px; align-items: center; gap: 14px; }
.brand-icon-preview { display: grid; width: 64px; height: 64px; flex: 0 0 64px; place-items: center; overflow: hidden; border: 1px solid #d7dbe3; border-radius: 8px; background: #f8fafc; color: #4f46e5; font-size: 26px; font-weight: 700; }
.brand-icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.brand-icon-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .brand-settings-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 按钮 ===== */
.actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.create-resource-actions { align-items: flex-end; }
.create-material-picker { width: min(360px, 100%); min-height: 44px; display: flex; align-items: center; border: 1px solid #c7d2fe; border-radius: 8px; background: #fff; box-shadow: 0 0 0 2px rgba(79,70,229,.08); overflow: hidden; }
.create-material-picker:focus-within { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.create-material-picker-label { flex: 0 0 auto; padding-left: 14px; color: #64748b; font-size: 14px; }
.create-material-picker-divider { width: 1px; height: 20px; flex: 0 0 1px; margin: 0 10px; background: #dbe1ea; }
.create-material-picker select { min-width: 0; flex: 1 1 auto; align-self: stretch; border: 0; background: #fff; color: #4f46e5; padding: 0 34px 0 0; font: inherit; font-size: 14px; outline: none; cursor: pointer; }
.create-material-picker select:disabled { color: #94a3b8; cursor: not-allowed; }
.create-resource-field { flex: 1 1 180px; max-width: 240px; margin-bottom: 0; }
.talking-head-picker-field { position: relative; }
.talking-head-picker-trigger { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; overflow: hidden; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #64748b; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.talking-head-picker-trigger:hover, .talking-head-picker-trigger[aria-expanded="true"] { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.talking-head-picker-trigger:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.talking-head-picker-trigger:disabled { color: #94a3b8; background: #f8fafc; cursor: not-allowed; }
.talking-head-picker-trigger.has-selection { color: #1f2937; }
.talking-head-picker-trigger > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talking-head-picker-chevron { width: 8px; height: 8px; flex: 0 0 8px; margin-left: auto; border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; transform: rotate(45deg) translate(-2px,-2px); transition: transform .15s ease; }
.talking-head-picker-trigger[aria-expanded="true"] .talking-head-picker-chevron { transform: rotate(225deg) translate(-1px,-1px); }
.talking-head-picker-panel { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: min(650px, calc(100vw - 48px)); max-height: 390px; display: grid; grid-template-columns: 205px minmax(0,1fr); overflow: hidden; border: 1px solid #dbe1ea; border-radius: 8px; background: #fff; box-shadow: 0 18px 44px rgba(15,23,42,.18); }
.talking-head-picker-groups { min-height: 0; overflow-y: auto; padding: 10px; border-right: 1px solid #e5e7eb; background: #f8fafc; }
.talking-head-picker-section-title { padding: 4px 8px 8px; color: #94a3b8; font-size: 12px; }
.talking-head-picker-group { width: 100%; min-height: 44px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto 12px; align-items: center; gap: 7px; padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: #475569; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.talking-head-picker-group:hover, .talking-head-picker-group.active { background: #eef2ff; color: #4f46e5; }
.talking-head-picker-group:focus-visible, .talking-head-picker-child:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }
.talking-head-picker-group-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talking-head-picker-group small { color: #94a3b8; font-size: 11px; white-space: nowrap; }
.talking-head-picker-folder { position: relative; width: 16px; height: 12px; border: 1.5px solid #d99a2b; border-radius: 2px; background: #fef3c7; }
.talking-head-picker-folder::before { content: ''; position: absolute; left: 1px; top: -5px; width: 7px; height: 4px; border: 1.5px solid #d99a2b; border-bottom: 0; border-radius: 2px 2px 0 0; background: #fef3c7; }
.talking-head-picker-next { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.talking-head-picker-children-wrap { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); padding: 14px 16px; }
.talking-head-picker-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.talking-head-picker-head > strong { min-width: 0; flex: 1; overflow: hidden; color: #334155; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.talking-head-picker-search { width: 150px; height: 34px; display: flex !important; align-items: center; gap: 7px; margin: 0 !important; padding: 0 9px; border: 1px solid #dbe1ea; border-radius: 5px; background: #f8fafc; }
.talking-head-picker-search > span { width: 12px; height: 12px; flex: 0 0 12px; border: 1.5px solid #94a3b8; border-radius: 50%; }
.talking-head-picker-search > span::after { content: ''; display: block; width: 5px; border-top: 1.5px solid #94a3b8; transform: translate(9px,9px) rotate(45deg); }
.talking-head-picker-search input { min-width: 0; width: 100%; height: 100%; padding: 0 !important; border: 0 !important; border-radius: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 13px !important; }
.talking-head-picker-children { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); grid-auto-rows: 66px; align-content: start; gap: 9px; overflow-y: auto; padding: 1px 3px 4px 1px; scrollbar-gutter: stable; }
.talking-head-picker-child { position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 9px 11px; border: 1px solid #dbe1ea; border-radius: 6px; background: #fff; color: #334155; font: inherit; text-align: left; cursor: pointer; }
.talking-head-picker-child:hover { border-color: #a5b4fc; background: #fafbff; }
.talking-head-picker-child.selected { border-color: #4f46e5; background: #eef2ff; color: #4f46e5; box-shadow: inset 0 0 0 1px #4f46e5; }
.talking-head-picker-child strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.talking-head-picker-child small { color: #64748b; font-size: 11px; }
.talking-head-picker-check { position: absolute; top: 7px; right: 8px; display: none; font-size: 13px; }
.talking-head-picker-child.selected .talking-head-picker-check { display: block; }
.talking-head-picker-empty { grid-column: 1 / -1; margin: 20px 8px; color: #94a3b8; font-size: 13px; text-align: center; }
.create-voice-button { width: 100%; min-height: 42px; margin-bottom: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.create-voice-button.has-selection { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }
.create-parse-button { align-self: flex-end; margin-bottom: 0; white-space: nowrap; }
.create-parse-anchor { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; }
.draft-state-row { min-height: 24px; display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.adjustment-banner { display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px; padding: 11px 14px; border: 1px solid #a5b4fc; border-radius: 6px; background: #eef2ff; color: #3730a3; font-size: 13px; line-height: 1.5; }
.adjustment-banner strong { white-space: nowrap; }
.adjustment-tools { margin: 0 0 18px; padding: 0; overflow: hidden; border: 1px solid #d8dee9; border-radius: 8px; background: #fff; box-shadow: 0 5px 18px rgba(15, 23, 42, .08); }
.adjustment-tools-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.adjustment-tools h2 { margin: 0; color: #0f172a; font-size: 18px; }
.adjustment-tools-head span { display: block; margin-top: 4px; color: #64748b; font-size: 13px; }
.adjustment-version-label { flex: 0 0 auto; margin-top: 0 !important; padding: 4px 8px; border-radius: 4px; background: #e0e7ff; color: #3730a3 !important; font-weight: 700; }
.adjustment-workbench { display: grid; grid-template-columns: minmax(218px, .8fr) minmax(310px, 1.15fr) minmax(270px, .9fr); min-height: 500px; }
.adjustment-preview-panel, .adjustment-timeline-panel, .adjustment-inspector { min-width: 0; padding: 16px; }
.adjustment-preview-panel, .adjustment-timeline-panel { border-right: 1px solid #e2e8f0; }
.adjustment-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; color: #334155; font-size: 14px; font-weight: 700; }
.adjustment-panel-heading small { color: #94a3b8; font-size: 12px; font-weight: 400; text-align: right; }
.adjustment-preview-frame { display: grid; width: min(100%, 250px); aspect-ratio: 9 / 16; margin: 0 auto; overflow: hidden; border-radius: 6px; background: #111827; box-shadow: 0 8px 18px rgba(15, 23, 42, .18); }
.adjustment-preview-frame video { width: 100%; height: 100%; object-fit: contain; }
.adjustment-timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; align-content: start; max-height: 412px; overflow-y: auto; padding-right: 3px; }
.adjustment-timeline-clip { position: relative; display: grid; min-width: 0; min-height: 126px; align-content: end; gap: 5px; overflow: hidden; border: 1px solid #dbe3ee; border-radius: 6px; background: #f8fafc; color: #334155; padding: 12px; font: inherit; text-align: left; cursor: pointer; }
.adjustment-timeline-clip::before { position: absolute; top: 0; left: 0; right: 0; height: 48px; content: ""; background: #dbeafe; }
.adjustment-timeline-clip.mat::before { background: #fde68a; }
.adjustment-timeline-clip:hover { border-color: #818cf8; background: #f5f3ff; }
.adjustment-timeline-clip.active { border-color: #4f46e5; background: #eef2ff; box-shadow: inset 0 0 0 1px #4f46e5; }
.adjustment-timeline-index, .adjustment-timeline-type, .adjustment-timeline-text { position: relative; min-width: 0; }
.adjustment-timeline-index { position: absolute; top: 10px; left: 10px; display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 4px; background: #fff; color: #3730a3; font-size: 12px; font-weight: 700; }
.adjustment-timeline-type { color: #64748b; font-size: 12px; font-weight: 700; }
.adjustment-timeline-text { display: -webkit-box; overflow: hidden; color: #334155; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.adjustment-timeline-note { margin: 12px 0 0; color: #94a3b8; font-size: 12px; line-height: 1.5; }
.adjustment-inspector { display: flex; flex-direction: column; gap: 14px; background: #fbfdff; overflow-y: auto; }
.adjustment-inspector-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.adjustment-inspector-kicker { display: block; margin-bottom: 3px; color: #94a3b8; font-size: 12px; }
.adjustment-inspector h3 { color: #1e293b; font-size: 16px; }
.adjustment-shot-kind { flex: 0 0 auto; padding: 4px 7px; border-radius: 4px; color: #92400e; background: #fef3c7; font-size: 12px; font-weight: 700; }
.adjustment-shot-kind.nar { color: #3730a3; background: #e0e7ff; }
.adjustment-inspector-section { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid #e2e8f0; }
.adjustment-inspector-section label { display: grid; gap: 5px; color: #475569; font-size: 12px; font-weight: 600; }
.adjustment-inspector-section textarea, .adjustment-inspector-section select, .adjustment-inspector-section input[type="number"] { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #1e293b; font: inherit; font-size: 13px; }
.adjustment-inspector-section textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.adjustment-inspector-section textarea:focus, .adjustment-inspector-section select:focus, .adjustment-inspector-section input:focus { outline: 2px solid #c7d2fe; outline-offset: 1px; border-color: #4f46e5; }
.adjustment-source-note { color: #64748b; font-size: 12px; line-height: 1.55; }
.adjustment-trim-grid, .adjustment-style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.adjustment-trim-grid label { position: relative; }
.adjustment-trim-grid small { position: absolute; right: 8px; bottom: 9px; color: #94a3b8; font-size: 11px; }
.adjustment-trim-grid input { padding-right: 26px !important; }
.adjustment-shot-actions { display: flex; gap: 7px; }
.adjustment-global-section { gap: 9px; }
.adjustment-section-title { color: #334155; font-size: 13px; font-weight: 700; }
.adjustment-inspector-section .toggle-field { display: flex; grid-template-columns: none; align-items: center; gap: 7px; color: #334155; }
.adjustment-inspector-section .toggle-field input { width: 16px; height: 16px; }
.adjustment-inspector-section input[type="color"] { width: 100%; height: 34px; padding: 3px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; }
.adjustment-range-field { grid-template-columns: auto minmax(0, 1fr) auto !important; align-items: center; }
.adjustment-range-field input { min-width: 0; }
.adjustment-range-field output { color: #4f46e5; font-size: 12px; }
.adjustment-empty-inspector { display: grid; min-height: 180px; place-items: center; color: #94a3b8; font-size: 13px; }
.adjustment-action-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid #dbe3ee; background: #f8fafc; }
.adjustment-preserve-note { color: #047857; font-size: 13px; font-weight: 700; }
.adjustment-action-buttons { display: flex; gap: 8px; }
.adjustment-action-bar .preflight-errors { grid-column: 1 / -1; margin-top: 0; }
#generation-panel-single.is-adjustment #singleDraftCard, #generation-panel-single.is-adjustment #step2 { display: none; }
.draft-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.draft-status.draft { background: #f1f5f9; color: #475569; }
.draft-status.needs_parse { background: #fff7ed; color: #c2410c; }
.draft-status.ready { background: #ecfdf5; color: #047857; }
.draft-status-hint { color: #64748b; font-size: 12px; }
.btn { padding: 11px 22px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; font-family: inherit; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-outline { background: #fff; color: #4f46e5; border: 1px solid #4f46e5; }
.btn-outline:hover { background: #eef2ff; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn-danger:hover { background: #991b1b; }

.production-workbench { margin-bottom: 16px; border: 1px solid #dbe3ee; border-radius: 8px; overflow: hidden; background: #fff; }
.production-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.production-summary > div:first-child { display: grid; gap: 2px; }
.production-summary strong { color: #172033; font-size: 15px; }
.production-summary span { color: #64748b; font-size: 12px; }
.production-summary-metrics { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.production-summary-metrics span { display: inline-flex; min-height: 30px; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #475569; }
.production-summary-metrics b { color: #172033; font-size: 14px; }
.production-summary-metrics .is-warning { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.production-summary-metrics .is-ok { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.production-layout { display: grid; grid-template-columns: minmax(260px, 36%) minmax(0, 1fr); min-height: 520px; }
.production-shot-list { max-height: 640px; overflow-y: auto; border-right: 1px solid #e2e8f0; background: #f8fafc; }
.production-shot-item { width: 100%; min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: stretch; border-bottom: 1px solid #e2e8f0; background: transparent; color: #334155; }
.production-shot-item:hover { background: #fff; }
.production-shot-item.active { background: #eef2ff; box-shadow: inset 3px 0 #4f46e5; }
.production-shot-select { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 0; background: transparent; padding: 11px 6px 11px 12px; color: inherit; text-align: left; cursor: pointer; }
.production-shot-number { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 5px; background: #fff; color: #475569; font-size: 12px; font-weight: 700; }
.production-shot-copy { display: grid; min-width: 0; gap: 4px; }
.production-shot-copy strong, .production-shot-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-shot-copy strong { color: #1e293b; font-size: 13px; }
.production-shot-copy small { color: #64748b; font-size: 12px; }
.production-shot-status { padding: 3px 6px; border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.production-shot-status.is-ok { background: #dcfce7; color: #15803d; }
.production-shot-status.is-warning { background: #ffedd5; color: #c2410c; }
.production-shot-actions { display: grid; align-content: center; gap: 2px; padding-right: 4px; }
.production-shot-actions button { width: 24px; height: 20px; border: 0; border-radius: 4px; background: transparent; color: #64748b; cursor: pointer; line-height: 1; }
.production-shot-actions button:hover:not(:disabled) { background: #e2e8f0; color: #1e293b; }
.production-shot-actions button.delete:hover:not(:disabled) { background: #fee2e2; color: #b91c1c; }
.production-shot-actions button:disabled { opacity: .3; cursor: not-allowed; }
.production-shot-inspector { min-width: 0; display: grid; align-content: start; gap: 14px; padding: 16px; }
.production-preview-frame { position: relative; width: min(100%, 260px); aspect-ratio: 9 / 16; margin: 0 auto; overflow: hidden; border-radius: 6px; background: #111827; }
.production-preview-frame video { width: 100%; height: 100%; object-fit: contain; background: #111827; }
.production-preview-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 18px; color: #cbd5e1; font-size: 12px; text-align: center; pointer-events: none; }
.production-shot-details { display: grid; gap: 14px; }
.production-inspector-head, .production-candidates-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.production-inspector-head h3 { margin: 2px 0 0; color: #172033; font-size: 16px; }
.production-kicker { color: #64748b; font-size: 11px; }
.production-shot-badge { max-width: 180px; overflow: hidden; padding: 4px 7px; border-radius: 5px; background: #f1f5f9; color: #475569; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.production-field { display: grid; gap: 6px; color: #475569; font-size: 12px; font-weight: 700; }
.production-field textarea, .production-field select, .production-field input, .production-trim-grid input { width: 100%; padding: 8px 9px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1e293b; font: inherit; font-weight: 400; }
.production-candidates-head span { color: #334155; font-size: 13px; font-weight: 700; }
.production-candidates-head small { color: #64748b; font-size: 11px; }
.production-candidates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; max-height: 164px; overflow-y: auto; }
.production-candidate { min-width: 0; display: grid; gap: 3px; padding: 8px 9px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #334155; text-align: left; cursor: pointer; }
.production-candidate.active { border-color: #4f46e5; background: #eef2ff; }
.production-candidate span { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.production-candidate small { color: #94a3b8; font-size: 10px; }
.production-upload-button { justify-self: start; }
.production-material-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.production-source-note { margin: 0; padding: 10px; border-radius: 6px; background: #f8fafc; color: #64748b; font-size: 12px; }
.production-trim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.production-trim-grid label { display: grid; gap: 5px; color: #64748b; font-size: 11px; }
.shot-action-button { width: 28px; height: 28px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #475569; font-size: 16px; line-height: 1; cursor: pointer; }
.shot-action-button:hover:not(:disabled) { border-color: #4f46e5; color: #4f46e5; background: #eef2ff; }
.shot-action-button.delete { color: #dc2626; border-color: #fecaca; }
.shot-action-button.delete:hover { background: #fef2f2; border-color: #ef4444; }
.shot-action-button:disabled { opacity: .35; cursor: not-allowed; }
.preflight-errors { display: grid; gap: 6px; margin-top: 14px; padding: 12px 14px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 6px; font-size: 13px; line-height: 1.5; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.batch-generate-actions { align-items: center; }
.batch-generate-button { min-width: 204px; }
.batch-generate-button[aria-busy="true"] { cursor: wait; opacity: .82; }
.batch-generate-button.is-submitting, .batch-generate-button.is-running, .batch-generate-button.is-uncertain { position: relative; }
.batch-generate-button.is-submitting::before, .batch-generate-button.is-running::before, .batch-generate-button.is-uncertain::before { display: inline-block; width: 13px; height: 13px; margin-right: 7px; border: 2px solid rgba(255,255,255,.42); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; content: ''; animation: batch-generate-spin .8s linear infinite; }
.batch-generate-button.is-uncertain { background: #b45309; }
.batch-generate-button.is-uncertain:hover { background: #92400e; }
.batch-generate-button.is-error { background: #b91c1c; }
.batch-generate-button.is-error:hover { background: #991b1b; }
.batch-generate-status { min-height: 20px; color: #64748b; font-size: 12px; line-height: 1.5; }
.batch-generate-status.is-success { color: #047857; }
.batch-generate-status.is-error { color: #b91c1c; }
@keyframes batch-generate-spin { to { transform: rotate(360deg); } }

/* ===== 进度 ===== */
.generation-stage { margin-bottom: 20px; }
.generation-workspace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; align-items: stretch; }
.generation-pane { min-width: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.generation-pane-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #e2e8f0; }
.generation-pane-head h3 { margin: 0; color: #0f172a; font-size: 16px; }
.generation-live-status { display: inline-flex; align-items: center; gap: 7px; color: #64748b; font-size: 12px; white-space: nowrap; }
.generation-live-status i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.generation-stage[data-state="error"] .generation-live-status i { background: #ef4444; }
.generation-pane-body { min-width: 0; padding: 16px; }
.generation-log-body { display: grid; gap: 12px; }
.generation-progress-view { display: grid; align-content: start; min-height: 320px; }
.generation-result-view { min-height: 320px; }
.progress-info { margin-bottom: 0; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.progress-info.is-batch { border-color: #c7d2fe; background: #fafbff; }
.progress-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; }
.step-label { min-width: 0; overflow: hidden; color: #0f172a; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.progress-percent { flex: 0 0 auto; color: #4338ca; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 700; }
.progress-bar { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 4px; background: #e2e8f0; }
.progress-fill { width: 0%; height: 100%; background: #4f46e5; transition: width .3s ease; }
.batch-progress-summary { display: grid; gap: 12px; margin-bottom: 12px; }
.batch-progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.batch-progress-current-wrap { min-width: 0; display: grid; gap: 4px; }
.batch-progress-eyebrow { color: #64748b; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.batch-progress-current { min-width: 0; overflow: hidden; color: #0f172a; font-size: 14px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.batch-progress-count { flex: 0 0 auto; color: #4338ca; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.batch-progress-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.batch-progress-stat { min-height: 26px; padding: 4px 8px; border-radius: 5px; background: #eef2ff; color: #4338ca; font-size: 12px; font-variant-numeric: tabular-nums; }
.batch-progress-stat.is-error { background: #fef2f2; color: #b91c1c; }
.batch-progress-details-toggle { justify-self: start; min-height: 34px; }
.generation-task-list { display: none; gap: 10px; margin: 12px 0 0; }
.generation-task-list.is-expanded { display: grid; max-height: min(320px, 50vh); overflow-y: auto; padding-right: 4px; }
.generation-task-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #0f172a; font-size: 13px; }
.generation-task-list-head span { color: #64748b; font-size: 12px; font-variant-numeric: tabular-nums; }
.generation-task-items { display: grid; gap: 8px; }
.generation-task-item { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(90px, 180px); gap: 12px; align-items: center; min-height: 44px; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; }
.generation-task-main { min-width: 0; display: grid; gap: 7px; }
.generation-task-name-row { min-width: 0; display: flex; align-items: center; gap: 8px; }
.generation-task-status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #94a3b8; }
.generation-task-index { flex: 0 0 22px; color: #94a3b8; font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.generation-task-name { min-width: 0; overflow: hidden; color: #334155; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.generation-task-status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 3px 8px; border-radius: 5px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600; white-space: nowrap; }
.generation-task-status-pill.is-queued { background: #f1f5f9; color: #64748b; }
.generation-task-status-pill.is-running { background: #eef2ff; color: #4338ca; }
.generation-task-status-pill.is-success { background: #ecfdf5; color: #047857; }
.generation-task-status-pill.is-error { background: #fef2f2; color: #b91c1c; }
.generation-task-detail { min-width: 0; overflow: hidden; color: #64748b; font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.generation-task-item.is-running .generation-task-status-dot { background: #4f46e5; box-shadow: 0 0 0 3px #e0e7ff; }
.generation-task-item.is-success .generation-task-status-dot { background: #10b981; }
.generation-task-item.is-error .generation-task-status-dot { background: #ef4444; }
.generation-task-item.is-queued { border-color: #e2e8f0; }
.generation-task-item.is-running { border-color: #c7d2fe; }
.generation-task-item.is-success { border-color: #bbf7d0; }
.generation-task-item.is-error { border-color: #fecaca; }
.log-box { min-height: 320px; max-height: 420px; overflow-y: auto; padding: 16px; border-radius: 6px; background: #17191d; color: #d4d4d4; font-family: Consolas, monospace; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.log-box:empty::before { color: #7f8794; content: '等待生成日志...'; }
.result { margin-top: 0; text-align: center; }
.result .ok { color: #16a34a; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.result video { display: block; width: min(100%, 320px); max-height: 520px; aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 6px; background: #000; object-fit: contain; }
.error-box { margin-top: 14px; padding: 12px 14px; background: #fef2f2; color: #b91c1c; border-radius: 8px; font-size: 13px; border: 1px solid #fecaca; }

@media (max-width: 900px) {
  .generation-workspace { grid-template-columns: 1fr; }
  .log-box, .generation-progress-view, .generation-result-view { min-height: 240px; }
}

/* ===== 批量列表 ===== */
.batch-list { margin-bottom: 12px; }
.batch-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 8px; }
.batch-item input[type=checkbox] { width: 18px; height: 18px; }
.batch-item-name { flex: 1; font-size: 14px; font-weight: 500; }
.batch-item-meta { font-size: 12px; color: #999; }
.batch-import-card { margin-bottom: 18px; }
.batch-import-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(360px, .92fr); gap: 22px; align-items: start; }
.batch-import-main { min-width: 0; }
.batch-import-head { align-items: flex-start; margin-bottom: 16px; }
.batch-import-head h2 { margin-bottom: 5px; font-size: 17px; }
.batch-import-head p { margin: 0; font-size: 13px; }
.batch-import-plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.batch-import-plan .field { margin-bottom: 0; }
.batch-import-plan > .field:nth-child(5) { display: none; }
.smart-clip-picker.batch-smart-clip-picker { min-width: 0; margin-top: 0; padding: 0 0 0 22px; border-top: 0; border-left: 1px solid #eef2f7; }
.batch-smart-clip-picker .smart-clip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.batch-smart-clip-value { display: none !important; }
.batch-import-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee; }
.batch-import-file-name { min-width: 0; flex: 1 1 180px; overflow: hidden; color: #64748b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.batch-import-status { min-height: 20px; margin-top: 12px; color: #64748b; font-size: 13px; }
.batch-import-status.success { color: #047857; }
.batch-import-status.warning { color: #b45309; }
.batch-import-status.error { color: #dc2626; }
.batch-import-preview { display: grid; gap: 6px; margin-top: 10px; }
.batch-import-template-hint { margin: 8px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.batch-import-preview-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) 72px; gap: 10px; padding: 0 12px 5px 42px; color: #94a3b8; font-size: 12px; }
.batch-import-row { display: grid; grid-template-columns: 24px 32px minmax(0, 1fr) 60px; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
.batch-import-row.valid { border-color: #d1fae5; background: #fbfffd; }
.batch-import-row.invalid { border-color: #fecaca; background: #fffafa; }
.batch-import-row-check input { width: 17px; height: 17px; }
.batch-import-row-number { color: #94a3b8; font-size: 12px; }
.batch-import-row-copy { min-width: 0; display: grid; gap: 3px; }
.batch-import-row-copy strong { overflow: hidden; color: #334155; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.batch-import-row-copy span { overflow: hidden; color: #64748b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.batch-import-row-copy .batch-import-row-mapping { color: #475569; font-weight: 600; }
.batch-import-row-copy .batch-import-row-cover-title { color: #2563eb; }
.batch-import-row-copy small { overflow: hidden; color: #dc2626; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.batch-import-row-status { font-size: 12px; text-align: right; }
.batch-import-row-status.success { color: #047857; }
.batch-import-row-status.error { color: #dc2626; }
.batch-import-actions { justify-content: flex-end; }
.btn-del { background: none; border: 1px solid #fca5a5; color: #dc2626; padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-del:hover { background: #fef2f2; }

/* ===== 历史记录 ===== */
#step3.view-suppressed { display: none !important; }
.history-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #f0f0f0; font-size: 13px; flex-wrap: wrap; }
.history-item:last-child { border-bottom: none; }
.history-name { font-weight: 500; min-width: 120px; }
.history-time { color: #999; margin-left: auto; font-size: 12px; }
.history-actions { display: inline-flex; align-items: center; gap: 6px; }
.history-actions .btn-primary { box-shadow: 0 1px 2px rgba(79, 70, 229, .24); }
.history-adjustment-hint { margin: 4px 0 0; color: #64748b; font-size: 13px; }
.history-adjustment-unavailable { color: #64748b; font-size: 12px; }
.quality-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 5px; font-size: 12px; font-weight: 700; }
.quality-passed { background: #dcfce7; color: #15803d; }
.quality-warning, .quality-checking { background: #fff7ed; color: #c2410c; }
.quality-failed { background: #fef2f2; color: #b91c1c; }
.quality-not_checked { background: #f1f5f9; color: #64748b; }
.quality-report-button { border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.quality-report { flex-basis: 100%; margin: 0 0 3px 130px; border-left: 3px solid #dbe3ee; background: #f8fafc; }
.quality-report-inner { padding: 9px 11px; color: #475569; font-size: 12px; }
.quality-report-summary { margin-bottom: 5px; color: #334155; font-weight: 600; }
.quality-report-inner ul { display: grid; gap: 3px; margin: 0; padding-left: 18px; }
.quality-issue-error { color: #b91c1c; }
.quality-issue-warning { color: #c2410c; }
.jianying-sync { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; }
.jianying-sync.is-success { color: #15803d; }
.jianying-sync.is-error { color: #dc2626; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge-ok { background: #dcfce7; color: #16a34a; }
.badge-err { background: #fef2f2; color: #dc2626; }
.link { color: #4f46e5; text-decoration: none; font-size: 13px; }
.link:hover { text-decoration: underline; }
.link-button { border: 0; background: transparent; padding: 0; font: inherit; cursor: pointer; }

body.output-preview-open { overflow: hidden; }
#outputPreviewModal { background: rgba(3, 7, 18, .78); z-index: 110; }
.output-preview-content { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 14px; overflow: hidden; padding: 18px; border: 1px solid #263244; border-radius: 8px; background: #111827; color: #f8fafc; box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
.output-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.output-preview-head h2 { min-width: 0; overflow: hidden; margin: 0; color: #f8fafc; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.output-preview-close { width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 6px; background: transparent; color: #f8fafc; font-size: 26px; line-height: 1; cursor: pointer; }
.output-preview-close:hover { background: #1f2937; }
.output-preview-video { display: block; width: min(100%, 320px); max-height: calc(100vh - 120px); aspect-ratio: 9 / 16; margin: 0 auto; object-fit: contain; border-radius: 6px; background: #020617; }

.system-toggle { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px; color: #374151; font-size: 14px; font-weight: 500; }
.system-toggle input { width: 18px; height: 18px; margin: 0; }
.audio-settings-anchor { position: relative; margin-left: auto; }
.create-resource-actions .audio-settings-anchor { flex: 0 0 auto; align-self: flex-end; margin-left: 0; }
.audio-settings-popover { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(320px, calc(100vw - 32px)); padding: 14px; border: 1px solid #dbe1ea; border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .14); }
.audio-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.audio-settings-head .icon-button { width: 28px; height: 28px; border: 0; background: transparent; color: #64748b; font-size: 20px; cursor: pointer; }
.audio-setting-range { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; margin: 12px 0; color: #374151; font-size: 13px; }
.audio-setting-range output { color: #4f46e5; font-variant-numeric: tabular-nums; }
.audio-setting-range input { grid-column: 1 / -1; width: 100%; accent-color: #4f46e5; }
.audio-setting-toggle { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #374151; font-size: 13px; }
.audio-setting-toggle input { width: 16px; height: 16px; margin: 0; }
.video-style-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.video-style-picker { display: inline-flex; align-items: center; gap: 8px; color: #374151; font-size: 13px; font-weight: 600; }
.video-style-picker select { min-width: 132px; padding: 7px 28px 7px 9px; border: 1px solid #c7d2fe; border-radius: 6px; background: #fff; color: #3730a3; font: inherit; font-size: 13px; cursor: pointer; }
.video-style-picker select:focus { outline: 2px solid #c7d2fe; outline-offset: 1px; border-color: #4f46e5; }
.video-style-description { flex: 1 1 220px; min-width: 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.public-voice-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 160px 160px 140px; gap: 14px; align-items: end; margin-bottom: 16px; }
.public-voice-toolbar .field { margin-bottom: 0; }
.public-voice-batch-bar { min-height: 38px; display: flex; align-items: center; gap: 12px; margin: -4px 0 12px; }
.public-voice-table-wrap { overflow-x: auto; }
.public-voice-table { min-width: 920px; }
.public-voice-table tr.is-disabled { opacity: .62; }
.public-voice-select-cell { width: 34px; }
.public-voice-select-cell input { width: 16px; height: 16px; margin: 0; }
.public-voice-admin-identity { min-width: 160px; display: flex; align-items: center; gap: 10px; }
.public-voice-admin-identity div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.public-voice-admin-identity strong, .public-voice-admin-identity small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-voice-admin-identity small { color: #94a3b8; }
.public-voice-admin-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 6px; object-fit: cover; border: 1px solid #e5e7eb; background: #f8fafc; }
.public-voice-admin-avatar.is-placeholder { display: inline-flex; align-items: center; justify-content: center; color: #6366f1; font-size: 20px; }
.public-voice-model { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-voice-admin-status { display: inline-flex; min-width: 54px; justify-content: center; padding: 4px 7px; border-radius: 5px; font-size: 12px; }
.public-voice-admin-status.is-enabled { background: #ecfdf5; color: #047857; }
.public-voice-admin-status.is-disabled { background: #f1f5f9; color: #64748b; }
.public-voice-preview-action { width: 112px; display: grid; gap: 4px; align-items: start; }
.public-voice-preview-error { display: block; max-width: 112px; color: #dc2626; font-size: 11px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-voice-admin-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.public-voice-admin-actions .btn, .public-voice-admin-actions .btn-del { padding: 5px 8px; }
.public-voice-pagination { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #e5e7eb; padding-top: 12px; }
.public-voice-page-controls { display: flex; align-items: center; gap: 8px; }
.public-voice-page-controls .btn { width: 36px; height: 36px; min-height: 36px; padding: 0; font-size: 22px; line-height: 1; }
.public-voice-modal { width: min(720px, calc(100% - 32px)); max-width: 720px; max-height: calc(100vh - 32px); overflow-y: auto; }
.public-voice-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.public-voice-media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.public-voice-media-item { min-width: 0; border: 1px solid #e5e7eb; border-radius: 7px; padding: 12px; background: #fafafa; }
.public-voice-media-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.public-voice-media-item audio { width: 100%; margin-top: 10px; }
.user-create-error.is-success { color: #047857; }
.system-setting-status { margin-top: 6px; color: #15803d; font-size: 12px; }
.system-setting-status.is-error { color: #dc2626; }
.image-human-admin-card { max-width: 1120px; }
.image-human-admin-status { margin: -3px 0 18px; padding: 10px 12px; border: 1px solid #dbe3ee; border-radius: 6px; color: #64748b; background: #f8fafc; font-size: 13px; line-height: 1.5; }
.image-human-admin-status.is-ready { border-color: #bbf7d0; color: #047857; background: #ecfdf5; }
.image-human-admin-status.is-warning { border-color: #fed7aa; color: #9a3412; background: #fff7ed; }
.image-human-admin-status.is-muted { border-color: #c7d2fe; color: #4338ca; background: #eef2ff; }
.image-human-admin-row { align-items: flex-start; }
.image-human-admin-row .field { flex: 1 1 190px; }
.image-human-admin-card .actions { margin-top: 6px; }

@media (max-width: 600px) {
  .image-human-admin-row { display: grid; grid-template-columns: 1fr; gap: 0; }
  .image-human-admin-row .field { width: 100%; }
}
.ai-tag-card { max-width: 1120px; }
.ai-tag-provider-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-tag-provider-choice { display: flex; align-items: center; gap: 10px; min-height: 62px; border: 1px solid #d9dce5; border-radius: 8px; padding: 12px 14px; background: #fff; cursor: pointer; }
.ai-tag-provider-choice:has(input:checked) { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,.12); }
.ai-tag-provider-choice input { width: 17px; height: 17px; accent-color: #4f46e5; flex: 0 0 auto; }
.ai-tag-provider-choice > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ai-tag-provider-choice strong { color: #1f2937; font-size: 14px; }
.ai-tag-provider-choice small { color: #6b7280; font-size: 12px; }
.ai-tag-preview-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; }
.ai-tag-preview-row .field { margin-bottom: 0; }
.ai-tag-preview-row .btn { min-width: 112px; margin-bottom: 1px; }
.ai-tag-preview-result { margin-top: 14px; border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4; color: #166534; padding: 11px 12px; font-size: 14px; font-weight: 600; line-height: 1.7; white-space: pre-line; }
.ai-tag-preview-result.is-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.ai-tag-preview-result[hidden] { display: none; }

/* ===== 素材库 ===== */
.resource-panel { min-width: 0; }
.resource-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.resource-name-field { flex: 1 1 240px; max-width: 480px; margin-bottom: 0; }
.resource-toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.resource-layout { display: grid; grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); min-height: 420px; margin-top: 18px; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.resource-sidebar { min-width: 0; border-right: 1px solid #e5e7eb; background: #f8fafc; }
.resource-tree { min-width: 0; padding: 8px; }
.resource-tree-row { min-width: 0; }
.resource-tree-root { min-width: 0; display: flex; align-items: center; gap: 2px; border-bottom: 1px solid #e5e7eb; padding-bottom: 6px; margin-bottom: 4px; }
.resource-tree-root-main { min-width: 0; flex: 1 1 auto; min-height: 44px; display: flex; align-items: center; gap: 7px; border: 0; border-radius: 6px; background: transparent; color: #334155; padding: 8px 8px; font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.resource-tree-root-main:hover { background: #eef2f7; }
.resource-tree-root-name { min-width: 0; flex: 1 1 auto; }
.resource-tree-root-action { flex: 0 0 34px; margin-right: 2px; }
.resource-tree-toggle { display: inline-flex; width: 14px; justify-content: center; color: #64748b; font-size: 20px; line-height: 1; transform: rotate(0deg); transition: transform .15s ease; }
.resource-tree-toggle.expanded { transform: rotate(90deg); }
.resource-tree-children { padding: 2px 0 0 14px; }
.resource-tree-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #cbd5e1; }
.resource-group-row { display: flex; align-items: center; gap: 2px; min-width: 0; border-radius: 6px; margin-bottom: 4px; }
.resource-group-row:hover { background: #eef2f7; }
.resource-group-row.active { background: #e0e7ff; }
.resource-group-main { min-width: 0; flex: 1 1 auto; min-height: 44px; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #334155; padding: 8px 6px 8px 10px; font: inherit; text-align: left; cursor: pointer; }
.resource-group-row.active .resource-group-main { color: #4338ca; font-weight: 600; }
.resource-group-main .resource-group-name { flex: 1 1 auto; }
.resource-group-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-group-count { flex: 0 0 auto; color: #94a3b8; font-size: 12px; font-weight: 400; }
.resource-row-actions { position: relative; flex: 0 0 36px; display: flex; gap: 2px; padding-right: 2px; }
.resource-tree-menu-trigger { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #94a3b8; font: inherit; font-size: 21px; line-height: 1; cursor: pointer; }
.resource-tree-menu-trigger:hover, .resource-tree-menu-trigger[aria-expanded="true"] { border-color: #c7d2fe; background: #fff; color: #4f46e5; }
.resource-tree-menu { z-index: 40; width: 150px; padding: 5px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .16); }
.resource-tree-menu button { width: 100%; min-height: 34px; display: flex; align-items: center; border: 0; border-radius: 4px; background: transparent; color: #334155; padding: 7px 10px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.resource-tree-menu button:hover { background: #f1f5f9; }
.resource-tree-menu button.danger { color: #dc2626; }
.resource-tree-menu button.danger:hover { background: #fef2f2; }
.resource-tree-children .resource-empty { padding-left: 0; }
.resource-icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #64748b; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.resource-icon-btn:hover { border-color: #cbd5e1; background: #fff; color: #334155; }
.resource-icon-btn:focus-visible { outline: 2px solid #4f46e5; outline-offset: 1px; }
.resource-icon-btn:disabled { opacity: .32; cursor: not-allowed; }
.resource-icon-btn.danger { color: #dc2626; }
.resource-icon-btn.danger:hover { border-color: #fecaca; background: #fef2f2; }
.resource-detail { min-width: 0; padding: 16px; background: #fff; }
.resource-detail-head { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
.resource-detail-head h2 { margin: 0 0 4px; color: #1f2937; font-size: 16px; font-weight: 600; }
.resource-media-list { padding-top: 12px; }
.resource-media-row { min-width: 0; display: grid; grid-template-columns: 96px minmax(150px, 1fr) auto; align-items: center; gap: 14px; min-height: 88px; padding: 10px 12px; border-bottom: 1px solid #edf0f4; }
.resource-media-row.bgmTrack { grid-template-columns: 44px minmax(150px, 1fr) minmax(220px, 280px) 44px; }
.resource-media-row:last-child { border-bottom: 0; }
.resource-media-row:hover { background: #fafbfc; }
.resource-media-preview { width: 84px; height: 68px; overflow: hidden; border-radius: 6px; background: #111827; }
.resource-media-preview video { width: 100%; height: 100%; display: block; object-fit: cover; }
.resource-media-info { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.resource-media-info strong { overflow: hidden; color: #334155; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.resource-media-info span { overflow: hidden; color: #94a3b8; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.resource-media-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.resource-media-row audio { width: min(280px, 30vw); height: 40px; }
.resource-audio-mark { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: #ecfdf5; color: #047857; font-size: 24px; }
.resource-empty { padding: 28px 12px; color: #94a3b8; font-size: 13px; text-align: center; }
.material-toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.material-field { flex: 1 1 220px; margin-bottom: 0; }
.material-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 0; }
.material-upload { display: inline-flex; align-items: center; justify-content: center; }
.material-upload.disabled { opacity: .55; cursor: not-allowed; }
.material-upload input { display: none; }
.material-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 18px; margin-top: 18px; min-height: 380px; }
.material-tree-panel { border: 1px solid #eee; border-radius: 8px; padding: 8px; max-height: 580px; overflow-y: auto; background: #fafafa; }
.material-tree { display: flex; flex-direction: column; gap: 4px; }
.material-tree-row { position: relative; display: flex; align-items: center; gap: 2px; min-width: 0; }
.material-tree-item { flex: 1 1 auto; min-width: 0; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: none; background: transparent; color: #444; padding: 9px 10px 9px calc(10px + var(--depth, 0) * 14px); border-radius: 8px; cursor: pointer; font: inherit; text-align: left; }
.material-tree-item:hover { background: #f0f2ff; }
.material-tree-item.active { background: #eef2ff; color: #4f46e5; font-weight: 600; }
.material-tree-leading { min-width: 0; display: flex; align-items: center; gap: 7px; }
.material-tree-toggle { display: inline-flex; width: 14px; justify-content: center; color: #888; font-size: 20px; line-height: 1; transform: rotate(0deg); transition: transform .15s ease; }
.material-tree-toggle.expanded { transform: rotate(90deg); }
.material-tree-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #cbd5e1; }
.material-tree-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-tree-count { flex: 0 0 auto; font-size: 12px; color: #888; }
.material-tree-menu-wrap { position: relative; flex: 0 0 32px; }
.material-tree-menu-trigger { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #94a3b8; font-size: 22px; line-height: 1; cursor: pointer; }
.material-tree-menu-trigger:hover,
.material-tree-menu-trigger[aria-expanded="true"] { border-color: #c7d2fe; background: #eef2ff; color: #4f46e5; }
.material-tree-menu { position: absolute; top: 34px; right: 0; z-index: 30; width: 132px; padding: 5px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .16); }
.material-tree-menu button { width: 100%; min-height: 34px; display: flex; align-items: center; border: none; border-radius: 4px; background: transparent; color: #334155; padding: 7px 10px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.material-tree-menu button:hover { background: #f1f5f9; }
.material-tree-menu button.danger { color: #dc2626; }
.material-tree-menu button.danger:hover { background: #fef2f2; }
.material-tree-menu-separator { height: 1px; margin: 4px 6px; background: #e5e7eb; }
.material-detail { min-width: 0; }
.material-detail-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #eee; }
.material-detail-title { font-size: 16px; font-weight: 600; color: #222; word-break: break-all; }
.material-detail-meta { color: #999; font-size: 12px; margin-top: 4px; }
.material-section { margin-bottom: 18px; }
.material-section-title { color: #666; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.material-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #eee; border-radius: 8px; background: #fff; font: inherit; text-align: left; margin-bottom: 8px; }
button.material-row { cursor: pointer; }
button.material-row:hover { border-color: #c7d2fe; background: #fafbff; }
.material-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.material-row-meta { flex: 0 0 auto; color: #888; font-size: 12px; }

.material-overlay,
.material-drawer-overlay { position: fixed; inset: 0; z-index: 130; background: rgba(15, 23, 42, .44); }
.material-overlay { display: flex; align-items: center; justify-content: center; padding: 20px; }
.material-dialog { width: min(520px, 100%); overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 18px 50px rgba(15, 23, 42, .24); }
.material-dialog-wide { width: min(560px, 100%); }
.material-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px 12px; }
.material-dialog-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.material-dialog-title h2 { margin: 0; color: #1f2937; font-size: 20px; font-weight: 600; }
.material-dialog-icon { width: 30px; height: 30px; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 19px; font-weight: 700; font-family: Arial, sans-serif; }
.material-dialog-icon.info { background: #4f46e5; }
.material-dialog-icon.warning { background: #f59e0b; }
.material-dialog-close { width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: #64748b; font-size: 28px; line-height: 1; cursor: pointer; }
.material-dialog-close:hover { color: #0f172a; }
.material-dialog-body { padding: 0 32px 18px; }
.material-dialog-body textarea,
.material-dialog-body input { width: 100%; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #1f2937; padding: 12px 14px; font: inherit; outline: none; }
.material-dialog-body textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.material-dialog-body textarea:focus,
.material-dialog-body input:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, .16); }
.material-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 0 32px 24px; }
.material-dialog-error { min-height: 18px; margin-top: 8px; color: #dc2626; font-size: 12px; }
.material-delete-question { margin: 4px 0 8px; color: #1f2937; font-size: 16px; }
.material-delete-message { margin: 0; color: #64748b; font-size: 13px; line-height: 1.6; }
.material-btn-warning { border-color: #f59e0b; background: #f59e0b; color: #fff; }
.material-btn-warning:hover { border-color: #d97706; background: #d97706; }

.material-drawer-overlay { display: flex; justify-content: flex-end; }
.material-drawer { width: min(500px, 100vw); min-height: 100%; display: flex; flex-direction: column; background: #fff; box-shadow: -16px 0 44px rgba(15, 23, 42, .18); }
.material-drawer-head { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid #e5e7eb; }
.material-drawer-head h2 { margin: 0; color: #1f2937; font-size: 20px; font-weight: 600; }
.material-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 24px 28px; }
.material-drawer-field { margin-bottom: 26px; }
.material-drawer-field > label { display: block; margin-bottom: 10px; color: #475569; font-size: 14px; }
.material-drawer-field select,
.material-drawer-field textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #1f2937; padding: 11px 13px; font: inherit; outline: none; }
.material-drawer-field select { min-height: 44px; }
.material-drawer-field textarea { min-height: 230px; resize: vertical; line-height: 1.6; }
.material-drawer-field select:focus,
.material-drawer-field textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, .16); }
.material-readonly-select { min-height: 44px; display: flex; align-items: center; border: 1px solid #dbe1ea; border-radius: 5px; background: #f8fafc; color: #64748b; padding: 10px 13px; }
.material-readonly-select-chevron { justify-content: space-between; gap: 12px; }
.material-readonly-select-chevron::after { content: ''; width: 8px; height: 8px; flex: 0 0 8px; border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; transform: rotate(45deg) translate(-2px, -2px); }
.material-dropzone { width: 100%; min-height: 174px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #cbd5e1; border-radius: 8px; background: #fbfdff; color: #64748b; padding: 24px; font: inherit; cursor: pointer; }
.material-dropzone:hover { border-color: #818cf8; background: #f8faff; }
.material-dropzone strong { color: #475569; font-size: 16px; font-weight: 500; }
.material-dropzone span:last-child { color: #94a3b8; font-size: 12px; text-align: center; }
.material-folder-icon { position: relative; width: 42px; height: 30px; border: 3px solid #94a3b8; border-radius: 5px; }
.material-folder-icon::before { content: ''; position: absolute; left: 2px; top: -9px; width: 17px; height: 8px; border: 3px solid #94a3b8; border-bottom: none; border-radius: 4px 4px 0 0; background: #fbfdff; }
.material-upload-icon { height: 44px; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 48px; line-height: 1; font-family: Arial, sans-serif; }
.material-drawer-actions { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 14px; padding: 18px 28px; border-top: 1px solid #e5e7eb; }
.material-drawer-actions .btn { min-width: 120px; }
.material-drawer-actions .btn:disabled { opacity: .5; cursor: not-allowed; }

.material-ai-tag-drawer { width: min(560px, 100vw); }
.material-ai-tag-copy-field { margin-bottom: 14px; }
.material-ai-tag-analyze-row { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.material-ai-tag-analyze-row .btn { min-width: 116px; }
.material-ai-tag-preview { margin-top: 18px; border: 1px solid #dbe1ea; border-radius: 6px; background: #fff; overflow: hidden; }
.material-ai-tag-preview-head { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #e5e7eb; background: #f8fafc; }
.material-ai-tag-preview-head h3 { margin: 0 0 3px; color: #1f2937; font-size: 15px; }
.material-ai-tag-preview-head span { color: #64748b; font-size: 12px; line-height: 1.5; }
.material-ai-tag-select-all { min-height: 40px; flex: 0 0 auto; border: 0; background: transparent; color: #4f46e5; padding: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.material-ai-tag-select-all:hover { color: #3730a3; text-decoration: underline; }
.material-ai-tag-select-all:focus-visible { outline: 2px solid #818cf8; outline-offset: 1px; }
.material-ai-tag-list { max-height: 430px; overflow-y: auto; }
.material-ai-tag-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; padding: 12px 14px 14px 8px; border-bottom: 1px solid #eef0f4; }
.material-ai-tag-row:last-child { border-bottom: 0; }
.material-ai-tag-row.is-existing { background: #f8fafc; }
.material-ai-tag-check { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.material-ai-tag-check:has(.material-ai-tag-checkbox:disabled) { cursor: not-allowed; }
.material-ai-tag-checkbox { width: 18px; height: 18px; margin: 0; accent-color: #4f46e5; cursor: pointer; }
.material-ai-tag-checkbox:disabled { cursor: not-allowed; }
.material-ai-tag-content { min-width: 0; }
.material-ai-tag-input { width: 100%; min-height: 40px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #1f2937; padding: 8px 10px; font: inherit; font-size: 14px; outline: none; }
.material-ai-tag-input:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, .14); }
.material-ai-tag-meta { min-height: 28px; display: flex; align-items: center; gap: 8px; color: #64748b; font-size: 12px; }
.material-ai-tag-state { border-radius: 4px; background: #ecfdf5; color: #047857; padding: 2px 6px; font-weight: 600; }
.material-ai-tag-row.is-existing .material-ai-tag-state { background: #f1f5f9; color: #64748b; }
.material-ai-tag-sources { color: #475569; font-size: 13px; }
.material-ai-tag-sources summary { width: fit-content; min-height: 32px; display: flex; align-items: center; color: #4f46e5; cursor: pointer; }
.material-ai-tag-sources ul { display: grid; gap: 7px; margin: 4px 0 0; padding: 10px 12px 10px 28px; border-left: 2px solid #e2e8f0; background: #f8fafc; color: #475569; line-height: 1.55; }
.material-ai-tag-sources li { overflow-wrap: anywhere; }

@media (max-width: 800px) {
  .production-summary { align-items: flex-start; flex-direction: column; }
  .production-summary-metrics { justify-content: flex-start; }
  .production-layout { grid-template-columns: 1fr; }
  .production-shot-list { max-height: 330px; border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .production-preview-frame { width: min(100%, 220px); }
  .layout { display: block; }
  .sidebar { position: static; width: 100%; height: auto; }
  .sidebar-logo { padding: 14px 16px; }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 8px; overflow: visible; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { min-width: 0; min-height: 44px; padding: 12px 14px; }
  .nav-item.active { border-left: none; border-bottom: 3px solid #818cf8; padding: 12px 14px 9px; }
  .sidebar-footer { display: none; }
  .content { min-width: 0; margin-left: 0; max-width: none; width: 100%; padding: 18px 14px; }
  .generation-tabs { width: 100%; margin-bottom: 18px; }
  .voice-config-tabs { width: 100%; overflow-x: auto; }
  .voice-config-tab { min-width: max-content; flex: 1 0 auto; }
  .generation-tab { flex: 1 1 50%; min-width: 0; }
  .batch-progress-head { flex-wrap: wrap; gap: 8px; }
  .batch-progress-current { white-space: normal; }
  .generation-task-item { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .generation-task-status-pill { grid-column: 2; grid-row: 1; }
  .generation-task-detail { grid-column: 1 / -1; text-align: left; }
  .card { padding: 16px; }
  #singleDraftCard { display: block; }
  #singleDraftCard > .smart-clip-picker { margin-top: 14px; padding: 14px 0 0; border-top: 1px solid #eef2f7; border-left: 0; }
  .form-row > .field:first-child { flex: 1 1 100%; }
  .field-sm { flex: 1 1 140px; }
  .create-material-picker { width: 100%; }
  .create-resource-actions { align-items: stretch; }
  .create-resource-field { flex: 1 1 calc(50% - 6px); max-width: none; }
  .create-parse-anchor { justify-content: center; }
  .create-parse-anchor .create-parse-button { flex: 0 0 auto; width: auto; }
  .batch-import-plan { grid-template-columns: 1fr; }
  .batch-import-layout { display: block; }
  .smart-clip-picker.batch-smart-clip-picker { margin-top: 18px; padding: 18px 0 0; border-top: 1px solid #eef2f7; border-left: 0; }
  .batch-import-preview-head { display: none; }
  .batch-import-row { grid-template-columns: 24px 28px minmax(0, 1fr); }
  .batch-import-row-status { grid-column: 3; text-align: left; }
  .adjustment-tools-head { align-items: flex-start; flex-direction: column; }
  .adjustment-workbench { display: block; min-height: 0; }
  .adjustment-preview-panel, .adjustment-timeline-panel, .adjustment-inspector { border-right: 0; }
  .adjustment-preview-panel, .adjustment-timeline-panel { border-bottom: 1px solid #e2e8f0; }
  .adjustment-preview-frame { width: min(100%, 220px); }
  .adjustment-timeline { max-height: none; }
  .adjustment-action-bar { grid-template-columns: 1fr; }
  .adjustment-action-buttons { width: 100%; }
  .adjustment-action-buttons .btn { flex: 1; }
  .nav-parent { grid-column: 1 / -1; min-width: 0; }
  .nav-parent-row { min-width: 0; min-height: 44px; }
  .nav-parent-link { padding: 12px 14px; }
  .nav-parent-link.active { border-bottom: 3px solid #818cf8; border-left: 0; padding: 12px 14px 9px; }
  .nav-parent-toggle { width: 44px; min-height: 44px; flex-basis: 44px; }
  .nav-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px 0 0 28px; }
  .nav-subitem { min-height: 44px; }
  .ai-tag-provider-selector, .ai-tag-preview-row { grid-template-columns: 1fr; }
  .ai-tag-preview-row .btn { width: 100%; min-height: 42px; margin-bottom: 0; }
  .resource-toolbar-actions { width: 100%; }
  .resource-toolbar-actions .btn { flex: 1 1 150px; }
  .resource-layout { grid-template-columns: 1fr; min-height: 0; }
  .resource-sidebar { border-right: 0; border-bottom: 1px solid #e5e7eb; }
  .resource-tree { max-height: 260px; overflow-y: auto; }
  .resource-detail { padding: 12px; }
  .resource-media-row { grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 10px 4px; }
  .resource-media-row.bgmTrack { grid-template-columns: 44px minmax(0, 1fr); }
  .resource-media-preview { width: 68px; height: 60px; }
  .resource-media-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .resource-media-row audio { grid-column: 1 / -1; width: 100%; }
  .resource-audio-mark { width: 44px; }
  .material-layout { grid-template-columns: 1fr; }
  .material-tree-panel { max-height: 280px; }
  .material-actions { width: 100%; }
  .material-actions .btn { flex: 1 1 140px; }
  .material-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .material-row-meta { white-space: normal; word-break: break-all; }
  .material-overlay { padding: 12px; }
  .material-dialog-head { padding: 18px 18px 10px; }
  .material-dialog-body { padding: 0 18px 14px; }
  .material-dialog-actions { padding: 0 18px 18px; }
  .material-drawer { width: 100%; }
  .material-drawer-head { padding: 0 18px; }
  .material-drawer-body { padding: 20px 18px; }
  .material-drawer-actions { padding: 14px 18px; }
  .material-drawer-actions .btn { min-width: 0; flex: 1 1 0; }
  .material-ai-tag-preview-head { align-items: flex-start; flex-direction: column; }
  .material-ai-tag-select-all { align-self: flex-end; }
  .voice-manager { width: calc(100% - 24px); height: calc(100vh - 24px); max-height: calc(100vh - 24px); padding: 20px; }
  .voice-manager .voice-profiles-list { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 10px; }
  .voice-manager .voice-profile-card, .voice-manager .voice-create-card { min-height: 0; height: 148px; }
  .voice-profile-card-body { padding-left: 2px; padding-right: 2px; }
  .voice-profile-menu { width: 148px; }
}
@media (max-width: 640px) {
  .talking-head-picker-field { flex-basis: 100%; }
  .talking-head-picker-panel { width: 100%; grid-template-columns: 145px minmax(0,1fr); }
  .talking-head-picker-group { grid-template-columns: 20px minmax(0,1fr) 12px; }
  .talking-head-picker-group small { display: none; }
  .talking-head-picker-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .talking-head-picker-search { width: 100%; }
  .talking-head-picker-children { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* ===== 设置弹窗 ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
body.voice-manager-open { overflow: hidden; }
.modal-content { background: #fff; border-radius: 12px; padding: 28px; width: 90%; max-width: 440px; max-height: calc(100vh - 40px); overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.modal-content h2 { font-size: 18px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.voice-manager { width: min(900px, calc(100% - 32px)); height: min(760px, calc(100vh - 32px)); max-width: 900px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; padding: 0; }
#voicePickerHost { width: 100%; display: flex; justify-content: center; }
.voice-library-host { min-height: 560px; }
.voice-library-host .voice-manager { width: 100%; max-width: none; height: min(720px, calc(100vh - 150px)); max-height: none; border: 1px solid #dbe3ee; border-radius: 8px; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.voice-manager[data-mode="library"] .voice-manager-head,
.voice-manager[data-mode="library"] .voice-manager-actions { display: none; }
.voice-manager[data-mode="library"] .voice-manager-tabs { padding-top: 6px; }
.voice-manager-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 24px 28px 16px; }
.voice-manager-head h2 { margin: 0; }
.voice-manager-close { width: 32px; height: 32px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #475569; cursor: pointer; font-size: 24px; line-height: 1; }
.voice-manager-close:hover { background: #f8fafc; color: #1f2937; }
.voice-manager-close:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.voice-manager-tabs { flex: 0 0 auto; display: flex; gap: 22px; min-height: 45px; padding: 0 28px; border-bottom: 1px solid #e5e7eb; }
.voice-manager-tab { position: relative; min-width: 88px; min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #64748b; padding: 0 8px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.voice-manager-tab:hover { color: #3730a3; }
.voice-manager-tab.active { border-bottom-color: #4f46e5; color: #3730a3; }
.voice-manager-tab:focus-visible { outline: 2px solid #818cf8; outline-offset: -3px; }
.voice-manager-panels { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 18px 28px 0; }
.voice-manager-panel { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.voice-manager-panel[hidden] { display: none; }
.voice-manager-actions { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 12px; margin: 0; padding: 16px 28px; border-top: 1px solid #e5e7eb; background: #fff; }
.voice-manager-actions .btn { min-width: 96px; }

/* ===== 设置页 ===== */
.settings-layout { display: grid; grid-template-columns: 180px minmax(0, 760px); gap: 22px; align-items: start; }
.settings-nav { padding: 6px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.settings-nav-item { width: 100%; min-height: 44px; border: 0; border-radius: 6px; background: transparent; color: #475569; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.settings-nav-item.active { background: #eef2ff; color: #3730a3; }
.settings-nav-item:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }
.settings-panel { border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; overflow: hidden; }
.settings-panel[hidden] { display: none; }
.settings-panel-head { padding: 22px 24px 18px; border-bottom: 1px solid #e5e7eb; }
.settings-panel-head h2 { margin: 0; color: #1f2937; font-size: 17px; }
.settings-panel-head p { margin: 5px 0 0; color: #64748b; font-size: 13px; }
.settings-version-row { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.settings-version-row > div { min-width: 0; display: grid; gap: 6px; }
.settings-label { color: #64748b; font-size: 12px; }
.settings-version-row strong { color: #1f2937; font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.settings-version-row .btn { min-width: 116px; min-height: 44px; }
.desktop-update-status { min-height: 44px; margin: 0; padding: 12px 24px; border-top: 1px solid #eef2f7; background: #f8fafc; color: #64748b; font-size: 13px; line-height: 1.5; }
.desktop-update-status.is-latest { color: #047857; background: #f0fdf4; }
.desktop-update-status.is-available,
.desktop-update-status.is-downloading { color: #4338ca; background: #eef2ff; }
.desktop-update-status.is-error { color: #b91c1c; background: #fef2f2; }
.download-settings-body { display: grid; gap: 12px; padding: 22px 24px; }
.download-folder-row { display: flex; align-items: center; gap: 16px; }
.download-folder-row strong { min-width: 0; flex: 1 1 auto; color: #1f2937; font-size: 15px; overflow-wrap: anywhere; }
.download-folder-row .btn { flex: 0 0 auto; min-width: 116px; min-height: 44px; }
.download-settings-body > p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.6; }
.download-folder-actions { display: flex; gap: 10px; margin-top: 4px; }
.download-settings-status { min-height: 44px; margin: 0; padding: 12px 24px; border-top: 1px solid #eef2f7; background: #f8fafc; color: #64748b; font-size: 13px; line-height: 1.5; }
.voice-clone-form { flex: 0 0 auto; padding: 14px 16px 16px; border: 1px solid #e0e7ff; border-radius: 8px; background: #fafbff; }
.voice-clone-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.voice-clone-form-head h3 { color: #1f2937; font-size: 15px; }
.voice-clone-form-close { width: 28px; height: 28px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #64748b; cursor: pointer; font-size: 20px; line-height: 1; }
.voice-clone-form-close:hover { color: #1f2937; background: #f8fafc; }
.voice-clone-form .field { margin-bottom: 10px; }
.voice-source-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.voice-clone-file-name { min-height: 20px; margin-top: 10px; color: #64748b; font-size: 13px; overflow-wrap: anywhere; }
.voice-clone-form audio { width: 100%; margin-top: 10px; }
.voice-clone-error { min-height: 20px; margin-top: 8px; color: #64748b; font-size: 13px; }
.voice-clone-error.error { color: #dc2626; }
.voice-clone-error.success { color: #047857; }
.voice-clone-form .modal-actions { margin-top: 12px; }
.voice-profiles-list { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); align-content: start; gap: 12px; margin-top: 16px; overflow-y: auto; padding: 2px 4px 4px 0; scrollbar-gutter: stable; }
.voice-profile-empty { grid-column: 1 / -1; padding: 18px 4px; text-align: center; }
.voice-create-card, .voice-profile-row, .voice-profile-card { width: 100%; max-width: 164px; min-width: 0; height: 164px; min-height: 0; border-radius: 10px; }
.voice-create-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px dashed #cbd5e1; background: #fff; color: #64748b; padding: 14px; font: inherit; font-size: 13px; cursor: pointer; }
.voice-create-card:hover { border-color: #818cf8; background: #f8faff; color: #4338ca; }
.voice-create-card:focus-visible, .voice-profile-card:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.voice-create-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; color: #94a3b8; font-size: 38px; font-weight: 300; line-height: 1; }
.voice-profile-card { position: relative; display: flex; flex-direction: column; gap: 10px; border: 1px solid #dbe3ee; background: #fff; color: #334155; padding: 12px; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.voice-profile-card:hover { border-color: #818cf8; background: #fafbff; box-shadow: 0 5px 14px rgba(79, 70, 229, .12); }
.voice-profile-card.is-unavailable { background: #fafafa; }
.voice-profile-card.is-renaming { height: auto; min-height: 164px; }
.voice-profile-card.is-selected { border-color: #4f46e5; background: #f5f3ff; box-shadow: inset 0 0 0 1px #4f46e5; }
.voice-profile-card.is-playing { border-color: #4f46e5; box-shadow: inset 0 0 0 1px #4f46e5, 0 5px 14px rgba(79, 70, 229, .12); }
.voice-profile-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.voice-profile-avatar { display: inline-flex; width: 54px; height: 54px; align-items: center; justify-content: center; border-radius: 50%; background: #39336b; color: #ede9fe; }
.voice-profile-wave { display: inline-flex; align-items: center; justify-content: center; gap: 2px; height: 24px; }
.voice-profile-wave i { display: block; width: 2px; border-radius: 2px; background: currentColor; }
.voice-profile-wave i:nth-child(1), .voice-profile-wave i:nth-child(7) { height: 7px; }
.voice-profile-wave i:nth-child(2), .voice-profile-wave i:nth-child(6) { height: 13px; }
.voice-profile-wave i:nth-child(3), .voice-profile-wave i:nth-child(5) { height: 19px; }
.voice-profile-wave i:nth-child(4) { height: 24px; }
.voice-profile-menu-wrap { position: relative; flex: 0 0 30px; }
.voice-profile-menu-trigger { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #94a3b8; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.voice-profile-menu-trigger:hover, .voice-profile-menu-trigger[aria-expanded="true"] { border-color: #c7d2fe; background: #eef2ff; color: #4f46e5; }
.voice-profile-menu { z-index: 160; width: 156px; padding: 5px; border: 1px solid #e5e7eb; border-radius: 7px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .16); }
.voice-profile-menu button { width: 100%; min-height: 34px; display: flex; align-items: center; border: 0; border-radius: 4px; background: transparent; color: #334155; padding: 7px 10px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.voice-profile-menu button:hover { background: #f1f5f9; }
.voice-profile-menu button.danger { color: #dc2626; }
.voice-profile-menu button.danger:hover { background: #fef2f2; }
.voice-profile-menu-separator { height: 1px; margin: 4px 6px; background: #e5e7eb; }
.voice-profile-card-body { min-width: 0; display: flex; flex: 1 1 auto; flex-direction: column; gap: 5px; }
.voice-profile-name { min-width: 0; display: flex; align-items: center; color: #1f2937; }
.voice-profile-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.voice-rename-input { min-width: 0; width: min(260px, 100%); padding: 7px 9px; border: 1px solid #a5b4fc; border-radius: 6px; font: inherit; }
.voice-profile-meta { display: flex; align-items: center; gap: 6px; min-height: 20px; font-size: 12px; }
.voice-status { color: #64748b; }
.voice-status.ready { color: #047857; }
.voice-status.processing { color: #b45309; }
.voice-status.failed, .voice-profile-error { color: #dc2626; }
.voice-default-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 6px; border-radius: 6px; background: #dcfce7; color: #047857; font-size: 11px; font-weight: 600; white-space: nowrap; }
.voice-profile-error { display: -webkit-box; overflow: hidden; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.voice-profile-preview { min-height: 38px; display: flex; align-items: flex-end; margin-top: auto; }
.voice-profile-preview-button { width: 100%; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e0e7ff; border-radius: 7px; background: #f8faff; color: #4338ca; font: inherit; font-size: 12px; cursor: pointer; }
.voice-profile-preview-button:hover, .voice-profile-preview-button[data-playing="true"] { border-color: #818cf8; background: #eef2ff; }
.voice-profile-preview-empty { width: 100%; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #eef2f7; border-radius: 7px; color: #94a3b8; font-size: 12px; }
.voice-profile-play-icon { position: relative; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; }
.voice-profile-preview-button[data-playing="true"] .voice-profile-play-icon { width: 10px; height: 12px; border: 0; background: linear-gradient(to right, currentColor 0 3px, transparent 3px 6px, currentColor 6px 9px); }
.voice-profile-audio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.voice-profile-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }
.voice-profile-rename { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.voice-profile-rename-actions { justify-content: flex-start; }
.public-voice-filters { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; min-width: 0; margin-bottom: 14px; }
.public-voice-categories { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.public-voice-categories::-webkit-scrollbar { display: none; }
.public-voice-category { flex: 0 0 auto; min-width: 56px; min-height: 44px; border: 0; border-radius: 6px; background: transparent; color: #64748b; padding: 0 13px; font: inherit; font-size: 13px; cursor: pointer; }
.public-voice-category:hover { background: #f1f5f9; color: #334155; }
.public-voice-category.active { background: #eef2ff; color: #3730a3; font-weight: 600; }
.public-voice-category:focus-visible { outline: 2px solid #818cf8; outline-offset: -2px; }
.public-voice-search { width: 224px; height: 44px; min-width: 0; flex: 0 0 224px; display: flex; align-items: center; gap: 8px; border: 1px solid #d8dee9; border-radius: 7px; background: #fff; color: #94a3b8; padding: 0 12px; }
.public-voice-search:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(79, 70, 229, .1); }
.public-voice-search input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: #334155; font: inherit; font-size: 13px; }
.public-voice-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 84px; align-content: start; gap: 12px; overflow-y: auto; padding: 2px 4px 8px 2px; scrollbar-gutter: stable; }
.public-voice-card { position: relative; width: 100%; height: 84px; min-width: 0; display: grid; grid-template-columns: 60px minmax(0, 1fr) 36px; align-items: center; gap: 11px; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; color: #334155; padding: 11px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.public-voice-card:hover { border-color: #a5b4fc; background: #fafbff; box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.public-voice-card:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.public-voice-card.is-selected { border-color: #4f46e5; background: #f5f3ff; box-shadow: inset 0 0 0 1px #4f46e5; }
.public-voice-card.is-playing { border-color: #0f766e; }
.public-voice-avatar { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 7px; background: #e2e8f0; color: #475569; }
.public-voice-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.public-voice-avatar-placeholder { height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.public-voice-avatar-placeholder i { width: 3px; border-radius: 3px; background: currentColor; }
.public-voice-avatar-placeholder i:nth-child(1), .public-voice-avatar-placeholder i:nth-child(5) { height: 10px; }
.public-voice-avatar-placeholder i:nth-child(2), .public-voice-avatar-placeholder i:nth-child(4) { height: 20px; }
.public-voice-avatar-placeholder i:nth-child(3) { height: 28px; }
.public-voice-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.public-voice-copy strong, .public-voice-copy small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-voice-copy strong { color: #1f2937; font-size: 14px; }
.public-voice-copy small { color: #7c8799; font-size: 12px; }
.public-voice-play { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe3ee; border-radius: 50%; background: #f8fafc; color: #4f46e5; }
.public-voice-play::before { width: 0; height: 0; margin-left: 3px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; content: ''; }
.public-voice-play::after { display: none; content: ''; }
.public-voice-card.is-playing .public-voice-play { border-color: #99f6e4; background: #ecfdf5; color: #0f766e; }
.public-voice-card.is-playing .public-voice-play::before, .public-voice-card.is-playing .public-voice-play::after { width: 3px; height: 12px; display: block; border: 0; background: currentColor; content: ''; }
.public-voice-card.is-playing .public-voice-play::before { margin-left: 0; margin-right: 3px; }
.public-voice-audio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.public-voice-preview-state { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe3ee; border-radius: 50%; background: #f8fafc; color: #64748b; font-size: 11px; }
.public-voice-preview-state.is-loading i { width: 15px; height: 15px; border: 2px solid #c7d2fe; border-top-color: #4f46e5; border-radius: 50%; animation: public-voice-spin .8s linear infinite; }
.public-voice-preview-state.is-error { border-radius: 6px; border-color: #fecaca; background: #fff7f7; color: #b91c1c; }
.public-voice-preview-state.is-unavailable { width: auto; min-width: 50px; height: 30px; padding: 0 6px; border-radius: 6px; background: #f8fafc; color: #94a3b8; }
.public-voice-more { flex: 0 0 auto; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 0 2px; }
.public-voice-visible-status { color: #64748b; font-size: 12px; }
.public-voice-more .btn { min-height: 36px; }
.public-voice-empty { grid-column: 1 / -1; padding: 28px 0; text-align: center; }

@keyframes public-voice-spin { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  .voice-manager { width: calc(100% - 24px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  .voice-manager-head { padding: 20px 20px 14px; }
  .voice-manager-tabs { padding: 0 20px; }
  .voice-manager-panels { padding: 16px 20px 0; }
  .voice-manager-actions { padding: 14px 20px; }
  .voice-manager .voice-profiles-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .voice-manager .voice-profile-card, .voice-manager .voice-create-card { max-width: none; min-height: 0; height: 148px; }
  .public-voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-library-host { min-height: 500px; }
  .voice-library-host .voice-manager { height: min(680px, calc(100dvh - 138px)); }
  .settings-layout { grid-template-columns: 1fr; gap: 12px; }
  .settings-nav { display: flex; }
  .settings-nav-item { width: auto; min-width: 96px; text-align: center; }
}

@media (max-width: 480px) {
  .voice-manager { width: calc(100% - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  .voice-manager-head { padding: 16px 16px 10px; }
  .voice-manager-close { width: 44px; height: 44px; }
  .voice-manager-tabs { gap: 8px; padding: 0 16px; }
  .voice-manager-tab { flex: 1 1 0; min-width: 0; }
  .voice-manager-panels { padding: 12px 16px 0; }
  .voice-manager-actions { padding: 12px 16px; }
  .voice-manager-actions .btn { min-width: 0; min-height: 44px; flex: 1 1 0; }
  .public-voice-filters { align-items: stretch; flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .public-voice-categories { width: 100%; flex: 0 0 auto; }
  .public-voice-category { min-width: 48px; padding: 0 10px; }
  .public-voice-search { width: 100%; flex: 0 0 44px; }
  .public-voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 154px; gap: 8px; padding-right: 2px; }
  .public-voice-card { height: 154px; grid-template-columns: 1fr; grid-template-rows: 56px minmax(38px, 1fr) 24px; justify-items: center; gap: 7px; padding: 10px 8px; }
  .public-voice-avatar { width: 56px; height: 56px; }
  .public-voice-copy { width: 100%; align-items: center; gap: 3px; text-align: center; }
  .public-voice-copy strong, .public-voice-copy small { max-width: 100%; }
  .public-voice-play { width: 28px; height: 28px; }
  .public-voice-preview-state { width: 28px; height: 28px; }
  .public-voice-more { justify-content: space-between; gap: 8px; }
  .voice-manager .voice-profile-card, .voice-manager .voice-create-card { height: 144px; }
  .voice-library-view .view-header { margin-bottom: 14px; }
  .voice-library-host { min-height: 460px; }
  .voice-library-host .voice-manager { width: 100%; height: calc(100dvh - 150px); max-height: none; border-radius: 6px; }
  .settings-panel-head { padding: 18px 16px 14px; }
  .settings-version-row { align-items: stretch; flex-direction: column; padding: 18px 16px; }
  .settings-version-row .btn { width: 100%; }
  .desktop-update-status { padding: 12px 16px; }
  .download-settings-body { padding: 18px 16px; }
  .download-folder-row { align-items: stretch; flex-direction: column; }
  .download-folder-row .btn { width: 100%; }
  .download-folder-actions { flex-direction: column; }
  .download-folder-actions .btn { width: 100%; }
  .download-settings-status { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-manager-tab, .public-voice-card { transition: none; }
  .batch-generate-button.is-submitting::before, .batch-generate-button.is-running::before, .batch-generate-button.is-uncertain::before { animation: none; }
  .public-voice-preview-state.is-loading i { animation: none; }
}
.config-section-title { margin: 4px 0 14px; padding-bottom: 8px; border-bottom: 1px solid #e5e7eb; font-size: 15px; }
.smart-clip-picker { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef2f7; }
.smart-clip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.smart-clip-title { margin: 0; color: #1f2937; font-size: 16px; line-height: 1.35; }
.smart-clip-status { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.smart-clip-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.smart-clip-scene-toolbar { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.smart-clip-scene-toolbar .smart-clip-tabs { flex: 1 1 auto; min-width: 0; margin: 0; }
.smart-clip-scene-toolbar #smartClipViewAllButton { flex: 0 0 auto; }
.smart-clip-tabs, .smart-clip-modal-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.smart-clip-tabs::-webkit-scrollbar, .smart-clip-modal-tabs::-webkit-scrollbar { display: none; }
.smart-clip-tab { min-height: 38px; flex: 0 0 auto; padding: 0 15px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #475569; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.smart-clip-tab:hover { border-color: #a5b4fc; color: #4338ca; }
.smart-clip-tab.active { border-color: #4f46e5; background: #eef2ff; color: #3730a3; font-weight: 600; }
.smart-clip-grid, .smart-clip-modal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.smart-clip-card { min-width: 0; display: grid; gap: 7px; padding: 0 0 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #334155; overflow: hidden; font: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.smart-clip-card:hover { border-color: #a5b4fc; box-shadow: 0 5px 14px rgba(79, 70, 229, .12); transform: translateY(-1px); }
.smart-clip-card.active { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, .16); }
.smart-clip-actions .btn:disabled { border-color: #cbd5e1; background: #f1f5f9; color: #94a3b8; cursor: not-allowed; opacity: 1; }
.smart-clip-cover { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; background: #e2e8f0; color: #64748b; font-size: 12px; }
.smart-clip-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.smart-clip-cover.is-placeholder, .smart-clip-cover.is-broken { background: #f1f5f9; }

.cover-picker { margin-top: 18px; padding: 16px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.cover-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cover-picker-head h3 { margin: 0; font-size: 16px; color: #1f2937; }
.cover-template-status { margin: 4px 0 0; color: #64748b; font-size: 12px; }
.cover-duration-field { display: flex; align-items: center; gap: 8px; color: #475569; font-size: 13px; white-space: nowrap; }
.cover-duration-field select, .batch-cover-plan-field select { min-width: 92px; }
.cover-template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.cover-template-card { display: flex; gap: 10px; width: 100%; padding: 8px; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; text-align: left; cursor: pointer; transition: border-color .16s, box-shadow .16s; }
.cover-template-card:hover, .cover-template-card.active { border-color: #2563eb; box-shadow: 0 0 0 2px #dbeafe; }
.cover-template-preview { width: 58px; height: 92px; flex: 0 0 58px; overflow: hidden; border-radius: 4px; background: #eef2f7; display: grid; place-items: center; }
.cover-template-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-template-none { color: #94a3b8; font-size: 12px; }
.cover-template-card-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 3px; }
.cover-template-card-copy strong { color: #1e293b; font-size: 13px; }
.cover-template-card-copy small { color: #64748b; line-height: 1.45; }
.cover-template-empty { padding: 14px; color: #94a3b8; font-size: 13px; }
.cover-copy-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cover-copy-fields label { display: flex; flex-direction: column; gap: 5px; color: #475569; font-size: 12px; }
.cover-copy-fields input { min-width: 0; }
.batch-cover-plan-field { min-width: 150px; }
.cover-admin-grid { display: grid; gap: 10px; }
.cover-admin-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef2f7; }
.cover-admin-item:last-child { border-bottom: 0; }
.cover-admin-thumb { width: 64px; height: 94px; display: grid; place-items: center; overflow: hidden; border-radius: 5px; background: #f1f5f9; color: #94a3b8; font-size: 11px; }
.cover-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-admin-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cover-admin-copy strong { color: #1f2937; }
.cover-admin-copy small, .cover-admin-copy span { color: #64748b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover-admin-actions { display: flex; gap: 6px; }
.cover-admin-upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.cover-admin-upload-row label { display: flex; flex-direction: column; gap: 5px; color: #475569; font-size: 12px; }
.cover-admin-upload-row input { font-size: 12px; }
.cover-editor-layout { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cover-editor-preview-panel { min-width: 0; }
.cover-editor-preview-head, .cover-editor-label-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cover-editor-preview-head { margin-bottom: 12px; color: #344054; font-size: 13px; font-weight: 700; }
.cover-preview-ratio { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #d8dee9; border-radius: 7px; background: #f4f6f9; }
.cover-preview-ratio button { min-width: 58px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: #667085; font: inherit; font-size: 12px; cursor: pointer; }
.cover-preview-ratio button:hover { color: #4f46e5; }
.cover-preview-ratio button.is-active { background: #fff; color: #4f46e5; box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.cover-preview-ratio button:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.cover-live-preview { position: relative; width: 100%; margin: 0 auto; overflow: hidden; border: 1px solid #cfd7e4; border-radius: 6px; background-color: #dce4ec; background-image: linear-gradient(45deg, #c9d3de 25%, transparent 25%, transparent 75%, #c9d3de 75%), linear-gradient(45deg, #c9d3de 25%, transparent 25%, transparent 75%, #c9d3de 75%); background-position: 0 0, 12px 12px; background-size: 24px 24px; box-shadow: 0 8px 20px rgba(15, 23, 42, .14); transition: width .2s ease, aspect-ratio .2s ease; }
.cover-live-preview.is-portrait { width: min(100%, 340px); aspect-ratio: 9 / 16; }
.cover-live-preview.is-landscape { width: 100%; max-width: 640px; aspect-ratio: 16 / 9; }
.cover-live-preview > img { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-live-empty { position: absolute; z-index: 0; inset: 0; display: grid; place-content: center; gap: 5px; color: #7c8798; text-align: center; }
.cover-live-empty[hidden] { display: none; }
.cover-live-empty span { font-size: 30px; font-weight: 300; line-height: 1; }
.cover-live-empty small { font-size: 11px; }
.cover-live-band { position: absolute; z-index: 1; overflow: visible; padding: 0; background-color: transparent; transition: inset .16s, width .16s, height .16s; }
.cover-live-band::after { content: ""; position: absolute; z-index: 2; inset: 0; border: 1px solid rgba(239, 68, 68, .86); border-radius: inherit; pointer-events: none; }
.cover-live-band-fill { position: absolute; z-index: 0; inset: 0; border-radius: inherit; background: #000; opacity: 1; pointer-events: none; transition: background-color .16s, opacity .16s, border-radius .16s; }
.cover-live-copy { position: absolute; z-index: 1; inset: 0; font-weight: 900; }
.cover-live-copy strong, .cover-live-copy small { position: absolute; display: block; max-width: calc(100% - 12px); line-height: 1.08; white-space: nowrap; transition: color .16s, left .16s, top .16s, font-size .16s, letter-spacing .16s, text-shadow .16s, -webkit-text-stroke .16s; }
.cover-live-copy small { line-height: 1.2; }
.cover-live-copy .is-editing::after { content: ""; position: absolute; inset: -4px -7px; border: 1px dashed rgba(34, 211, 238, .9); pointer-events: none; }
.cover-editor-preview-status { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; color: #64748b; font-size: 11px; }
.cover-editor-preview-status i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.cover-editor-controls { min-width: 0; padding: 15px 16px 14px; border: 1px solid #e0e6ef; border-radius: 8px; background: #fbfcfe; }
.cover-editor-group { padding: 0 0 14px; border-bottom: 1px solid #e8ecf2; }
.cover-editor-group + .cover-editor-group { padding-top: 14px; }
.cover-editor-group:last-child { padding-bottom: 0; border-bottom: 0; }
.cover-editor-group h3 { margin: 0 0 10px; color: #475467; font-size: 13px; }
.cover-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 13px; }
.cover-editor-field-full { grid-column: 1 / -1; min-width: 0; }
.cover-editor-description { margin-top: 11px; }
.cover-editor-grid .field { min-width: 0; }
.cover-editor-grid .field label, .cover-editor-toggle-row > span, .cover-editor-label-line label { color: #667085; font-size: 12px; }
.cover-editor-grid .field input, .cover-editor-grid .field select { min-width: 0; width: 100%; }
.cover-editor-label-line output { color: #526078; font-size: 11px; font-variant-numeric: tabular-nums; }
.cover-color-picker { position: relative; width: min(100%, 220px); margin-top: 7px; }
.cover-color-trigger { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 5px 8px; border: 1px solid #cfd7e4; border-radius: 6px; background: #fff; color: #344054; cursor: pointer; text-align: left; }
.cover-color-trigger:hover, .cover-color-trigger[aria-expanded="true"] { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, .13); }
.cover-color-trigger-swatch { width: 82px; height: 22px; flex: 0 0 82px; border: 1px solid rgba(15, 23, 42, .18); border-radius: 3px; background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.cover-color-trigger-value { min-width: 0; overflow: hidden; color: #475467; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.cover-color-trigger-chevron { margin-left: auto; color: #667085; font-size: 16px; line-height: 1; }
.cover-color-popover { position: absolute; z-index: 80; top: calc(100% + 8px); left: 0; width: 310px; padding: 12px; border: 1px solid #d9dee8; border-radius: 8px; background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, .2); }
.cover-color-tabs { display: flex; align-items: center; gap: 18px; min-height: 31px; border-bottom: 1px solid #edf0f5; }
.cover-color-tab { position: relative; min-height: 31px; padding: 0 0 8px; border: 0; background: transparent; color: #667085; font-size: 12px; cursor: pointer; }
.cover-color-tab.active { color: #06b6d4; font-weight: 700; }
.cover-color-tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #06b6d4; }
.cover-color-tab:disabled { color: #b4bdca; cursor: not-allowed; }
.cover-color-spectrum { position: relative; height: 142px; margin-top: 12px; overflow: hidden; border-radius: 5px; background-color: hsl(var(--cover-picker-hue, 0deg) 100% 50%); background-image: linear-gradient(to top, #000 0%, transparent 100%), linear-gradient(to right, #fff 0%, transparent 100%); cursor: crosshair; touch-action: none; }
.cover-color-spectrum:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.cover-color-spectrum-pointer { position: absolute; top: 0%; left: 0%; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(15, 23, 42, .45), 0 1px 3px rgba(15, 23, 42, .35); pointer-events: none; transform: translate(-50%, -50%); }
.cover-color-hue { width: 100%; height: 14px; margin: 12px 0 9px; appearance: none; border-radius: 7px; background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); cursor: pointer; }
.cover-color-hue::-webkit-slider-thumb { width: 16px; height: 16px; appearance: none; border: 2px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .45); }
.cover-color-hue::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .45); }
.cover-color-presets { display: flex; align-items: center; gap: 8px; padding: 8px 0 10px; border-top: 1px solid #edf0f5; }
.cover-color-preset { width: 28px; height: 28px; padding: 0; border: 2px solid #fff; border-radius: 5px; box-shadow: 0 0 0 1px #cfd7e4; cursor: pointer; }
.cover-color-preset:hover, .cover-color-preset.active { box-shadow: 0 0 0 2px #6366f1; }
.cover-color-preset.is-yellow { background: #f2cd50; }
.cover-color-preset.is-blue { background: #2c5cc2; }
.cover-color-preset.is-dark { background: #172033; }
.cover-color-preset.is-white { background: #fff; }
.cover-color-input-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 32px; align-items: center; gap: 7px; }
.cover-color-hex-label { color: #667085; font-size: 11px; font-weight: 700; }
.cover-color-hex { width: 100%; min-width: 0; height: 31px; padding: 0 8px; border: 1px solid #d0d5dd; border-radius: 5px; color: #344054; font-size: 12px; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.cover-color-hex:focus { border-color: #6366f1; outline: 0; box-shadow: 0 0 0 2px rgba(99, 102, 241, .13); }
.cover-color-input-row input[type="color"] { width: 32px; height: 32px; padding: 2px; border: 1px solid #cfd7e4; border-radius: 5px; background: #fff; cursor: pointer; }
.cover-editor-range-field { min-width: 0; }
.cover-editor-range-field input[type="range"] { width: 100%; margin-top: 8px; accent-color: #4f46e5; }
.cover-editor-range-scale { display: flex; justify-content: space-between; color: #98a2b3; font-size: 10px; }
.cover-band-settings { display: grid; gap: 16px; }
.cover-band-settings > .cover-editor-field-full { padding-bottom: 4px; }
.cover-band-control { display: grid; grid-template-columns: 78px minmax(120px, 1fr) 92px; align-items: center; gap: 12px; min-width: 0; }
.cover-band-control > label { color: #475467; font-size: 12px; }
.cover-band-control > input[type="range"] { width: 100%; min-width: 0; margin: 0; accent-color: #4f46e5; cursor: pointer; }
.cover-band-number { min-width: 0; height: 36px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; }
.cover-band-number:focus-within { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, .12); }
.cover-band-number input[type="number"] { width: 100%; min-width: 0; height: 34px; padding: 0 4px 0 10px; border: 0; outline: 0; color: #344054; font-size: 13px; font-variant-numeric: tabular-nums; }
.cover-band-number i { padding-right: 8px; color: #98a2b3; font-size: 11px; font-style: normal; pointer-events: none; }
.cover-editor-toggle-row { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.cover-editor-toggle { position: relative; width: 32px; height: 19px; padding: 0; border: 0; border-radius: 10px; background: #cbd5e1; cursor: pointer; }
.cover-editor-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .14s; }
.cover-editor-toggle.is-on { background: #4f46e5; }
.cover-editor-toggle.is-on::after { transform: translateX(13px); }
.cover-editor-enabled { margin-top: 16px; }
.cover-admin-card .card-head { align-items: flex-start; }
.cover-admin-grid { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.cover-admin-item { min-width: 220px; flex: 0 0 220px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.cover-admin-item:hover { border-color: #a8b9ff; box-shadow: 0 4px 14px rgba(37, 99, 235, .1); }
.cover-admin-thumb { width: 100%; height: 86px; grid-column: 1 / -1; border-radius: 7px; }
.cover-admin-copy { min-width: 0; }
.cover-admin-actions { justify-content: flex-end; }
.cover-editor-layout { grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); gap: 18px; }
.cover-editor-preview-panel { padding: 16px; border: 1px solid #e0e6ef; border-radius: 10px; background: #fff; }
.cover-live-preview { width: 100%; max-width: none; aspect-ratio: 16 / 9; }
.cover-editor-controls { max-height: calc(100vh - 130px); padding: 0; overflow-x: hidden; overflow-y: auto; background: #fff; }
.cover-editor-tabs { position: sticky; z-index: 12; top: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #e0e6ef; background: #fbfcfe; }
.cover-editor-tab { position: relative; min-height: 48px; border: 0; background: transparent; color: #667085; font-size: 13px; font-weight: 700; cursor: pointer; }
.cover-editor-tab:hover { color: #4f46e5; background: #f5f7ff; }
.cover-editor-tab.is-active { color: #4f46e5; background: #fff; }
.cover-editor-tab.is-active::after { content: ""; position: absolute; right: 18px; bottom: -1px; left: 18px; height: 3px; border-radius: 3px 3px 0 0; background: #4f46e5; }
.cover-editor-tab-panel { padding: 18px; border-bottom: 0; }
.cover-editor-tab-panel + .cover-editor-tab-panel { padding-top: 18px; }
.cover-editor-tab-panel.is-hidden { display: none; }
.cover-text-layer-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid #dbe1eb; border-radius: 7px; background: #f4f6f9; }
.cover-text-layer-switch button { min-height: 38px; border: 0; border-radius: 5px; background: transparent; color: #667085; font-size: 13px; font-weight: 700; cursor: pointer; }
.cover-text-layer-switch button.is-active { background: #fff; color: #4f46e5; box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.cover-text-layer-switch button:focus-visible, .cover-align-buttons button:focus-visible, .cover-text-presets button:focus-visible, .cover-module-reset:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.cover-text-module { border-top: 1px solid #e7eaf0; }
.cover-text-module:last-child { border-bottom: 1px solid #e7eaf0; }
.cover-text-module > summary { display: flex; align-items: center; min-height: 44px; color: #344054; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.cover-text-module > summary::-webkit-details-marker { display: none; }
.cover-text-module > summary::before { content: "›"; margin-right: 8px; color: #98a2b3; font-size: 17px; transform: rotate(0); transition: transform .16s; }
.cover-text-module[open] > summary::before { transform: rotate(90deg); }
.cover-module-reset { width: 32px; height: 32px; margin-left: auto; border: 0; border-radius: 5px; background: transparent; color: #667085; font-size: 17px; cursor: pointer; }
.cover-module-reset:hover { background: #f2f4f7; color: #4f46e5; }
.cover-text-module-body { display: grid; gap: 12px; padding: 2px 0 15px 25px; }
.cover-align-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #667085; font-size: 12px; }
.cover-align-buttons { display: flex; gap: 3px; padding: 3px; border-radius: 6px; background: #eef1f5; }
.cover-align-buttons button { width: 42px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.cover-align-buttons button.is-active { background: #fff; color: #4f46e5; box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.align-lines { width: 17px; height: 13px; display: flex; flex-direction: column; justify-content: space-between; }
.align-lines::before, .align-lines::after { content: ""; width: 100%; height: 2px; border-radius: 1px; background: currentColor; box-shadow: 0 5px 0 currentColor; }
.align-center { align-items: center; }
.align-right { align-items: flex-end; }
.align-left::after, .align-center::after, .align-right::after { width: 65%; }
.cover-text-presets { display: grid; grid-template-columns: repeat(6, 44px); gap: 9px; }
.cover-text-presets button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 2px solid transparent; border-radius: 7px; background: #28303b; cursor: pointer; }
.cover-text-presets button:hover, .cover-text-presets button.is-active { border-color: #06b6d4; box-shadow: 0 0 0 1px #06b6d4; }
.cover-text-presets span { color: #fff; font-size: 22px; font-weight: 900; line-height: 1; }
.cover-text-presets .preset-none { color: #98a2b3; text-decoration: line-through; }
.cover-text-presets .preset-white-black { color: #fff; -webkit-text-stroke: 2px #111; }
.cover-text-presets .preset-yellow-black { color: #ffd21f; -webkit-text-stroke: 2px #111; }
.cover-text-presets .preset-red-white { color: #ff334f; -webkit-text-stroke: 2px #fff; }
.cover-text-presets .preset-blue-white { color: #38a8ff; -webkit-text-stroke: 2px #fff; }
.cover-text-presets .preset-black-white { color: #111; -webkit-text-stroke: 2px #fff; }
.cover-text-presets .preset-pink-white { color: #f55291; -webkit-text-stroke: 2px #fff; }
.cover-text-presets .preset-cyan-black { color: #4dd7f4; -webkit-text-stroke: 2px #111; }
.cover-text-presets .preset-green-black { color: #7dcb37; -webkit-text-stroke: 2px #111; }
.cover-text-presets .preset-gold-brown { color: #ffe89a; -webkit-text-stroke: 2px #6b321c; }
.cover-text-presets .preset-white-blue { color: #fff; -webkit-text-stroke: 2px #2878d0; }
.cover-text-presets .preset-black-yellow { color: #111; -webkit-text-stroke: 2px #ffd600; }
.cover-size-row { display: grid; grid-template-columns: auto minmax(120px, 1fr) 86px; align-items: center; gap: 10px; color: #667085; font-size: 12px; }
.cover-size-row input[type="range"] { width: 100%; accent-color: #4f46e5; }
.cover-size-row input[type="number"] { width: 86px; min-height: 35px; }
.cover-text-module input[type="color"] { width: 100%; min-height: 35px; padding: 3px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; cursor: pointer; }
.cover-editor-tab-panel input[type="number"], .cover-editor-tab-panel input[type="text"], .cover-editor-tab-panel select { min-height: 35px; }
@media (max-width: 1100px) { .cover-editor-layout { grid-template-columns: 1fr; } .cover-editor-preview-panel { width: 100%; max-width: 680px; margin: 0 auto; } }
@media (max-width: 560px) { .cover-editor-grid { grid-template-columns: 1fr; } .cover-editor-field-full { grid-column: auto; } .cover-admin-upload-row { grid-template-columns: 1fr; } .cover-text-presets { grid-template-columns: repeat(4, 44px); } .cover-size-row { grid-template-columns: 1fr 82px; } .cover-size-row label { grid-column: 1 / -1; } .cover-band-control { grid-template-columns: 70px minmax(90px, 1fr) 82px; gap: 8px; } }

@media (max-width: 900px) {
  .cover-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cover-picker-head, .cover-copy-fields { grid-template-columns: 1fr; display: grid; }
  .cover-template-grid { grid-template-columns: 1fr; }
}
.smart-clip-card-name { min-width: 0; padding: 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.smart-clip-empty { grid-column: 1 / -1; min-height: 92px; display: grid; place-items: center; border: 1px dashed #cbd5e1; border-radius: 8px; color: #64748b; font-size: 13px; }
.smart-clip-modal-open { overflow: hidden; }
#smartClipTemplateModal { background: rgba(3, 7, 18, .76); }
.smart-clip-modal-content { width: min(1150px, calc(100% - 48px)); height: min(820px, calc(100vh - 48px)); display: flex; flex-direction: column; overflow: hidden; padding: 24px 28px 20px; border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; color: #1f2937; box-shadow: 0 24px 80px rgba(15, 23, 42, .18); }
.smart-clip-modal-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.smart-clip-modal-head h2 { margin: 0; color: #111827; font-size: 22px; }
.smart-clip-modal-head p { margin: 6px 0 0; color: #64748b; font-size: 13px; }
.smart-clip-modal-close { width: 38px; height: 38px; flex: 0 0 38px; border: 0; border-radius: 8px; background: transparent; color: #f8fafc; font-size: 28px; line-height: 1; cursor: pointer; }
.smart-clip-modal-close:hover { background: #1f2937; color: #fff; }
#smartClipTemplateModal .smart-clip-modal-close { color: #475569; }
#smartClipTemplateModal .smart-clip-modal-close:hover { background: #f1f5f9; color: #111827; }
.smart-clip-modal-grid { flex: 1 1 auto; min-height: 0; align-content: start; align-items: start; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(300px, 300px); row-gap: 22px; column-gap: 18px; overflow-y: auto; padding: 22px 4px 12px 0; scrollbar-color: #cbd5e1 transparent; }
.smart-clip-modal-grid .smart-clip-card { position: relative; display: block; box-sizing: border-box; height: 300px; aspect-ratio: auto; padding: 0; border: 1px solid #e2e8f0; border-radius: 18px; background: #f8fafc; color: #1f2937; overflow: hidden; }
.smart-clip-modal-grid .smart-clip-card:hover { border-color: #a5b4fc; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); transform: translateY(-2px); }
.smart-clip-modal-grid .smart-clip-card.active { border-color: #818cf8; box-shadow: 0 0 0 2px rgba(129, 140, 248, .7); }
.smart-clip-modal-grid .smart-clip-cover { width: 100%; height: 100%; aspect-ratio: auto; border-radius: inherit; background: #e2e8f0; }
.smart-clip-modal-grid .smart-clip-card-meta { position: absolute; right: 0; bottom: 0; left: 0; display: grid; gap: 3px; padding: 52px 14px 14px; border-radius: 0 0 17px 17px; background: linear-gradient(transparent, rgba(0, 0, 0, .88)); text-align: left; }
.smart-clip-modal-grid .smart-clip-card-meta strong { overflow: hidden; color: #fff; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.smart-clip-modal-grid .smart-clip-card-meta small { color: #cbd5e1; font-size: 11px; }
.smart-clip-preview-open { overflow: hidden; }
#smartClipPreviewModal { background: rgba(3, 7, 18, .78); z-index: 110; }
.smart-clip-preview-content { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; padding: 20px; border: 1px solid #263244; border-radius: 16px; background: #111827; color: #f8fafc; box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
.smart-clip-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.smart-clip-preview-head h2 { min-width: 0; overflow: hidden; margin: 0; color: #f8fafc; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.smart-clip-preview-stage { min-height: 0; display: grid; place-items: center; gap: 10px; padding: 16px 0 12px; }
.smart-clip-preview-video { display: block; width: min(100%, 320px); max-height: calc(100vh - 180px); aspect-ratio: 9 / 16; object-fit: contain; border-radius: 10px; background: #020617; box-shadow: 0 12px 28px rgba(0, 0, 0, .34); }
.smart-clip-preview-status { min-height: 20px; max-width: 100%; color: #94a3b8; font-size: 12px; line-height: 1.5; text-align: center; }
.smart-clip-preview-footer { display: flex; justify-content: flex-end; padding-top: 4px; }
.smart-clip-preview-footer .btn { width: auto; min-width: 88px; margin-top: 0; }
.batch-result { margin-top: 16px; border-top: 1px solid #eee; padding-top: 14px; }
.batch-result-summary { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; color: #666; }
.batch-result-summary .btn { margin-left: auto; }
.batch-result-summary strong { color: #222; }
.batch-result-previews { margin-top: 14px; }
.batch-result-previews-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #334155; font-size: 13px; }
.batch-result-previews-head span { color: #64748b; font-size: 12px; }
.batch-result-video-grid { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; justify-content: flex-start; gap: 12px; }
.batch-result-video-card { flex: 0 0 160px; width: 160px; max-width: 160px; min-width: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .05); }
.batch-result-video-frame { aspect-ratio: 9 / 16; overflow: hidden; background: #111827; }
.batch-result-video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #111827; }
.batch-result-video-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 9px 10px 10px; }
.batch-result-video-meta strong { min-width: 0; overflow: hidden; color: #334155; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.batch-result-video-meta span { color: #94a3b8; font-size: 11px; text-align: right; }
.batch-result-video-meta .btn { grid-column: 1 / -1; width: 100%; min-height: 32px; margin-top: 3px; }
.batch-result-more { display: block; min-height: 38px; margin: 14px auto 0; }
.batch-result-list { display: grid; gap: 6px; }
.batch-result-item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; background: #fafafa; border-radius: 6px; font-size: 13px; }
.batch-result-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-result-item-error { color: #dc2626; text-align: right; }

/* ===== 全驱动数字人 ===== */
.image-human-notice { margin: -4px 0 16px; padding: 11px 14px; border: 1px solid #fed7aa; border-radius: 6px; background: #fff7ed; color: #9a3412; font-size: 13px; line-height: 1.5; }
.image-human-workbench { display: grid; grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 20px; }
.image-human-image-panel, .image-human-compose, .image-human-library-panel { min-width: 0; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.image-human-image-panel { padding: 20px; }
.image-human-compose { grid-column: 1 / -1; padding: 20px; }
.image-human-library-panel { min-height: 0; overflow: hidden; }
.image-human-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.image-human-image-panel > .image-human-panel-head, .image-human-compose > .image-human-panel-head { padding-bottom: 16px; border-bottom: 1px solid #edf0f4; }
.image-human-library-head { align-items: center; padding: 18px 20px; border-bottom: 1px solid #edf0f4; }
.image-human-panel-head h2 { color: #172033; font-size: 16px; font-weight: 700; }
.image-human-panel-head p { margin-top: 4px; color: #7c879b; font-size: 12px; line-height: 1.5; }
.image-human-library-head .btn { flex: 0 0 auto; min-height: 38px; }
.image-human-control-section { padding: 18px 0; border-bottom: 1px solid #edf0f4; }
.image-human-image-control-section { padding-bottom: 0; border-bottom: 0; }
.image-human-settings-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .85fr) minmax(0, 1.15fr); gap: 18px; align-items: start; padding-top: 18px; }
.image-human-sound-section, .image-human-settings-meta, .image-human-prompt-field { min-width: 0; }
.image-human-sound-section .image-human-control-label { margin-bottom: 10px; }
.image-human-settings-meta .image-human-inline-fields { margin-top: 0; }
.image-human-control-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.image-human-control-label label { color: #334155; font-size: 13px; font-weight: 700; }
.image-human-control-label span { color: #94a3b8; font-size: 11px; }
.image-human-upload-stage { position: relative; width: 100%; min-height: 220px; display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; border: 1px dashed #cbd5e1; border-radius: 6px; background: #f8fafc; color: #64748b; padding: 0; font: inherit; cursor: pointer; }
.image-human-upload-stage:hover { border-color: #818cf8; background: #f7f7ff; }
.image-human-upload-stage:focus-visible, .image-human-audio-picker:focus-visible, .image-human-voice-picker:focus-visible, .image-human-image-select:focus-visible, .image-human-image-delete:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.image-human-upload-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; background: #f8fafc; }
.image-human-upload-stage > span { display: grid; justify-items: center; gap: 6px; text-align: center; }
.image-human-upload-stage b { width: 38px; height: 38px; display: inline-grid; place-items: center; margin-bottom: 2px; border-radius: 6px; background: #e0e7ff; color: #4338ca; font-size: 24px; font-weight: 400; line-height: 1; }
.image-human-upload-stage strong { color: #475569; font-size: 14px; font-weight: 700; }
.image-human-upload-stage small { color: #94a3b8; font-size: 12px; }
.image-human-selected-file { min-height: 18px; margin-top: 8px; overflow: hidden; color: #64748b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.image-human-source-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.image-human-source-tabs label { flex: 1 1 0; min-width: 0; }
.image-human-source-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.image-human-source-tabs span { min-height: 42px; display: grid; place-items: center; padding: 9px 8px; border: 1px solid #dbe3ee; border-radius: 6px; background: #f8fafc; color: #64748b; font-size: 13px; text-align: center; cursor: pointer; }
.image-human-source-tabs input:checked + span { border-color: #818cf8; background: #eef2ff; color: #3730a3; font-weight: 600; }
.image-human-source-tabs input:focus-visible + span { outline: 2px solid #818cf8; outline-offset: 2px; }
.image-human-audio-picker { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px dashed #cbd5e1; border-radius: 6px; background: #fff; color: #64748b; font: inherit; text-align: left; cursor: pointer; }
.image-human-audio-picker:hover { border-color: #818cf8; background: #f8faff; }
.image-human-audio-picker > span { display: inline-flex; width: 25px; height: 25px; align-items: center; justify-content: center; border-radius: 5px; background: #eef2ff; color: #4f46e5; font-size: 18px; line-height: 1; }
.image-human-audio-picker strong { min-width: 0; overflow: hidden; color: #475569; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.image-human-control-section audio { width: 100%; height: 38px; margin-top: 10px; }
.image-human-voice-picker { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #334155; padding: 10px 12px; font: inherit; text-align: left; cursor: pointer; }
.image-human-voice-picker:hover { border-color: #818cf8; background: #f8faff; }
.image-human-voice-picker.has-selection { border-color: #a5b4fc; background: #f5f7ff; }
.image-human-voice-picker > span { min-width: 0; display: grid; gap: 3px; }
.image-human-voice-picker strong, .image-human-voice-picker small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-human-voice-picker strong { color: #334155; font-size: 13px; }
.image-human-voice-picker small { color: #94a3b8; font-size: 11px; font-weight: 400; }
.image-human-voice-picker > b { flex: 0 0 auto; color: #818cf8; font-size: 22px; font-weight: 400; }
.image-human-text-field { position: relative; min-width: 0; margin-top: 12px; }
.image-human-text-field > label { display: block; margin-bottom: 7px; color: #334155; font-size: 13px; font-weight: 700; }
.image-human-text-field > label span { color: #94a3b8; font-size: 11px; font-weight: 400; }
.image-human-text-field textarea { width: 100%; min-height: 118px; resize: vertical; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #1e293b; padding: 10px 12px 28px; font: inherit; font-size: 13px; line-height: 1.65; }
.image-human-text-field textarea:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .11); }
.image-human-text-field textarea:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
.image-human-script-field { grid-column: 1 / -1; margin-top: 0; }
.image-human-character-count { position: absolute; right: 10px; bottom: 9px; color: #94a3b8; font-size: 11px; line-height: 1; pointer-events: none; }
.image-human-character-count b { color: #64748b; font-weight: 600; }
.image-human-inline-fields { display: grid; grid-template-columns: minmax(120px, .75fr) minmax(0, 1.25fr); gap: 12px; margin-top: 18px; }
.image-human-inline-fields .field { margin-bottom: 0; }
.image-human-inline-fields .field label { color: #334155; font-weight: 700; }
.image-human-inline-fields input, .image-human-inline-fields select { min-height: 42px; border-color: #dbe3ee; border-radius: 6px; color: #334155; }
.image-human-prompt-field { margin-top: 0; }
.image-human-prompt-field textarea { min-height: 92px; }
.image-human-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 0; padding-top: 16px; border-top: 1px solid #edf0f4; }
.image-human-form-status { min-height: 20px; color: #64748b; font-size: 13px; line-height: 1.5; }
.image-human-form-status.success { color: #047857; }
.image-human-form-status.error { color: #dc2626; }
.image-human-actions .btn { flex: 0 0 auto; min-width: 156px; }
.image-human-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; min-height: 340px; align-content: start; padding: 18px; }
.image-human-image-card { position: relative; min-width: 0; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid #dbe3ee; border-radius: 6px; background: #e9eef5; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.image-human-image-card:hover { border-color: #a5b4fc; }
.image-human-image-card.selected { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, .16); }
.image-human-image-select { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; border: 0; background: transparent; padding: 0; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.image-human-image-select:disabled { cursor: wait; }
.image-human-image-select img { width: 100%; height: 100%; display: block; object-fit: cover; background: #eef2f7; }
.image-human-image-card-shade { position: absolute; right: 0; bottom: 0; left: 0; height: 42%; background: linear-gradient(to top, rgba(15, 23, 42, .86), rgba(15, 23, 42, 0)); pointer-events: none; }
.image-human-image-card-name { position: absolute; right: 10px; bottom: 9px; left: 10px; overflow: hidden; color: #fff; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(15, 23, 42, .7); }
.image-human-image-selected { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #4f46e5; color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 2px 6px rgba(15, 23, 42, .2); }
.image-human-image-delete { position: absolute; top: 4px; right: 4px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .93); color: #64748b; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 7px rgba(15, 23, 42, .14); }
.image-human-image-delete:hover:not(:disabled) { background: #fef2f2; color: #dc2626; }
.image-human-image-delete:disabled { cursor: wait; opacity: .75; }
.image-human-library-empty { grid-column: 1 / -1; min-height: 300px; display: grid; align-content: center; justify-items: center; gap: 6px; color: #94a3b8; font-size: 12px; text-align: center; }
.image-human-library-empty strong { color: #64748b; font-size: 14px; }
.image-human-library-empty span { max-width: 230px; line-height: 1.5; }
.image-human-library-empty.is-error { color: #dc2626; }
.image-human-button-spinner { width: 13px; height: 13px; display: inline-block; margin-right: 4px; vertical-align: -2px; border: 2px solid #c7d2fe; border-top-color: #4f46e5; border-radius: 50%; animation: image-human-spin .8s linear infinite; }
@keyframes image-human-spin { to { transform: rotate(360deg); } }

/* PSD layout: keep these rules inside the upper design shell so task history stays unchanged. */
.image-human-design-shell { --image-human-accent: #635bff; --image-human-accent-soft: #eef0ff; margin: -4px -4px 0; padding: 4px; }
.image-human-hero { position: relative; min-height: 168px; display: flex; align-items: center; overflow: hidden; margin-bottom: 14px; padding: 20px 48% 18px 28px; border: 1px solid #e1e6f4; border-radius: 8px; background: #f4f7ff; box-shadow: 0 3px 14px rgba(32, 47, 78, .06); }
.image-human-hero-copy { position: relative; z-index: 2; min-width: 0; }
.image-human-hero-badge { width: fit-content; min-height: 25px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid #e0e3ff; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #5354d8; font-size: 11px; font-weight: 700; box-shadow: 0 2px 8px rgba(75, 81, 167, .08); }
.image-human-hero-badge svg { width: 13px; height: 13px; fill: var(--image-human-accent); stroke: none; }
.image-human-hero-copy h1 { margin: 7px 0 0; color: #111936; font-size: 32px; line-height: 1.08; letter-spacing: 0; }
.image-human-hero-copy h1 span { color: var(--image-human-accent); }
.image-human-hero-copy p { margin: 7px 0 0; color: #64718c; font-size: 12px; line-height: 1.55; }
.image-human-features { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.image-human-feature { display: inline-flex; align-items: center; gap: 7px; color: #5f6c84; font-size: 11px; white-space: nowrap; }
.image-human-feature b { width: 15px; height: 15px; display: inline-grid; flex: 0 0 15px; place-items: center; border-radius: 50%; background: #8485ff; color: #fff; font-size: 9px; line-height: 1; }
.image-human-hero-art { position: absolute; z-index: 1; right: 0; bottom: 0; width: 51%; height: 100%; display: block; object-fit: cover; object-position: right center; pointer-events: none; }
.image-human-refresh { position: absolute; z-index: 4; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid #dfe4ee; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #65708a; cursor: pointer; }
.image-human-refresh:hover { border-color: #b7bef6; color: var(--image-human-accent); }
.image-human-refresh:focus-visible { outline: 2px solid var(--image-human-accent); outline-offset: 2px; }
.image-human-refresh svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.image-human-design-shell .image-human-notice { margin: 0 0 14px; }
.image-human-design-shell .image-human-workbench { grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); gap: 14px; margin-bottom: 0; }
.image-human-design-shell .image-human-image-panel,
.image-human-design-shell .image-human-compose,
.image-human-design-shell .image-human-library-panel { border-color: #e1e6ef; box-shadow: 0 3px 13px rgba(37, 49, 82, .055); }
.image-human-design-shell .image-human-image-panel { padding: 16px 18px 14px; }
.image-human-design-shell .image-human-panel-head { align-items: center; justify-content: flex-start; gap: 10px; }
.image-human-design-shell .image-human-panel-head > div { min-width: 0; }
.image-human-design-shell .image-human-panel-head h2 { font-size: 15px; }
.image-human-design-shell .image-human-panel-head p { margin-top: 2px; font-size: 11px; }
.image-human-design-shell .image-human-panel-icon { width: 32px; height: 32px; display: grid; flex: 0 0 32px; place-items: center; border-radius: 7px; background: var(--image-human-accent-soft); color: var(--image-human-accent); }
.image-human-design-shell .image-human-panel-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.image-human-design-shell .image-human-format { margin-left: auto; color: #8e9ab1; font-size: 11px; white-space: nowrap; }
.image-human-design-shell .image-human-image-panel > .image-human-panel-head { padding-bottom: 10px; border-bottom: 0; }
.image-human-design-shell .image-human-control-section { padding: 0; }
.image-human-design-shell .image-human-upload-stage { min-height: 126px; aspect-ratio: auto; border-color: #d4daeb; background: #fbfcff; }
.image-human-design-shell .image-human-upload-stage b { background: #eceeff; color: #5d5fe9; }
.image-human-design-shell .image-human-selected-file { margin-top: 6px; }
.image-human-design-shell .image-human-library-panel { min-height: 0; }
.image-human-design-shell .image-human-library-head { min-height: 59px; padding: 12px 16px; }
.image-human-design-shell .image-human-library-head .btn { margin-left: auto; border-color: #7775ff; color: #5554dc; background: #fff; }
.image-human-design-shell .image-human-library-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); grid-auto-rows: 126px; gap: 10px; min-height: 145px; max-height: 170px; overflow-x: auto; overflow-y: hidden; padding: 12px 16px 14px; }
.image-human-design-shell .image-human-image-card { height: 126px; aspect-ratio: auto; }
.image-human-design-shell .image-human-image-delete { width: 32px; height: 32px; font-size: 18px; }
.image-human-design-shell .image-human-library-empty { min-height: 120px; }
.image-human-design-shell .image-human-compose { padding: 14px 18px 16px; }
.image-human-design-shell .image-human-compose > .image-human-panel-head { padding-bottom: 10px; }
.image-human-design-shell .image-human-settings-grid { grid-template-columns: minmax(260px, 1.05fr) minmax(250px, .9fr) minmax(300px, 1.25fr); gap: 12px 24px; padding-top: 12px; }
.image-human-design-shell .image-human-source-tabs { margin-bottom: 10px; }
.image-human-design-shell .image-human-source-tabs span { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.image-human-design-shell .image-human-source-tabs svg,
.image-human-design-shell .image-human-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.image-human-design-shell .image-human-audio-picker { min-height: 48px; }
.image-human-design-shell .image-human-inline-fields { grid-template-columns: minmax(110px, .72fr) minmax(0, 1.28fr); gap: 14px; }
.image-human-design-shell .image-human-text-field { margin-top: 0; }
.image-human-design-shell .image-human-prompt-field textarea { min-height: 94px; }
.image-human-design-shell .image-human-script-field { grid-column: 1 / 3; }
.image-human-design-shell .image-human-script-field textarea { min-height: 72px; }
.image-human-design-shell .image-human-actions { grid-column: 3; flex-direction: column; align-items: stretch; align-self: end; justify-content: flex-end; min-height: 72px; padding-top: 0; border-top: 0; }
.image-human-design-shell .image-human-form-status { width: 100%; overflow-wrap: anywhere; }
.image-human-design-shell .image-human-actions .btn { width: 100%; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-color: transparent; background: #6558f6; box-shadow: 0 8px 18px rgba(99, 88, 246, .22); }
.image-human-design-shell .image-human-actions .btn:hover:not(:disabled) { background: #5748eb; }
.image-human-design-shell .image-human-actions .btn:disabled { box-shadow: none; }
.image-human-design-shell .image-human-form-status:empty { display: none; }
.image-human-tasks-section { margin-top: 24px; }
.image-human-tasks-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.image-human-tasks-head h2 { color: #172033; font-size: 18px; }
.image-human-tasks-head p { margin-top: 5px; line-height: 1.5; }
.image-human-task-total { flex: 0 0 auto; color: #64748b; font-size: 12px; }
.image-human-task-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) 150px; gap: 10px; align-items: center; margin-bottom: 14px; }
.image-human-task-filters { display: flex; gap: 8px; min-width: 0; }
.image-human-task-filters button { min-height: 40px; padding: 8px 13px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #64748b; font: inherit; font-size: 13px; cursor: pointer; }
.image-human-task-filters button:hover { border-color: #a5b4fc; color: #4338ca; }
.image-human-task-filters button:focus-visible, .image-human-task-pagination button:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.image-human-task-filters button.active { border-color: #6366f1; background: #eef2ff; color: #3730a3; font-weight: 700; }
.image-human-task-filters button span { margin-left: 3px; color: #94a3b8; font-size: 11px; }
.image-human-task-filters button.active span { color: #6366f1; }
.image-human-task-search { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #94a3b8; }
.image-human-task-search:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .11); }
.image-human-task-search svg { width: 17px; height: 17px; flex: 0 0 17px; }
.image-human-task-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #334155; font: inherit; font-size: 13px; }
.image-human-task-sort { min-height: 40px; display: flex; align-items: center; gap: 7px; padding-left: 10px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #94a3b8; font-size: 12px; }
.image-human-task-sort select { min-width: 0; flex: 1; height: 38px; border: 0; outline: 0; background: transparent; color: #475569; font: inherit; font-size: 13px; }
.image-human-task-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pic-lipsync-workbench { grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); }
.pic-lipsync-view { --pic-accent: #5b5ce2; --pic-accent-soft: #eef0ff; }
.pic-lipsync-hero { position: relative; min-height: 168px; display: flex; align-items: center; overflow: hidden; margin-bottom: 14px; padding: 24px 390px 24px 24px; border: 1px solid #dfe5f2; border-radius: 8px; background: #f7f9ff; box-shadow: 0 3px 14px rgba(32, 47, 78, .06); }
.pic-lipsync-hero-copy { position: relative; z-index: 2; min-width: 0; }
.pic-lipsync-title-row { display: flex; align-items: flex-start; gap: 14px; }
.pic-lipsync-title-row h1 { margin: 0; color: #17213c; font-size: 28px; line-height: 1.15; letter-spacing: 0; }
.pic-lipsync-title-row p { max-width: 620px; margin: 7px 0 0; color: #63708a; font-size: 13px; line-height: 1.6; }
.pic-lipsync-title-icon { width: 48px; height: 48px; flex: 0 0 48px; overflow: hidden; border-radius: 8px; box-shadow: 0 5px 14px rgba(91, 92, 226, .13); }
.pic-lipsync-title-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic-lipsync-features { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0 62px; }
.pic-lipsync-feature { min-height: 30px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid #e3e7ef; border-radius: 6px; background: #fff; color: #5c6880; font-size: 11px; box-shadow: 0 2px 7px rgba(32, 47, 78, .04); }
.pic-lipsync-feature svg { width: 14px; height: 14px; fill: none; stroke: var(--pic-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pic-lipsync-hero-art { position: absolute; z-index: 1; right: 34px; bottom: 10px; width: min(350px, 34%); aspect-ratio: 900 / 262; overflow: hidden; }
.pic-lipsync-hero-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pic-lipsync-refresh { position: absolute; z-index: 4; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid #dfe4ee; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #65708a; cursor: pointer; }
.pic-lipsync-refresh:hover { border-color: #b7bef6; color: var(--pic-accent); }
.pic-lipsync-refresh:focus-visible { outline: 2px solid var(--pic-accent); outline-offset: 2px; }
.pic-lipsync-refresh svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pic-lipsync-view .image-human-notice { margin: 0 0 14px; }
.pic-lipsync-media-grid { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); gap: 14px; align-items: stretch; }
.pic-lipsync-media-grid > section { min-height: 330px; }
.pic-lipsync-media-grid .image-human-image-panel { padding: 18px; }
.pic-lipsync-media-grid .image-human-image-panel > .image-human-panel-head { padding-bottom: 13px; }
.pic-lipsync-media-grid .image-human-upload-stage { min-height: 205px; aspect-ratio: auto; }
.pic-lipsync-media-grid .image-human-library-grid { min-height: 270px; max-height: 390px; overflow-y: auto; }
.pic-lipsync-section-head { display: flex; align-items: flex-start; }
.pic-lipsync-section-head > div { min-width: 0; flex: 1; }
.pic-lipsync-section-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 7px; background: var(--pic-accent-soft); color: var(--pic-accent); }
.pic-lipsync-section-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pic-lipsync-format { align-self: center; color: #94a3b8; font-size: 11px; white-space: nowrap; }
.pic-lipsync-compose { margin-top: 14px; padding: 18px; }
.pic-lipsync-compose > .image-human-panel-head { padding-bottom: 13px; }
.pic-lipsync-compose-grid { grid-template-columns: minmax(220px, .9fr) minmax(260px, 1fr) minmax(280px, 1.15fr); gap: 14px; padding-top: 14px; }
.pic-lipsync-mode-select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #334155; font: inherit; font-size: 13px; }
.pic-lipsync-mode-select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .11); }
.pic-lipsync-audio-label { margin-top: 18px; }
.pic-lipsync-compose-grid .image-human-text-field textarea { min-height: 106px; }
.pic-lipsync-compose-grid .image-human-prompt-field { grid-column: 3; grid-row: 1; align-self: end; }
.pic-lipsync-compose-grid .image-human-prompt-field textarea { min-height: 58px; height: 58px; }
.pic-lipsync-compose-grid .image-human-actions { order: 5; }
.pic-lipsync-tasks { margin-top: 14px; padding: 18px; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.pic-lipsync-tasks .image-human-tasks-head { align-items: center; }
.pic-lipsync-tasks .image-human-task-empty { min-height: 180px; border-top: 1px solid #edf0f4; }
.pic-lipsync-tasks .image-human-task-empty::before { content: ""; width: 38px; height: 30px; margin: 0 auto 2px; border-radius: 6px; background: linear-gradient(#e8edf6 0 5px, transparent 5px 11px, #e8edf6 11px 16px, transparent 16px 22px, #e8edf6 22px 27px); }
.pic-lipsync-task-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.image-human-task-item { min-width: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(15, 23, 42, .05); }
.image-human-task-item:hover { border-color: #c7d2fe; box-shadow: 0 5px 14px rgba(15, 23, 42, .08); }
.image-human-task-item.success { border-color: #bbf7d0; }
.image-human-task-item.failed, .image-human-task-item.uncertain { border-color: #fecaca; }
.image-human-task-preview { position: relative; display: grid; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; background: #111827; }
.image-human-task-preview video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: #111827; }
.image-human-task-preview-empty { width: 100%; height: 100%; display: grid; align-content: center; justify-items: center; gap: 5px; padding: 18px; color: #cbd5e1; text-align: center; }
.image-human-task-preview-empty span { font-size: 13px; font-weight: 700; }
.image-human-task-preview-empty small { max-width: 100%; overflow: hidden; color: #94a3b8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.image-human-task-duration { position: absolute; right: 7px; bottom: 7px; padding: 3px 6px; border-radius: 4px; background: rgba(15, 23, 42, .82); color: #fff; font-size: 11px; line-height: 1; pointer-events: none; }
.image-human-task-body { padding: 11px 12px 12px; }
.image-human-task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.image-human-task-head strong { min-width: 0; overflow: hidden; color: #334155; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.image-human-task-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 4px; background: #eef2ff; color: #4338ca; font-size: 12px; font-weight: 600; }
.image-human-task-item.success .image-human-task-status { background: #ecfdf5; color: #047857; }
.image-human-task-item.failed .image-human-task-status, .image-human-task-item.uncertain .image-human-task-status { background: #fef2f2; color: #dc2626; }
.image-human-task-subtitle { margin-top: 5px; color: #94a3b8; font-size: 12px; }
.image-human-task-facts { display: flex; align-items: center; gap: 12px; margin-top: 9px; color: #64748b; font-size: 11px; }
.image-human-task-facts span, .image-human-task-facts time { min-width: 0; display: inline-flex; align-items: center; gap: 4px; }
.image-human-task-facts time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-human-task-facts svg { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.image-human-task-progress { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: #eef2f7; }
.image-human-task-progress > div { height: 100%; min-width: 0; border-radius: inherit; background: #6366f1; transition: width .2s ease; }
.pic-lipsync-waiting > div { animation: pic-lipsync-wait 1.6s ease-in-out infinite alternate; }
@keyframes pic-lipsync-wait { from { transform: translateX(-100%); } to { transform: translateX(285%); } }
@media (prefers-reduced-motion: reduce) { .pic-lipsync-waiting > div { animation: none; } }
.image-human-task-item.success .image-human-task-progress > div { background: #10b981; }
.image-human-task-item.failed .image-human-task-progress > div, .image-human-task-item.uncertain .image-human-task-progress > div { background: #ef4444; }
.image-human-task-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; color: #64748b; font-size: 11px; }
.image-human-task-meta span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-human-task-empty { grid-column: 1 / -1; min-height: 220px; display: grid; place-content: center; gap: 6px; color: #94a3b8; text-align: center; }
.image-human-task-empty strong { color: #64748b; font-size: 14px; }
.image-human-task-empty span { font-size: 12px; }
.image-human-task-pagination { min-height: 40px; display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.image-human-task-pagination:empty { display: none; }
.image-human-task-pagination button { width: 40px; height: 40px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: #64748b; font: inherit; font-size: 13px; cursor: pointer; }
.image-human-task-pagination button:hover:not(:disabled) { border-color: #a5b4fc; color: #4338ca; }
.image-human-task-pagination button.active { border-color: #6366f1; background: #6366f1; color: #fff; font-weight: 700; }
.image-human-task-pagination button:disabled { cursor: not-allowed; opacity: .4; }

@media (max-width: 1160px) {
  .image-human-workbench { grid-template-columns: 1fr; }
  .image-human-library-panel { min-height: 0; }
  .image-human-library-grid { min-height: 280px; }
  .image-human-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-human-task-toolbar { grid-template-columns: 1fr 1fr; }
  .image-human-task-filters { grid-column: 1 / -1; }
  .image-human-task-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pic-lipsync-compose-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pic-lipsync-compose-grid .image-human-prompt-field { grid-column: 1 / -1; grid-row: auto; align-self: start; }
  .image-human-design-shell .image-human-workbench { grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr); }
  .image-human-design-shell .image-human-settings-grid { grid-template-columns: minmax(230px, 1fr) minmax(210px, .9fr) minmax(260px, 1.1fr); }
}

@media (max-width: 800px) {
  .image-human-settings-grid { grid-template-columns: 1fr; }
  .image-human-hero { min-height: 0; padding: 20px; }
  .image-human-hero-art { display: none; }
  .image-human-hero-copy h1 { font-size: 28px; }
  .image-human-design-shell .image-human-workbench,
  .image-human-design-shell .image-human-settings-grid { grid-template-columns: 1fr; }
  .image-human-design-shell .image-human-script-field,
  .image-human-design-shell .image-human-actions { grid-column: 1; }
  .pic-lipsync-hero { min-height: 0; padding: 20px; }
  .pic-lipsync-hero-art { display: none; }
  .pic-lipsync-features { margin-left: 0; }
  .pic-lipsync-media-grid { grid-template-columns: 1fr; }
  .pic-lipsync-media-grid > section { min-height: 0; }
  .pic-lipsync-compose-grid { grid-template-columns: 1fr; }
  .pic-lipsync-compose-grid .image-human-prompt-field { grid-column: auto; }
  .image-human-actions { align-items: stretch; flex-direction: column; }
  .image-human-form-status { width: 100%; }
  .image-human-actions .btn { width: 100%; }
  .image-human-task-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .image-human-image-panel, .image-human-compose { padding: 14px; }
  .image-human-library-head { align-items: flex-start; padding: 14px; }
  .image-human-library-head .btn { padding-inline: 10px; }
  .image-human-inline-fields { grid-template-columns: 1fr; }
  .image-human-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 230px; padding: 12px; }
  .image-human-library-empty { min-height: 210px; }
  .image-human-source-tabs { gap: 6px; }
  .image-human-source-tabs span { padding-inline: 5px; font-size: 12px; }
  .image-human-tasks-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .image-human-task-toolbar { grid-template-columns: 1fr; }
  .image-human-task-filters { grid-column: auto; overflow-x: auto; padding-bottom: 3px; }
  .image-human-task-filters button { flex: 0 0 auto; }
  .image-human-task-list { grid-template-columns: 1fr; }
  .pic-lipsync-task-list { grid-template-columns: 1fr; }
  .pic-lipsync-title-row h1 { font-size: 23px; }
  .pic-lipsync-title-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .pic-lipsync-feature { flex: 1 1 150px; }
  .pic-lipsync-media-grid .image-human-library-grid { min-height: 230px; }
  .pic-lipsync-compose, .pic-lipsync-tasks { padding: 14px; }
  .pic-lipsync-format { display: none; }
  .image-human-design-shell { margin-inline: 0; padding-inline: 0; }
  .image-human-hero { padding: 18px 16px; }
  .image-human-features { gap: 8px 12px; }
  .image-human-feature { white-space: normal; }
  .image-human-design-shell .image-human-image-panel,
  .image-human-design-shell .image-human-compose { padding: 14px; }
  .image-human-design-shell .image-human-library-grid { grid-template-columns: repeat(3, minmax(92px, 1fr)); grid-auto-flow: column; grid-auto-columns: 92px; overflow-x: auto; }
  .image-human-design-shell .image-human-format { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .image-human-button-spinner { animation: none; }
}

/* ===== 登录页 ===== */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 24px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { width: min(400px, 100%); min-height: 568px; background: #fff; padding: 36px 40px; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.login-box h1 { font-size: 26px; text-align: center; margin-bottom: 4px; overflow-wrap: anywhere; }
.login-sub { color: #777; font-size: 14px; text-align: center; margin-bottom: 22px; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; min-height: 42px; margin-bottom: 22px; padding: 4px; border: 1px solid #e5e7eb; border-radius: 8px; background: #f3f4f6; }
.auth-tab { min-width: 0; border: 0; border-radius: 6px; background: transparent; color: #64748b; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.auth-tab:hover { color: #3730a3; }
.auth-tab.active { background: #fff; color: #4338ca; box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.auth-tab:focus-visible { outline: 2px solid #818cf8; outline-offset: 1px; }
.auth-form { min-height: 302px; }
.auth-confirm[hidden] { display: none; }
.remember-account { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 8px; color: #475569; font-size: 14px; cursor: pointer; user-select: none; }
.remember-account input { width: 16px; height: 16px; margin: 0; accent-color: #4f46e5; cursor: pointer; }
.remember-account[hidden] { display: none; }
.login-btn { width: 100%; margin-top: 8px; padding: 12px; }
.login-btn:disabled { cursor: wait; opacity: .68; }
.login-err { color: #dc2626; font-size: 13px; text-align: center; margin-top: 14px; min-height: 18px; }

@media (max-width: 480px) {
  .login-page { align-items: flex-start; padding: 16px; }
  .login-box { min-height: 0; padding: 28px 22px; }
  .auth-form { min-height: 294px; }
}

/* ===== 后台页 ===== */
.admin-topbar { background: #1e1e2e; color: #fff; padding: 12px 28px; display: flex; justify-content: space-between; align-items: center; }
.admin-topbar h1 { font-size: 18px; }
.admin-security-warning { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; border: 1px solid #f59e0b; border-left: 4px solid #d97706; border-radius: 6px; background: #fffbeb; color: #78350f; padding: 14px 16px; }
.admin-security-warning strong { display: block; margin-bottom: 3px; font-size: 14px; }
.admin-security-warning p { margin: 0; font-size: 13px; line-height: 1.5; }
.admin-security-warning .btn { flex: 0 0 auto; min-height: 40px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stat-num { font-size: 32px; font-weight: 700; color: #4f46e5; }
.stat-label { color: #888; font-size: 13px; margin-top: 4px; }
.cloud-service-card { margin-bottom: 24px; }
.cloud-service-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cloud-service-head h2 { margin: 0 0 4px; font-size: 17px; }
.cloud-service-head p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.cloud-capability-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 18px; border-top: 1px solid #e5e7eb; }
.cloud-capability-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 13px 12px 0 0; font-size: 13px; }
.cloud-capability-list strong { flex: 0 0 auto; color: #64748b; font-size: 12px; }
.cloud-capability-list strong.is-ready { color: #15803d; }
.cloud-capability-list strong.is-unavailable { color: #b45309; }
.cloud-provider-header { max-width: 1120px; align-items: flex-start; }
.cloud-provider-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 7px; color: #64748b; font-size: 12px; }
.cloud-provider-meta strong { color: #334155; font-weight: 600; }
.cloud-provider-form { width: 100%; max-width: 1120px; overflow: hidden; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; }
.cloud-provider-section { padding: 22px 24px; border-bottom: 1px solid #e5e7eb; }
.cloud-provider-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.cloud-provider-section-head h2 { color: #1f2937; font-size: 16px; }
.cloud-provider-section-head > span { color: #64748b; font-size: 12px; }
.cloud-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.cloud-provider-grid .field { min-width: 0; margin-bottom: 16px; }
.cloud-provider-field-wide { grid-column: 1 / -1; }
.cloud-provider-subsection + .cloud-provider-subsection { margin-top: 6px; padding-top: 20px; border-top: 1px solid #eef2f7; }
.cloud-provider-subsection h3 { margin-bottom: 12px; color: #475569; font-size: 14px; }
.cloud-secret-control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(116px, auto); align-items: center; gap: 10px; }
.cloud-secret-control input { min-width: 0; }
.cloud-key-status { min-width: 116px; color: #64748b; font-size: 12px; text-align: right; white-space: nowrap; }
.cloud-key-status.is-configured { color: #15803d; }
.cloud-secret-clear { width: fit-content; min-height: 32px; display: inline-flex !important; align-items: center; gap: 7px; margin: 3px 0 0 !important; color: #64748b !important; cursor: pointer; font-size: 12px !important; font-weight: 400 !important; }
.cloud-secret-clear input { width: 16px !important; height: 16px; margin: 0; padding: 0; accent-color: #b91c1c; cursor: pointer; }
.cloud-provider-footer { display: grid; grid-template-columns: 1fr; align-items: end; gap: 0 20px; padding: 22px 24px; background: #f8fafc; }
.cloud-provider-actions { display: flex; justify-content: flex-end; gap: 10px; }
.cloud-provider-actions .btn { min-width: 142px; min-height: 42px; }
.cloud-provider-status { grid-column: 1 / -1; min-height: 20px; margin-top: 12px; color: #475569; font-size: 13px; line-height: 1.5; }
.cloud-provider-status.is-error { color: #b91c1c; }
.cloud-provider-status.is-success { color: #15803d; }
.software-release-current-card,
.software-release-publish-card,
.software-release-history-card { max-width: 1120px; }
.software-release-current { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.software-release-current > div { min-width: 0; padding: 14px 16px; border-right: 1px solid #e5e7eb; background: #f8fafc; }
.software-release-current > div:last-child { border-right: 0; }
.software-release-current span,
.software-release-staged span { display: block; margin-bottom: 5px; color: #64748b; font-size: 12px; }
.software-release-current strong { display: block; overflow-wrap: anywhere; color: #1f2937; font-size: 15px; }
.software-release-fields { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(280px, 1.45fr); gap: 16px; }
.software-release-fields .field { margin-bottom: 10px; }
.software-release-mandatory { width: fit-content; margin: 2px 0 14px; }
.software-release-mandatory small { color: #b45309; font-size: 12px; font-weight: 400; }
.software-release-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px; align-items: center; gap: 12px; min-height: 22px; margin: 6px 0 14px; }
.software-release-progress-row progress { width: 100%; height: 10px; accent-color: #4f46e5; }
.software-release-progress-row span { color: #475569; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.software-release-staged { display: grid; grid-template-columns: minmax(120px, .55fr) minmax(140px, .65fr) minmax(280px, 1.8fr); gap: 16px; padding: 14px 16px; border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4; }
.software-release-staged strong,
.software-release-staged code { color: #166534; font-size: 13px; }
.software-release-hash { min-width: 0; }
.software-release-hash code { display: block; overflow-wrap: anywhere; font-family: Consolas, monospace; }
.software-release-message { min-height: 20px; margin-top: 12px; color: #475569; font-size: 13px; line-height: 1.5; }
.software-release-message.is-error { color: #b91c1c; }
.software-release-message.is-success { color: #15803d; }
.model-interface-panels { min-width: 0; }
.model-interface-panel { display: none; }
.model-interface-panel.is-active { display: block; }
.model-interface-panel .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.model-interface-description { margin: 5px 0 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.model-interface-status { flex: 0 0 auto; color: #b45309; font-size: 12px; font-weight: 600; }
.model-interface-status.is-ready { color: #15803d; }
.model-interface-fixed-note { margin-top: 4px; color: #64748b; font-size: 12px; line-height: 1.5; }
.model-interface-fixed-note strong { color: #334155; }
.model-channel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.model-channel-actions [data-model-action-status] { min-height: 20px; color: #64748b; font-size: 13px; }
.model-channel-actions [data-model-action-status].is-success { color: #15803d; }
.model-channel-actions [data-model-action-status].is-error { color: #b91c1c; }
.model-diagnostic,
.model-catalog { margin-top: 18px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.model-diagnostic { padding: 14px 16px; background: #f8fafc; }
.model-diagnostic-head,
.model-catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.model-diagnostic h3,
.model-catalog h3 { margin: 0; color: #1f2937; font-size: 14px; }
.model-diagnostic p { margin: 5px 0 0; color: #64748b; font-size: 13px; line-height: 1.5; }
.model-diagnostic p.is-ready { color: #15803d; }
.model-diagnostic p.is-error { color: #b91c1c; }
.model-catalog { overflow: hidden; }
.model-catalog-head { padding: 14px 16px; border-bottom: 1px solid #e2e8f0; }
.model-catalog-head span { color: #64748b; font-size: 12px; }
.model-catalog-table-wrap { overflow-x: auto; }
.model-catalog-table { min-width: 620px; }
.model-catalog-table td { vertical-align: middle; }
.model-catalog-table td:first-child strong { overflow-wrap: anywhere; }
.model-enable-switch { display: inline-flex; align-items: center; gap: 7px; color: #475569; font-size: 12px; white-space: nowrap; cursor: pointer; }
.model-enable-switch input { width: 15px; height: 15px; margin: 0; accent-color: #4f46e5; }
.model-enable-switch input:disabled { cursor: not-allowed; }
.model-active-badge { display: inline-flex; margin-left: 8px; padding: 2px 6px; border-radius: 4px; background: #ecfdf5; color: #047857; font-size: 11px; font-weight: 600; white-space: nowrap; }
.model-delete-button { padding: 5px 10px; border: 1px solid #fecaca; border-radius: 6px; background: #fff; color: #dc2626; font: inherit; font-size: 12px; cursor: pointer; }
.model-delete-button:hover:not(:disabled) { background: #fef2f2; }
.model-delete-button:disabled { border-color: #e2e8f0; color: #94a3b8; cursor: not-allowed; }
.model-legacy-config { display: none !important; }
.model-routing-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 13px 15px; border: 1px solid #c7d2fe; border-left: 3px solid #6366f1; border-radius: 7px; background: #eef2ff; color: #475569; font-size: 13px; line-height: 1.5; }
.model-routing-notice strong { flex: 0 0 auto; color: #3730a3; }
.model-routing-notice span { min-width: 0; flex: 1 1 auto; }
.model-routing-notice .btn { flex: 0 0 auto; white-space: nowrap; }
.software-release-table-wrap { overflow-x: auto; }
.software-release-table { min-width: 820px; }
.software-release-table td { vertical-align: middle; }
.software-release-table td:first-child strong { display: inline-block; margin-right: 7px; }
.software-release-file { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.software-release-state,
.software-release-force { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.software-release-state.is-staged { background: #eef2ff; color: #4338ca; }
.software-release-state.is-published { background: #ecfdf5; color: #047857; }
.software-release-state.is-superseded { background: #f1f5f9; color: #475569; }
.software-release-state.is-withdrawn,
.software-release-state.is-unknown { background: #fef2f2; color: #b91c1c; }
.software-release-force { min-height: 20px; padding: 2px 6px; background: #fff7ed; color: #c2410c; }
.admin-section { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; }
.admin-section h2 { font-size: 16px; margin-bottom: 14px; }
.user-table { width: 100%; font-size: 14px; }
.user-table th, .user-table td { text-align: left; padding: 10px; border-bottom: 1px solid #f0f0f0; }
.role-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.role-admin { background: #fee2e2; color: #dc2626; }
.role-user { background: #dbeafe; color: #2563eb; }

/* 后台数据表格 */
.data-table { width: 100%; font-size: 14px; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 12px; background: #f9fafb; color: #666; font-weight: 600; font-size: 13px; border-bottom: 1px solid #eee; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
.user-row-actions { white-space: nowrap; }
.user-action-button { min-width: 52px; padding: 5px 10px; border: 1px solid #c7d2fe; border-radius: 6px; background: #fff; color: #4f46e5; font: inherit; font-size: 12px; cursor: pointer; }
.user-action-button + .user-action-button { margin-left: 6px; }
.user-action-button:hover:not(:disabled) { background: #eef2ff; }
.user-action-button.delete { border-color: #fecaca; color: #dc2626; }
.user-action-button.delete:hover:not(:disabled) { background: #fef2f2; }
.user-action-button:disabled { opacity: .45; cursor: not-allowed; }

.user-create-modal { max-width: 480px; }
.user-create-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.user-create-head h2 { margin: 0; }
.user-create-close { width: 32px; height: 32px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #475569; cursor: pointer; font-size: 24px; line-height: 1; }
.user-create-close:hover { background: #f8fafc; color: #1f2937; }
.user-create-form .field { margin-bottom: 12px; }
.user-create-error { min-height: 20px; margin-top: 4px; color: #dc2626; font-size: 13px; }
.user-create-form .modal-actions { margin-top: 16px; }
.user-create-form .modal-actions .btn { min-width: 92px; }
.user-edit-modal { max-width: 480px; }
.user-edit-form .field { margin-bottom: 12px; }
.user-edit-form input[readonly] { background: #f8fafc; color: #64748b; }
.user-edit-hint { margin-top: -2px; color: #64748b; font-size: 12px; line-height: 1.5; }
.user-edit-form .modal-actions { margin-top: 16px; }
.user-edit-form .modal-actions .btn { min-width: 92px; }

/* 后台列表项 */
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid #f0f0f0; gap: 12px; }
.list-item:last-child { border-bottom: none; }
.list-item .muted { font-size: 12px; }
.hint { font-size: 12px; color: #999; margin-top: 4px; }

@media (max-width: 900px) {
  .public-voice-toolbar { grid-template-columns: 1fr 1fr; }
  .public-voice-toolbar .field:first-child { grid-column: 1 / -1; }
  .software-release-current { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .software-release-current > div:nth-child(2) { border-right: 0; }
  .software-release-current > div:nth-child(-n+2) { border-bottom: 1px solid #e5e7eb; }
  .software-release-staged { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .software-release-hash { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .model-diagnostic-head,
  .model-catalog-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .model-diagnostic-head .btn { width: 100%; min-height: 40px; }
  .model-channel-actions .btn { flex: 1 1 140px; }
  .admin-security-warning { align-items: stretch; flex-direction: column; gap: 10px; }
  .admin-security-warning .btn { width: 100%; min-height: 44px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cloud-service-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .cloud-capability-list { grid-template-columns: 1fr 1fr; }
  #view-users .card { overflow: hidden; }
  #view-users .data-table { table-layout: fixed; font-size: 12px; }
  #view-users .data-table th,
  #view-users .data-table td { padding: 8px 4px; overflow-wrap: anywhere; }
  #view-users .data-table th:nth-child(1) { width: 9%; }
  #view-users .data-table th:nth-child(2) { width: 18%; }
  #view-users .data-table th:nth-child(3) { width: 14%; }
  #view-users .data-table th:nth-child(4) { width: 17%; }
  #view-users .data-table th:nth-child(5) { width: 22%; }
  #view-users .data-table th:nth-child(6) { width: 20%; }
  #view-users .user-row-actions { white-space: normal; }
  #view-users .user-action-button { display: block; width: 100%; min-width: 44px; min-height: 32px; padding: 5px 3px; }
  #view-users .user-action-button + .user-action-button { margin: 4px 0 0; }
  .smart-clip-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .smart-clip-actions { justify-content: flex-start; }
  .smart-clip-scene-toolbar { align-items: stretch; gap: 8px; }
  .smart-clip-scene-toolbar #smartClipViewAllButton,
  .smart-clip-scene-toolbar #smartClipBatchViewAllButton { min-height: 38px; }
  .smart-clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-smart-clip-picker .smart-clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-result-previews-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .smart-clip-modal-content { width: calc(100% - 20px); height: calc(100vh - 20px); max-height: calc(100vh - 20px); padding: 18px; }
  .smart-clip-modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(220px, 220px); row-gap: 16px; column-gap: 10px; }
  .smart-clip-modal-grid .smart-clip-card { height: 220px; border-radius: 12px; }
  .smart-clip-modal-grid .smart-clip-card-meta { border-radius: 0 0 11px 11px; padding: 42px 10px 10px; }
  .smart-clip-modal-grid .smart-clip-card-meta strong { font-size: 13px; }
  .smart-clip-preview-content { width: calc(100% - 20px); max-height: calc(100vh - 20px); padding: 16px; }
  .smart-clip-preview-video { width: min(100%, 280px); max-height: calc(100vh - 150px); }
  .public-voice-toolbar, .public-voice-form-grid, .public-voice-media-grid { grid-template-columns: 1fr; }
  .public-voice-toolbar .field:first-child { grid-column: auto; }
  .public-voice-pagination { align-items: stretch; flex-direction: column; gap: 8px; }
  .public-voice-page-controls { justify-content: flex-end; }
  .public-voice-modal { width: calc(100% - 20px); max-height: calc(100vh - 20px); padding: 18px; }
  .software-release-fields,
  .software-release-current,
  .software-release-staged { grid-template-columns: minmax(0, 1fr); }
  .software-release-current > div { border-right: 0; border-bottom: 1px solid #e5e7eb; }
  .software-release-current > div:last-child { border-bottom: 0; }
  .software-release-hash { grid-column: auto; }
  .software-release-publish-card .actions .btn { width: 100%; }
  .model-interface-routing-grid { grid-template-columns: 1fr; gap: 0; }
  .model-interface-actions { align-items: stretch; flex-direction: column; }
  .model-interface-actions .btn { width: 100%; }
  .model-routing-notice { align-items: stretch; flex-direction: column; gap: 6px; }
  .model-routing-notice .btn { width: 100%; }
}

@media (max-width: 700px) {
  .cloud-provider-header { align-items: stretch; }
  .cloud-provider-header .btn { width: 100%; min-height: 42px; }
  .cloud-provider-section { padding: 19px 16px; }
  .cloud-provider-grid { grid-template-columns: 1fr; gap: 0; }
  .cloud-provider-field-wide { grid-column: auto; }
  .cloud-secret-control { grid-template-columns: 1fr; gap: 6px; }
  .cloud-key-status { min-width: 0; text-align: left; }
  .cloud-provider-footer { grid-template-columns: 1fr; gap: 16px; padding: 19px 16px; }
  .cloud-provider-actions { display: grid; grid-template-columns: 1fr; }
  .cloud-provider-actions .btn { width: 100%; }
  .cloud-provider-status { grid-column: auto; margin-top: 0; }
}

@media (max-width: 360px) {
  .batch-result-video-card { flex-basis: 100%; width: 100%; max-width: 100%; }
}
