:root { color-scheme: light; --ink:#102820; --muted:#627069; --paper:#f4f1e8; --card:#fffdf7; --line:#d9d6ca; --green:#1d5b45; --lime:#d9ee75; --cyan:#8fe3dc; --orange:#ff885d; --danger:#a03e36; font-family: Inter,"PingFang SC","Microsoft YaHei",sans-serif; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
.workspace-login { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:24px; background:linear-gradient(135deg,#edf7f1,#f7f8f4); }
.workspace-login-card { width:min(440px,100%); display:grid; gap:18px; padding:34px; border:1px solid var(--line); border-radius:24px; background:#fff; box-shadow:0 24px 70px rgba(20,74,57,.16); }
.workspace-login-card .brand-mark { width:54px; height:54px; }
.workspace-login-card h1 { margin:0 0 8px; font-size:28px; }
.workspace-login-card p { margin:0; color:var(--muted); line-height:1.65; }
.workspace-login-card label { display:grid; gap:8px; font-weight:700; }
.workspace-login-card input { width:100%; min-height:48px; }
.workspace-login-card button[type="submit"] { min-height:48px; }
html { scroll-behavior:smooth; }
body { margin:0; color:var(--ink); background:var(--paper); }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
button,.tabs a { min-height:44px; }
.brand-mark { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; color:white; background:var(--green); font-weight:800; }
.workspace-shell { display:grid; grid-template-columns:220px minmax(0,1fr); min-height:100vh; }
.workspace-sidebar { position:sticky; top:0; align-self:start; height:100vh; padding:18px 16px 24px; overflow-y:auto; border-right:1px solid var(--line); background:#ede9dc; }
.sidebar-brand { display:flex; align-items:center; gap:10px; margin:0 4px 18px; padding:2px 0 17px; color:inherit; text-decoration:none; border-bottom:1px solid var(--line); }
.sidebar-brand strong,.sidebar-brand small { display:block; }.sidebar-brand strong { font-size:16px; }.sidebar-brand small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.3; }
.tabs { display:grid; gap:0; overflow:hidden; border:1px solid rgba(16,40,32,.11); border-radius:16px; background:rgba(255,255,255,.38); }
.tabs a { display:grid; grid-template-columns:36px minmax(0,1fr); align-items:center; gap:10px; width:100%; padding:13px 12px; border-bottom:1px solid rgba(16,40,32,.10); color:var(--ink); text-decoration:none; font-size:14px; font-weight:750; }.tabs a:last-child { border-bottom:0; }.tabs a:hover { background:rgba(255,255,255,.72); }.tabs a.active { color:white; background:var(--green); box-shadow:inset 4px 0 var(--lime); }.nav-index { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; color:var(--green); background:rgba(255,255,255,.78); font-size:11px; font-weight:900; letter-spacing:.04em; }.tabs a.active .nav-index { color:var(--ink); background:var(--lime); }
.workspace-sidebar .status { margin-top:24px; font-size:12px; line-height:1.5; }
main { width:min(1220px,100%); min-width:0; margin:0 auto; padding:22px 24px 80px; }
.panel { margin:0; padding:clamp(22px,4vw,42px); border:1px solid var(--line); border-radius:28px; background:rgba(255,253,247,.78); box-shadow:0 18px 50px rgba(16,40,32,.06); }
.workspace-sidebar .system-only { display:none !important; }
main > .panel { display:none !important; }main > .panel.active-page { display:block !important; }main > .panel.system-only { display:none !important; }
.dark-panel { color:#f7f5ed; background:var(--ink); border-color:var(--ink); }.dark-panel .section-heading p,.dark-panel label { color:#c5d0ca; }.dark-panel input,.dark-panel textarea,.dark-panel select { color:#f7f5ed; background:#18392f; border-color:#36584d; }
.section-heading { display:flex; justify-content:space-between; gap:24px; align-items:end; margin-bottom:28px; }.section-heading>div { display:flex; align-items:center; gap:12px; }.section-heading h2,.future h2 { margin:0; font-size:clamp(24px,4vw,36px); }.section-heading p { max-width:520px; margin:0; color:var(--muted); line-height:1.65; }
.step { display:inline-grid; place-items:center; min-width:38px; height:38px; padding:0 8px; border-radius:12px; background:var(--lime); color:var(--ink); font-weight:900; }
.two-column { display:grid; grid-template-columns:1.1fr .9fr; gap:20px; }.card { padding:22px; border:1px solid var(--line); border-radius:20px; background:var(--card); }.card h3 { margin-top:0; }.card-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.entity-panel { padding:26px 30px; }.entity-panel .section-heading { margin-bottom:18px; }.entity-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(360px,.85fr); gap:16px; align-items:start; }.entity-form { display:grid; grid-template-columns:1fr 1fr; gap:10px 12px; padding:18px; }.entity-form>h3,.entity-form>.field-wide,.entity-form>.form-actions { grid-column:1/-1; }.entity-form h3 { margin-bottom:2px; }.entity-form label { gap:5px; }.entity-form input,.entity-form textarea,.entity-form select { padding:10px 12px; }.entity-form textarea { min-height:62px; }.entity-form .form-actions { margin-top:2px; }.entity-persona-group { display:grid; gap:8px; margin:2px 0; padding:12px; border:1px solid var(--line); border-radius:14px; }.entity-persona-group legend { padding:0 7px; font-weight:900; }.entity-persona-group>p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }.entity-persona-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }.history-card { align-self:start; min-width:0; min-height:0; padding:14px; font-size:14px; }.history-card .card-title { align-items:center; }.history-card .card-title h3 { margin-bottom:2px; }.history-card .card-title p { margin:0; color:var(--muted); font-size:10px; line-height:1.4; }.history-card .compact { font-size:11px; }.history-card .product-list { display:grid; gap:7px; margin:10px 0 0; }.history-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; gap:7px; align-items:center; min-height:48px; padding:7px; border:1px solid var(--line); border-radius:13px; background:white; }.history-row.active { border-color:var(--green); box-shadow:inset 3px 0 var(--green); }.history-entity { display:flex; align-items:center; gap:8px; min-width:0; }.history-entity::before { content:"店"; display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; border-radius:9px; color:white; background:var(--green); font-size:11px; font-weight:900; }.history-entity strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.history-action { display:inline-flex; align-items:center; gap:4px; padding:9px 11px; white-space:nowrap; }.history-use { grid-column:auto; }.history-delete { color:#9d2f24; }
.entity-form #entity-save-status { grid-column:1/-1; width:100%; max-width:none; margin:2px 0 0; line-height:1.55; overflow-wrap:anywhere; text-wrap:pretty; }
form { display:grid; gap:15px; }label { display:grid; gap:7px; color:#31483f; font-size:14px; font-weight:700; }input,textarea,select { width:100%; border:1px solid #c8cbc3; border-radius:12px; padding:12px 13px; color:var(--ink); background:white; outline:none; }input::placeholder,textarea::placeholder { color:#8b928e; opacity:1; }textarea { resize:vertical; line-height:1.55; }input:focus,textarea:focus,select:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(29,91,69,.14); }.field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field-label { display:flex; align-items:center; gap:5px; }.required-mark,.optional-mark { display:inline-flex; width:max-content; padding:2px 6px; border-radius:999px; font-size:11px; font-weight:800; vertical-align:middle; }.required-mark { color:#8a2f29; background:#f8dfda; }.optional-mark { color:var(--muted); background:#ecece6; }
.primary,.secondary,.accent,.ghost { border:0; border-radius:12px; padding:12px 16px; font-weight:800; }.primary { color:white; background:var(--green); }.secondary { color:var(--green); background:#e4eddf; }.accent { color:var(--ink); background:var(--lime); }.ghost { color:var(--ink); background:transparent; border:1px solid var(--line); }.primary:disabled,.secondary:disabled,.accent:disabled,.ghost:disabled { opacity:.5; cursor:not-allowed; }.compact { padding:8px 11px; font-size:13px; }.icon-button { min-width:44px; border:0; background:transparent; font-size:28px; }
.product-list { display:grid; gap:9px; margin-bottom:20px; }.product-button { display:flex; justify-content:space-between; align-items:center; width:100%; padding:13px; border:1px solid var(--line); border-radius:13px; text-align:left; background:white; }.product-button.active { border-color:var(--green); box-shadow:inset 4px 0 var(--green); }.product-button small { color:var(--muted); }.empty { color:var(--muted); }.upload-box { padding-top:20px; border-top:1px dashed var(--line); }.file-picker { padding:16px; border:1px dashed #9ca8a1; border-radius:14px; background:#f7f7f1; }.file-picker input { padding:8px 0 0; border:0; background:transparent; }
.product-row { display:grid; grid-template-columns:1fr auto auto; gap:7px; align-items:center; }.product-row .product-button { min-width:0; }.advanced-fields { padding:12px; border:1px dashed var(--line); border-radius:14px; }.advanced-fields summary { cursor:pointer; color:var(--green); font-weight:800; }.advanced-fields[open] summary { margin-bottom:14px; }.advanced-fields label+label,.advanced-fields .field-row { margin-top:12px; }.form-actions { display:grid; grid-template-columns:1fr auto; gap:8px; }
.script-controls { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; align-items:end; }.script-controls button { min-height:46px; }.script-section-heading { align-items:center; margin-bottom:18px; }.script-entity-summary { display:grid; justify-items:end; gap:3px; min-width:260px; text-align:right; }.script-entity-summary small,.script-entity-summary span { color:#b9cbc3; }.script-entity-summary strong { font-size:19px; }.script-library-layout { display:grid; grid-template-columns:minmax(300px,360px) minmax(0,1fr); gap:18px; align-items:start; }.script-template-picker { display:grid; gap:14px; min-width:0; max-height:calc(100vh - 54px); padding:16px; overflow:hidden; border:1px solid #36584d; border-radius:18px; background:#15342b; }.script-picker-heading { display:flex; align-items:flex-start; gap:10px; }.script-picker-heading h3,.script-picker-heading p { margin:0; }.script-picker-heading p { margin-top:4px; color:#b9cbc3; font-size:12px; }.script-library-content { min-width:0; }.script-category-tabs { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin:0; }.script-category-tab { grid-column:span 2; min-height:52px; padding:9px 6px; color:#dce8e2; border:1px solid #36584d; background:#18392f; font-size:13px; text-align:center; }.script-category-tab:nth-child(n+4) { grid-column:span 3; }.script-category-tab.active { color:var(--ink); border-color:var(--lime); background:var(--lime); }.script-grid { display:grid; grid-template-columns:1fr; gap:16px; margin-top:18px; }.script-card { display:grid; gap:12px; padding:18px; border:1px solid #36584d; border-radius:18px; background:#15342b; }.topic-card { grid-template-columns:minmax(0,1fr) minmax(180px,260px); }.topic-card>.script-card-heading,.topic-card>.topic-description,.topic-card>.topic-status { grid-column:1; }.script-card-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }.script-card h3 { margin:0; }.script-duration { color:#cfe0d9; font-size:14px; white-space:nowrap; }.script-card textarea { min-height:230px; }.script-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }.script-actions button { min-width:0; padding:10px 7px; font-size:13px; line-height:1.3; }.script-industry-types { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }.script-industry-type { min-height:40px; padding:8px 5px; color:#dce8e2; border:1px solid #477064; background:#18392f; font-size:13px; }.script-industry-type.active { color:var(--ink); border-color:var(--lime); background:var(--lime); }.script-topic-list { display:grid; gap:9px; min-width:0; min-height:0; overflow-y:auto; padding:2px; scrollbar-width:thin; }.script-topic-list-button { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 8px; align-items:center; width:100%; min-height:58px; padding:10px 12px; color:#dce8e2; border:1px solid #36584d; background:#18392f; text-align:left; }.script-topic-list-button strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.script-topic-list-button span { color:#b9cbc3; font-size:12px; white-space:nowrap; }.script-topic-list-button small { grid-column:1/-1; color:var(--cyan); font-size:11px; }.script-topic-list-button.active { color:var(--ink); border-color:var(--cyan); background:var(--cyan); }.script-topic-list-button.active span,.script-topic-list-button.active small { color:#285148; }.script-topic-editor,.script-topic-editor .topic-card { min-width:0; }.script-structure-fields { grid-column:1/-1; display:grid; gap:10px; }.script-scene-row { display:grid; grid-template-columns:86px minmax(180px,260px) minmax(0,1fr); gap:12px; align-items:center; padding:10px; border:1px solid #36584d; border-radius:12px; background:#102b24; }.script-scene-number { color:var(--lime); }.script-scene-function { color:#cfe0d9; line-height:1.45; }.script-scene-row textarea { min-height:82px; resize:vertical; }.script-topic-actions { grid-column:2; grid-row:1/4; grid-template-columns:1fr; width:100%; align-self:start; }.script-topic-empty { min-height:120px; display:grid; place-items:center; text-align:center; }
.script-topic-list-button { grid-template-columns:minmax(0,1fr); }.script-scene-table-header { display:grid; grid-template-columns:86px minmax(240px,1fr) minmax(240px,1fr); gap:12px; padding:0 10px; color:#b9cbc3; font-size:12px; font-weight:800; }.script-scene-row { grid-template-columns:86px minmax(240px,1fr) minmax(240px,1fr); align-items:stretch; }.script-template-text { display:grid; align-content:start; gap:7px; color:#f7f5ed; line-height:1.55; }.script-template-text small { color:var(--cyan); font-weight:800; }.script-scene-row textarea { min-height:96px; }.script-rewrite-privacy { color:#a9bdb5; font-size:11px; line-height:1.5; }.status { margin-top:14px; padding:11px 13px; border-radius:12px; font-size:14px; }.neutral { color:#405149; background:#e9e8df; }.success { color:#174d39; background:#dff1e6; }.error { color:#7f2e28; background:#f6ded9; }.dark-panel .neutral { color:#dbe6e1; background:#25463b; }
.script-template-placeholder { padding:1px 3px; border-radius:4px; background:#ffe36e; color:#4d3900; font-weight:900; box-shadow:inset 0 -2px #e5a800; }.script-scene-row.needs-template-input { border-color:#e5a800; }.script-scene-row.needs-template-input textarea { border-color:#e5a800; }
.future { min-height:170px; }.future .step { float:left; margin-right:14px; }.future p { margin-left:52px; color:var(--muted); line-height:1.7; }
.consent { grid-template-columns:auto 1fr; align-items:start; line-height:1.5; }.consent input { width:20px; height:20px; margin:0; }.asset-list { display:grid; gap:8px; margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }.asset-row { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border-radius:12px; background:#f0efe8; }.asset-row small { color:var(--muted); }
.media-top-grid { align-items:stretch; }.library-heading { margin:22px 0 0; padding-top:18px; border-top:1px solid var(--line); }.media-library-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:12px; margin-top:12px; }.media-library-card { display:grid; align-content:space-between; gap:12px; min-height:118px; padding:14px; border:1px solid var(--line); border-radius:15px; background:#f3f2eb; }.media-library-card strong { overflow:hidden; text-overflow:ellipsis; line-height:1.45; }.media-library-card.selected { border:2px solid var(--green); box-shadow:0 0 0 3px rgba(211,239,105,.55); }.media-library-card .danger { color:#9d2f24; background:#fffdf7; }.avatar-library-section { display:grid; grid-template-columns:minmax(300px,.8fr) minmax(0,1.2fr); gap:24px; margin-top:20px; }.avatar-library-section>div>h3 { margin-top:0; }.avatar-thumbnail { width:100%; aspect-ratio:9/16; max-height:220px; border-radius:11px; background:#102820; object-fit:cover; }.avatar-library-card { min-height:0; }.voice-preview { display:grid; grid-template-columns:1fr auto; align-content:start; align-items:end; gap:14px; margin:0; }.voice-preview .voice-script-block,.voice-preview .status,.voice-preview audio { grid-column:1/-1; width:100%; }.voice-preview h3 { margin:0 0 14px; }.voice-preview textarea { min-height:220px; }.voice-preview small { display:block; margin-top:8px; color:var(--muted); line-height:1.5; }
.media-task-form { display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:14px; }.media-task-form .status,.media-task-form>video { grid-column:1/-1; width:100%; max-height:680px; border-radius:14px; background:#0c1713; }.subtitle-samples { display:grid; grid-template-columns:repeat(7,1fr); gap:10px; margin-bottom:18px; }.subtitle-sample { position:relative; min-height:150px; overflow:hidden; border:3px solid transparent; border-radius:16px; color:white; background:linear-gradient(145deg,#203b33,#4d675d); }.subtitle-sample::before { content:"工厂真实能力"; position:absolute; left:50%; bottom:24px; width:90%; transform:translateX(-50%); font-size:18px; font-weight:900; text-shadow:0 2px 4px #000,0 0 2px #000; }.subtitle-sample span { position:absolute; inset:10px auto auto 10px; padding:4px 7px; border-radius:7px; background:rgba(0,0,0,.55); font-size:12px; }.subtitle-sample.selected { border-color:var(--orange); }.subtitle-sample.bold_yellow::before { color:#ffe800; }.subtitle-sample.tech_blue::before { color:#62ddff; }.subtitle-sample.high_contrast::before { padding:6px; background:rgba(0,0,0,.72); }.subtitle-sample.word_highlight::before { color:#ffe800; text-decoration:underline; text-decoration-color:white; }.subtitle-sample.two_tone_yellow::before { color:#ffe800; text-decoration:underline; text-decoration-color:white; }.subtitle-sample.two_tone_cyan::before { color:#62ddff; text-decoration:underline; text-decoration-color:white; }.render-form video { width:100%; max-height:720px; border-radius:14px; background:#0c1713; }.render-form audio { width:100%; }.bgm-controls { display:grid; grid-template-columns:2fr 1fr 1fr; gap:12px; }.bgm-controls output { float:right; color:var(--muted); }.download { display:block; width:max-content; color:white; text-decoration:none; text-align:center; }
.workflow-next-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; align-items:center; padding-top:13px; border-top:1px solid rgba(29,91,69,.16); }.workflow-next-actions p { grid-column:1/-1; margin:0; color:var(--muted); font-size:13px; }.workflow-next-actions button { width:100%; }
.publishing-panel { display:grid; gap:24px; }.publishing-panel .section-heading { margin-bottom:0; }.publishing-panel button { min-height:44px; }.publishing-accounts,.publishing-results { display:grid; gap:14px; }.publishing-accounts .card-title p { margin:4px 0 0; color:var(--muted); font-size:13px; }.publishing-account-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }.publishing-account-card { display:grid; align-content:space-between; gap:12px; min-height:178px; padding:18px; border:1px solid var(--line); border-radius:18px; background:var(--card); }.publishing-account-card.connected { border-color:#77a991; box-shadow:inset 0 4px #77a991; }.publishing-account-card.needs_user_action,.publishing-account-card.expired { border-color:#e5aa82; box-shadow:inset 0 4px #e5aa82; }.publishing-account-heading,.publishing-result-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }.publishing-account-heading strong { font-size:20px; }.publishing-account-status { padding:5px 8px; border-radius:999px; color:var(--muted); background:#ecece6; font-size:12px; font-weight:800; }.publishing-account-card.connected .publishing-account-status { color:#174d39; background:#dff1e6; }.publishing-account-card p { margin:0; color:var(--muted); line-height:1.5; }.publishing-account-actions,.publishing-result-actions { display:flex; flex-wrap:wrap; gap:8px; }.publishing-account-actions button { flex:1 1 auto; }.publishing-account-waiting { color:var(--muted); font-size:13px; }.danger { color:var(--danger); }.publishing-compose { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:18px; align-items:stretch; }.publishing-settings { align-content:start; }.publishing-platforms { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:0; padding:14px; border:1px solid var(--line); border-radius:14px; }.publishing-platforms legend { padding:0 6px; color:#31483f; font-size:14px; font-weight:800; }.publishing-platforms label { display:flex; grid-template-columns:none; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:9px; border:1px solid var(--line); border-radius:11px; background:#f7f6ef; }.publishing-platforms input { width:20px; height:20px; margin:0; }.publishing-platforms label:has(input:checked) { border-color:var(--green); background:#e4eddf; }.publishing-platforms label:has(input:disabled) { opacity:.5; }.publishing-preview-card { display:grid; align-content:start; min-width:0; }.publishing-preview-card video { width:100%; max-height:620px; border-radius:14px; background:#0c1713; }.publishing-preview-card .empty { display:grid; place-items:center; min-height:280px; margin:0; padding:24px; border:1px dashed var(--line); border-radius:14px; text-align:center; }.publishing-result-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }.publishing-result-list.empty { display:block; padding:18px; border:1px dashed var(--line); border-radius:14px; }.publishing-result-card { display:grid; align-content:start; gap:12px; min-width:0; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--card); }.publishing-result-card.published { border-color:#77a991; }.publishing-result-card.failed { border-color:#d49a93; }.publishing-result-card.needs_user_action { border-color:#e5aa82; }.publishing-result-heading strong { font-size:18px; }.publishing-result-heading span { color:var(--muted); font-weight:800; }.publishing-result-card p { margin:0; color:var(--muted); line-height:1.5; }.publishing-progress { height:9px; overflow:hidden; border-radius:999px; background:#e4e5de; }.publishing-progress span { display:block; height:100%; border-radius:inherit; background:var(--green); }.publishing-task-error { color:var(--danger) !important; }.publishing-result-link { display:inline-grid; place-items:center; min-height:44px; color:var(--green); text-decoration:none; }
dialog { width:min(560px,calc(100% - 24px)); padding:0; border:0; border-radius:22px; box-shadow:0 25px 100px rgba(0,0,0,.3); }dialog::backdrop { background:rgba(10,28,23,.65); backdrop-filter:blur(5px); }.dialog-card { padding:24px; background:var(--card); }
.existing-workspace { border-top:1px solid var(--line); }.existing-workspace h3 { margin-top:0; }.credential-result { display:grid; gap:10px; margin-top:8px; padding:15px; border-radius:14px; background:#eef3e4; }.credential-result p { margin:0; color:var(--muted); font-size:13px; }.credential-result input { font-family:ui-monospace,Consolas,monospace; font-size:12px; }
.task-list { display:grid; gap:10px; margin-top:16px; }.task-row { display:grid; grid-template-columns:minmax(150px,1.1fr) minmax(180px,2fr) auto; gap:14px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:14px; background:white; }.task-row strong,.task-row small { display:block; }.task-row small { margin-top:4px; color:var(--muted); }.task-progress { height:8px; overflow:hidden; border-radius:999px; background:#e4e5de; }.task-progress span { display:block; height:100%; background:var(--green); }.task-error { color:var(--danger); }
.health-title { margin-top:30px; }.health-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px; }.health-item { padding:13px; border:1px solid var(--line); border-radius:13px; background:white; }.health-item strong,.health-item small { display:block; }.health-item small { margin-top:5px; color:var(--muted); }.health-dot { display:inline-block; width:9px; height:9px; margin-right:7px; border-radius:50%; background:var(--danger); }.health-item.ready .health-dot { background:#32a66a; }
.member-panel { margin-top:30px; padding-top:24px; border-top:1px solid var(--line); }.member-form { grid-template-columns:1fr auto; align-items:end; }.member-list { display:grid; gap:8px; margin-top:14px; }.member-row { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; background:white; }.member-row small { display:block; color:var(--muted); }
#toast { position:fixed; right:18px; bottom:18px; z-index:30; max-width:min(380px,calc(100% - 36px)); padding:12px 16px; border-radius:12px; color:white; background:var(--ink); opacity:0; transform:translateY(10px); pointer-events:none; transition:.2s; }#toast.show { opacity:1; transform:none; }
@media (max-width:850px) { .workspace-shell { grid-template-columns:170px minmax(0,1fr); }.workspace-sidebar { padding-inline:12px; }.two-column,.script-grid { grid-template-columns:1fr; }.script-controls { grid-template-columns:1fr 1fr; }.section-heading { align-items:start; flex-direction:column; }.script-section-heading { align-items:flex-start; }.script-entity-summary { justify-items:start; min-width:0; text-align:left; }.script-library-layout { grid-template-columns:1fr; }.script-template-picker { max-height:640px; }.script-category-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }.script-category-tab,.script-category-tab:nth-child(n+4) { grid-column:span 1; }.topic-card { grid-template-columns:1fr; }.topic-card>.script-card-heading,.topic-card>.topic-description,.topic-card>.topic-status,.script-topic-actions { grid-column:1; grid-row:auto; }.sidebar-brand small { display:none; } }
@media (max-width:850px) { .script-scene-table-header { display:none; }.script-scene-row { grid-template-columns:1fr; align-items:start; }.script-scene-row textarea { width:100%; }.script-topic-actions { grid-template-columns:1fr; } }
@media (max-width:900px) { .publishing-account-grid,.publishing-compose,.publishing-result-list { grid-template-columns:1fr; }.publishing-preview-card .empty { min-height:180px; } }
@media (max-width:1000px) { .entity-layout { grid-template-columns:1fr; }.history-card { order:2; } }
@media (max-width:850px) { .voice-preview,.avatar-library-section { grid-template-columns:1fr; }.voice-preview .voice-script-block,.voice-preview .status,.voice-preview audio { grid-column:auto; } }
@media (max-width:850px) { .workflow-next-actions { grid-template-columns:1fr 1fr; }.workflow-next-actions p { grid-column:1/-1; } }
@media (max-width:850px) { .media-task-form,.bgm-controls { grid-template-columns:1fr; }.media-task-form .status,.media-task-form>video { grid-column:auto; }.subtitle-samples { grid-template-columns:repeat(2,1fr); }.subtitle-sample { min-height:130px; } }
@media (max-width:850px) { .task-row { grid-template-columns:1fr; }.task-row button { width:100%; } }
@media (max-width:850px) { .health-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:560px) { .health-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .member-form,.member-row { grid-template-columns:1fr; } }
@media (max-width:560px) { .brand-mark { width:40px; height:40px; border-radius:12px; font-size:12px; }.workspace-shell { grid-template-columns:118px minmax(0,1fr); }.workspace-sidebar { top:0; height:100vh; padding:10px 7px; }.sidebar-brand { justify-content:center; margin-inline:0; }.sidebar-brand .brand-copy { display:none; }.workspace-sidebar .status { display:none; }.tabs a { grid-template-columns:26px minmax(0,1fr); gap:6px; min-height:52px; padding:9px 7px; font-size:11px; line-height:1.3; }.nav-index { width:24px; height:24px; border-radius:7px; font-size:9px; }.panel { padding:20px 14px; border-radius:20px; }.section-heading h2 { font-size:24px; }.field-row,.script-controls,.entity-form,.entity-persona-fields { grid-template-columns:1fr; }.entity-form>h3,.entity-form>.field-wide,.entity-form>.form-actions { grid-column:auto; }.history-row { grid-template-columns:repeat(3,minmax(0,1fr)); }.history-entity { grid-column:1/-1; }.history-use { grid-column:auto; }.script-card textarea { min-height:190px; } main { padding:12px 8px 50px; } #toast { bottom:18px; } }
@media (max-width:560px) { .product-row { grid-template-columns:1fr auto; }.product-row .product-button { grid-column:1 / -1; }.form-actions { grid-template-columns:1fr; } }
.publishing-acceptance-ids { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; }
.publishing-acceptance-id { min-width:0; display:grid; gap:4px; }
.publishing-acceptance-id code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bgm-library-upload { display:grid; grid-template-columns:minmax(220px,.8fr) minmax(320px,1.4fr) auto; align-items:end; gap:14px; margin-bottom:18px; }
.bgm-library-upload>div:first-child,.bgm-library-upload .consent,.bgm-library-upload .status,.bgm-library-upload .bgm-library-grid { grid-column:1/-1; }
.bgm-library-upload h3,.bgm-library-upload p { margin:0; }
.bgm-library-upload p { margin-top:6px; color:var(--muted); }
.bgm-library-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; width:100%; }
.bgm-library-grid.empty { display:block; color:var(--muted); }
.bgm-library-card { display:grid; align-content:start; gap:10px; min-width:0; padding:14px; border:1px solid var(--line); border-radius:15px; background:#f3f2eb; }
.bgm-library-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bgm-library-card small { color:var(--muted); }
.bgm-library-card audio { width:100%; min-width:0; }
.bgm-library-card .form-actions { grid-template-columns:1fr 1fr; }
.bgm-library-card.selected { border:2px solid var(--green); box-shadow:0 0 0 3px rgba(211,239,105,.45); }
.voice-library-list,.bgm-library-list { display:grid; gap:8px; width:100%; margin-top:12px; }
.voice-library-row,.bgm-library-row { display:grid; grid-template-columns:minmax(150px,.7fr) minmax(240px,1.5fr) auto; align-items:center; gap:12px; min-width:0; padding:9px 12px; border:1px solid var(--line); border-radius:13px; background:#f3f2eb; }
.bgm-library-row { grid-template-columns:minmax(150px,.7fr) minmax(240px,1.5fr) auto auto; }
.library-row-details { min-width:0; }
.library-row-details strong,.library-row-details small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.library-row-details small { margin-top:3px; color:var(--muted); }
.voice-library-row audio,.bgm-library-row audio { width:100%; min-width:0; height:40px; }
.voice-library-row>.danger,.bgm-library-row>.danger { color:#9d2f24; background:#fffdf7; }
.publishing-settings,.publishing-preview-card,.publishing-compose>* { min-width:0; }
.publishing-settings input,.publishing-settings select,.publishing-settings textarea,.publishing-settings fieldset { box-sizing:border-box; min-width:0; max-width:100%; width:100%; }
@media (max-width:900px) { .publishing-acceptance-ids { grid-template-columns:1fr; } }
@media (max-width:900px) { .bgm-library-upload { grid-template-columns:1fr; }.bgm-library-upload>div:first-child,.bgm-library-upload .consent,.bgm-library-upload .status,.bgm-library-upload .bgm-library-grid { grid-column:auto; }.bgm-library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .bgm-library-grid { grid-template-columns:1fr; } }
@media (max-width:900px) { .voice-library-row,.bgm-library-row { grid-template-columns:minmax(110px,.7fr) minmax(180px,1.3fr) auto; }.bgm-library-row { grid-template-columns:minmax(110px,.7fr) minmax(180px,1.3fr) auto auto; } }
@media (max-width:560px) { .voice-library-row,.bgm-library-row { grid-template-columns:1fr auto; }.voice-library-row audio,.bgm-library-row audio { grid-column:1/-1; }.bgm-library-row .library-row-details { grid-column:1/-1; } }
@media (max-width:560px) { .publishing-platforms { grid-template-columns:1fr; } }

/* 03 声音库：左侧编辑文案，右侧直接试听并生成 */
.media-top-grid { grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr); align-items:start; }
.voice-script-form { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.voice-script-form h3 { margin-bottom:12px; }
.voice-script-form textarea { min-height:260px; }
.voice-library-card { min-width:0; }
.voice-expression-panel { display:grid; gap:12px; margin:0 0 14px; padding:14px; border:1px solid rgba(29,91,69,.2); border-radius:16px; background:linear-gradient(145deg,#f7f9f1,#eef4e9); }
.voice-expression-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.voice-expression-heading strong { font-size:16px; }
.voice-expression-panel fieldset { display:grid; gap:8px; min-width:0; margin:0; padding:0; border:0; }
.voice-option-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.voice-option-grid label { position:relative; display:grid; place-items:center; min-height:38px; padding:7px 6px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.8); cursor:pointer; text-align:center; font-size:13px; font-weight:800; }
.voice-option-grid input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.voice-option-grid label:has(input:checked) { color:white; border-color:var(--green); background:var(--green); box-shadow:0 5px 14px rgba(29,91,69,.16); }
.voice-option-grid label:focus-within { outline:3px solid rgba(29,91,69,.18); outline-offset:2px; }
.voice-smart-result { display:block; padding:7px 9px; border-radius:9px; color:var(--green); background:rgba(205,239,95,.22); font-weight:800; }
.voice-expression-unavailable { color:#a63b2a; }
.voice-library-row { grid-template-columns:minmax(120px,.7fr) minmax(190px,1.2fr) auto auto; }
.voice-library-row.selected,.bgm-library-row.selected { border-color:var(--green); box-shadow:inset 4px 0 var(--green); }
.voice-library-row .voice-generate { white-space:nowrap; }
.voice-generation-action-bar { display:grid; grid-template-columns:minmax(0,1fr) minmax(112px,max-content); align-items:stretch; gap:10px; width:100%; margin-top:14px; }
.voice-generation-action-bar:has(.voice-stop-generation[hidden]) { grid-template-columns:minmax(0,1fr); }
.voice-library-progress { width:100%; min-width:0; margin:0; border-left:5px solid var(--lime); font-weight:700; }
.voice-stop-generation { width:100%; min-width:112px; border:1px solid #e9aaa0; background:#fff5f2; color:#a32c22; font-weight:900; }
.voice-stop-generation:hover:not(:disabled) { border-color:#c85549; background:#ffe9e4; }
.voice-stop-generation:disabled { opacity:.62; cursor:wait; }
.voice-preview-panel { display:grid; gap:13px; margin-top:16px; padding:16px; border:1px solid rgba(29,91,69,.2); border-radius:18px; background:linear-gradient(145deg,#f5f8ee,#eef5eb); box-shadow:0 10px 28px rgba(16,40,32,.06); }
.voice-preview-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.voice-preview-heading strong,.voice-preview-heading small { display:block; }
.voice-preview-heading strong { font-size:17px; }
.voice-preview-heading small { margin-top:4px; color:var(--muted); line-height:1.45; }
.voice-speed-value { flex:0 0 auto; padding:6px 10px; border-radius:999px; color:white; background:var(--green); font-size:12px; font-weight:900; }
.voice-library-preview { width:100%; margin:0; }
.legacy-voice-speed { padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.64); }
.legacy-voice-speed>small { display:block; margin:5px 0 9px; color:var(--muted); }
.voice-speed-control { display:grid; gap:2px; }
.voice-speed-slider-row { display:grid; grid-template-columns:minmax(0,1fr) 66px; align-items:center; gap:12px; }
.voice-speed-slider-row input[type="range"] { --speed-progress:0%; height:26px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; cursor:pointer; accent-color:var(--green); }
.voice-speed-slider-row input[type="range"]::-webkit-slider-runnable-track { height:7px; border-radius:999px; background:linear-gradient(90deg,var(--green) 0 var(--speed-progress),#d9e0dc var(--speed-progress) 100%); }
.voice-speed-slider-row input[type="range"]::-webkit-slider-thumb { width:20px; height:20px; margin-top:-6.5px; border:3px solid #fff; border-radius:50%; background:var(--green); box-shadow:0 2px 7px rgba(16,40,32,.26); -webkit-appearance:none; }
.voice-speed-slider-row input[type="range"]::-moz-range-track { height:7px; border-radius:999px; background:#d9e0dc; }
.voice-speed-slider-row input[type="range"]::-moz-range-progress { height:7px; border-radius:999px; background:var(--green); }
.voice-speed-slider-row input[type="range"]::-moz-range-thumb { width:16px; height:16px; border:3px solid #fff; border-radius:50%; background:var(--green); box-shadow:0 2px 7px rgba(16,40,32,.26); }
.voice-speed-slider-row input[type="range"]:focus-visible { outline:3px solid rgba(29,91,69,.2); outline-offset:3px; }
.voice-speed-slider-row output { min-width:66px; padding:6px 8px; border-radius:9px; color:#fff; background:var(--green); font-variant-numeric:tabular-nums; font-size:12px; font-weight:900; text-align:center; }
.voice-speed-scale { display:flex; justify-content:space-between; padding-right:78px; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.highlight-textarea { position:relative; min-height:260px; border:1px solid #c8cbc3; border-radius:12px; overflow:hidden; background:#fff; }
.highlight-textarea.has-placeholders { border:2px solid #e05b39; box-shadow:0 0 0 4px rgba(224,91,57,.12); }
.highlight-textarea-backdrop,.highlight-textarea textarea { box-sizing:border-box; width:100%; min-height:260px; margin:0; padding:12px 13px; border:0; border-radius:0; font:inherit; font-weight:700; line-height:1.55; letter-spacing:normal; white-space:pre-wrap; overflow-wrap:break-word; }
.highlight-textarea-backdrop { position:absolute; inset:0; overflow:auto; color:transparent; pointer-events:none; scrollbar-width:none; }
.highlight-textarea-backdrop::-webkit-scrollbar { display:none; }
.highlight-textarea textarea { position:relative; z-index:1; resize:none; background:transparent; }
.highlight-textarea textarea:focus { box-shadow:none; }
.inline-placeholder-highlight { border-radius:3px; background:#ffe36e; color:transparent; box-shadow:inset 0 -2px #c62d23; }

/* 真实百分比保持不变，活动光带表示任务仍在运行。 */
.live-task-progress { display:grid; gap:7px; }
.live-task-progress-track { position:relative; height:10px; overflow:hidden; border-radius:999px; background:rgba(16,40,32,.13); }
.live-task-progress-fill { height:100%; border-radius:inherit; background:var(--green); transition:width .4s linear; }
.live-task-progress-activity { position:absolute; inset:0; opacity:0; pointer-events:none; transform:translateX(-100%); background:linear-gradient(100deg,transparent 25%,rgba(255,255,255,.72) 50%,transparent 75%); }
.live-task-progress.active .live-task-progress-activity { opacity:1; animation: live-task-progress-sweep 1.35s linear infinite; }
@keyframes live-task-progress-sweep { to { transform:translateX(100%); } }
@media (prefers-reduced-motion:reduce) { .live-task-progress.active .live-task-progress-activity { animation:none; opacity:.35; transform:none; } }
@media (max-width:640px) {
  .voice-generation-action-bar { grid-template-columns:minmax(0,1fr) minmax(92px,max-content); }
  .voice-stop-generation { min-width:92px; padding-inline:10px; }
  .voice-option-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* 06 音乐库：在列表中选择，固定 15% 音量后直接生成 */
.bgm-library-upload { grid-template-columns:minmax(260px,1fr) auto; align-items:end; }
.bgm-library-upload>div:first-child,.bgm-library-upload .status,.bgm-library-upload .bgm-library-choice-bar,.bgm-library-upload .bgm-library-list,.bgm-library-upload .bgm-final-render { grid-column:1/-1; }
.bgm-library-choice-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:52px; padding:8px 12px; border-radius:13px; background:#eef2e8; }
.bgm-library-row { grid-template-columns:minmax(150px,.75fr) minmax(220px,1.3fr) auto auto; }
.bgm-final-render { width:100%; margin-top:4px; }
.render-result-card { margin-top:0; padding-top:16px; }

/* 07 发布：缩短表单、突出平台与进度 */
.publishing-panel { gap:20px; }
.publishing-account-card { min-height:156px; padding:16px; }
.publishing-compose { grid-template-columns:minmax(360px,.9fr) minmax(320px,1.1fr); }
.publishing-settings { gap:12px; }
.publishing-settings textarea { min-height:112px; }
.publishing-settings #publish-submit { width:100%; }
.publishing-preview-card video { aspect-ratio:9/16; max-height:560px; object-fit:contain; }

/* 发布平台使用离线品牌标识，保持四张方形选择卡。 */
.publishing-platforms { grid-template-columns:repeat(4,minmax(82px,1fr)); gap:12px; }
.publishing-platforms .publishing-platform-card { position:relative; display:grid; place-items:center; align-content:center; gap:8px; aspect-ratio:1; min-height:0; padding:12px; border-radius:16px; cursor:pointer; text-align:center; }
.publishing-platform-card img { width:42px; height:42px; object-fit:contain; }
.publishing-platform-card span { font-weight:800; line-height:1; }
.publishing-platforms .publishing-platform-card input { position:absolute; top:9px; right:9px; width:20px; height:20px; margin:0; accent-color:var(--green); }
.publishing-platforms .publishing-platform-card:has(input:checked) { box-shadow:inset 0 0 0 2px rgba(29,102,76,.12); }

@media (max-width:900px) {
  .media-top-grid,.publishing-compose { grid-template-columns:1fr; }
  .voice-library-row,.bgm-library-row { grid-template-columns:minmax(120px,.7fr) minmax(180px,1.3fr) auto; }
  .voice-library-row>.danger,.bgm-library-row>.danger { grid-column:auto; }
  .bgm-library-upload { grid-template-columns:1fr; }
}
@media (max-width:560px) {
  .voice-library-row,.bgm-library-row { grid-template-columns:1fr auto; }
  .voice-library-row .library-row-details,.bgm-library-row .library-row-details,.voice-library-row audio,.bgm-library-row audio { grid-column:1/-1; }
  .bgm-library-choice-bar { align-items:stretch; flex-direction:column; }
  .bgm-library-choice-bar button { width:100%; }
  .publishing-platforms { grid-template-columns:repeat(2,minmax(110px,1fr)); gap:8px; padding:10px; }
  .publishing-platforms .publishing-platform-card { padding:9px; border-radius:13px; }
  .publishing-platform-card img { width:34px; height:34px; }
  .voice-expression-heading { display:grid; }
  .voice-expression-heading small { text-align:left; }
  .voice-option-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.subtitle-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 18px}.subtitle-controls label{margin:0}.subtitle-controls select{background:var(--surface);font-weight:800}.subtitle-sample::before{font-family:var(--subtitle-preview-font,"Source Han Sans SC","Microsoft YaHei",sans-serif);font-size:var(--subtitle-preview-size,40px)}
.voice-library-row.system{background:#f4f3ec;border-color:var(--line)}.voice-library-row.system.selected,.voice-library-row.selected{border:2px solid var(--green);background:#f8faef;box-shadow:inset 5px 0 var(--green),0 0 0 3px rgba(205,239,95,.38)}
@media(max-width:720px){.subtitle-controls{grid-template-columns:1fr}.subtitle-sample::before{font-size:calc(var(--subtitle-preview-size,40px)*.78)}}

.voice-speed-picker { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:0; }
.voice-speed-picker label { position:relative; display:grid; place-items:center; min-height:42px; padding:8px 6px; border:1px solid transparent; border-radius:12px; color:#31483f; background:rgba(255,255,255,.72); cursor:pointer; text-align:center; }
.voice-speed-picker input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.voice-speed-picker label:has(input:checked) { color:white; border-color:var(--green); background:var(--green); box-shadow:0 5px 14px rgba(29,91,69,.18); }
.voice-speed-picker label:focus-within { outline:3px solid rgba(29,91,69,.18); outline-offset:2px; }
@media (max-width:560px) { .voice-speed-picker { grid-template-columns:repeat(2,minmax(0,1fr)); }.voice-preview-heading { align-items:flex-start; }.workflow-next-actions { grid-template-columns:1fr; }.workflow-next-actions p { grid-column:auto; } }

.custom-script-card { margin-top:18px; padding:22px; border:1px solid rgba(255,255,255,.18); border-radius:22px; background:rgba(255,255,255,.05); }
.custom-script-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.custom-script-heading h3,.custom-script-heading p { margin:0; }
.custom-script-heading small { display:block; margin-bottom:4px; color:var(--green); font-weight:800; }
.custom-script-heading p { max-width:65ch; margin-top:6px; color:var(--muted); font-size:13px; line-height:1.55; text-align:left; }
.custom-script-heading > div { min-width:0; }
.custom-script-heading > button { flex:0 0 auto; width:auto; min-height:44px; padding:10px 20px; white-space:nowrap; }
#scripts .script-topic-actions > button { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-width:0; min-height:48px; padding:10px 12px; }
#scripts .script-topic-actions .script-action-icon,
#scripts .script-topic-actions > .script-rewrite-compact::before,
#scripts .script-topic-actions > .script-custom-open::before { display:inline-flex; align-items:center; justify-content:center; flex:0 0 20px; width:20px; height:20px; font-size:20px; line-height:1; }
#scripts .script-topic-actions > .script-rewrite-compact::before { content:"✦"; }
#scripts .script-topic-actions > .script-custom-open::before { content:"✎"; }
.custom-script-card form { display:grid; gap:14px; margin-top:14px; }
.edit-mode-card { display:grid; gap:18px; }
.edit-mode-picker { display:grid; grid-template-columns:minmax(260px,1.25fr) repeat(2,minmax(210px,1fr)); gap:6px; padding:6px; border:1px solid rgba(23,107,80,.12); border-radius:18px; background:#edf3ef; }
.edit-mode-option { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px; min-height:86px; padding:13px 15px; border:0; border-radius:13px; background:transparent; color:var(--ink); text-align:left; transition:transform .2s ease,background-color .2s ease,box-shadow .2s ease; }
.edit-mode-option:hover { background:rgba(255,255,255,.72); transform:translateY(-1px); }
.edit-mode-option:active { transform:translateY(1px); }
.edit-mode-option:focus-visible { outline:3px solid rgba(23,107,80,.22); outline-offset:2px; }
.edit-mode-index { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; color:var(--green); background:rgba(255,255,255,.78); font-size:12px; font-weight:900; font-variant-numeric:tabular-nums; }
.edit-mode-copy strong,.edit-mode-copy small { display:block; }
.edit-mode-copy strong { font-size:16px; letter-spacing:-.01em; }
.edit-mode-copy small { margin-top:5px; color:var(--muted); line-height:1.4; }
.edit-mode-option.selected { background:var(--green); color:#fff; box-shadow:0 10px 22px rgba(25,96,69,.2); }
.edit-mode-option.selected .edit-mode-index { color:var(--green); background:#fff; }
.edit-mode-option.selected small { color:rgba(255,255,255,.82); }
.auto-mix-action { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:24px; padding:18px 20px; border:1px solid rgba(23,107,80,.14); border-radius:16px; background:radial-gradient(circle at 0 50%,rgba(214,237,225,.9),rgba(247,250,246,.94) 48%,#fff 100%); }
.auto-mix-copy { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:14px; min-width:0; }
.auto-mix-mark { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; color:#fff; background:var(--green); font-size:14px; font-weight:900; letter-spacing:.04em; box-shadow:0 8px 18px rgba(23,107,80,.18); }
.auto-mix-copy strong { display:block; font-size:17px; letter-spacing:-.01em; }
.auto-mix-copy p { max-width:62ch; margin:4px 0 0; color:var(--muted); line-height:1.55; text-wrap:pretty; }
.auto-mix-generate { min-width:190px; min-height:50px; }
.editing-generation-status { margin:0; }
.avatar-talk-action { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; gap:20px; padding:20px; border:1px solid rgba(23,107,80,.14); border-radius:16px; background:radial-gradient(circle at 0 50%,rgba(218,236,226,.9),rgba(248,250,246,.96) 46%,#fff 100%); }
.avatar-talk-current { display:grid; justify-items:center; gap:9px; min-width:0; }
.avatar-talk-current > strong { justify-self:start; font-size:15px; }
.avatar-talk-frame { position:relative; display:grid; place-items:center; width:min(100%,112px); overflow:hidden; aspect-ratio:9/16; border:4px solid #245845; border-radius:16px; color:#6b7d75; background:linear-gradient(160deg,#e7efea,#f8faf7); box-shadow:0 12px 26px rgba(20,71,54,.14); }
.avatar-talk-frame img { width:100%; height:100%; object-fit:cover; }
.avatar-talk-frame img.loading { opacity:.72; }
.avatar-talk-frame span { padding:10px; font-size:13px; font-weight:800; text-align:center; }
.avatar-talk-current button { width:100%; min-height:56px; font-size:16px; font-weight:900; box-shadow:0 10px 22px rgba(23,107,80,.22); }
.avatar-talk-copy { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:14px; min-width:0; }
.avatar-talk-mark { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; color:#fff; background:var(--green); font-size:14px; font-weight:900; letter-spacing:.04em; box-shadow:0 8px 18px rgba(23,107,80,.18); }
.avatar-talk-copy strong { display:block; font-size:18px; letter-spacing:-.01em; }
.avatar-talk-copy p { max-width:58ch; margin:5px 0 0; color:var(--muted); line-height:1.6; text-wrap:pretty; }
.avatar-talk-generate { width:100%; min-height:56px; }
.editing-subsection-title { margin-top:24px; }
.portfolio-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-top:18px; }
.portfolio-card { display:grid; align-content:start; gap:8px; min-width:0; padding:10px; border:1px solid var(--line); border-radius:16px; background:var(--card); overflow:hidden; }
.portfolio-card video { width:min(100%,236px); height:auto; aspect-ratio:9/16; justify-self:center; border-radius:12px; background:#08291f; object-fit:contain; }
.portfolio-card > strong { min-width:0; overflow:hidden; font-size:14px; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }
.portfolio-card small { min-width:0; color:var(--muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.portfolio-actions { display:flex; flex-wrap:wrap; gap:6px; }
.portfolio-actions a { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.portfolio-heading-actions { display:flex; justify-content:flex-end; margin-bottom:4px; }
@media (max-width:1100px) { .portfolio-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px) { .edit-mode-picker { grid-template-columns:1fr; }.portfolio-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.edit-mode-option { min-height:72px; }.auto-mix-action { grid-template-columns:1fr; gap:14px; }.auto-mix-generate { width:100%; }.avatar-talk-action { grid-template-columns:1fr 1fr; gap:20px; }.avatar-talk-generate { grid-column:1/-1; width:100%; } }
@media (max-width:600px) { .portfolio-grid { grid-template-columns:1fr; }.avatar-talk-action { grid-template-columns:1fr; }.avatar-talk-current { width:min(100%,180px); justify-self:center; }.avatar-talk-copy { grid-template-columns:1fr; justify-items:center; text-align:center; }.avatar-talk-generate { grid-column:auto; width:100%; } }

.composition-workspace { display:grid; gap:18px; margin-top:18px; }
.composition-generation-action { display:flex; justify-content:flex-end; }
.composition-generation-action[hidden] { display:none; }
.composition-heading p { margin:4px 0 0; color:var(--muted); }
.composition-segments { display:grid; gap:12px; }
.composition-segment { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.composition-segment-main { display:grid; gap:8px; align-content:start; }
.composition-segment-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; color:var(--muted); font-size:13px; }
.composition-segment-meta strong { color:var(--green); font-size:15px; }
.composition-segment-function { color:#6326c0; font-weight:800; }
.composition-segment-text { margin:0; color:var(--ink); font-size:16px; line-height:1.5; font-weight:700; }
.composition-segment-controls { display:grid; gap:8px; align-content:start; padding:10px 12px; border-radius:14px; background:#f6f3fc; }
.composition-mode-picker { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.composition-mode-picker label { display:flex; flex-direction:row; justify-content:center; align-items:center; gap:7px; padding:10px; border:1px solid var(--line); border-radius:11px; background:#fff; cursor:pointer; }
.composition-mode-picker label:has(input:checked) { color:white; border-color:var(--green); background:var(--green); }
.composition-upload { display:grid; gap:6px; }
.composition-upload input { width:100%; }
.composition-upload-note { color:var(--muted); font-size:13px; }
.composition-upload-error { color:#b52f27; font-size:13px; font-weight:800; }
.composition-file-list { display:grid; gap:6px; margin-top:4px; }
.composition-file-list > div { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 9px; border:1px solid rgba(19,78,61,.14); border-radius:9px; background:#fff; }
.composition-file-list span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; }
.composition-segment.ready { border-color:#d9c8f8; box-shadow:inset 4px 0 #7939df; }
.composition-segment.error { border-color:#d96d63; box-shadow:inset 4px 0 #b52f27; }
.composition-generate { justify-self:end; min-width:280px; }
.composition-result-card { display:grid; gap:16px; }
.composition-result-list { display:grid; gap:8px; }
.composition-result-row { display:grid; grid-template-columns:70px minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:11px 13px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.composition-result-row strong { color:var(--green); }
.composition-result-card video { width:min(100%,720px); max-height:70vh; justify-self:center; border-radius:16px; background:#000; }
@media (max-width:800px) { .composition-segment { grid-template-columns:1fr; }.composition-generate { width:100%; min-width:0; }.composition-result-row { grid-template-columns:60px 1fr; }.composition-result-row span:last-child { grid-column:2; } }

.material-library-section { display:grid; gap:16px; margin-top:18px; }
.material-library-heading { align-items:flex-start; }
.material-library-heading p,.avatar-library-section p,.composition-preflight-card p { margin:4px 0 0; color:var(--muted); }
.material-library-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.material-library-toolbar { display:flex; flex-wrap:wrap; align-items:end; justify-content:space-between; gap:12px; }
.material-library-toolbar label { min-width:220px; margin:0; }
.material-library-toolbar span { color:var(--muted); font-size:.9rem; }
.material-toolbar-summary { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
#material-selection-summary { color:var(--green); font-weight:800; }
.material-folder-list { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
.material-folder-chip { flex:0 0 auto; padding:9px 13px; border:1px solid var(--line); border-radius:999px; background:#f4f5ee; color:var(--ink); font-weight:750; cursor:pointer; }
.material-folder-chip.active { border-color:var(--green); background:var(--green); color:#fff; }
.material-asset-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); grid-auto-rows:max-content; align-content:start; gap:12px; max-height:620px; overflow:auto; padding:2px 6px 8px 2px; scrollbar-width:thin; }
.material-asset-card { align-self:start; height:max-content; overflow:hidden; display:grid; grid-template-rows:130px auto; border:1px solid var(--line); border-radius:15px; background:#fff; }
.material-asset-card.selected { border-color:var(--green); box-shadow:0 0 0 3px rgba(31,99,76,.14); }
.material-asset-card>img { width:100%; height:130px; object-fit:cover; color:transparent; background:#edf2e8; transition:opacity .16s ease; }
.material-asset-card>img.loading { opacity:.72; background:linear-gradient(110deg,#edf2e8 8%,#f8faf5 18%,#edf2e8 33%); background-size:200% 100%; animation:material-thumbnail-loading 1.1s linear infinite; }
.material-asset-card>img.preview-unavailable { opacity:1; background:#edf2e8; }
@keyframes material-thumbnail-loading { to { background-position-x:-200%; } }
.material-library-empty { grid-column:1/-1; margin:0; padding:24px; color:var(--muted); text-align:center; }
.material-asset-card>div { display:grid; align-content:start; gap:6px; min-width:0; padding:12px; }
.material-card-select { display:flex; align-items:center; gap:7px; width:max-content; margin:0; color:var(--green); font-size:.82rem; font-weight:800; cursor:pointer; }
.material-card-select input { width:18px; height:18px; margin:0; }
.material-asset-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.material-asset-card small { color:var(--muted); line-height:1.4; }
.material-tags { min-height:1.4em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.material-card-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.composition-source-select { display:grid; gap:6px; margin:0; color:var(--muted); font-size:.82rem; font-weight:800; }
.composition-source-select select { margin:0; color:var(--ink); background:#fff; }
.composition-preflight-card { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,.8fr) auto; gap:18px; align-items:center; margin-top:18px; }
.composition-preflight { padding:13px 15px; border-radius:13px; background:#f4f5ee; }
.composition-preflight.success { color:#145b43; background:#e2f1e8; }
.composition-preflight.error { color:#982c25; background:#f9dfdc; }
.composition-preflight ul { margin:7px 0 0; padding-left:20px; }
.material-picker-dialog { width:min(820px,calc(100% - 24px)); }
.material-picker-card { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; gap:16px; width:100%; height:min(82vh,760px); height:min(82dvh,760px); max-height:min(82vh,760px); max-height:min(82dvh,760px); overflow:hidden; }
.dialog-heading,.dialog-actions { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.dialog-heading h3,.dialog-heading p { margin:0; }
.dialog-heading p { margin-top:5px; color:var(--muted); }
.material-picker-assets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:9px; min-width:0; min-height:0; overflow:auto; padding:2px 4px 10px 2px; scrollbar-width:thin; }
.material-picker-item { display:grid; grid-template-columns:auto 74px minmax(0,1fr); align-items:center; gap:10px; margin:0; padding:9px; border:1px solid var(--line); border-radius:12px; background:#fff; cursor:pointer; }
.material-picker-item:has(input:checked) { border-color:var(--green); box-shadow:inset 3px 0 var(--green); background:#eef7f1; }
.material-picker-thumbnail { width:74px; height:52px; border-radius:8px; object-fit:cover; color:transparent; background:#edf2e8; }
.material-picker-thumbnail.loading { opacity:.72; }
.material-picker-item span { display:grid; gap:3px; min-width:0; }
.material-picker-item strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.material-picker-item small { color:var(--muted); }
.dialog-actions { position:relative; z-index:2; align-items:center; padding-top:12px; border-top:1px solid var(--line); background:var(--card); box-shadow:0 -8px 18px rgba(255,253,248,.9); }
.material-move-card { width:min(520px,calc(100vw - 28px)); }
.composition-retry { justify-self:start; }
@media (max-width:900px) { .composition-preflight-card { grid-template-columns:1fr; }.composition-preflight-card .composition-generate { justify-self:stretch; }.material-library-heading { align-items:stretch; flex-direction:column; }.material-library-actions>* { flex:1; } }
@media (max-width:560px) { .material-asset-grid,.material-picker-assets { grid-template-columns:1fr; }.material-asset-grid { max-height:480px; }.material-library-actions { display:grid; grid-template-columns:1fr 1fr; }.material-library-toolbar { align-items:stretch; }.material-library-toolbar label { min-width:0; width:100%; }.material-toolbar-summary { justify-content:flex-start; }.dialog-actions { align-items:stretch; flex-direction:column; }.dialog-actions button { width:100%; } }

/* The secondary taxonomy can contain many authored framework types. */
.script-industry-types { grid-template-columns:1fr; max-height:220px; overflow-y:auto; padding-right:2px; scrollbar-width:thin; }
.script-industry-type { padding:8px 10px; line-height:1.35; text-align:left; }

/* 2026-08-29 现代 SaaS 视觉系统：保留业务结构，仅统一信息密度与组件语言。 */
:root {
  --ink:#17211d; --muted:#66716c; --paper:#f5f7f6; --card:#fff; --surface:#f8faf9;
  --line:#e3e9e6; --line-strong:#d3ddd8; --green:#176b50; --green-strong:#0f5942;
  --green-soft:#e9f5ef; --lime:#b9ed5b; --cyan:#9de4d0; --danger:#b43c36;
  --shadow-sm:0 1px 2px rgba(20,42,33,.04),0 8px 24px rgba(20,42,33,.045);
  --shadow-md:0 18px 48px rgba(20,42,33,.08);
  font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { min-width:320px; color:var(--ink); background:var(--paper); }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; transition:border-color .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease; }
button:hover:not(:disabled) { transform:translateY(-1px); }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline:3px solid rgba(23,107,80,.2); outline-offset:2px; }
.skip-link { position:fixed; top:10px; left:84px; z-index:100; padding:9px 13px; border-radius:9px; color:#fff; background:var(--green); text-decoration:none; transform:translateY(-160%); }
.skip-link:focus { transform:none; }

.workspace-shell { grid-template-columns:72px minmax(0,1fr); grid-template-rows:60px minmax(0,1fr); min-height:100dvh; }
.workspace-sidebar { grid-row:1/-1; position:sticky; top:0; z-index:20; height:100dvh; padding:14px 10px; overflow:visible; border-right:1px solid var(--line); background:#fff; }
.sidebar-brand { justify-content:center; margin:0 0 18px; padding:0 0 14px; border-bottom:1px solid var(--line); }
.brand-mark { width:42px; height:42px; border-radius:13px; box-shadow:0 8px 18px rgba(23,107,80,.18); font-size:12px; }
.sidebar-brand .brand-copy { display:none; }
.tabs { gap:7px; overflow:visible; border:0; border-radius:0; background:transparent; }
.tabs a { position:relative; display:grid; grid-template-columns:1fr; place-items:center; width:50px; min-height:48px; padding:0; border:0; border-radius:14px; color:#77817c; }
.tabs a:last-child { border:0; }
.tabs a:hover { color:var(--green); background:var(--green-soft); }
.tabs a.active { color:var(--green); background:var(--green-soft); box-shadow:inset 3px 0 var(--green); }
.tabs a > span:last-child { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.nav-index,.tabs a.active .nav-index { width:34px; height:34px; border:0; border-radius:10px; color:inherit; background:transparent; font-size:11px; font-weight:850; }
.tabs a::after { content:attr(data-label); position:absolute; left:59px; top:50%; z-index:50; width:max-content; max-width:150px; padding:7px 10px; border-radius:8px; color:#fff; background:#1f2b26; box-shadow:var(--shadow-sm); font-size:12px; font-weight:700; opacity:0; pointer-events:none; transform:translate(-6px,-50%); transition:.16s ease; }
.tabs a:hover::after,.tabs a:focus-visible::after { opacity:1; transform:translate(0,-50%); }

.workspace-topbar { grid-column:2; grid-row:1; position:sticky; top:0; z-index:15; display:flex; align-items:center; justify-content:space-between; gap:20px; min-width:0; height:60px; padding:0 32px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.92); backdrop-filter:blur(18px); }
.topbar-context { display:flex; align-items:center; gap:9px; min-width:0; }
.topbar-context > span { color:var(--muted); font-size:12px; }
.topbar-context strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.topbar-actions { display:flex; align-items:center; gap:16px; flex:0 0 auto; color:var(--muted); font-size:12px; }
.topbar-save-state { display:inline-flex; align-items:center; gap:7px; padding:6px 9px; border-radius:999px; background:var(--surface); }
.topbar-save-state i { width:7px; height:7px; border-radius:50%; background:#9aa49f; }
.topbar-save-state.saved i { background:#36a570; box-shadow:0 0 0 4px rgba(54,165,112,.1); }
.topbar-avatar { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; color:#fff; background:linear-gradient(145deg,var(--green),#27936f); font-weight:850; }
main { grid-column:2; grid-row:2; width:min(1480px,100%); margin:0 auto; padding:28px 32px 80px; }

.panel { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.section-heading { align-items:center; margin-bottom:22px; }
.section-heading > div { gap:11px; }
.section-heading h2,.future h2 { font-size:clamp(25px,3vw,34px); letter-spacing:-.035em; }
.section-heading p { color:var(--muted); font-size:13px; line-height:1.55; }
.step { min-width:36px; height:30px; padding:0 10px; border:1px solid #c9eadb; border-radius:9px; color:var(--green); background:var(--green-soft); font-size:12px; }
.card { padding:20px; border:1px solid var(--line); border-radius:16px; background:var(--card); box-shadow:var(--shadow-sm); }
.card-title h3,.card-title p { margin-top:0; }
.card-title p { color:var(--muted); }

label { gap:6px; color:#39453f; font-size:13px; font-weight:700; }
input,textarea,select { min-height:42px; padding:9px 11px; border-color:var(--line-strong); border-radius:9px; color:var(--ink); background:#fff; transition:border-color .16s ease,box-shadow .16s ease; }
input::placeholder,textarea::placeholder { color:#9aa39f; font-weight:500; }
input:focus,textarea:focus,select:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(23,107,80,.11); }
textarea { min-height:72px; }
.required-mark,.optional-mark { padding:2px 6px; font-size:10px; }
.required-mark { color:#a53c36; background:#fcebe9; }
.optional-mark { color:#6c7671; background:#f0f3f1; }
.primary,.secondary,.accent,.ghost { min-height:40px; padding:9px 14px; border-radius:9px; font-size:13px; }
.primary { background:var(--green); box-shadow:0 6px 14px rgba(23,107,80,.14); }
.primary:hover:not(:disabled) { background:var(--green-strong); box-shadow:0 9px 18px rgba(23,107,80,.18); }
.secondary { color:var(--green); background:var(--green-soft); }
.accent { color:#214225; background:var(--lime); }
.ghost { border-color:var(--line-strong); background:#fff; }
.ghost:hover:not(:disabled) { border-color:#aebbb5; background:var(--surface); }
.compact { min-height:34px; padding:7px 10px; }
.status { border-radius:9px; font-size:13px; }
.neutral { background:#f0f3f1; }
.success { background:#e7f6ee; }
.error { background:#fce8e5; }

.entity-panel { padding:0; }
.entity-panel .section-heading { margin-bottom:20px; }
.entity-layout { grid-template-columns:minmax(0,1.65fr) minmax(300px,.62fr); gap:18px; }
.entity-form { grid-template-columns:repeat(12,minmax(0,1fr)); gap:15px 14px; padding:22px; }
.entity-form > h3,.entity-form > .field-wide,.entity-form > .form-actions { grid-column:1/-1; }
.entity-form .field-span-4 { grid-column:span 4; }
.entity-form .field-span-6 { grid-column:span 6; }
.entity-form-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.entity-form-heading h3,.entity-form-heading p { margin:0; }
.entity-form-heading h3 { font-size:17px; }
.entity-form-heading p { margin-top:4px; color:var(--muted); font-size:12px; }
.entity-form-heading > span { padding:5px 8px; border-radius:999px; color:var(--green); background:var(--green-soft); font-size:11px; font-weight:800; white-space:nowrap; }
.entity-form input,.entity-form textarea,.entity-form select { padding:9px 11px; }
.entity-form #secondary-industry-custom { margin-top:2px; }
.entity-custom-industry-context { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:14px; border:1px solid #cfe2d9; border-radius:11px; background:#f7fbf9; }
.entity-form .form-actions { display:flex; justify-content:flex-end; margin-top:1px; padding-top:3px; }
.entity-form .form-actions .primary { min-width:190px; }
.entity-optional-section { overflow:hidden; margin:0; border:1px solid var(--line); border-radius:11px; background:var(--surface); }
.entity-optional-section summary { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:58px; padding:11px 14px; cursor:pointer; list-style:none; }
.entity-optional-section summary::-webkit-details-marker { display:none; }
.entity-optional-section summary::after { content:"＋"; order:3; color:var(--green); font-size:18px; font-weight:500; }
.entity-optional-section[open] summary::after { content:"−"; }
.entity-optional-section summary > span:first-child { display:grid; gap:2px; min-width:0; }
.entity-optional-section summary strong { font-size:13px; }
.entity-optional-section summary small { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:500; }
.entity-optional-section summary .optional-mark { margin-left:auto; }
.entity-optional-content { padding:14px; border-top:1px solid var(--line); background:#fff; }
.entity-persona-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
.entity-marketing-fields { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

.history-card { position:sticky; top:78px; padding:16px; }
.history-card .card-title h3 { font-size:16px; }
.history-card .product-list { gap:8px; margin-top:14px; }
.history-row { grid-template-columns:minmax(0,1fr) auto; gap:8px; min-height:54px; padding:7px 8px; border-color:var(--line); border-radius:11px; }
.history-row.active { border-color:#9ccdb9; background:#fbfefc; box-shadow:inset 3px 0 var(--green); }
.history-entity::before { flex-basis:30px; width:30px; height:30px; border-radius:9px; }
.history-entity strong { font-size:13px; }
/* 其余版块沿用同一套明亮组件，不再出现突兀的深色工作区。 */
.dark-panel { color:var(--ink); background:transparent; border-color:transparent; }
.dark-panel .section-heading p,.dark-panel label,.dark-panel .script-entity-summary small,.dark-panel .script-entity-summary span { color:var(--muted); }
.dark-panel input,.dark-panel textarea,.dark-panel select { color:var(--ink); background:#fff; border-color:var(--line-strong); }
.script-template-picker,.script-card { border-color:var(--line); background:#fff; box-shadow:var(--shadow-sm); }
.script-template-picker { border-radius:16px; }
.script-picker-heading p,.script-duration,.script-rewrite-privacy,.script-scene-function,.script-scene-table-header { color:var(--muted); }
.script-category-tab,.script-industry-type,.script-topic-list-button { color:#33413a; border-color:var(--line); background:var(--surface); }
.script-category-tab.active,.script-industry-type.active,.script-topic-list-button.active { color:var(--green); border-color:#a8d5c0; background:var(--green-soft); }
.script-topic-list-button span,.script-topic-list-button small,.script-topic-list-button.active span,.script-topic-list-button.active small { color:var(--muted); }
.script-scene-row { border-color:var(--line); background:var(--surface); }
.script-template-text { color:var(--ink); }
.script-scene-number { color:var(--green); }
.dark-panel .neutral { color:#405149; background:#f0f3f1; }
.custom-script-card { border-color:var(--line); background:#fff; box-shadow:var(--shadow-sm); }
.voice-expression-panel,.voice-preview-panel { border-color:var(--line); background:var(--surface); box-shadow:none; }
.voice-option-grid label:has(input:checked),.voice-speed-picker label:has(input:checked) { background:var(--green); }
.material-library-section,.composition-workspace,.avatar-library-section,.edit-mode-card,.publishing-account-card,.portfolio-card { border-color:var(--line); box-shadow:var(--shadow-sm); }

@media (max-width:1100px) {
  .workspace-topbar { padding-inline:24px; }
  main { padding:24px 24px 70px; }
  .entity-layout { grid-template-columns:1fr; }
  .history-card { position:static; }
}
@media (max-width:760px) {
  .workspace-shell { grid-template-columns:60px minmax(0,1fr); grid-template-rows:56px minmax(0,1fr); }
  .workspace-sidebar { width:60px; padding:10px 5px; }
  .brand-mark { width:38px; height:38px; border-radius:11px; font-size:10px; }
  .tabs { gap:5px; }
  .tabs a { width:49px; min-height:43px; }
  .tabs a::after { left:54px; }
  .workspace-topbar { height:56px; padding-inline:16px; }
  .topbar-workspace-name { display:none; }
  main { padding:20px 14px 58px; }
  .section-heading { align-items:flex-start; gap:8px; }
  .section-heading h2 { font-size:25px; }
  .panel { padding:0; border-radius:0; }
  .entity-form { grid-template-columns:1fr; padding:16px; }
  .entity-form .field-span-4,.entity-form .field-span-6,.entity-form > .field-wide,.entity-form > .form-actions { grid-column:auto; }
  .entity-form-heading { align-items:flex-start; }
  .entity-persona-fields,.entity-marketing-fields,.entity-custom-industry-context { grid-template-columns:1fr; }
  .history-row { grid-template-columns:minmax(0,1fr) auto auto; }
}
@media (max-width:520px) {
  .workspace-shell { grid-template-columns:54px minmax(0,1fr); }
  .workspace-sidebar { width:54px; padding-inline:3px; }
  .tabs a { width:47px; }
  .tabs a::after { display:none; }
  .topbar-context > span,.topbar-save-state { display:none; }
  .topbar-actions { gap:8px; }
  main { padding:16px 10px 48px; }
  .section-heading p { display:none; }
  .card { padding:15px; border-radius:13px; }
  .entity-form-heading > span { display:none; }
  .entity-optional-heading small { max-width:190px; }
  .entity-form .form-actions { align-items:stretch; flex-direction:column; }
  .entity-form .form-actions .primary { min-width:0; width:100%; }
}

/* Workflow state, prerequisite guidance, and actionable task failures. */
.nav-index.current { color:var(--ink); background:var(--lime); }
.nav-index.todo { color:#87918c; background:#f0f1ec; }
.tabs a.active .nav-index.current { color:var(--ink); background:var(--lime); }
.workflow-prerequisites { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin:-10px 0 22px; padding:13px 16px; border:1px solid #dfb991; border-radius:13px; color:#6f4529; background:#fff2df; }
.workflow-prerequisites strong { font-weight:800; }
.workflow-prerequisites a { min-height:44px; display:inline-flex; align-items:center; color:var(--green); font-weight:850; text-decoration:underline; text-underline-offset:3px; }
.task-error,.publishing-task-error { display:grid; gap:7px; margin-top:7px; color:var(--danger); }
.task-error p,.publishing-task-error p { margin:0; color:inherit; line-height:1.5; }
.task-error details,.publishing-task-error details,.task-error-details { color:#704e49; font-size:12px; }
.task-error summary,.publishing-task-error summary,.task-error-details summary { width:max-content; cursor:pointer; font-weight:750; }
.task-error code,.publishing-task-error code,.task-error-details code { display:block; max-width:100%; margin-top:6px; padding:8px 10px; overflow-wrap:anywhere; white-space:pre-wrap; border-radius:8px; color:#5e403c; background:rgba(255,255,255,.58); }
.status .task-error-details { margin-top:9px; }

/* 声音样本：文件上传与电脑麦克风录音共用现有声音注册通道。 */
.voice-source-picker { display:grid; gap:12px; margin:0; padding:14px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.voice-source-picker legend { padding:0 6px; color:var(--ink); font-size:13px; font-weight:800; }
.voice-source-tabs { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.voice-source-tabs button { min-height:42px; border:1px solid var(--line-strong); border-radius:12px; color:var(--muted); background:#fff; }
.voice-source-tabs button.active { color:#fff; border-color:var(--green); background:var(--green); }
.voice-source-panel { display:grid; gap:10px; }
.voice-source-panel > small,.voice-source-panel > p { margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.voice-recorder-toolbar { display:grid; grid-template-columns:auto auto 54px minmax(80px,1fr); align-items:center; gap:8px; }
.voice-recorder-toolbar button { min-height:40px; }
#voice-record-timer { font-variant-numeric:tabular-nums; text-align:center; }
.voice-record-level { display:block; height:9px; overflow:hidden; border-radius:999px; background:#dfe6e2; }
.voice-record-level i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--green),var(--lime)); transition:width .08s linear; }
.voice-recorder audio { width:100%; }
.voice-record-actions { display:flex; flex-wrap:wrap; gap:8px; }
.voice-record-actions button { min-height:38px; }

@media (max-width:520px) {
  .workflow-prerequisites { align-items:flex-start; margin:-4px 0 16px; }
  .workflow-prerequisites a { min-height:36px; }
  .voice-recorder-toolbar { grid-template-columns:1fr 1fr; }
  .voice-record-level { grid-column:1 / -1; }
}

/* 2026-08-29 第二轮密度修正：完整导航、紧凑素材卡和等高操作按钮。 */
.workspace-shell { grid-template-columns:218px minmax(0,1fr); }
.workspace-sidebar { width:218px; padding:16px 14px 22px; overflow-x:hidden; overflow-y:auto; }
.sidebar-brand { justify-content:flex-start; gap:11px; margin-bottom:14px; padding:0 4px 15px; }
.sidebar-brand .brand-copy { display:block; min-width:0; }
.sidebar-brand .brand-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.sidebar-brand .brand-copy small { display:block; margin-top:3px; font-size:10px; }
.tabs { gap:4px; }
.tabs a { grid-template-columns:34px minmax(0,1fr); justify-items:start; gap:10px; width:100%; min-height:48px; padding:7px 10px; border-radius:11px; color:#53615b; font-size:13px; font-weight:720; }
.tabs a > span:last-child { position:static; width:auto; height:auto; overflow:hidden; clip:auto; text-overflow:ellipsis; white-space:nowrap; }
.tabs a::after { display:none; }
.tabs a.active { color:var(--green); background:var(--green-soft); box-shadow:inset 3px 0 var(--green); }
.nav-index,.tabs a.active .nav-index { width:30px; height:30px; border-radius:8px; color:inherit; background:#f0f4f2; font-variant-numeric:tabular-nums; }
.tabs a.active .nav-index { background:#d8f1e5; }

/* 视频素材库：统一为竖屏 9:16 预览，信息与操作压缩在单个窄横条中。 */
.material-asset-grid { grid-template-columns:repeat(auto-fill,minmax(150px,168px)); justify-content:start; gap:10px; max-height:670px; padding:3px 8px 10px 3px; }
.material-asset-card { position:relative; grid-template-rows:auto auto; width:100%; border-radius:12px; }
.material-asset-card > img { width:100%; height:auto; aspect-ratio:9/16; object-fit:cover; object-position:center; }
.material-asset-card > div { gap:3px; padding:7px; }
.material-card-select { position:absolute; top:7px; left:7px; z-index:2; gap:5px; padding:4px 7px; border:1px solid rgba(255,255,255,.66); border-radius:7px; color:#fff; background:rgba(15,43,33,.72); backdrop-filter:blur(7px); font-size:11px; }
.material-card-select input { width:15px; height:15px; min-height:0; accent-color:var(--green); }
.material-asset-card strong { font-size:11px; line-height:1.25; }
.material-asset-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9.5px; line-height:1.25; }
.material-card-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; margin-top:2px; }
.material-card-actions button { width:100%; min-width:0; min-height:27px; height:27px; padding:3px 0; border-radius:6px; font-size:9px; }

/* AI分身库：两栏顶部对齐，上传区不再随卡片高度拉伸。 */
.avatar-library-section { grid-template-columns:minmax(270px,330px) minmax(0,1fr); align-items:start; gap:22px; padding:20px; }
.avatar-upload-panel,.avatar-manager-panel { min-width:0; align-content:start; }
.avatar-upload-panel { gap:13px; padding-right:22px; border-right:1px solid var(--line); }
.avatar-pane-heading { display:grid; gap:3px; margin-bottom:4px; }
.avatar-pane-heading > span { color:var(--green); font-size:10px; font-weight:850; letter-spacing:.08em; }
.avatar-pane-heading h3,.avatar-pane-heading p { margin:0; }
.avatar-pane-heading h3 { font-size:17px; }
.avatar-pane-heading p { max-width:52ch; color:var(--muted); font-size:11px; line-height:1.5; }
.avatar-upload-panel input { min-height:40px; }
.avatar-upload-panel input[type="file"] { padding:7px; font-size:11px; }
.avatar-upload-panel > button { width:100%; min-height:40px; height:40px; padding:8px 12px; }
.avatar-manager-panel .media-library-grid { grid-template-columns:repeat(auto-fill,minmax(132px,148px)); justify-content:start; gap:10px; margin-top:13px; }
.avatar-library-card { display:grid; grid-template-rows:auto auto auto; gap:7px; width:100%; min-height:0; padding:8px; border-radius:12px; background:var(--surface); }
.avatar-preview-frame { position:relative; width:100%; overflow:hidden; aspect-ratio:9/16; border-radius:9px; background:#191022; }
.avatar-thumbnail,.avatar-card-video { display:block; width:100%; height:100%; border-radius:inherit; }
.avatar-thumbnail { max-height:none; object-fit:cover; object-position:center top; background:#e7eeea; transition:opacity .16s ease; }
.avatar-card-video { object-fit:contain; background:#191022; }
.avatar-card-video[hidden],.avatar-thumbnail[hidden] { display:none; }
.avatar-thumbnail.loading { opacity:.76; }
.avatar-library-card > strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.avatar-card-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; margin-top:1px; }
.avatar-card-actions .avatar-select-choice { grid-column:1/-1; }
.avatar-card-actions button { width:100%; min-width:0; min-height:32px; height:32px; padding:5px 3px; border-radius:7px; font-size:10px; }
.avatar-library-card.selected { border:1px solid var(--green); box-shadow:0 0 0 3px rgba(23,107,80,.12); }
.avatar-library-card.playing-video { box-shadow:0 0 0 3px rgba(121,57,223,.17); }
#avatars .workflow-next-actions { grid-template-columns:repeat(2,minmax(0,220px)); justify-content:flex-end; gap:8px; margin-top:14px; }
#avatars .workflow-next-actions button { min-height:40px; height:40px; padding:8px 12px; }
#materials > .workflow-next-actions.single-next-action,#avatars .workflow-next-actions.single-next-action { grid-template-columns:minmax(190px,240px); justify-content:end; }

@media (max-width:900px) {
  .workspace-shell { grid-template-columns:178px minmax(0,1fr); }
  .workspace-sidebar { width:178px; padding-inline:10px; }
  .sidebar-brand .brand-copy small { display:none; }
  .tabs a { gap:7px; padding-inline:7px; font-size:12px; }
  .avatar-library-section { grid-template-columns:1fr; }
  .avatar-upload-panel { padding:0 0 18px; border-right:0; border-bottom:1px solid var(--line); }
}
@media (max-width:620px) {
  .workspace-shell { grid-template-columns:126px minmax(0,1fr); }
  .workspace-sidebar { width:126px; padding:10px 6px; }
  .sidebar-brand { justify-content:center; }
  .sidebar-brand .brand-copy { display:none; }
  .tabs a { grid-template-columns:27px minmax(0,1fr); gap:5px; min-height:44px; padding:6px 5px; font-size:10px; }
  .nav-index,.tabs a.active .nav-index { width:25px; height:25px; font-size:9px; }
  .material-asset-grid { grid-template-columns:repeat(auto-fill,minmax(138px,158px)); }
  .avatar-manager-panel .media-library-grid { grid-template-columns:repeat(auto-fill,minmax(130px,160px)); }
  #materials > .workflow-next-actions.single-next-action,#avatars .workflow-next-actions.single-next-action { grid-template-columns:1fr; }
}
.knowledge-supplement-card { margin-top: 20px; }

/* 2026-08-30 实体与素材库交互精简：序号始终可见，选填项直接展开。 */
.entity-optional-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:58px; padding:11px 14px; }
.entity-optional-heading > span:first-child { display:grid; gap:2px; min-width:0; }
.entity-optional-heading strong { font-size:13px; }
.entity-optional-heading small { color:var(--muted); font-size:11px; font-weight:500; line-height:1.45; }
.entity-optional-heading .optional-mark { margin-left:auto; }

.history-row { grid-template-columns:minmax(0,1fr) auto; }
.history-entity::before { display:none; content:none; }
.history-index { display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; border-radius:9px; color:#fff; background:var(--green); font-size:8px; font-weight:900; font-variant-numeric:tabular-nums; }
.history-actions { display:flex; align-items:center; gap:5px; }
.history-actions .history-action { display:inline-flex; align-items:center; justify-content:center; gap:4px; width:auto; min-width:58px; height:34px; min-height:34px; padding:0 9px; border:1px solid var(--line); border-radius:8px; background:#fff; font-size:10px; font-weight:800; white-space:nowrap; }
.history-actions .history-use { color:#fff; border-color:var(--green); background:var(--green); }
.history-actions .history-edit { color:var(--green); background:var(--green-soft); }
.history-actions .history-delete { color:var(--danger); background:#fff7f5; }
.history-actions .history-action:hover { transform:translateY(-1px); box-shadow:0 4px 10px rgba(16,40,32,.08); }

.material-library-heading h3 { margin:0; }
.material-library-toolbar { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; }
.material-library-toolbar > button { white-space:nowrap; }
.material-library-toolbar #upload-materials { justify-self:end; }
.material-folder-list { min-width:0; margin:0; padding:2px 0 4px; }
.material-selection-toolbar { display:flex; align-items:center; justify-content:flex-end; gap:8px; min-height:42px; padding:7px 9px; border-radius:11px; background:var(--green-soft); }
.material-selection-toolbar[hidden] { display:none !important; }
.material-selection-toolbar span { margin-right:auto; color:var(--green); font-size:12px; font-weight:800; }

@media (max-width:720px) {
  .history-row { grid-template-columns:minmax(0,1fr); }
  .history-actions { grid-column:1/-1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .history-actions .history-action { width:100%; }
  .material-library-toolbar { grid-template-columns:auto minmax(0,1fr) auto; }
  .material-folder-list { grid-column:1/-1; grid-row:2; }
  .material-selection-toolbar { align-items:stretch; flex-wrap:wrap; }
}
.knowledge-upload-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.knowledge-upload-form label { flex: 1 1 360px; }
.knowledge-document-list { display: grid; gap: 12px; margin-top: 16px; }
.knowledge-document-card { border: 1px solid var(--line, #dce5e1); border-radius: 16px; padding: 14px; }
.knowledge-document-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.knowledge-chunk-list { display: grid; gap: 10px; margin-top: 12px; }
.knowledge-chunk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.knowledge-chunk-row textarea { width: 100%; resize: vertical; }
@media (max-width: 760px) { .knowledge-chunk-row { grid-template-columns: auto minmax(0, 1fr); } .knowledge-chunk-row button { grid-column: 2; } }

/* 2026-09-05 行业、素材与数字人交互调整。 */
.script-scene-row { grid-template-columns:1fr; gap:8px; align-items:stretch; padding:12px; }
.script-scene-heading { display:flex; align-items:center; gap:14px; }
.script-scene-row textarea { width:100%; min-height:96px; }
.material-asset-grid { grid-template-columns:repeat(auto-fill,minmax(132px,148px)); }
.material-library-toolbar { grid-template-columns:auto minmax(0,1fr) minmax(250px,auto) auto; align-items:center; }
#material-library-quota { margin:0; padding:10px 13px; white-space:nowrap; }
.avatar-library-section { grid-template-columns:minmax(270px,330px) minmax(0,1fr); align-items:start; }
.avatar-create-panel { display:grid; align-content:start; min-height:150px; padding-right:22px; border-right:1px solid var(--line); }
.avatar-create-button { width:100%; min-height:88px; font-size:18px; }
.avatar-create-button span { font-size:26px; line-height:1; }
.avatar-library-card { cursor:pointer; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.avatar-library-card:hover,.avatar-library-card:focus-visible { transform:translateY(-4px); border-color:#8fc8af; box-shadow:0 10px 24px rgba(18,78,59,.16); outline:none; }
.avatar-thumbnail { transition:opacity .16s ease,transform .18s ease; }
.avatar-library-card:hover .avatar-thumbnail,.avatar-library-card:focus-visible .avatar-thumbnail { transform:scale(1.018); }
.avatar-create-dialog { width:min(620px,calc(100% - 24px)); }
.avatar-create-dialog .avatar-upload-panel { display:grid; gap:15px; padding:26px; background:var(--card); }
@media (max-width:720px) {
  .material-library-toolbar { grid-template-columns:auto minmax(0,1fr) auto; }
  #material-library-quota { grid-column:1/3; grid-row:3; white-space:normal; }
  .avatar-create-panel { padding:0 0 18px; border-right:0; border-bottom:1px solid var(--line); }
  .material-asset-grid { grid-template-columns:repeat(auto-fill,minmax(130px,150px)); }
}
.portfolio-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.portfolio-toolbar label { flex: 1 1 240px; }
.portfolio-tags { color: var(--muted, #64746f); }

/* 成片视觉模板：缩略图和主预览均来自服务端同源 ASS 渲染。 */
.visual-template-workspace { display:grid; gap:18px; margin-top:22px; }
.visual-template-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.visual-template-heading h3,.visual-template-heading p,.visual-preview-summary p { margin:0; }
.visual-template-heading p { margin-top:4px; color:var(--muted); }
.visual-template-gallery { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:start; gap:14px; }
.visual-template-card { position:relative; display:grid; grid-template-rows:auto auto; gap:0; min-width:0; padding:0; overflow:hidden; border:2px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); text-align:left; cursor:pointer; transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.visual-template-card:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(12,50,39,.1); }
.visual-template-card:focus-visible { outline:3px solid rgba(23,107,80,.24); outline-offset:3px; }
.visual-template-card.selected { border-color:var(--green); box-shadow:0 0 0 4px rgba(23,107,80,.12); }
.visual-template-card img { display:block; width:100%; height:auto; min-height:0; max-height:none; aspect-ratio:9/16; object-fit:cover; background:linear-gradient(145deg,#dcebe4,#49675b); }
.visual-template-card-copy { display:grid; gap:3px; padding:11px 12px 13px; }
.visual-template-card-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.visual-template-card-copy small { min-height:34px; color:var(--muted); line-height:1.45; }
.visual-template-loading { position:absolute; inset:12px 12px auto auto; padding:3px 7px; border-radius:999px; color:#fff; background:rgba(8,35,27,.68); font-size:10px; }
.visual-template-media { position:relative; min-width:0; aspect-ratio:9/16; background:linear-gradient(145deg,#dcebe4,#49675b); }
.visual-template-actions { position:absolute; z-index:2; right:12px; bottom:12px; left:12px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.visual-template-view,.visual-template-use { width:100%; min-width:0; min-height:42px; padding:8px 10px; border:1px solid rgba(255,255,255,.78); border-radius:10px; color:#fff; box-shadow:0 8px 24px rgba(5,28,21,.18); font-size:14px; font-weight:800; white-space:nowrap; }
.visual-template-view { background:rgba(12,42,33,.78); backdrop-filter:blur(8px); }
.visual-template-use { background:var(--green); }
.visual-template-view:hover:not(:disabled) { background:rgba(23,107,80,.94); }
.visual-template-use:hover:not(:disabled) { background:var(--green-strong); }
.visual-template-view:active:not(:disabled),.visual-template-use:active:not(:disabled) { transform:translateY(1px); }
.visual-template-card-status { color:var(--danger); font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
.visual-preview-stage { display:grid; grid-template-columns:minmax(180px,270px) minmax(0,1fr); align-items:center; gap:22px; padding:18px; border-radius:18px; background:linear-gradient(145deg,#eef6f1,#f9f7ed); }
.visual-preview-phone { position:relative; display:grid; place-items:center; width:min(100%,250px); aspect-ratio:9/16; overflow:hidden; border:7px solid #173a2f; border-radius:25px; background:#173a2f; box-shadow:0 14px 30px rgba(5,31,23,.18); }
.visual-preview-phone img,.visual-preview-phone video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#0b1f19; }
.visual-preview-phone div { padding:20px; color:#d6e7e0; text-align:center; font-size:12px; line-height:1.6; }
.visual-preview-play { position:absolute; z-index:3; inset:0; display:grid; place-items:center; width:58px; height:58px; margin:auto; padding:0 0 0 3px; transform:none; border:1px solid rgba(255,255,255,.72); border-radius:50%; color:#fff; background:rgba(13,52,41,.82); box-shadow:0 10px 28px rgba(4,24,18,.28); backdrop-filter:blur(8px); font-size:22px; transition:background-color .2s ease,box-shadow .2s ease; }
#play-composition-preview:hover:not(:disabled) { transform:none; background:rgba(23,107,80,.96); box-shadow:0 12px 30px rgba(4,24,18,.34); }
#play-composition-preview:active:not(:disabled) { transform:none; box-shadow:0 7px 20px rgba(4,24,18,.26); }
.visual-preview-play[hidden] { display:none; }
.visual-preview-summary { display:grid; align-content:center; gap:9px; }
.visual-preview-summary > strong { font-size:24px; }
.visual-safe-badge { width:max-content; padding:6px 10px; border-radius:999px; color:var(--green); background:#dff5e9; font-size:12px; font-weight:900; }
.visual-advanced { border-top:1px solid var(--line); padding-top:14px; }
.visual-advanced summary { cursor:pointer; color:var(--green); font-weight:900; }
.visual-control-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; margin-top:16px; }
.visual-control-grid label { margin:0; }
.visual-control-grid input[type="color"] { min-height:46px; padding:5px; }
.visual-control-grid input[type="range"] { padding:4px 0; }
.visual-control-grid output { float:right; color:var(--green); font-weight:900; }
.visual-style-settings { margin-top:22px; padding:20px; border:1px solid rgba(23,107,80,.14); border-radius:16px; background:linear-gradient(145deg,rgba(238,246,241,.72),rgba(255,255,255,.9)); }
.visual-style-settings .visual-editor-section-heading h4 { font-size:17px; }
.visual-style-settings .visual-editor-section-heading p { margin-top:4px; }
.visual-advanced-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
@media (max-width:1050px) { .visual-template-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) {
  .visual-template-heading { align-items:flex-start; }
  .visual-template-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .visual-template-card img { min-height:0; }
  .visual-preview-stage { grid-template-columns:125px minmax(0,1fr); gap:13px; padding:12px; }
  .visual-preview-summary > strong { font-size:18px; }
  .visual-control-grid { grid-template-columns:1fr; }
  .visual-style-settings { padding:15px; }
}

/* 文案改写：减少表单噪音，把最终选择收敛为原稿与新稿两个明确动作。 */
.custom-script-rewrite-action { display:grid; grid-template-columns:minmax(0,420px); justify-content:start; }
.custom-script-rewrite-action button { min-height:46px; }
.custom-script-rewrite-panel { display:grid; gap:14px; padding:16px; border:1px solid #cddbd5; border-radius:14px; background:#f6faf8; }
.custom-script-rewrite-panel[hidden] { display:none; }
.custom-script-rewrite-panel textarea { min-height:210px; color:var(--ink); background:#fff; }
.script-choice-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.script-choice-button { display:grid; grid-template-columns:32px minmax(0,1fr); align-items:center; justify-content:center; gap:8px; min-height:50px; padding:8px 12px; border:1px solid #bfd2c9; border-radius:12px; color:var(--green); background:#edf5f1; font-weight:800; text-align:left; transition:transform .2s ease,background-color .2s ease,border-color .2s ease,box-shadow .2s ease; }
.script-choice-button.rewritten { color:#fff; border-color:var(--green); background:var(--green); box-shadow:0 8px 18px rgba(23,107,80,.16); }
.script-choice-button:hover:not(:disabled) { transform:translateY(-1px); }
.script-choice-button:active:not(:disabled) { transform:translateY(1px) scale(.99); }
.script-choice-button:focus-visible { outline:3px solid rgba(23,107,80,.22); outline-offset:2px; }
.script-choice-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; color:inherit; background:rgba(255,255,255,.72); font-size:18px; font-weight:900; }
.script-choice-button.rewritten .script-choice-icon { color:var(--green); }
.script-topic-actions { gap:10px; }
.script-topic-actions > .accent { width:100%; }
.script-topic-actions .script-choice-actions { width:100%; }
.script-topic-actions .script-choice-button { grid-template-columns:28px minmax(0,1fr); min-height:48px; padding-inline:8px; font-size:12px; }
.script-topic-actions .script-choice-icon { width:26px; height:26px; border-radius:8px; font-size:15px; }

@media (max-width:560px) {
  .custom-script-rewrite-action { grid-template-columns:1fr; }
  .script-choice-actions { grid-template-columns:1fr 1fr; }
  .script-choice-button { grid-template-columns:1fr; justify-items:center; text-align:center; }
}

@media (prefers-reduced-motion:reduce) {
  .script-choice-button { transition:none; }
}

/* 脚本恢复成功时不占提示位，右侧内容与左侧模板卡片顶边对齐。 */
.script-library-content { display:grid; align-content:start; gap:18px; min-width:0; }
.script-library-content .script-grid { margin-top:0; }
.script-quick-actions { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:var(--shadow-sm); }
.script-quick-actions > div { display:grid; gap:3px; min-width:0; }
.script-quick-actions strong { font-size:16px; }
.script-quick-actions span { color:var(--muted); font-size:13px; }
.script-quick-action-buttons { display:flex !important; grid-auto-flow:column; gap:10px !important; flex:0 0 auto; }
.script-quick-actions .script-custom-open,.script-quick-actions .script-ai-generate { width:auto; min-width:150px; }
.script-quick-actions .script-custom-open > span:last-child { color:inherit; font-size:inherit; }
.script-ai-generate { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.script-quick-actions .script-ai-generate span { color:inherit; font-size:inherit; }
.script-ai-generate .script-ai-indicator { font-size:15px; }
.script-ai-generate.is-loading .script-ai-indicator { animation:script-ai-pulse 1.15s ease-in-out infinite; }
.script-quick-actions.is-generating {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  justify-items:center;
  gap:14px;
  padding:24px clamp(18px,4vw,42px);
  text-align:center;
  background:
    radial-gradient(circle at 50% 0,rgba(173,239,77,.2),transparent 45%),
    #fff;
}
.script-quick-actions.is-generating > div:first-child { justify-items:center; }
.script-quick-actions.is-generating .script-quick-action-buttons {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(220px,300px));
  justify-content:center;
  width:100%;
}
.script-quick-actions.is-generating .script-custom-open,
.script-quick-actions.is-generating .script-ai-generate {
  width:100%;
  min-height:64px;
  border-radius:14px;
  font-size:16px;
  box-shadow:0 12px 28px rgba(23,107,80,.12);
}
.script-quick-actions.is-generating .script-ai-generate:disabled {
  color:#fff !important;
  border-color:transparent !important;
  background:var(--green) !important;
  opacity:1 !important;
  box-shadow:0 12px 28px rgba(23,107,80,.2) !important;
}

.script-generation-status {
  display:grid;
  gap:13px;
  min-height:88px;
  margin:0 0 14px;
  padding:16px 18px 15px;
  border:1px solid #c9e2d7;
  border-left:4px solid var(--green);
  border-radius:14px;
  color:var(--ink);
  background:
    radial-gradient(circle at 90% 0,rgba(173,239,77,.14),transparent 32%),
    linear-gradient(110deg,#f3faf6 0%,#fbfcf9 72%);
  box-shadow:0 12px 28px rgba(23,107,80,.09);
}
.script-generation-status[hidden] { display:none; }
.script-generation-status.error { border-color:#efc7c1; border-left-color:#b64c43; background:#fff7f5; }
.script-generation-status.success { border-color:#c9e2d7; background:#f2faf6; }
.script-generation-heading { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:13px; }
.script-generation-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; color:#fff; background:var(--green); font-size:13px; font-weight:900; letter-spacing:.04em; box-shadow:0 8px 18px rgba(23,107,80,.18); }
.script-generation-status.error .script-generation-icon { background:#b64c43; box-shadow:0 8px 18px rgba(182,76,67,.16); }
.script-generation-copy { display:grid; gap:3px; min-width:0; }
.script-generation-copy strong { font-size:15px; font-weight:800; letter-spacing:-.01em; }
.script-generation-copy > span { color:var(--muted); font-size:12px; line-height:1.5; }
.script-generation-state { align-self:start; padding:5px 8px; border-radius:7px; color:var(--green); background:#e1f2ea; font-size:10px; font-weight:800; white-space:nowrap; }
.script-generation-status.error .script-generation-state { color:#a53c36; background:#fce8e5; }
.script-generation-progress { position:relative; display:block; height:7px; overflow:hidden; border-radius:999px; background:#dfe9e4; }
.script-generation-progress i { position:absolute; inset:0 auto 0 0; width:34%; border-radius:inherit; background:linear-gradient(90deg,#176b50,#63a889,#adef4d); animation:script-generation-sweep 1.65s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes script-generation-sweep { 0% { transform:translateX(-105%); } 100% { transform:translateX(295%); } }
@keyframes script-ai-pulse { 0%,100% { transform:scale(.82); opacity:.58; } 50% { transform:scale(1.12); opacity:1; } }
@media (prefers-reduced-motion:reduce) {
  .script-generation-progress i { width:62%; animation:none; }
  .script-ai-generate.is-loading .script-ai-indicator { animation:none; }
}
@media (max-width:760px) {
  .script-quick-actions { align-items:stretch; flex-direction:column; }
  .script-quick-action-buttons { grid-auto-flow:row; grid-template-columns:1fr 1fr; width:100%; }
  .script-quick-actions .script-custom-open,.script-quick-actions .script-ai-generate { width:100%; min-width:0; }
  .script-quick-actions.is-generating .script-quick-action-buttons { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .script-quick-action-buttons { grid-template-columns:1fr; }
  .script-generation-heading { grid-template-columns:38px minmax(0,1fr); }
  .script-generation-icon { width:38px; height:38px; }
  .script-generation-state { grid-column:2; justify-self:start; }
}

/* 成片链路：先生成画面，再集中确认模板、字幕和音乐。 */
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.composition-workspace[hidden],.final-presentation-settings[hidden] { display:none; }
.editing-base-generation { grid-template-columns:minmax(0,1fr) minmax(260px,.72fr) auto; }
.composition-result-card { gap:10px; padding:18px 22px; }
.composition-progress-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; color:var(--ink); font-variant-numeric:tabular-nums; }
.composition-progress-heading span { color:var(--green); font-weight:900; }
#composition-progress { width:100%; height:12px; overflow:hidden; border:0; border-radius:999px; background:#f1e9fc; accent-color:var(--green); }
#composition-progress::-webkit-progress-bar { border-radius:999px; background:#f1e9fc; }
#composition-progress::-webkit-progress-value { border-radius:999px; background:linear-gradient(90deg,#7939df,#d9c8f8); transition:width .3s ease; }
#composition-progress.is-running::-webkit-progress-value { background:linear-gradient(100deg,#7939df 25%,#d9c8f8 50%,#7939df 75%); background-size:200% 100%; animation:composition-progress-sweep 2.4s linear infinite; }
#composition-progress::-moz-progress-bar { background:#7939df; border-radius:999px; }
/* 生成期间让关键进度始终停留在视口内，并避开底部创作进度栏。 */
#editing .composition-result-card.composition-progress-floating {
  position:fixed;
  left:calc(var(--workspace-nav-width,232px) + 28px);
  right:28px;
  bottom:72px;
  z-index:17;
  margin:0;
  padding:14px 18px;
  border-color:#d9c7f1;
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 34px rgba(72,34,113,.16);
  backdrop-filter:blur(16px);
}
#editing:has(.composition-result-card.composition-progress-floating) { padding-bottom:88px; }
@media (max-width:760px) {
  #editing .composition-result-card.composition-progress-floating { left:10px; right:10px; bottom:72px; padding:12px 14px; }
  #editing:has(.composition-result-card.composition-progress-floating) { padding-bottom:82px; }
}
@keyframes composition-progress-sweep { to { background-position:-200% 0; } }
@media (prefers-reduced-motion:reduce) {
  .live-task-progress-fill,#composition-progress::-webkit-progress-value { transition:none; }
  #composition-progress.is-running::-webkit-progress-value { animation:none; }
}
.final-presentation-settings { scroll-margin-top:24px; }
.final-presentation-settings .visual-preview-stage { --final-editor-height:clamp(560px,calc(100dvh - 210px),720px); grid-template-columns:minmax(315px,405px) minmax(0,1fr); align-items:start; gap:clamp(22px,2.4vw,38px); padding:28px; }
.final-video-preview video,.final-video-preview img { width:100%; height:100%; object-fit:contain; }
.visual-template-preview-column { display:grid; align-content:start; justify-items:center; gap:14px; min-width:0; height:var(--final-editor-height); }
.visual-template-preview-column .visual-preview-phone { width:auto; height:100%; max-width:100%; aspect-ratio:9/16; justify-self:center; }
.visual-template-preview-column:has(.preview-avatar-select:not([hidden])) { grid-template-rows:auto minmax(0,1fr); }
.preview-avatar-select { width:min(100%,320px); }
.visual-headline-style-heading .headline-disable-option { display:inline-flex; align-items:center; gap:8px; margin:0; font-size:15px; cursor:pointer; }
.visual-headline-style-heading .headline-disable-option input { width:18px; height:18px; min-height:0; padding:0; margin:0; box-shadow:none; accent-color:var(--green); }
.visual-headline-style-heading > div:has(.headline-disable-option) { align-items:center; }
.visual-settings-workbench { display:grid; align-content:stretch; min-width:0; height:var(--final-editor-height); padding:10px; overflow:hidden; border:1px solid rgba(121,57,223,.16); border-radius:22px; background:rgba(255,255,255,.94); box-shadow:0 16px 38px rgba(72,34,113,.09); }
.visual-settings-scroll { min-width:0; height:100%; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; scrollbar-color:#a976e4 #eee5f8; scrollbar-width:thin; border:1px solid rgba(121,57,223,.14); border-radius:14px; background:#fff; }
.visual-settings-scroll::-webkit-scrollbar { width:10px; }
.visual-settings-scroll::-webkit-scrollbar-track { border-radius:10px; background:#eee5f8; }
.visual-settings-scroll::-webkit-scrollbar-thumb { border:2px solid #eee5f8; border-radius:10px; background:#a976e4; }
.visual-content-workbench { display:grid; align-content:start; gap:0; min-width:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.visual-title-workbench { display:grid; align-content:start; gap:15px; min-width:0; padding:26px 28px 28px; border:0; border-top:1px solid rgba(121,57,223,.14); border-radius:0; background:transparent; box-shadow:none; }
.visual-title-workbench-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.visual-title-workbench-heading > div { display:grid; gap:4px; min-width:0; }
.visual-title-workbench-heading strong { font-size:20px; letter-spacing:-.02em; }
.visual-title-workbench-heading small { color:var(--muted); line-height:1.45; }
.visual-title-workbench label { margin:0; color:#30483f; font-size:13px; font-weight:900; }
.visual-title-workbench input { min-height:48px; margin-top:6px; background:#fff; font-size:16px; font-weight:800; }
.visual-title-workbench .status { margin:0; padding:10px 12px; font-size:13px; }
.visual-headline-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:2px; }
.visual-headline-actions button,.change-template-button { width:100%; min-height:50px; }
.visual-headline-style-picker { display:grid; align-content:start; gap:18px; min-width:0; padding:26px 28px 30px; border:0; border-top:1px solid rgba(121,57,223,.14); border-radius:0; background:transparent; box-shadow:none; }
.visual-headline-style-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.visual-headline-style-heading > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px 14px; min-width:0; }
.visual-headline-style-heading strong { color:var(--ink); font-size:18px; letter-spacing:-.02em; }
.visual-headline-style-heading small { color:var(--muted); font-size:12px; }
.visual-headline-style-heading > span { flex:0 0 auto; color:var(--green); font-size:12px; font-weight:850; }
.visual-headline-style-scroll { min-width:0; overflow:hidden; padding:10px; border:1px solid #e3d6f2; border-radius:14px; background:#f8f4fc; box-shadow:inset 0 1px #fff; }
.visual-headline-style-gallery { display:grid; grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(156px,46%); gap:11px; min-width:0; overflow-x:auto; overscroll-behavior-inline:contain; padding:2px 2px 10px; scrollbar-color:#a976e4 #eee5f8; scrollbar-width:thin; scroll-snap-type:x proximity; }
.visual-headline-style-gallery.empty { display:block; padding:20px; color:var(--muted); text-align:center; }
.visual-headline-style-card { position:relative; display:grid; grid-template-rows:64px auto; gap:7px; min-width:0; min-height:94px; padding:7px; overflow:hidden; border:2px solid transparent; border-radius:13px; color:var(--ink); background:#fff; box-shadow:none; cursor:pointer; text-align:left; scroll-snap-align:start; transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease,background-color .2s ease; }
.visual-headline-style-card:hover:not(:disabled) { transform:translateY(-2px); border-color:#c9a9ed; background:#fff; box-shadow:0 9px 20px rgba(72,34,113,.11); }
.visual-headline-style-card:active:not(:disabled) { transform:translateY(0) scale(.99); }
.visual-headline-style-card:focus-visible { outline:3px solid rgba(121,57,223,.25); outline-offset:2px; }
.visual-headline-style-card.selected { border-color:#8b45e6; background:#fff; box-shadow:0 0 0 3px rgba(121,57,223,.1); }
.visual-headline-style-card.applying { opacity:.65; cursor:wait; }
.visual-headline-style-preview { display:grid; place-content:center; align-content:center; gap:1px; min-width:0; padding:7px; overflow:hidden; border-radius:9px; color:#fff; background:#333139; text-align:center; }
.visual-headline-style-preview strong,.visual-headline-style-preview small { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-shadow:0 2px 4px rgba(0,0,0,.75); }
.visual-headline-style-preview strong { font-size:14px; line-height:1.12; }
.visual-headline-style-preview small { color:#fff; font-size:12px; font-weight:850; line-height:1.12; }
.visual-headline-style-name { overflow:hidden; padding-inline:3px; color:#5b476b; font-size:11px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.visual-headline-style-check { position:absolute; top:9px; right:9px; display:none; place-items:center; width:20px; height:20px; border-radius:50%; color:#fff; background:#8b45e6; box-shadow:0 3px 8px rgba(66,24,122,.3); font-size:12px; font-weight:900; }
.visual-headline-style-card.selected .visual-headline-style-check { display:grid; }
.visual-headline-style-card[data-headline-style-id="local_store_hot_v1"] .visual-headline-style-preview strong { color:#ffde00; font-size:16px; }
.visual-headline-style-card[data-headline-style-id="enthusiastic_recommend_v1"] .visual-headline-style-preview small { color:#19d34a; font-size:13px; }
.visual-headline-style-card[data-headline-style-id="urgent_promotion_v1"] .visual-headline-style-preview { font-family:serif; }
.visual-headline-style-card[data-headline-style-id="urgent_promotion_v1"] .visual-headline-style-preview small { color:#ffde00; }
.visual-headline-style-card[data-headline-style-id="trusted_expert_v1"] .visual-headline-style-preview { background:#123c32; }
.visual-headline-style-card[data-headline-style-id="trusted_expert_v1"] .visual-headline-style-preview small { color:#eacb76; font-size:14px; }
.visual-headline-style-card[data-headline-style-id="professional_knowledge_v1"] .visual-headline-style-preview { background:#1557b0; }
.visual-headline-style-card[data-headline-style-id="professional_knowledge_v1"] .visual-headline-style-preview small { color:#77e3ff; font-size:14px; }
.visual-headline-style-card[data-headline-style-id="warm_story_v1"] .visual-headline-style-preview { background:#47333f; }
.visual-headline-style-card[data-headline-style-id="warm_story_v1"] .visual-headline-style-preview strong { color:#fe2abb; text-shadow:0 0 1px #fff,0 2px 4px #000; }
.visual-headline-style-card[data-headline-style-id="warm_story_v1"] .visual-headline-style-preview small { color:#fe8de9; text-shadow:0 0 1px #fff,0 2px 4px #000; }
.visual-preview-controls { display:grid; align-items:start; justify-items:stretch; min-width:0; padding:0; }
.change-template-button { padding:11px 16px; font-size:15px; }
.presentation-option-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; color:var(--green); background:var(--green-soft); font-size:18px; font-weight:900; }
.visual-preview-music { display:grid; grid-template-columns:minmax(0,1fr); gap:17px; width:100%; min-width:0; padding:26px 28px 28px; border:0; border-radius:0; background:transparent; box-shadow:none; }
.visual-preview-music-heading { display:flex; align-items:center; gap:12px; }
.visual-preview-music-heading > div { display:grid; gap:3px; }
.visual-preview-music-heading small { color:var(--muted); }
.visual-preview-music audio { width:100%; min-width:0; height:40px; }
.music-select-label { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:14px; margin:0; color:#30213f; font-size:14px; font-weight:900; }
.music-select-label select { min-height:52px; margin:0; background:#fff; font-weight:800; }
.bgm-quick-upload { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:12px; margin:0; padding-top:14px; border-top:1px solid rgba(23,107,80,.12); }
.bgm-quick-upload label { margin:0; color:#30483f; font-size:13px; font-weight:900; }
.bgm-quick-upload input { min-height:46px; margin:0; padding:9px 12px; background:#fff; }
.bgm-quick-upload button { min-height:46px; white-space:nowrap; }
.visual-caption-quick-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(112px,.42fr); gap:12px; padding-top:16px; border-top:1px solid rgba(121,57,223,.14); }
.visual-caption-quick-controls label { display:grid; gap:7px; margin:0; color:#30213f; font-size:13px; font-weight:900; }
.visual-caption-quick-controls select { width:100%; min-height:48px; margin:0; background:#fff; font-weight:800; }
.presentation-final-action { display:flex; justify-content:flex-end; padding-top:2px; }
.presentation-final-action .final-generate-video { width:min(100%,360px); min-height:56px; font-size:17px; }
.editing-choice-dialog { width:min(1100px,calc(100vw - 32px)); max-height:88dvh; padding:22px; overflow:auto; border:1px solid rgba(23,107,80,.18); border-radius:20px; background:#fff; box-shadow:0 24px 70px rgba(10,45,35,.24); }
.editing-choice-dialog::backdrop { background:rgba(8,30,24,.42); backdrop-filter:blur(4px); }
.editing-choice-dialog .dialog-heading { margin-bottom:18px; }
.editing-choice-dialog .dialog-heading button { min-width:40px; min-height:40px; padding:4px; border-radius:12px; font-size:22px; }
.editing-choice-dialog .visual-template-gallery { grid-template-columns:repeat(4,minmax(0,1fr)); }
.visual-template-editor-dialog { width:min(1280px,calc(100vw - 32px)); }
.visual-template-editor-layout { display:grid; grid-template-columns:minmax(190px,260px) minmax(0,1fr); align-items:start; gap:24px; }
.visual-editor-preview { position:sticky; top:0; display:grid; gap:10px; min-width:0; }
.visual-editor-preview > strong { font-size:18px; }
.visual-editor-preview > small { color:var(--muted); line-height:1.5; }
.visual-editor-preview-frame { position:relative; display:grid; place-items:center; width:100%; overflow:hidden; aspect-ratio:9/16; border:6px solid #173a2f; border-radius:22px; color:#d8e8e1; background:#173a2f; box-shadow:0 16px 36px rgba(5,31,23,.18); }
.visual-editor-preview-frame img { width:100%; height:100%; object-fit:cover; transition:opacity .2s ease; }
.visual-editor-preview-frame.loading img { opacity:.48; }
.visual-editor-preview-frame.loading::after { position:absolute; z-index:2; inset:auto 12px 12px; padding:8px 10px; border:1px solid rgba(255,255,255,.3); border-radius:10px; content:"正在更新字体预览"; color:#fff; background:rgba(8,35,27,.82); box-shadow:0 8px 20px rgba(4,24,18,.24); text-align:center; font-size:12px; font-weight:800; backdrop-filter:blur(8px); }
.visual-editor-preview-frame div { padding:18px; text-align:center; line-height:1.6; }
.visual-editor-workspace { display:grid; gap:16px; min-width:0; }
.visual-editor-tabs { display:flex; gap:6px; overflow-x:auto; padding:4px; border-radius:14px; background:#edf3ef; scrollbar-width:thin; }
.visual-editor-tabs button { flex:1 0 auto; min-width:72px; min-height:42px; padding:8px 12px; border:0; border-radius:10px; color:var(--muted); background:transparent; font-weight:800; }
.visual-editor-tabs button.active { color:#fff; background:var(--green); box-shadow:0 7px 16px rgba(23,107,80,.18); }
.visual-editor-panel { display:grid; gap:16px; min-width:0; padding:18px; border:1px solid var(--line); border-radius:16px; background:#fafbf8; }
.visual-editor-panel[hidden] { display:none; }
.visual-editor-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.visual-editor-section-heading h4,.visual-editor-section-heading p { margin:0; }
.visual-editor-section-heading p { max-width:62ch; margin-top:4px; color:var(--muted); line-height:1.55; }
.visual-toggle { display:flex; flex-direction:row; align-items:center; gap:8px; width:max-content; margin:0; white-space:nowrap; }
.visual-toggle input { width:18px; height:18px; margin:0; accent-color:var(--green); }
.visual-annotation-list { display:grid; gap:12px; }
.visual-annotation-list fieldset { display:grid; grid-template-columns:auto minmax(180px,1fr) minmax(130px,.45fr) minmax(110px,.35fr); align-items:end; gap:12px; margin:0; padding:14px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.visual-annotation-list legend { padding:0 6px; color:var(--green); font-weight:900; }
.visual-annotation-position { grid-column:1/-1; display:grid; grid-template-columns:minmax(130px,.45fr) 1fr 1fr; gap:14px; align-items:end; }
.visual-annotation-position output { float:right; color:var(--green); font-weight:900; }
.visual-template-editor-dialog .visual-advanced-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:4px; }
.visual-template-editor-dialog .visual-advanced-actions button { min-width:180px; }
.final-render-output { display:grid; gap:14px; margin-top:14px; }
.final-render-output video { justify-self:center; width:min(100%,760px); }
.final-output-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; width:100%; }
.final-output-actions a { display:inline-grid; place-items:center; min-width:150px; min-height:48px; text-decoration:none; }
.final-output-actions .secondary { color:var(--green); }
@media (max-width:1100px) {
  .final-presentation-settings .visual-preview-stage { --final-editor-height:clamp(520px,calc(100dvh - 190px),620px); grid-template-columns:minmax(290px,350px) minmax(0,1fr); gap:20px; }
}
@media (max-width:1300px) {
  .visual-headline-style-gallery { grid-auto-columns:minmax(164px,46%); }
}
@media (max-width:800px) {
  .editing-base-generation { grid-template-columns:1fr; }
  .editing-base-generation .composition-generate { width:100%; }
  .final-presentation-settings .visual-preview-stage { grid-template-columns:minmax(260px,320px) minmax(0,1fr); gap:22px; padding:18px; }
  .visual-preview-music,.visual-title-workbench,.visual-headline-style-picker { padding:22px; }
  .editing-choice-dialog .visual-template-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .visual-template-editor-layout { grid-template-columns:1fr; }
  .visual-editor-preview { position:static; grid-template-columns:110px minmax(0,1fr); align-items:center; }
  .visual-editor-preview-frame { grid-row:1/3; }
  .visual-annotation-list fieldset { grid-template-columns:1fr 1fr; }
}
@media (max-width:760px) { .final-presentation-settings .visual-preview-stage { --final-editor-height:auto; grid-template-columns:1fr; }.visual-template-preview-column { justify-self:center; width:min(82vw,320px); height:auto; }.visual-template-preview-column .visual-preview-phone { width:100%; height:auto; }.visual-settings-workbench { width:100%; height:min(620px,72dvh); }.visual-content-workbench { width:100%; }.visual-preview-music,.visual-title-workbench,.visual-headline-style-picker { padding:20px 18px 22px; }.visual-title-workbench { width:100%; }.visual-preview-controls { grid-column:auto; justify-items:stretch; }.visual-headline-style-picker { grid-column:auto; }.visual-headline-style-heading { align-items:flex-start; flex-direction:column; gap:5px; }.visual-headline-style-gallery { grid-auto-columns:152px; }.visual-caption-quick-controls { grid-template-columns:1fr; }.music-select-label { grid-template-columns:1fr; gap:7px; }.bgm-quick-upload { grid-template-columns:1fr; }.bgm-quick-upload button { width:100%; }.presentation-final-action .final-generate-video { width:100%; }.final-output-actions { display:grid; grid-template-columns:1fr 1fr; }.final-output-actions a { width:100%; min-width:0; } }

@media (max-width:560px) {
  .editing-choice-dialog .visual-template-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .visual-template-card-copy small { display:none; }
  .visual-template-actions { right:8px; bottom:8px; left:8px; gap:6px; }
  .visual-template-view,.visual-template-use { min-height:38px; padding:7px 2px; border-radius:8px; font-size:12px; }
  .visual-editor-tabs { margin-inline:-4px; }
  .visual-editor-panel { padding:14px; }
  .visual-editor-section-heading { display:grid; }
  .visual-annotation-list fieldset { grid-template-columns:1fr; }
  .visual-annotation-position { grid-template-columns:1fr; }
  .visual-template-editor-dialog .visual-advanced-actions { display:grid; }
  .visual-template-editor-dialog .visual-advanced-actions button { width:100%; min-width:0; }
}

/* 选题与声音工作台：把选择、试听和生成拆成清晰的连续动作。 */
.custom-script-card[hidden] { display:none; }
#custom-script-card { scroll-margin-top:22px; }
.script-custom-open { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:48px; }
.script-custom-open .script-choice-icon { color:var(--green); background:var(--green-soft); }
.scripts-next-actions { grid-template-columns:minmax(220px,320px); justify-content:end; margin-top:18px; }
.custom-script-rewrite-action { grid-template-columns:repeat(2,minmax(0,320px)); gap:10px; }
.custom-script-rewrite-action button { display:flex; align-items:center; justify-content:center; gap:8px; }
.custom-script-choice-actions { grid-template-columns:minmax(0,320px); justify-content:end; }
@media (max-width:760px) { .custom-script-heading { align-items:flex-start; flex-direction:column; gap:8px; }.custom-script-heading p { text-align:left; } }

.voice-workspace-stack { display:grid; gap:18px; }
.voice-import-card,.voice-library-card { width:100%; min-width:0; }
#voice-task-form[hidden] { display:none; }
.voice-library-card > h3 { margin-bottom:14px; }
.voice-library-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; width:100%; margin-top:16px; }
.voice-library-group { min-width:0; padding:14px; border:1px solid var(--line); border-radius:16px; background:#f7f8f3; }
.voice-library-group-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.voice-library-group-heading h4 { margin:0; font-size:17px; }
.voice-library-group-heading span { padding:4px 9px; border-radius:999px; color:var(--green); background:var(--green-soft); font-size:12px; font-weight:800; }
.voice-library-group .voice-library-list { margin:0; }
.voice-group-empty { margin:0; padding:20px 12px; border:1px dashed #cbd8d2; border-radius:12px; color:var(--muted); text-align:center; }
.voice-library-group .voice-library-row { grid-template-columns:minmax(0,1fr) auto; gap:10px; min-height:60px; padding:8px 10px; cursor:default; background:#fff; }
.voice-library-group .voice-library-row.selected,
.voice-library-group .voice-library-row.system.selected { border:1px solid var(--line); background:#fff; box-shadow:none; }
.voice-library-group .library-row-details { align-self:center; }
.voice-card-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.voice-card-actions button { flex:0 0 auto; width:auto; min-width:68px; min-height:36px; padding:7px 10px; font-size:12px; white-space:nowrap; }
.voice-card-actions .voice-select-choice { min-width:168px; }

#move-selected-materials:not(:disabled) { color:#fff; border-color:#0f5f45; background:#0f5f45; box-shadow:0 8px 18px rgba(15,95,69,.2); }
#move-selected-materials:not(:disabled):hover { border-color:#0b4e38; background:#0b4e38; }
.voice-library-row.selected .voice-select-choice { color:#fff; border-color:var(--green); background:var(--green); }
.voice-generation-action-bar { margin-top:10px; }
.voice-preview-main-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,.9fr); align-items:stretch; gap:14px; }
.voice-preview-main-row:has(.legacy-voice-speed[hidden]) { grid-template-columns:1fr; }
.voice-preview-main-row .legacy-voice-speed { height:100%; margin:0; }
.voice-generated-audio { display:grid; align-content:center; gap:12px; min-width:0; padding:14px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.72); }
.voice-generated-audio audio { width:100%; min-width:0; }
#voice-next-actions { grid-template-columns:repeat(3,minmax(160px,220px)); justify-content:end; }
#voice-next-actions p { text-align:right; }

@media (max-width:900px) {
  .voice-library-groups,.voice-preview-main-row { grid-template-columns:1fr; }
  #voice-next-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:600px) {
  .custom-script-rewrite-action,.custom-script-choice-actions,.scripts-next-actions { grid-template-columns:1fr; }
  .voice-library-group { padding:10px; }
  .voice-library-group .voice-library-row { grid-template-columns:1fr; }
  .voice-card-actions { justify-content:stretch; }
  .voice-card-actions button { flex:1 1 auto; }
  .voice-generation-action-bar { grid-template-columns:1fr; }
  .voice-generation-action-bar .voice-stop-generation { width:100%; }
  #voice-next-actions { grid-template-columns:1fr; }
  #voice-next-actions p { text-align:left; }
}

/* 2026-09-06 脚本按需展开与双入口声音创建。 */
.topic-card { grid-template-columns:minmax(0,1fr) minmax(180px,260px); }
.script-topic-actions { grid-column:2; grid-row:1; }
.script-topic-actions > button { width:100%; min-height:48px; }
.script-structure-fields { grid-column:1/-1; grid-row:2; }
.script-scene-row textarea {
  min-height:0;
  height:auto;
  overflow-y:hidden;
  resize:none;
}
#scripts .script-template-picker { max-height:none; overflow:visible; }
#scripts .script-topic-actions {
  grid-column:1/-1;
  grid-row:1;
  grid-template-columns:repeat(3,minmax(120px,1fr));
  justify-self:end;
  width:min(100%,720px);
}
#scripts .script-structure-fields { grid-row:2; }
.script-change-copy { display:flex; align-items:center; justify-content:center; gap:8px; }
.script-action-icon { font-size:20px; line-height:1; }

/* 脚本阅读空间：单组操作入口、完整段落高度、正文与底部操作栏互不遮挡。 */
#scripts .script-library-layout { grid-template-columns:clamp(224px,25%,300px) minmax(0,1fr); gap:20px; }
#scripts .script-template-picker { gap:14px; padding:18px; border-radius:16px; }
#scripts .script-picker-heading h3 { font-size:18px; }
#scripts .script-picker-heading p { line-height:1.5; }
#scripts .script-category-tabs { gap:6px; }
#scripts .script-category-tab { min-height:44px; border-radius:8px; font-size:13px; }
#scripts .script-industry-type { min-height:42px; padding:10px 12px; border-radius:8px; overflow-wrap:anywhere; }
#scripts .script-industry-type.active { box-shadow:inset 3px 0 var(--green); }
#scripts .script-library-content { gap:0; }
#scripts .script-quick-actions { gap:12px; padding:0 2px 12px; border:0; border-radius:0; background:transparent; box-shadow:none; }
#scripts .script-quick-actions:not(.is-generating) { justify-content:flex-end; }
#scripts .script-quick-actions strong { font-size:18px; }
#scripts .script-quick-actions span { line-height:1.5; }
/* Keep the creation entry only while the workspace is empty; populated editors own their actions. */
#scripts .script-library-content:has(.topic-card) .script-quick-actions { display:none; }
#scripts .script-grid { margin-top:0; gap:12px; }
#scripts .topic-card { grid-template-columns:minmax(0,1fr); gap:12px; padding:16px; border-radius:16px; }
#scripts .script-topic-actions { width:100%; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
#scripts .script-topic-actions > button { min-height:42px; padding:9px 12px; border-radius:10px; overflow-wrap:anywhere; }
#scripts .script-structure-fields { gap:10px; min-width:0; min-height:0; align-content:start; padding:2px 4px 12px 2px; }
#scripts .script-structure-fields:focus-visible { outline:2px solid #8fc8af; outline-offset:2px; border-radius:10px; }
#scripts .script-scene-row { min-width:0; margin:0; padding:10px 12px; gap:7px; border-radius:12px; }
#scripts .script-scene-heading { gap:12px; flex-wrap:wrap; }
#scripts .script-scene-number { font-size:13px; font-weight:750; }
#scripts .script-scene-function { font-size:12px; font-weight:600; color:var(--muted); }
#scripts .script-scene-row textarea { min-height:44px; max-height:none; padding:9px 11px; border-radius:9px; font-size:14px; font-weight:600; line-height:1.65; overflow-wrap:anywhere; }
#scripts .script-generation-status { flex:0 0 auto; margin:0 0 12px; }
html:has(#scripts.active-page) { scroll-padding-top:88px; scroll-padding-bottom:84px; }

@media (min-width:1100px) and (min-height:640px) {
  main:has(> #scripts.active-page) { padding-bottom:80px; }
  #scripts .script-library-layout { height:calc(100dvh - 180px); }
  #scripts .script-template-picker { max-height:100%; grid-template-rows:auto auto minmax(0,1fr); overflow:hidden; }
  #scripts .script-industry-types { max-height:none; min-height:0; align-content:start; overflow-y:auto; scrollbar-gutter:stable; }
  #scripts .script-library-content { display:flex; flex-direction:column; height:100%; min-height:0; }
  #scripts .script-quick-actions { flex:0 0 auto; }
  #scripts .script-grid { flex:1 1 auto; min-height:0; grid-template-rows:minmax(0,1fr); }
  #scripts .script-topic-editor { min-height:0; }
  #scripts .topic-card { height:100%; min-height:0; grid-template-rows:auto minmax(0,1fr); }
  #scripts .script-structure-fields { overflow-y:auto; scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#9ab5a9 #edf3ef; scroll-padding-block:12px; }
}
@media (max-width:1099px) {
  #scripts .script-library-layout { grid-template-columns:minmax(0,1fr); gap:18px; }
  #scripts .script-industry-types { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:180px; }
  #scripts .script-category-tabs { display:flex; flex-wrap:wrap; }
  #scripts .script-category-tab { flex:1 1 90px; }
}
@media (max-width:560px) {
  #scripts .script-template-picker,#scripts .topic-card { padding:12px; }
  #scripts .script-industry-types { grid-template-columns:1fr; }
  #scripts .script-topic-actions { grid-template-columns:1fr; gap:7px; }
  #scripts .script-quick-action-buttons { flex-wrap:wrap; }
  #scripts .script-quick-action-buttons > button { flex:1 1 100%; }
  #scripts .script-scene-row { padding:9px; }
  #scripts .script-structure-fields { padding-inline:0; }
}

/* 下一步校验：把客户带到第一个缺项，并让对应输入框清晰跳动。 */
#scripts .script-required-attention {
  position:relative;
  z-index:1;
  border-color:#d33f67 !important;
  background:#fff7fa !important;
  box-shadow:0 0 0 4px rgba(211,63,103,.14),0 12px 28px rgba(92,39,126,.16) !important;
  animation:script-required-bounce .62s cubic-bezier(.22,.82,.26,1) 2;
  transform-origin:center;
  will-change:transform;
}
#scripts .script-required-attention :is(textarea,input,select) {
  border-color:#d33f67 !important;
  box-shadow:0 0 0 3px rgba(211,63,103,.12) !important;
}
#scripts .script-required-hint {
  display:inline-flex;
  align-items:center;
  min-height:24px;
  margin-left:auto;
  padding:3px 9px;
  border-radius:7px;
  color:#a7264c;
  background:#ffe8ef;
  font-size:12px;
  font-weight:800;
  line-height:1.35;
}
@keyframes script-required-bounce {
  0%,100% { transform:translateY(0) scale(1); }
  28% { transform:translateY(-8px) scale(1.006); }
  52% { transform:translateY(3px) scale(.998); }
  74% { transform:translateY(-3px) scale(1.003); }
}
@media (prefers-reduced-motion:reduce) {
  #scripts .script-required-attention { animation:none; }
}

.voice-create-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.voice-create-card {
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  gap:16px;
  min-width:0;
  padding:20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--surface);
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.voice-create-card.active { border-color:#73a994; box-shadow:0 12px 30px rgba(29,91,69,.1); }
.voice-create-card:focus-within { border-color:var(--green); box-shadow:0 0 0 3px rgba(29,91,69,.12); }
.voice-create-heading {
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  align-items:center;
  gap:13px;
  width:100%;
  padding:0 0 14px;
  border:0;
  border-bottom:1px solid var(--line);
  color:var(--ink);
  background:transparent;
  text-align:left;
}
.voice-create-heading span:last-child { display:grid; gap:3px; }
.voice-create-heading strong { font-size:19px; }
.voice-create-heading small { color:var(--muted); font-size:12px; font-weight:600; }
.voice-create-icon {
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:15px;
  color:var(--green);
  background:var(--green-soft);
  font-size:25px;
  font-weight:900;
  transition:color .2s ease,background .2s ease,transform .2s ease;
}
.voice-create-heading.active .voice-create-icon { color:#fff; background:var(--green); }
.voice-create-heading:hover .voice-create-icon { transform:translateY(-1px); }
.voice-create-heading:focus-visible { outline:3px solid rgba(29,91,69,.18); outline-offset:4px; }
.voice-create-card .voice-source-panel { align-content:start; }
.voice-create-card .voice-upload-format-tip {
  margin:0;
  color:var(--muted);
  font-size:13px;
  font-weight:600;
  line-height:1.6;
}
.voice-create-card .voice-create-submit { align-self:end; width:100%; min-height:48px; }
.voice-reading-label { color:#31483f; font-size:14px; }
.voice-recorder #voice-record-status { margin-top:0; line-height:1.65; }
#voice-next-actions { grid-template-columns:repeat(2,minmax(160px,220px)); }

@media (max-width:850px) {
  .topic-card { grid-template-columns:1fr; }
  #scripts .script-topic-actions { grid-column:1; grid-row:1; width:100%; }
  .script-structure-fields { grid-column:1; grid-row:2; }
  .voice-create-grid { grid-template-columns:1fr; }
}

@media (max-width:560px) {
  #scripts .script-topic-actions { grid-template-columns:1fr; }
}

@media (max-width:520px) {
  .voice-create-card { padding:15px; }
  .voice-create-heading { grid-template-columns:44px minmax(0,1fr); }
  .voice-create-icon { width:44px; height:44px; }
}

/* 声音库主页面只展示右上角创建入口；上传与录制表单统一放入弹窗。 */
.voice-section-heading { align-items:center; }
.voice-heading-create {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:0 0 auto;
  width:min(320px,34vw);
  min-width:210px;
  min-height:48px;
  box-shadow:0 10px 24px rgba(23,107,80,.16);
}
.voice-workspace-stack {
  display:block;
  padding:20px;
}
.voice-library-card { min-width:0; }
.voice-library-card > h3 { margin:0 0 14px; }
.voice-create-dialog {
  width:min(1500px,calc(100% - 32px));
  max-height:calc(100dvh - 32px);
  overflow:auto;
}
.voice-create-dialog-card { display:grid; gap:20px; padding:26px; background:var(--card); }
.voice-create-dialog-card .dialog-heading { position:sticky; top:-26px; z-index:2; padding:4px 0 14px; background:var(--card); }
.voice-create-dialog-content { min-width:0; }
.voice-create-dialog-content[hidden] { display:none; }

@media (max-width:900px) {
  .voice-heading-create { width:min(280px,42vw); }
}

@media (max-width:760px) {
  .voice-section-heading { align-items:stretch; }
  .voice-heading-create { width:100%; min-width:0; }
  .voice-create-dialog { width:min(720px,calc(100% - 20px)); max-height:calc(100dvh - 20px); }
  .voice-create-dialog-card { padding:18px; }
  .voice-create-dialog-card .dialog-heading { top:-18px; }
}

/* 实体信息页固定操作栏：高度与顶部工作区栏一致。 */
main { padding-bottom:112px; }
.creation-progress-dock {
  position:fixed;
  left:218px;
  right:0;
  bottom:0;
  z-index:18;
  height:60px;
  border-top:1px solid var(--line);
  background:rgba(255,255,255,.96);
  box-shadow:0 -10px 26px rgba(20,42,33,.07);
  backdrop-filter:blur(18px);
}
.creation-progress-dock-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  width:min(1480px,100%);
  height:100%;
  margin:0 auto;
  padding:0 32px;
}
.creation-progress-copy { display:grid; gap:3px; min-width:220px; }
.creation-progress-copy > span { color:#96a09b; font-size:11px; font-weight:750; line-height:1; }
.creation-progress-summary { display:flex; align-items:center; gap:10px; }
.creation-progress-summary strong { color:var(--green); font-size:16px; line-height:1; font-variant-numeric:tabular-nums; }
.creation-progress-track { display:block; width:126px; height:6px; overflow:hidden; border-radius:999px; background:#e7ece9; }
.creation-progress-track i { display:block; width:16.6667%; height:100%; border-radius:inherit; background:var(--green); }
.creation-progress-action { min-width:190px; min-height:42px; }
.creation-progress-action-shell { margin-left:auto; }
.creation-progress-dock-inner:has(#final-generate-video:not([hidden])) { width:100%; }
#creation-progress-dock #final-generate-video { margin-left:auto; order:2; }
#creation-progress-dock #change-avatar-regenerate { margin-left:auto; order:1; min-width:210px; min-height:42px; }
.creation-progress-dock-inner:has(#change-avatar-regenerate:not([hidden])) #final-generate-video { margin-left:0; }
.creation-progress-dock-inner:has(#final-generate-video:not([hidden])) .editing-final-actions { margin-left:0; }
.editing-final-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-left:auto; }
.editing-final-actions > a,.editing-final-actions > button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:44px; min-width:150px; margin:0; text-decoration:none; white-space:nowrap; }
.editing-final-actions > button:disabled { cursor:not-allowed; opacity:.45; box-shadow:none; }
@media (max-width:640px) {
  #creation-progress-dock:has(#editing-final-actions:not([hidden])) { height:auto; min-height:74px; }
  #creation-progress-dock:has(#editing-final-actions:not([hidden])) .creation-progress-dock-inner { flex-wrap:wrap; padding-block:10px; gap:8px; }
  #editing-final-actions { flex:1 1 auto; flex-wrap:wrap; }
  #editing-final-actions > a,#editing-final-actions > button { min-width:0; padding:10px; font-size:12px; }
}
.creation-progress-dock.actions-only .creation-progress-dock-inner { justify-content:center; }
.creation-progress-dock.actions-only .creation-progress-action-shell {
  width:min(760px,100%);
  margin-left:0;
}
.creation-progress-split-actions {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  width:min(620px,calc(100% - 250px));
}
.creation-progress-split-actions .creation-progress-action {
  width:100%;
  min-width:0;
  padding-inline:16px;
  white-space:nowrap;
}

/* 数字人库：创建入口收进右上角，素材库使用完整内容宽度。 */
#avatars .avatar-library-section { display:block; margin-top:0; padding:20px; }
#avatars .avatar-library-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:28px; }
#avatars .avatar-library-toolbar .avatar-pane-heading { display:flex; align-items:center; gap:12px; flex:1 1 auto; min-width:0; margin:0; }
#avatars .avatar-pane-heading h2 { margin:0; font-size:clamp(25px,3vw,34px); line-height:1.15; letter-spacing:-.035em; }
#avatars .avatar-create-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex:0 0 auto;
  width:auto;
  min-width:142px;
  min-height:40px;
  height:40px;
  padding:8px 15px;
  font-size:13px;
  box-shadow:0 8px 18px rgba(23,107,80,.14);
}
#avatars .avatar-create-button span { font-size:18px; line-height:1; }
#avatars .avatar-manager-panel { width:100%; min-width:0; }
#avatars .avatar-manager-panel .media-library-grid {
  grid-template-columns:repeat(auto-fit,minmax(152px,180px));
  justify-content:space-between;
  width:100%;
  gap:14px;
  margin-top:18px;
}

@media (max-width:900px) {
  .creation-progress-dock { left:178px; }
  .creation-progress-dock-inner { padding-inline:24px; }
}
@media (max-width:760px) {
  main { padding-bottom:100px; }
  .creation-progress-dock { height:56px; }
  .creation-progress-dock-inner { gap:14px; padding-inline:16px; }
  .creation-progress-copy { min-width:0; }
  .creation-progress-track { width:92px; }
  .creation-progress-action { min-width:150px; min-height:40px; }
  .creation-progress-split-actions { width:min(500px,calc(100% - 170px)); gap:8px; }
  .creation-progress-split-actions .creation-progress-action { padding-inline:10px; font-size:12px; }
  #avatars .avatar-library-toolbar { align-items:stretch; gap:14px; }
  #avatars .avatar-create-button { min-width:132px; padding-inline:12px; }
  #avatars .avatar-manager-panel .media-library-grid { grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); justify-content:stretch; gap:10px; }
}
@media (max-width:620px) {
  .creation-progress-dock { left:126px; }
  .creation-progress-dock-inner { padding-inline:10px; }
  .creation-progress-copy > span { display:none; }
  .creation-progress-summary { gap:7px; }
  .creation-progress-track { width:56px; }
  .creation-progress-action { min-width:122px; padding-inline:10px; }
  .creation-progress-split-actions { width:calc(100% - 86px); }
  .creation-progress-split-actions .creation-progress-action { padding-inline:7px; font-size:11px; }
}

/* 2026-09-07 信息架构：顶部一级导航 + 五步制作链路。 */
.workspace-shell {
  grid-template-columns:218px minmax(0,1fr);
  grid-template-rows:72px minmax(0,1fr);
}
.workspace-topbar {
  grid-column:1/-1;
  grid-row:1;
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr);
  gap:24px;
  height:72px;
  padding:0 28px 0 20px;
  background:rgba(255,255,255,.96);
}
.topbar-brand {
  display:flex;
  align-items:center;
  gap:11px;
  width:max-content;
  color:var(--text);
  text-decoration:none;
}
.topbar-brand .brand-mark { flex:0 0 auto; }
.topbar-brand .brand-copy { display:grid; gap:1px; }
.topbar-brand .brand-copy strong { font-size:16px; line-height:1.2; letter-spacing:-.02em; }
.topbar-brand .brand-copy small { color:var(--muted); font-size:10px; }
.topbar-primary-nav {
  align-self:stretch;
  display:flex;
  align-items:stretch;
  justify-content:center;
  gap:34px;
}
.topbar-primary-nav > a {
  position:relative;
  display:flex;
  align-items:center;
  min-height:100%;
  padding:0 2px;
  border:0;
  color:#66716c;
  background:transparent;
  font-size:14px;
  font-weight:760;
  text-decoration:none;
  cursor:pointer;
  transition:color .2s ease;
}
.topbar-primary-nav > a::after {
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  left:0;
  height:3px;
  border-radius:3px 3px 0 0;
  background:var(--green);
  opacity:0;
  transform:scaleX(.35);
  transition:opacity .2s ease,transform .2s ease;
}
.topbar-primary-nav > a:hover,
.topbar-primary-nav > a.active { color:var(--text); }
.topbar-primary-nav > a.active::after { opacity:1; transform:scaleX(1); }
.topbar-actions { justify-self:end; }
.topbar-service-state {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#75807b;
  white-space:nowrap;
}
.topbar-service-state i,
.sidebar-context .topbar-save-state i {
  width:8px;
  height:8px;
  border-radius:50%;
  background:#7939df;
  box-shadow:0 0 0 5px rgba(121,57,223,.1);
}
.workspace-sidebar {
  grid-column:1;
  grid-row:2;
  top:72px;
  height:calc(100dvh - 72px);
  padding:24px 16px 22px;
  background:#fff;
}
.sidebar-context {
  display:grid;
  gap:5px;
  margin:0 4px 20px;
  padding:0 7px 18px;
  border-bottom:1px solid var(--line);
}
.sidebar-context > span { color:var(--muted); font-size:11px; font-weight:650; }
.sidebar-context > strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.sidebar-context .topbar-save-state {
  display:flex;
  align-items:center;
  gap:7px;
  width:max-content;
  padding:0;
  border-radius:0;
  color:var(--green);
  background:transparent;
  font-size:10px;
}
.sidebar-context .topbar-save-state i { width:6px; height:6px; box-shadow:none; background:#aab3af; }
.sidebar-context .topbar-save-state.saved i { background:#36a570; }
.tabs { gap:8px; }
.tabs a { min-height:58px; padding:8px 11px; border-radius:14px; }
.tabs a.active { color:#fff; background:#1d2420; box-shadow:none; }
.tabs a.active .nav-index { color:#fff; background:rgba(255,255,255,.14); }
main { grid-column:2; grid-row:2; }
.section-kicker {
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:8px;
  color:var(--green);
  background:var(--green-soft);
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
}
.asset-section-heading > div { display:flex; align-items:center; gap:12px; }
.creation-progress-track i { width:20%; }

/* Keep the script editor flush with the template controls. */
#scripts .script-section-heading { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:24px; align-items:center; }
#scripts .script-section-heading > div:first-child { white-space:nowrap; }
#scripts .script-entity-summary { grid-column:3; min-width:0; max-width:240px; }
#scripts #script-results { margin-top:0; }
#scripts #generation-status:not([hidden]) { margin:0 0 14px; }
@media (max-width:1100px) {
  #scripts .script-section-heading { grid-template-columns:minmax(0,1fr) auto; gap:12px 18px; }
  #scripts .script-entity-summary { grid-column:2; grid-row:1; max-width:180px; }
}
@media (max-width:600px) {
  #scripts .script-section-heading { grid-template-columns:minmax(0,1fr); }
  #scripts .script-entity-summary { grid-column:1; grid-row:2; max-width:none; justify-items:start; text-align:left; }
}

@media (max-width:900px) {
  .workspace-topbar { grid-template-columns:minmax(170px,1fr) auto minmax(48px,1fr); padding-inline:14px; }
  .topbar-primary-nav { gap:18px; }
  .topbar-service-state { font-size:0; }
  .workspace-sidebar { top:72px; height:calc(100dvh - 72px); }
}
@media (max-width:760px) {
  .workspace-shell { grid-template-columns:126px minmax(0,1fr); grid-template-rows:60px minmax(0,1fr); }
  .workspace-topbar { grid-template-columns:48px minmax(0,1fr) 20px; gap:8px; height:60px; padding-inline:8px; }
  .topbar-brand .brand-copy { display:none; }
  .topbar-brand .brand-mark { width:38px; height:38px; }
  .topbar-primary-nav { justify-content:space-around; gap:4px; min-width:0; }
  .topbar-primary-nav > a { padding-inline:4px; font-size:11px; }
  .workspace-sidebar { top:60px; width:126px; height:calc(100dvh - 60px); padding:16px 7px; }
  .sidebar-context { margin-inline:2px; padding-inline:4px; }
  .tabs a { grid-template-columns:27px minmax(0,1fr); gap:6px; min-height:50px; padding:7px 6px; font-size:10px; }
  .nav-index,.tabs a.active .nav-index { width:26px; height:26px; }
  .creation-progress-dock { left:126px; }
}

/* 2026-09-07：精简制作流程抬头，并把实体摘要固定到左侧工作区。 */
.workspace-sidebar .sidebar-entity-summary {
  display:grid;
  justify-items:start;
  gap:4px;
  min-width:0;
  max-width:none;
  margin:0 4px 20px;
  padding:0 7px 18px;
  border-bottom:1px solid var(--line);
  text-align:left;
}
.workspace-sidebar .sidebar-entity-summary small {
  color:var(--muted);
  font-size:11px;
  font-weight:650;
}
.workspace-sidebar .sidebar-entity-summary strong {
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text);
  font-size:16px;
}
.workspace-sidebar .sidebar-entity-summary span {
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:11px;
}
/* 创建声音紧邻“我的音色”，上下关系一眼可见。 */
.voice-library-group-private { padding-top:14px; }
.voice-library-group-private > .voice-heading-create {
  width:100%;
  min-width:0;
  margin:0 0 16px;
}

/* 智能混剪无素材时，在主操作下方提供明确入口。 */
.auto-mix-actions {
  display:grid;
  gap:14px;
  width:clamp(300px,26vw,420px);
  min-width:300px;
}
.auto-mix-actions .auto-mix-generate,
.auto-mix-actions .auto-mix-upload { width:100%; min-width:0; }
.auto-mix-upload { min-height:44px; }
.auto-mix-count { display:grid; gap:8px; color:var(--muted); font-size:15px; font-weight:750; }
.auto-mix-count input { width:100%; min-height:62px; border:1px solid rgba(23,107,80,.22); border-radius:14px; padding:12px 18px; background:#fff; color:var(--ink); font-family:inherit; font-size:18px; font-weight:700; line-height:1.2; font-variant-numeric:tabular-nums; }
.auto-mix-actions .auto-mix-generate { min-height:62px; border-radius:14px; font-size:17px; font-weight:800; }
.auto-mix-results { display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:8px; margin-top:16px; padding-bottom:4px; overflow-x:auto; scrollbar-width:thin; }
.auto-mix-result { display:grid; align-content:start; gap:7px; min-width:0; padding:9px 10px; border:1px solid rgba(23,107,80,.14); border-radius:13px; background:#fff; }
.auto-mix-result header { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:6px; }
.auto-mix-result header strong { white-space:nowrap; font-size:14px; }
.auto-mix-result-status { min-width:0; overflow:hidden; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; font-weight:650; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.auto-mix-result-body { display:grid; gap:7px; min-width:0; }
.auto-mix-preview-frame { position:relative; overflow:hidden; border-radius:12px; background:#081711; }
.auto-mix-result video { display:block; width:100%; aspect-ratio:9/16; max-height:420px; border-radius:0; background:#081711; object-fit:contain; }
.auto-mix-preview-overlay { position:absolute; inset:0; z-index:2; pointer-events:none; opacity:0; background:rgba(255,255,255,.38); transition:opacity .18s ease; }
.auto-mix-result.preview-frozen .auto-mix-preview-overlay { opacity:1; pointer-events:auto; }
.auto-mix-result.preview-frozen video { pointer-events:none; }
.auto-mix-result-actions { display:flex; gap:5px; }
.auto-mix-result-actions button { flex:1; min-width:0; padding:7px 4px; font-size:11px; line-height:1.25; }
.auto-mix-result-progress { width:100%; margin-top:6px; }
.auto-mix-result-progress .live-task-progress-track { height:8px; background:#eee8f6; }
.auto-mix-result-progress .live-task-progress-fill { background:linear-gradient(90deg,#7939df,#aa78ec); }

@media (max-width:900px) {
  .auto-mix-actions { width:100%; min-width:0; }
}

@media (max-width:760px) {
  .workspace-sidebar .sidebar-entity-summary { margin-inline:2px; padding-inline:4px; }
  .workspace-sidebar .sidebar-entity-summary strong { font-size:13px; }
  .workspace-sidebar .sidebar-entity-summary span { white-space:normal; line-height:1.4; }
  .topbar-primary-nav { gap:2px; }
  .topbar-primary-nav > a { font-size:10px; }
}

/* 数字人口播的两个动作保持同列，“更换”在上、“生成”在下。 */
.avatar-talk-actions {
  display:grid;
  align-content:center;
  gap:12px;
  min-width:0;
}
.avatar-talk-actions button {
  width:100%;
  min-height:56px;
  font-size:16px;
  font-weight:900;
}

/* 素材库和数字人库都是剪辑过程的辅助页，固定回程按钮靠右显示。 */
.creation-progress-dock.actions-only .creation-progress-dock-inner {
  justify-content:flex-end;
}

@media (max-width:900px) {
  .avatar-talk-actions { grid-column:1/-1; }
}

@media (max-width:600px) {
  .avatar-talk-actions { grid-column:auto; width:100%; }
}

/* 2026-09-08 档案资料库：降低列表视觉噪音，让名称与三个动作在窄栏中清晰对齐。 */
.history-card .card-title h3 { font-size:15px; }
.history-card .card-title p { font-size:10px; }
.history-entity { gap:6px; }
.history-entity strong { font-size:11px; }
.history-index {
  flex-basis:26px;
  width:26px;
  height:26px;
  border-radius:7px;
  font-size:8px;
}
#knowledge .history-row {
  box-sizing:border-box;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto 42px;
  align-content:start;
  gap:7px;
  width:100%;
  min-width:0;
  min-height:102px;
}
#knowledge .history-entity {
  box-sizing:border-box;
  width:100%;
  min-width:0;
}
#knowledge .history-actions {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px;
  width:100%;
  min-width:0;
}
#knowledge .history-actions .history-action {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  height:42px;
  min-height:42px;
  padding:0 4px;
  border-radius:7px;
  font-size:8px;
}

/* 实体页：档案列表在内框滚动，不能以档案数量撑高整页。 */
#knowledge .entity-layout { align-items:stretch; }
#knowledge .history-card {
  position:static;
  align-self:stretch;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
#knowledge .history-card > .card-title { flex:0 0 auto; }
#knowledge .history-card .product-list {
  flex:1 1 auto;
  min-height:0;
  align-content:start;
  margin-bottom:0;
  padding:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f7faf8;
  overflow-y:scroll;
  overflow-x:hidden;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:#91ad9f #e8eeea;
}
#knowledge .product-list:focus-visible { outline:2px solid #91ad9f; outline-offset:2px; }
#knowledge .product-list::-webkit-scrollbar { width:8px; }
#knowledge .product-list::-webkit-scrollbar-track { background:#e8eeea; border-radius:8px; }
#knowledge .product-list::-webkit-scrollbar-thumb { background:#91ad9f; border-radius:8px; }
@media (min-width:1101px) {
  main:has(> #knowledge.active-page) {
    --entity-page-gap:clamp(20px,2.6dvh,28px);
    display:flex;
    align-items:center;
    min-height:calc(100dvh - 72px);
    padding-top:var(--entity-page-gap);
    padding-bottom:calc(60px + var(--entity-page-gap));
  }
  #knowledge { width:100%; }
  #knowledge .entity-form {
    min-height:0;
    grid-auto-rows:max-content;
    align-content:start;
    gap:11px 14px;
    padding:18px 22px;
    overflow:visible;
  }
  #knowledge .entity-form-heading { padding-bottom:10px; }
  #knowledge .entity-optional-heading { min-height:50px; padding-block:8px; }
  #knowledge .entity-optional-content { padding-block:10px; }
  #knowledge .entity-form textarea { min-height:56px; }
  #knowledge .history-card { contain:size; }
}
@media (max-width:1100px) {
  #knowledge .history-card .product-list { flex:none; height:clamp(16rem,50dvh,28rem); }
}

/* 声音库：等高双栏，标题固定，音色仅在各自的列表内滚动。 */
.voice-library-groups { align-items:stretch; gap:20px; }
.voice-library-group {
  padding:16px;
  border-radius:18px;
  background:linear-gradient(180deg,#fafbf7 0%,#f5f7f2 100%);
}
.voice-library-group-heading { height:44px; min-height:44px; margin-bottom:12px; }
.voice-library-group .voice-library-list {
  height:clamp(20rem,calc(100dvh - 24rem),30rem);
  min-height:0;
  align-content:start;
  padding:2px 8px 2px 2px;
  overflow-y:scroll;
  overflow-x:hidden;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:#91ad9f #e8eeea;
}
.voice-library-group .voice-library-list:focus-visible {
  outline:2px solid #91ad9f;
  outline-offset:2px;
  border-radius:12px;
}
.voice-library-group .voice-library-list::-webkit-scrollbar { width:8px; }
.voice-library-group .voice-library-list::-webkit-scrollbar-track { background:#e8eeea; border-radius:8px; }
.voice-library-group .voice-library-list::-webkit-scrollbar-thumb { background:#91ad9f; border-radius:8px; }
.voice-library-group .voice-library-list::-webkit-scrollbar-thumb:hover { background:#6b8c7b; }
.voice-library-group-heading h4 { font-size:18px; letter-spacing:-.02em; }
.voice-group-heading-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.voice-library-group-heading .voice-heading-create {
  width:auto;
  min-width:126px;
  min-height:38px;
  height:38px;
  padding:7px 13px;
  border-radius:10px;
  font-size:12px;
  box-shadow:0 6px 16px rgba(23,107,80,.13);
}
.voice-library-group-private { padding-top:16px; }
.voice-library-group-private > .voice-heading-create { margin:0; }
.voice-library-group .voice-library-row { min-height:64px; border-color:#dfe7e2; }
.voice-library-group .library-row-details strong { font-size:12px; }

/* 主导航是跨页面的一级入口，字号提高 4px；音色名收紧 2px，给操作区留足空间。 */
.topbar-primary-nav > a { font-size:18px; }

/* 作品卡把生成日期独立成一行，便于按时间核对版本。 */
.portfolio-created-at {
  display:block;
  color:#476158;
  font-size:11px;
  font-weight:750;
  line-height:1.4;
  font-variant-numeric:tabular-nums;
}

@media (max-width:600px) {
  .topbar-primary-nav > a { font-size:12px; }
  .voice-library-group-heading { height:84px; min-height:84px; flex-direction:column; align-items:stretch; gap:8px; }
  .voice-group-heading-actions { align-items:center; justify-content:space-between; }
  .voice-library-group-heading .voice-heading-create { min-width:0; padding-inline:8px; }
  .voice-library-group .library-row-details { min-width:0; overflow-wrap:anywhere; }
  .voice-library-group .voice-card-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .voice-library-group .voice-card-actions button { width:100%; min-width:0; padding-inline:6px; }
  .voice-library-group .voice-card-actions .voice-select-choice { grid-column:1/-1; white-space:normal; }
}

/* 03 配音：为完成后的播放器预留首屏空间，不缩放页面或压小操作文字。 */
#voices .voice-workspace-stack { padding:16px; }
#voices .voice-library-card { display:flex; flex-direction:column; gap:10px; }
#voices .voice-library-groups { margin-top:0; gap:16px; }
#voices .voice-library-group { padding:12px; border-radius:16px; }
#voices .voice-library-group-heading { height:40px; min-height:40px; margin-bottom:8px; }
#voices .voice-library-group-heading h4 { font-size:17px; }
/* 在原首屏布局上增加一行（60px 卡片 + 8px 间距）。 */
#voices .voice-library-list { height:clamp(14.25rem,calc(100dvh - 24.75rem),30.25rem); }
#voices .voice-library-row { min-height:60px; }
#voices .voice-generation-action-bar { margin:0; }
#voices .voice-generation-action-bar:not(:has(> :not([hidden]))) { display:none; }
#voices .voice-preview-panel {
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:8px 16px;
  margin:0;
  padding:12px 16px;
  border-radius:14px;
}
#voices .voice-preview-heading { align-items:center; }
#voices .voice-preview-main-row { min-width:0; }
#voices .voice-generated-audio { padding:0; border:0; background:transparent; }
#voices .voice-generated-audio audio { display:block; height:48px; }
#voice-next-actions {
  grid-column:1/-1;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin:0;
  padding:0;
  border:0;
}
#voice-next-actions:not(:has(> :not([hidden]))) { display:none; }
#voices .voice-preview-panel:has(#legacy-voice-speed:not([hidden])) { grid-template-columns:1fr; }
@media (max-width:900px) {
  /* 单栏时优先展示已完成的结果，避免两组列表将播放器推到屏外。 */
  #voices .voice-preview-panel { order:-1; grid-template-columns:1fr; }
  #voices .voice-generation-action-bar { order:-2; }
  #voices .voice-library-list { height:clamp(12rem,40dvh,22rem); }
}
@media (max-width:600px) {
  #voices .voice-workspace-stack { padding:10px; }
  #voices .voice-library-group-heading { height:84px; min-height:84px; }
  #voices .voice-preview-panel { padding:12px; gap:8px; }
  #voice-next-actions { flex-wrap:wrap; }
}

/* 04 智能剪辑：收紧模式选择与数字人口播区域，建立清晰的主次层级。 */
#editing .edit-mode-card {
  gap:26px;
  padding:clamp(24px,2.5vw,34px);
  border:1px solid rgba(23,107,80,.12);
  border-radius:24px;
  background:
    radial-gradient(circle at 96% 0%,rgba(218,238,228,.48),transparent 30%),
    #fff;
  box-shadow:0 18px 46px rgba(26,75,58,.09);
}
#editing .edit-mode-card > div:first-child {
  display:grid;
  grid-template-columns:max-content minmax(0,1fr);
  align-items:baseline;
  gap:8px 24px;
}
#editing .edit-mode-card > div:first-child h3 {
  margin:0;
  font-size:clamp(22px,2vw,28px);
  line-height:1.2;
  letter-spacing:-.035em;
}
#editing .edit-mode-card > div:first-child p {
  max-width:62ch;
  margin:0;
  color:#64766e;
  line-height:1.6;
  text-wrap:pretty;
}

#editing .edit-mode-picker {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:8px;
  border-color:rgba(23,107,80,.1);
  border-radius:20px;
  background:#edf4f0;
  box-shadow:inset 0 1px 2px rgba(29,91,69,.04);
}
#editing .edit-mode-option {
  min-height:92px;
  padding:16px 18px;
  border:1px solid transparent;
  border-radius:15px;
}
#editing .edit-mode-option:not(.selected) {
  background:rgba(255,255,255,.56);
}
#editing .edit-mode-option:not(.selected):hover {
  border-color:rgba(23,107,80,.16);
  background:#fff;
  box-shadow:0 8px 20px rgba(29,91,69,.08);
}
#editing .edit-mode-option.selected {
  border-color:#176b50;
  background:#176b50;
  box-shadow:0 12px 28px rgba(23,107,80,.2);
}
#editing .edit-mode-index {
  width:44px;
  height:44px;
  border-radius:12px;
  font-size:13px;
}
#editing .edit-mode-copy strong {
  font-size:17px;
  line-height:1.35;
}
#editing .edit-mode-copy small {
  margin-top:4px;
  font-size:13px;
}

#editing .auto-mix-action,
#editing .avatar-talk-action {
  border-color:rgba(23,107,80,.13);
  border-radius:20px;
  background:
    radial-gradient(circle at 0 0,rgba(215,237,225,.72),transparent 44%),
    #f9fbf9;
  box-shadow:inset 0 1px rgba(255,255,255,.9);
}
#editing .auto-mix-action {
  padding:24px 26px;
}
#editing .avatar-talk-action {
  grid-template-columns:minmax(240px,.8fr) minmax(290px,1.2fr);
  grid-template-areas:
    "intro current"
    "change current";
  align-items:center;
  gap:16px 38px;
  min-height:260px;
  padding:28px 30px;
}
#editing .avatar-talk-intro {
  grid-area:intro;
  display:flex;
  align-items:center;
  gap:14px;
  align-self:end;
  min-width:0;
}
#editing .avatar-talk-ai-mark {
  position:relative;
  display:grid;
  place-items:center;
  flex:0 0 54px;
  width:54px;
  height:54px;
  border:1px solid rgba(126,55,224,.18);
  border-radius:17px;
  color:#7736df;
  background:linear-gradient(145deg,#fff 0%,#f0e5ff 100%);
  box-shadow:0 10px 24px rgba(126,55,224,.12);
}
#editing .avatar-talk-ai-mark b { font-size:15px; letter-spacing:.04em; }
#editing .avatar-talk-ai-mark i { position:absolute; top:7px; right:7px; font-size:10px; font-style:normal; }
#editing .avatar-talk-intro strong { display:block; color:#25153e; font-size:21px; line-height:1.35; }
#editing .avatar-talk-intro p { margin:5px 0 0; color:#756985; font-size:14px; line-height:1.55; }
#editing .avatar-talk-change {
  grid-area:change;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:start;
  gap:9px;
  width:min(100%,310px);
  min-height:52px;
  color:#7130db;
  border:1px solid rgba(126,55,224,.2);
  border-radius:14px;
  background:#f1e8ff;
}
#editing .avatar-talk-change strong { font-size:15px; }
#editing .avatar-talk-change-icon { display:grid; place-items:center; width:22px; height:22px; color:currentColor; }
#editing .avatar-talk-change-icon svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
#editing .avatar-talk-copy {
  grid-area:copy;
  align-self:end;
  gap:16px;
}
#editing .avatar-talk-mark {
  width:54px;
  height:54px;
  border-radius:16px;
  font-size:15px;
}
#editing .avatar-talk-copy strong {
  font-size:22px;
}
#editing .avatar-talk-copy p {
  max-width:40ch;
  margin-top:7px;
  font-size:15px;
}
#editing .avatar-talk-current {
  grid-area:current;
  grid-template-columns:minmax(0,1fr);
  width:min(100%,360px);
  max-width:100%;
  justify-self:center;
  align-items:center;
  justify-items:center;
  gap:10px;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
#editing .avatar-talk-current > strong {
  justify-self:center;
  color:#493b5d;
  font-size:15px;
  line-height:1.5;
}
#editing .avatar-talk-frame {
  width:min(100%,180px);
  border-width:3px;
  border-radius:17px;
  box-shadow:0 12px 28px rgba(20,71,54,.16);
}
#editing .avatar-talk-frame video { width:100%; height:100%; object-fit:cover; background:#0c1713; }
#editing .avatar-talk-actions {
  grid-area:actions;
  grid-template-columns:repeat(2,minmax(150px,220px));
  align-self:start;
  justify-content:start;
  gap:10px;
  width:100%;
}
#editing .avatar-talk-actions button {
  min-height:50px;
  font-size:15px;
  transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease;
}
#editing .avatar-talk-actions button:hover:not(:disabled) {
  transform:translateY(-1px);
}
#editing .avatar-talk-actions button:active:not(:disabled) {
  transform:translateY(1px);
}
#editing #choose-full-avatar {
  box-shadow:none;
}
#editing #choose-full-avatar:hover:not(:disabled) {
  background:#e8d9ff;
}
#editing #generate-avatar-composition {
  box-shadow:0 10px 24px rgba(23,107,80,.18);
}

@media (max-width:920px) {
  #editing .edit-mode-card > div:first-child { grid-template-columns:1fr; }
  #editing .edit-mode-picker { grid-template-columns:1fr; }
  #editing .edit-mode-option { min-height:76px; }
  #editing .avatar-talk-action {
    grid-template-columns:minmax(210px,.8fr) minmax(230px,1.2fr);
    gap:18px 22px;
    padding:24px;
  }
  #editing .avatar-talk-actions {
    grid-column:auto;
    grid-template-columns:repeat(2,minmax(130px,1fr));
  }
  #editing .avatar-talk-current { grid-template-columns:1fr; }
  #editing .avatar-talk-frame { width:104px; }
}

@media (max-width:800px) {
  #editing .edit-mode-card { gap:18px; padding:18px; border-radius:19px; }
  #editing .avatar-talk-action {
    grid-template-columns:1fr;
    grid-template-areas:"intro" "current" "change";
    min-height:0;
    padding:20px;
  }
  #editing .avatar-talk-copy { align-self:auto; }
  #editing .avatar-talk-current {
    grid-template-columns:1fr;
    width:max-content;
    padding:0;
  }
  #editing .avatar-talk-frame { width:94px; }
  #editing .avatar-talk-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #editing .avatar-talk-generate { grid-column:auto; }
}

@media (max-width:520px) {
  #editing .avatar-talk-actions { grid-template-columns:1fr; }
}
