.script-workspace { min-width: 0; height: 100vh; overflow: hidden; color: #e9edf8; background: radial-gradient(circle at 72% -10%,rgba(71,103,193,.13),transparent 34%),#0c0e14; }
.script-workspace button,.script-workspace input,.script-workspace textarea,.script-workspace select { font: inherit; }
.script-topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(13,15,22,.82); backdrop-filter: blur(18px); }
.script-heading { min-width: 0; display: flex; align-items: center; gap: 13px; }.script-heading small { color: #6e7689; font-size: 11px; letter-spacing: .04em; }.script-heading h1 { margin: 5px 0 0; font-size: 22px; line-height: 1; }.script-back { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.035); color: #cbd2e2; font-size: 18px; }
.script-top-actions { display: flex; align-items: center; gap: 12px; }.script-capability { padding: 7px 11px; border: 1px solid rgba(113,139,226,.18); border-radius: 999px; color: #94a7df; background: rgba(76,103,190,.08); font-size: 11px; }
.script-points-balance { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid rgba(113,139,226,.18); border-radius: 999px; color: #94a7df; background: rgba(76,103,190,.08); }.script-points-balance small { color: #727f9f; font-size: 9px; }.script-points-balance strong { color: #dbe4ff; font-size: 12px; }.script-assets-pane > header h2 > span { margin-left: 4px; color: #7f8baa; font-size: 12px; font-weight: 600; }
:root[data-theme="light"] .script-points-balance { border-color: #d9e0f2; background: #f4f6fb; }:root[data-theme="light"] .script-points-balance small { color: #78839a; }:root[data-theme="light"] .script-points-balance strong { color: #3f4f7b; }:root[data-theme="light"] .script-assets-pane > header h2 > span { color: #7a8499; }
.script-asset-list,.script-structure-pane { scrollbar-width: none; -ms-overflow-style: none; }.script-asset-list::-webkit-scrollbar,.script-structure-pane::-webkit-scrollbar { display: none; width: 0; height: 0; }
.script-project-home { height: calc(100vh - 76px); overflow: auto; padding: 46px max(28px,6vw) 38px; }.script-home-intro { max-width: 780px; margin: 0 auto 28px; text-align: center; }.script-home-intro small,.script-projects-head small { color: #7489cd; font-size: 10px; font-weight: 700; letter-spacing: .18em; }.script-home-intro h2 { margin: 12px 0 10px; font-size: clamp(26px,3vw,40px); letter-spacing: -.04em; }.script-home-intro p { margin: 0; color: #858da1; font-size: 14px; line-height: 1.8; }
.script-create-row { max-width: 1040px; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(270px,.7fr); gap: 14px; margin: 0 auto 48px; }.script-dropzone,.script-enter-button { min-height: 154px; border-radius: 19px; }.script-dropzone { display: grid; grid-template-columns: 58px minmax(0,1fr); grid-template-rows: auto auto; align-content: center; column-gap: 16px; padding: 24px 28px; border: 1px dashed rgba(122,145,219,.32); background: linear-gradient(135deg,rgba(66,89,162,.11),rgba(255,255,255,.018)); cursor: pointer; transition: .2s ease; }.script-dropzone:hover,.script-dropzone.dragover { border-color: #6d8be8; background: rgba(73,98,180,.14); transform: translateY(-1px); }.script-upload-icon { grid-row: 1/3; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: #a7b8ef; background: rgba(95,121,207,.16); font-size: 25px; }.script-dropzone strong { align-self: end; font-size: 17px; }.script-dropzone small { align-self: start; margin-top: 8px; color: #747d91; font-size: 11px; line-height: 1.5; }
.script-enter-button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; padding: 26px; border: 1px solid rgba(106,133,225,.25); color: #fff; background: linear-gradient(135deg,#5577df,#7659d3); box-shadow: 0 20px 50px rgba(67,82,169,.18); text-align: left; transition: .2s ease; }.script-enter-button span { font-size: 18px; font-weight: 700; }.script-enter-button small { color: rgba(255,255,255,.66); font-size: 11px; }.script-enter-button:disabled { border-color: rgba(255,255,255,.07); color: #666d7e; background: #171a23; box-shadow: none; cursor: not-allowed; }.script-enter-button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 24px 55px rgba(77,91,188,.28); }
.script-projects-head { max-width: 1180px; display: flex; justify-content: space-between; align-items: end; margin: 0 auto 15px; }.script-projects-head h3 { margin: 5px 0 0; font-size: 20px; }.script-projects-head > span { color: #6f788b; font-size: 11px; }.script-project-grid { max-width: 1180px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin: auto; }.script-project-card { position: relative; min-height: 178px; display: flex; flex-direction: column; overflow: hidden; padding: 17px; border: 1px solid rgba(255,255,255,.075); border-radius: 16px; background: linear-gradient(150deg,rgba(255,255,255,.045),rgba(255,255,255,.017)); cursor: pointer; transition: .2s ease; }.script-project-card:hover { border-color: rgba(105,133,220,.34); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.2); }.script-project-cover { height: 68px; display: grid; place-items: center; overflow: hidden; margin: -17px -17px 14px; background: linear-gradient(135deg,#202a48,#27243f); color: #6f82bd; font-size: 26px; }.script-project-cover img { width: 100%; height: 100%; object-fit: cover; }.script-project-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }.script-project-card > small { margin: 6px 0 14px; color: #71798b; font-size: 10px; }.script-project-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }.script-project-stats span { padding: 4px 7px; border-radius: 7px; color: #8b96b4; background: rgba(102,122,181,.09); font-size: 9px; }.script-project-pagination { max-width: 1180px; display: flex; justify-content: space-between; margin: 18px auto 0; color: #6f778a; font-size: 10px; }.script-project-pagination div { display: flex; gap: 7px; }.script-project-pagination button { padding: 7px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: #939bad; background: rgba(255,255,255,.025); }
.script-editor { height: calc(100vh - 76px); overflow: hidden; }.script-project-toolbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.07); }.script-project-identity { min-width: 190px; display: grid; gap: 5px; }.script-project-identity input { width: min(310px,26vw); padding: 7px 9px; border: 1px solid transparent; border-radius: 9px; color: #e9edf8; background: transparent; font-size: 16px; font-weight: 700; }.script-project-identity input:focus { border-color: rgba(108,135,226,.3); outline: 0; background: rgba(255,255,255,.025); }.script-project-identity span { padding-left: 9px; color: #60697b; font-size: 9px; }.script-primary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }.script-primary-actions button,.script-download-all { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid rgba(111,135,218,.18); border-radius: 10px; color: #bbc5e2; background: rgba(68,89,157,.09); font-size: 10px; text-decoration: none; }.script-primary-actions button:hover,.script-download-all:not(.disabled):hover { border-color: rgba(110,138,232,.38); color: #fff; }.script-primary-actions button:disabled,.script-download-all.disabled { opacity: .42; cursor: not-allowed; pointer-events: none; }.script-primary-actions #generateAllPromptsButton { color: #f1edff; background: linear-gradient(135deg,rgba(91,113,210,.26),rgba(118,82,198,.21)); }.script-operation-bar { height: 32px; align-items: center; gap: 9px; padding: 0 20px; color: #aeb9d9; background: rgba(63,85,160,.13); font-size: 10px; }.script-operation-bar:not(.hidden) { display: flex; }.script-operation-bar i { width: 11px; height: 11px; border: 2px solid rgba(142,162,224,.3); border-top-color: #93a9ed; border-radius: 50%; animation: script-spin .8s linear infinite; }
.script-editor-layout { height: calc(100% - 76px); display: grid; grid-template-columns: minmax(300px,22%) minmax(0,1fr); }.script-editor:has(.script-operation-bar:not(.hidden)) .script-editor-layout { height: calc(100% - 108px); }.script-assets-pane { position: relative; min-width: 0; display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto; overflow: hidden; border-right: 1px solid rgba(255,255,255,.075); background: rgba(12,14,20,.72); }.script-assets-pane > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 15px 11px; }.script-assets-pane > header small { color: #6072aa; font-size: 8px; letter-spacing: .14em; }.script-assets-pane > header h2 { margin: 4px 0 0; font-size: 16px; }.script-assets-pane > header button { width: 31px; height: 31px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: #8e9abb; background: rgba(255,255,255,.025); }.script-editor-layout.assets-expanded { grid-template-columns: 1fr 0; }.script-editor-layout.assets-expanded .script-assets-pane { border-right: 0; }.script-editor-layout.assets-expanded .script-structure-pane { visibility: hidden; }.script-editor-layout.assets-expanded #expandAssetsButton { position: fixed; right: 22px; top: 164px; z-index: 3; }
.script-style-references { margin: 0 12px 10px; padding: 11px; border: 1px solid rgba(255,255,255,.065); border-radius: 13px; background: rgba(255,255,255,.018); }.script-style-references > div:first-child { display: flex; justify-content: space-between; color: #a7afc0; font-size: 10px; }.script-style-references > div:first-child span { color: #657087; }.script-style-grid { display: flex; gap: 5px; min-height: 0; margin-top: 8px; }.script-style-item { position: relative; width: 40px; height: 40px; overflow: hidden; border-radius: 9px; background: #171a23; }.script-style-item img { width: 100%; height: 100%; object-fit: cover; }.script-style-item button { position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border: 0; border-radius: 50%; color: #fff; background: rgba(5,6,9,.72); font-size: 10px; }.script-style-references > label { display: block; margin-top: 8px; padding: 7px; border: 1px dashed rgba(113,134,200,.2); border-radius: 8px; color: #7e89a8; text-align: center; font-size: 9px; cursor: pointer; }
.script-asset-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 9px; }.script-asset-tabs button { flex: 0 0 auto; padding: 6px 8px; border: 0; border-radius: 8px; color: #687187; background: transparent; font-size: 9px; }.script-asset-tabs button.active { color: #dbe3fa; background: rgba(80,104,183,.15); }.script-asset-list { overflow: auto; padding: 0 11px 12px; }.script-asset-group-title { display: flex; justify-content: space-between; margin: 10px 3px 7px; color: #727c92; font-size: 9px; }.script-asset-card { position: relative; min-height: 57px; display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 9px; align-items: center; margin-bottom: 7px; padding: 6px; border: 1px solid rgba(255,255,255,.065); border-radius: 12px; background: rgba(255,255,255,.022); cursor: pointer; }.script-asset-card:hover { border-color: rgba(101,128,215,.27); background: rgba(74,94,158,.07); }.script-asset-thumb { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; color: #697798; background: #171b27; font-size: 15px; }.script-asset-thumb img { width: 100%; height: 100%; object-fit: cover; }.script-asset-card strong,.script-asset-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.script-asset-card strong { padding-right: 20px; color: #cfd5e3; font-size: 10px; }.script-asset-card small { margin-top: 5px; color: #626b7e; font-size: 8px; }.script-asset-delete { position: absolute; right: 8px; top: 7px; display: none; width: 18px; height: 18px; border: 0; border-radius: 6px; color: #c47e8b; background: rgba(160,67,84,.12); }.script-asset-card:hover .script-asset-delete { display: block; }.script-asset-status { position: absolute; left: 41px; bottom: 4px; width: 9px; height: 9px; border: 2px solid #11141b; border-radius: 50%; background: #697187; }.script-asset-status.ready { background: #59c995; }.script-asset-status.generating { background: #f0b95f; animation: script-pulse 1s ease infinite; }.script-asset-status.failed { background: #e4697e; }
.script-asset-generator { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 11px 12px; border-top: 1px solid rgba(255,255,255,.065); background: rgba(14,16,23,.95); }.script-asset-generator select,.script-regenerate-settings select { min-width: 0; height: 31px; padding: 0 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: #aab2c5; background: #171a23; font-size: 9px; }.script-asset-generator button { grid-column: 1/-1; min-height: 36px; border: 1px solid rgba(106,134,225,.25); border-radius: 10px; color: #e8edff; background: linear-gradient(135deg,rgba(76,104,200,.45),rgba(113,77,190,.38)); font-size: 10px; }.script-asset-generator button:disabled { opacity: .4; }
.script-structure-pane { min-width: 0; overflow: auto; padding: 16px 20px 60px; }.script-original-toggle { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }.script-original-toggle button { padding: 6px 9px; border: 1px solid rgba(255,255,255,.075); border-radius: 8px; color: #7f899f; background: rgba(255,255,255,.02); font-size: 9px; }.script-original-toggle span { color: #5f687a; font-size: 9px; }.script-original-panel { margin-bottom: 15px; padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 13px; background: rgba(255,255,255,.018); }.script-original-panel > div { display: flex; justify-content: space-between; }.script-original-panel button { border: 0; color: #7f899f; background: transparent; font-size: 9px; }.script-original-panel pre { max-height: 310px; overflow: auto; margin: 12px 0 0; color: #9ca4b6; font: 11px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre-wrap; }
.script-sections { display: grid; gap: 18px; }.script-section { padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 16px; background: rgba(255,255,255,.017); }.script-section-head { display: grid; grid-template-columns: minmax(220px,.42fr) minmax(300px,1fr); gap: 10px; margin-bottom: 11px; }.script-section-head input,.script-section-head textarea { width: 100%; border: 1px solid rgba(88,119,214,.2); border-radius: 10px; color: #e7edff; background: linear-gradient(135deg,rgba(61,91,185,.34),rgba(71,93,168,.23)); }.script-section-head input { padding: 10px 12px; font-size: 16px; font-weight: 700; }.script-section-head textarea { min-height: 42px; resize: vertical; padding: 9px 12px; font-size: 11px; line-height: 1.5; }.script-event-grid { display: grid; grid-template-columns: repeat(3,minmax(220px,1fr)); gap: 9px; }.script-event-card { min-width: 0; overflow: hidden; border: 1px solid rgba(90,116,196,.18); border-radius: 13px; background: rgba(50,72,137,.11); transition: .2s ease; }.script-event-card:hover,.script-event-card.active { border-color: rgba(102,132,226,.45); }.script-event-card.split { background: linear-gradient(145deg,rgba(65,102,184,.16),rgba(80,66,153,.12)); }.script-event-card header { display: flex; gap: 8px; padding: 9px 10px; border-bottom: 1px solid rgba(99,125,209,.14); }.script-event-card header input { min-width: 0; flex: 1; border: 0; color: #dce5ff; background: transparent; font-size: 12px; font-weight: 700; outline: 0; }.script-event-badges { display: flex; gap: 4px; }.script-event-badges span { padding: 3px 5px; border-radius: 6px; color: #97addf; background: rgba(88,122,211,.14); font-size: 7px; white-space: nowrap; }.script-event-card textarea { width: 100%; min-height: 92px; max-height: 150px; resize: vertical; padding: 9px 10px; border: 0; color: #98a3ba; background: transparent; font-size: 9px; line-height: 1.65; outline: 0; }.script-event-card footer { display: flex; justify-content: space-between; align-items: center; padding: 7px 9px; border-top: 1px solid rgba(99,125,209,.1); }.script-event-card footer small { color: #606b83; font-size: 8px; }.script-event-card footer button { padding: 5px 7px; border: 1px solid rgba(108,139,231,.22); border-radius: 7px; color: #acbce7; background: rgba(77,101,177,.12); font-size: 8px; }
.script-event-prompts { grid-column: 1/-1; display: grid; gap: 8px; padding: 11px; border: 1px solid rgba(105,133,219,.19); border-radius: 13px; background: rgba(42,57,105,.1); }.script-event-prompts-head { display: flex; justify-content: space-between; align-items: center; }.script-event-prompts-head strong { font-size: 11px; }.script-event-prompts-head button { border: 0; color: #7785a8; background: transparent; font-size: 9px; }.script-video-prompt-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,340px); gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(11,13,20,.7); }.script-video-prompt-main input,.script-video-prompt-main textarea { width: 100%; border: 0; color: #dbe2f2; background: transparent; outline: 0; }.script-video-prompt-main input { margin-bottom: 6px; font-size: 11px; font-weight: 700; }.script-video-prompt-main textarea { min-height: 112px; resize: vertical; color: #929caf; font-size: 9px; line-height: 1.65; }.script-video-prompt-side { display: flex; flex-direction: column; gap: 7px; }.script-prompt-assets { max-height: 80px; overflow: auto; display: flex; gap: 4px; flex-wrap: wrap; }.script-prompt-assets label { padding: 4px 6px; border: 1px solid rgba(255,255,255,.07); border-radius: 7px; color: #778197; font-size: 8px; }.script-prompt-assets label:has(input:checked) { border-color: rgba(102,132,225,.34); color: #b8c5e8; background: rgba(74,100,183,.13); }.script-prompt-assets input { width: 10px; height: 10px; margin: 0 4px 0 0; }.script-prompt-params { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }.script-prompt-params select { min-width: 0; height: 28px; padding: 0 6px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; color: #9099ad; background: #171a23; font-size: 8px; }.script-generate-video { min-height: 31px; border: 1px solid rgba(103,134,231,.26); border-radius: 9px; color: #eef1ff; background: linear-gradient(135deg,rgba(76,106,205,.52),rgba(108,77,187,.4)); font-size: 9px; }.script-video-result { display: grid; gap: 6px; }.script-video-result video { width: 100%; max-height: 180px; object-fit: contain; border-radius: 9px; background: #050608; }.script-video-result a { padding: 6px; border-radius: 8px; color: #b7c6ed; background: rgba(77,104,188,.13); text-align: center; text-decoration: none; font-size: 8px; }
.script-prompt-reference-box { display: grid; gap: 6px; padding: 8px; border: 1px solid rgba(255,255,255,.065); border-radius: 10px; background: rgba(255,255,255,.018); }.script-prompt-reference-box > header { display: flex; justify-content: space-between; gap: 8px; }.script-prompt-reference-box > header strong { color: #b7c1d8; font-size: 9px; }.script-prompt-reference-box > header span,.script-prompt-reference-label { color: #65718a; font-size: 7px; }.script-prompt-reference-files { display: grid; gap: 5px; }.script-prompt-reference-file { min-width: 0; display: grid; grid-template-columns: 34px minmax(0,1fr) 20px; gap: 6px; align-items: center; padding: 4px; border-radius: 8px; background: rgba(255,255,255,.026); }.script-reference-preview { position: relative; width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; color: #a9b9e7; background: #0b0e15; }.script-reference-preview img,.script-reference-preview video { width: 100%; height: 100%; object-fit: cover; }.script-reference-preview.video > i { position: absolute; display: grid; place-items: center; inset: 9px; border-radius: 50%; color: #fff; background: rgba(0,0,0,.55); font-size: 8px; }.script-reference-preview.audio i { font-size: 16px; }.script-prompt-reference-file > span { min-width: 0; }.script-prompt-reference-file strong,.script-prompt-reference-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.script-prompt-reference-file strong { color: #9fa9bd; font-size: 8px; }.script-prompt-reference-file small { margin-top: 3px; color: #5f6b82; font-size: 7px; }.script-prompt-reference-file > button { width: 20px; height: 20px; border: 0; border-radius: 6px; color: #c98894; background: rgba(176,63,83,.1); }.script-prompt-source-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; }.script-prompt-source-actions button { min-height: 25px; border: 1px solid rgba(255,255,255,.07); border-radius: 7px; color: #8490a8; background: rgba(255,255,255,.02); font-size: 7px; }.script-generation-error { display: grid; gap: 3px; padding: 7px 8px; border: 1px solid rgba(214,93,113,.18); border-radius: 8px; color: #d58a97; background: rgba(158,50,70,.08); font-size: 8px; }.script-generation-error span { color: #a86f79; line-height: 1.45; }
.script-empty { grid-column: 1/-1; min-height: 120px; display: grid; place-items: center; align-content: center; gap: 7px; color: #646d80; text-align: center; font-size: 11px; }.script-empty b { color: #8c96aa; font-size: 13px; }.script-empty span { max-width: 420px; line-height: 1.7; }.script-structure-empty { min-height: 360px; border: 1px dashed rgba(255,255,255,.08); border-radius: 16px; }
.script-asset-detail-layer,.script-source-picker-layer,.script-confirm-layer { z-index: 45; }.script-asset-detail,.script-source-picker { width: min(1040px,94vw); max-height: 90vh; overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 20px; color: #e7ebf6; background: #10131b; box-shadow: 0 35px 100px rgba(0,0,0,.65); }.script-asset-detail > header,.script-source-picker > header { display: flex; justify-content: space-between; align-items: center; padding: 17px 19px; border-bottom: 1px solid rgba(255,255,255,.07); }.script-asset-detail header small,.script-source-picker header small { color: #6e80ba; font-size: 8px; letter-spacing: .15em; }.script-asset-detail header h2,.script-source-picker header h2 { margin: 5px 0 0; font-size: 18px; }.script-asset-detail header button,.script-source-picker header button { width: 32px; height: 32px; border: 0; border-radius: 10px; color: #9ba4b7; background: rgba(255,255,255,.05); font-size: 18px; }.script-asset-detail-body { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(310px,.85fr); min-height: 520px; }.script-asset-preview { min-height: 0; display: grid; place-items: center; overflow: hidden; background: #07090e; color: #5e6779; }.script-asset-preview img { width: 100%; height: 100%; max-height: 70vh; object-fit: contain; }.script-asset-controls { overflow: auto; padding: 18px; }.script-asset-controls label { display: grid; gap: 6px; margin-bottom: 12px; color: #7c879e; font-size: 9px; }.script-asset-controls textarea { resize: vertical; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; color: #c4cbda; background: #171a23; font-size: 10px; line-height: 1.6; }.script-source-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 12px 0; }.script-source-actions button,.script-source-actions label { display: grid; place-items: center; min-height: 34px; margin: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: #919bb0; background: rgba(255,255,255,.025); font-size: 8px; cursor: pointer; }.script-regenerate-settings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }.script-regenerate-button { width: 100%; min-height: 38px; margin-top: 10px; border: 1px solid rgba(106,136,229,.3); border-radius: 10px; color: #eef2ff; background: linear-gradient(135deg,#4c69c5,#7050b8); font-size: 10px; }.script-asset-generation-references { display: grid; gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.018); }.script-asset-generation-references > header { display: flex; justify-content: space-between; align-items: center; }.script-asset-generation-references > header strong { color: #aab4ca; font-size: 9px; }.script-asset-generation-references > header span,.script-asset-generation-references > small { color: #68748d; font-size: 8px; }.script-asset-reference-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }.script-asset-reference-item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #090b10; }.script-asset-reference-item img { width: 100%; height: 100%; object-fit: cover; }.script-asset-reference-item button { position: absolute; right: 3px; top: 3px; width: 18px; height: 18px; border: 0; border-radius: 6px; color: #fff; background: rgba(5,6,9,.78); }.script-asset-controls .script-asset-reference-upload { min-height: 31px; place-items: center; margin: 0; border: 1px dashed rgba(108,135,222,.25); border-radius: 8px; color: #8998bd; background: rgba(76,99,172,.06); cursor: pointer; }.script-asset-reference-upload.disabled { opacity: .42; pointer-events: none; }.script-source-picker { width: min(900px,94vw); }.script-source-filters { display: flex; gap: 6px; padding: 10px 15px 0; }.script-source-filters button { padding: 6px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; color: #77839b; background: transparent; font-size: 9px; }.script-source-filters button.active { border-color: rgba(100,132,226,.31); color: #c6d2f5; background: rgba(75,101,185,.14); }.script-source-grid { max-height: 68vh; overflow: auto; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; padding: 15px; }.script-source-card { position: relative; overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; color: #9ca5b7; background: rgba(255,255,255,.025); text-align: left; }.script-source-card > img,.script-source-card > video,.script-source-audio-icon { width: 100%; height: 145px; display: grid; place-items: center; object-fit: contain; background: #090b10; }.script-source-audio-icon { color: #869bdd; font-size: 34px; }.script-source-media-icon { position: absolute; left: 50%; top: 72px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.62); transform: translate(-50%,-50%); }.script-source-card > span:last-child { display: block; overflow: hidden; padding: 8px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.script-source-card > span:last-child strong { display: block; margin-bottom: 4px; color: #b7c0d2; font-size: 9px; }.script-confirm-dialog { width: min(380px,90vw); padding: 24px; border: 1px solid rgba(255,255,255,.09); border-radius: 20px; color: #e8ecf7; background: #12151e; box-shadow: 0 28px 90px rgba(0,0,0,.62); text-align: center; }.script-confirm-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 14px; color: #eda3b0; background: rgba(193,68,89,.13); font-size: 20px; font-weight: 800; }.script-confirm-dialog h2 { margin: 0; font-size: 17px; }.script-confirm-dialog p { margin: 10px 0 20px; color: #838da1; font-size: 11px; line-height: 1.7; }.script-confirm-dialog footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.script-confirm-dialog button { min-height: 36px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; color: #aeb7c9; background: rgba(255,255,255,.035); font-size: 10px; }.script-confirm-dialog #scriptConfirmAccept { border-color: rgba(206,75,96,.25); color: #fff; background: linear-gradient(135deg,#a84458,#873649); }
body.script-studio-active .app-shell { grid-template-columns: minmax(0,1fr); }
body.script-studio-active .sidebar { display: none !important; }
.script-operation-bar.failed { color: #d6939e; background: rgba(174,57,76,.1); }.script-operation-bar.failed i { border: 0; border-radius: 0; animation: none; }.script-operation-bar.failed i::after { content: "!"; color: #dc7d8d; font-style: normal; font-weight: 800; }
.script-operation-bar.asset-submitting { color: #f2eeff; background: rgba(117,98,232,.24); box-shadow: inset 3px 0 #8f7cff; }
.script-operation-bar.asset-submitted { color: #e7fff5; background: rgba(35,151,102,.2); box-shadow: inset 3px 0 #42d494; }
.script-operation-bar.asset-submitted i { border: 0; animation: none; }
.script-operation-bar.asset-submitted i::after { content: "✓"; color: #6ce0ad; font-style: normal; font-weight: 900; }
@keyframes script-spin { to { transform: rotate(360deg); } } @keyframes script-pulse { 50% { opacity: .4; } }

:root[data-theme="light"] .script-workspace { color: #292e3a; background: radial-gradient(circle at 70% -10%,rgba(91,120,210,.11),transparent 34%),#f5f7fb; }.light-placeholder{}
:root[data-theme="light"] .script-topbar { border-color: #e4e7ef; background: rgba(255,255,255,.87); }:root[data-theme="light"] .script-home-intro p,:root[data-theme="light"] .script-dropzone small,:root[data-theme="light"] .script-project-card > small { color: #778091; }:root[data-theme="light"] .script-dropzone { border-color: #cbd3ea; background: linear-gradient(135deg,#f1f4fc,#fff); }:root[data-theme="light"] .script-enter-button:disabled { color: #9ba2b0; background: #e9ecf2; }:root[data-theme="light"] .script-project-card,:root[data-theme="light"] .script-section { border-color: #e0e4ed; background: rgba(255,255,255,.82); box-shadow: 0 8px 25px rgba(37,46,70,.04); }:root[data-theme="light"] .script-project-cover { background: linear-gradient(135deg,#e4eafb,#eee9f7); }:root[data-theme="light"] .script-project-toolbar,:root[data-theme="light"] .script-assets-pane { border-color: #e3e6ee; background: rgba(250,251,253,.92); }:root[data-theme="light"] .script-project-identity input { color: #2f3440; }:root[data-theme="light"] .script-style-references,:root[data-theme="light"] .script-asset-card,:root[data-theme="light"] .script-original-panel { border-color: #e1e5ed; background: #fff; }:root[data-theme="light"] .script-asset-card strong { color: #414754; }:root[data-theme="light"] .script-asset-generator { border-color: #e2e5ec; background: #f9fafc; }:root[data-theme="light"] .script-asset-generator select,:root[data-theme="light"] .script-regenerate-settings select,:root[data-theme="light"] .script-prompt-params select { color: #545b69; background: #fff; border-color: #dfe3eb; }:root[data-theme="light"] .script-section-head input,:root[data-theme="light"] .script-section-head textarea { color: #fff; }:root[data-theme="light"] .script-event-card { border-color: #ccd6f1; background: #edf2ff; }:root[data-theme="light"] .script-event-card header input { color: #344267; }:root[data-theme="light"] .script-event-card textarea { color: #65708a; }:root[data-theme="light"] .script-event-prompts { border-color: #dfe4f2; background: #f4f7fd; }:root[data-theme="light"] .script-video-prompt-card { border-color: #e0e4ec; background: #fff; }:root[data-theme="light"] .script-video-prompt-main input { color: #343a46; }:root[data-theme="light"] .script-video-prompt-main textarea { color: #687181; }:root[data-theme="light"] .script-prompt-reference-box,:root[data-theme="light"] .script-prompt-reference-file { border-color: #e2e6ee; background: #f8f9fc; }:root[data-theme="light"] .script-prompt-reference-box > header strong,:root[data-theme="light"] .script-prompt-reference-file strong { color: #50596b; }:root[data-theme="light"] .script-asset-detail,:root[data-theme="light"] .script-source-picker,:root[data-theme="light"] .script-confirm-dialog { color: #303642; background: #fff; }:root[data-theme="light"] .script-asset-controls textarea { color: #4b5260; background: #f8f9fc; border-color: #e0e4ec; }:root[data-theme="light"] .script-source-card { border-color: #e0e4ec; background: #f8f9fc; }
@media (max-width: 1350px) { .script-project-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.script-event-grid { grid-template-columns: repeat(2,minmax(220px,1fr)); }.script-primary-actions button,.script-download-all { padding-inline: 8px; }.script-capability { display: none; } }
@media (max-width: 1050px) { .script-editor-layout { grid-template-columns: 290px minmax(0,1fr); }.script-project-toolbar { align-items: flex-start; flex-direction: column; }.script-project-identity input { width: min(70vw,500px); }.script-primary-actions { width: 100%; justify-content: flex-start; }.script-editor-layout { height: calc(100% - 118px); }.script-section-head { grid-template-columns: 1fr; }.script-video-prompt-card { grid-template-columns: 1fr; }.script-project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) { .script-topbar { height: 66px; padding: 0 14px; }.script-heading h1 { font-size: 18px; }.script-project-home { height: calc(100vh - 66px); padding: 28px 14px; }.script-create-row { grid-template-columns: 1fr; }.script-dropzone,.script-enter-button { min-height: 120px; }.script-project-grid { grid-template-columns: 1fr; }.script-editor { height: calc(100vh - 66px); }.script-editor-layout { grid-template-columns: 1fr; overflow: auto; }.script-assets-pane { min-height: 58vh; overflow: visible; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); }.script-asset-list { max-height: 48vh; }.script-structure-pane { overflow: visible; }.script-event-grid { grid-template-columns: 1fr; }.script-primary-actions { overflow-x: auto; flex-wrap: nowrap; }.script-primary-actions button,.script-download-all { flex: 0 0 auto; }.script-editor-layout.assets-expanded { grid-template-columns: 1fr; }.script-editor-layout.assets-expanded .script-structure-pane { display: none; }.script-source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.script-asset-detail-body { grid-template-columns: 1fr; overflow: auto; max-height: calc(90vh - 70px); }.script-asset-preview { min-height: 300px; }.script-source-actions { grid-template-columns: 1fr; } }

/* Current task status and project task log */
.script-operation-bar { padding: 0 12px 0 20px; }
.script-operation-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-operation-bar > i { flex: 0 0 auto; }
.script-operation-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.script-operation-actions button { height: 24px; padding: 0 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; color: inherit; background: rgba(255,255,255,.035); font-size: 9px; }
.script-operation-actions #dismissScriptOperation { width: 24px; padding: 0; font-size: 14px; }
.script-task-log-layer { z-index: 48; }
.script-task-log { width: min(760px,92vw); max-height: 86vh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 20px; color: #e7ebf6; background: #10131b; box-shadow: 0 35px 100px rgba(0,0,0,.65); }
.script-task-log > header,.script-task-log > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.script-task-log > footer { border-top: 1px solid rgba(255,255,255,.07); border-bottom: 0; color: #737e94; font-size: 9px; }
.script-task-log > header small { color: #7185c4; font-size: 8px; letter-spacing: .16em; }
.script-task-log > header h2 { margin: 5px 0 0; font-size: 18px; }
.script-task-log > header > button { width: 32px; height: 32px; border: 0; border-radius: 10px; color: #9ba4b7; background: rgba(255,255,255,.05); font-size: 18px; }
.script-task-log > footer div { display: flex; gap: 6px; }
.script-task-log > footer button { min-height: 30px; padding: 0 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; color: #9ca7bc; background: rgba(255,255,255,.03); font-size: 9px; }
.script-task-log > footer button:disabled { opacity: .35; }
.script-task-log-list { min-height: 280px; overflow: auto; display: grid; align-content: start; gap: 8px; padding: 14px 16px; }
.script-task-log-item { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.065); border-radius: 12px; background: rgba(255,255,255,.022); }
.script-task-log-item > header,.script-task-log-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.script-task-log-item > header strong { color: #cbd3e4; font-size: 11px; }
.script-task-log-item > header span { padding: 4px 7px; border-radius: 999px; color: #97a7cf; background: rgba(83,108,183,.13); font-size: 8px; }
.script-task-log-item.status-succeeded > header span { color: #72d5aa; background: rgba(42,151,105,.13); }
.script-task-log-item.status-failed > header span { color: #e18c9a; background: rgba(187,63,84,.13); }
.script-task-log-meta { justify-content: flex-start; color: #69758b; font-size: 8px; }
.script-task-log-prompt,.script-task-log-error { display: -webkit-box; overflow: hidden; margin: 0; color: #8792a8; font-size: 9px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.script-task-log-error { padding: 7px 9px; border-radius: 8px; color: #d48a96; background: rgba(171,52,73,.08); }
:root[data-theme="light"] .script-task-log { color: #303642; background: #fff; border-color: #dfe3eb; }
:root[data-theme="light"] .script-task-log > header,:root[data-theme="light"] .script-task-log > footer { border-color: #e3e7ee; }
:root[data-theme="light"] .script-task-log-item { border-color: #e2e6ee; background: #f8f9fc; }
:root[data-theme="light"] .script-task-log-item > header strong { color: #3f4654; }
:root[data-theme="light"] .script-operation-actions button { border-color: rgba(70,82,112,.13); background: rgba(255,255,255,.48); }
@media (max-width: 760px) { .script-task-log { width: 94vw; }.script-task-log-item > header { align-items: flex-start; } }
.script-source-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px 14px; border-top: 1px solid rgba(255,255,255,.07); color: #707b91; font-size: 9px; }
.script-source-pagination div { display: flex; gap: 6px; }
.script-source-pagination button { min-height: 29px; padding: 0 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; color: #9ba6bb; background: rgba(255,255,255,.03); font-size: 9px; }
.script-source-pagination button:disabled { opacity: .35; cursor: not-allowed; }
:root[data-theme="light"] .script-source-pagination { border-color: #e3e7ee; color: #6e7788; }
:root[data-theme="light"] .script-source-pagination button { border-color: #dfe3eb; color: #5f6879; background: #f7f8fb; }

/* Unified video-workspace palette and controls (2026-08-21) */
.script-enter-button,.script-asset-generator button,.script-generate-video,.script-regenerate-button {
  border-color: #7562e8;
  color: #fff;
  background: #7562e8;
  box-shadow: none;
}
.script-enter-button:not(:disabled):hover,.script-asset-generator button:not(:disabled):hover,.script-generate-video:not(:disabled):hover,.script-regenerate-button:not(:disabled):hover {
  border-color: #6652da;
  background: #6652da;
  box-shadow: none;
}
.script-primary-actions button,.script-download-all {
  min-height: 36px;
  border-color: #292e3b;
  color: #a3abba;
  background: #171a23;
}
.script-primary-actions #generateAllPromptsButton { color: #dcd7ff; background: #211e3b; }
.script-primary-actions button:disabled,.script-download-all.disabled,.script-asset-generator button:disabled,.script-enter-button:disabled,.script-generate-video:disabled,.script-regenerate-button:disabled {
  border-color: #252b39;
  color: #737d90;
  background: #191d29;
  opacity: 1;
  box-shadow: none;
  cursor: not-allowed;
}
.script-section-head input,.script-section-head textarea { background: rgba(117,98,232,.2); }
.script-event-card.split { background: rgba(71,76,135,.18); }
.script-asset-generator .custom-select-trigger,.script-regenerate-settings .custom-select-trigger,.script-prompt-params .custom-select-trigger {
  border-color: #292e3b;
  color: #a3abba;
  background: #171a23;
}
:root[data-theme="light"] .script-workspace { color: #252936; background: #f5f7fb; }
:root[data-theme="light"] .script-heading small,:root[data-theme="light"] .script-project-identity span,:root[data-theme="light"] .script-document-meta,:root[data-theme="light"] .script-projects-head > span { color: #667085; }
:root[data-theme="light"] .script-capability { border-color: #dce2f0; color: #627099; background: #f4f6fb; }
:root[data-theme="light"] .script-primary-actions button,:root[data-theme="light"] .script-download-all {
  border-color: #e1e6ef;
  color: #4f5868;
  background: #fff;
}
:root[data-theme="light"] .script-primary-actions button:hover,:root[data-theme="light"] .script-download-all:not(.disabled):hover { border-color: #cfc8ef; color: #5140c4; background: #f7f5ff; }
:root[data-theme="light"] .script-primary-actions #generateAllPromptsButton { border-color: #ddd8fb; color: #5e4bd1; background: #f2efff; }
:root[data-theme="light"] .script-primary-actions button:disabled,:root[data-theme="light"] .script-download-all.disabled,:root[data-theme="light"] .script-asset-generator button:disabled,:root[data-theme="light"] .script-enter-button:disabled,:root[data-theme="light"] .script-generate-video:disabled,:root[data-theme="light"] .script-regenerate-button:disabled {
  border-color: #e1e6ef;
  color: #8b95a7;
  background: #eef1f6;
  opacity: 1;
}
:root[data-theme="light"] .script-operation-bar { color: #53627e; background: #e3e9f5; }
:root[data-theme="light"] .script-operation-bar i { border-color: #b8c4dc; border-top-color: #7562e8; }
:root[data-theme="light"] .script-operation-bar.asset-submitting { color: #4f3cc1; background: #ece9ff; box-shadow: inset 3px 0 #7562e8; }
:root[data-theme="light"] .script-operation-bar.asset-submitted { color: #16704b; background: #e0f6eb; box-shadow: inset 3px 0 #2ca875; }
:root[data-theme="light"] .script-asset-tabs button { color: #667085; }
:root[data-theme="light"] .script-asset-tabs button.active { color: #5140c4; background: #ece9ff; }
:root[data-theme="light"] .script-asset-generation-references { border-color: #e1e6ef; background: #f8f9fc; }
:root[data-theme="light"] .script-asset-generation-references > header strong { color: #4f5868; }
:root[data-theme="light"] .script-asset-generation-references > header span,:root[data-theme="light"] .script-asset-generation-references > small { color: #778195; }
:root[data-theme="light"] .script-asset-reference-item { background: #eef1f6; }
:root[data-theme="light"] .script-asset-controls .script-asset-reference-upload { border-color: #cfd6e8; color: #59698f; background: #f1f4fb; }
:root[data-theme="light"] .script-empty { color: #667085; }
:root[data-theme="light"] .script-empty b { color: #475467; }
:root[data-theme="light"] .script-asset-generator .custom-select-trigger,:root[data-theme="light"] .script-regenerate-settings .custom-select-trigger,:root[data-theme="light"] .script-prompt-params .custom-select-trigger {
  border-color: #e1e6ef;
  color: #4f5868;
  background: #fff;
}
:root[data-theme="light"] .script-section-head input,:root[data-theme="light"] .script-section-head textarea { border-color: #d9d3f7; color: #343a46; background: #f2efff; }
:root[data-theme="light"] .script-event-card.split { background: #edf1fb; }

/* Match the comprehensive workspace reference-file presentation. */
.script-asset-reference-list { display: flex; flex-wrap: wrap; gap: 7px; }
.script-asset-reference-chip { width: 100%; max-width: 270px; flex: 1 1 210px; }
.script-asset-reference-chip .reference-name { cursor: pointer; }

/* Single-asset workflow: preview and generation are two clear work zones. */
.script-prompt-label { margin-bottom: 8px; color: #9ba5ba; font-size: 10px; font-weight: 650; }
.script-asset-controls > textarea { width: 100%; height: clamp(280px,44vh,430px); min-height: 260px; box-sizing: border-box; margin: 10px 0 12px; }
.script-asset-controls .script-asset-generation-references { margin: 0; }
:root[data-theme="light"] .script-prompt-label { color: #596273; }

/* Large asset review canvas with wheel zoom and drag-to-pan. */
.script-asset-detail {
  width: min(1480px,96vw);
  height: min(900px,94vh);
  max-height: 94vh;
  display: grid;
  grid-template-rows: minmax(0,1fr);
}
.script-asset-detail-body {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  grid-template-columns: minmax(0,3fr) minmax(400px,2fr);
}
.script-asset-preview-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); background: #0c0f16; }
.script-asset-zone-head,.script-asset-generation-head {
  min-height: 64px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.script-asset-breadcrumb { min-width: 0; display: flex; align-items: center; gap: 8px; }
.script-asset-breadcrumb span { flex: 0 0 auto; color: #a7b0c2; font-size: 15px; font-weight: 750; }
.script-asset-breadcrumb i { flex: 0 0 auto; color: #6655d1; font-size: 18px; font-style: normal; }
.script-asset-detail .script-asset-breadcrumb h2 { min-width: 0; overflow: hidden; margin: 0; color: #edf0f8; font-size: 15px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.script-asset-generation-head h3 { margin: 0; color: #edf0f8; font-size: 15px; }
.script-asset-generation-head > button { flex: 0 0 auto; cursor: pointer; }
.script-asset-controls { min-width: 0; border-left: 1px solid rgba(255,255,255,.07); }
.script-asset-controls .script-asset-generation-head { margin: -18px -18px 16px; padding-right: 18px; padding-left: 18px; }
.script-asset-upload-menu-wrap { position: relative; z-index: 6; }
.script-asset-zone-head .script-asset-upload-trigger {
  width: auto;
  min-height: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(139,121,255,.55);
  border-radius: 10px;
  color: #fff;
  background: #6754d8;
  box-shadow: 0 7px 20px rgba(71,54,170,.24);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.script-asset-zone-head .script-asset-upload-trigger:hover { border-color: #9a89ff; color: #fff; background: #7562e8; }
.script-asset-upload-chevron { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.script-asset-upload-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 236px;
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 13px;
  color: #dfe3ef;
  background: #151923;
  box-shadow: 0 18px 48px rgba(0,0,0,.46);
}
.script-asset-upload-menu.hidden { display: none; }
.script-asset-zone-head .script-asset-upload-menu > button,.script-asset-zone-head .script-asset-upload-menu > label {
  width: 100%;
  height: auto;
  min-height: 43px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.script-asset-zone-head .script-asset-upload-menu > button:hover,.script-asset-zone-head .script-asset-upload-menu > label:hover { color: #fff; background: rgba(117,98,232,.15); }
.script-asset-upload-menu span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #c4bbff; background: rgba(117,98,232,.16); font-size: 14px; }
.script-asset-upload-menu strong { overflow: hidden; color: inherit; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.script-asset-preview {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: block;
  overflow: hidden;
  margin: 16px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: #07090e;
  box-shadow: inset 0 1px rgba(255,255,255,.025),0 14px 35px rgba(0,0,0,.2);
}
.script-asset-preview-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  outline: 0;
  cursor: zoom-in;
  touch-action: none;
}
.script-asset-preview-stage.zoomed { cursor: grab; }
.script-asset-preview-stage.dragging { cursor: grabbing; }
.script-asset-preview-stage img {
  width: auto;
  height: auto;
  max-width: calc(100% - 48px);
  max-height: calc(100% - 48px);
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  will-change: transform;
  transform: translate(0,0) scale(1);
  transform-origin: center center;
}
.script-asset-preview-toolbar {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 7px 6px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: #9ca6ba;
  background: rgba(11,13,19,.8);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  font-size: 9px;
  white-space: nowrap;
}
.script-asset-preview-toolbar button {
  min-width: 48px;
  height: 27px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  color: #d8d4ff;
  background: rgba(117,98,232,.22);
  font-size: 9px;
  cursor: pointer;
}
#regenerateScriptAsset { min-height: 44px; font-size: 13px; font-weight: 700; }
:root[data-theme="light"] .script-asset-preview-toolbar { border-color: rgba(67,76,99,.14); color: #606a7c; background: rgba(255,255,255,.84); }
:root[data-theme="light"] .script-asset-preview-toolbar button { color: #5947ca; background: #ece9ff; }
:root[data-theme="light"] .script-asset-zone-head,:root[data-theme="light"] .script-asset-generation-head { border-color: #e4e7ee; }
:root[data-theme="light"] .script-asset-preview-panel { background: #f3f5f9; }
:root[data-theme="light"] .script-asset-breadcrumb span { color: #5b6474; }
:root[data-theme="light"] .script-asset-detail .script-asset-breadcrumb h2,:root[data-theme="light"] .script-asset-generation-head h3 { color: #303642; }
:root[data-theme="light"] .script-asset-preview { border-color: #dce1ea; background: #eef1f6; box-shadow: inset 0 1px #fff,0 12px 30px rgba(42,50,68,.09); }
:root[data-theme="light"] .script-asset-controls { border-left-color: #e4e7ee; }
:root[data-theme="light"] .script-asset-zone-head .script-asset-upload-trigger { border-color: #6754d8; color: #fff; background: #6754d8; }
:root[data-theme="light"] .script-asset-zone-head .script-asset-upload-trigger:hover { color: #fff; background: #5845ca; }
:root[data-theme="light"] .script-asset-upload-menu { border-color: #dfe3eb; color: #404754; background: #fff; box-shadow: 0 18px 45px rgba(42,50,68,.18); }
:root[data-theme="light"] .script-asset-zone-head .script-asset-upload-menu > button:hover,:root[data-theme="light"] .script-asset-zone-head .script-asset-upload-menu > label:hover { color: #404754; background: #f1efff; }
:root[data-theme="light"] .script-asset-upload-menu span { color: #5f4ed0; background: #ece9ff; }
@media (max-width: 760px) {
  .script-asset-detail { width: 96vw; height: 94vh; }
  .script-asset-detail-body { display: grid; grid-template-columns: 1fr; overflow: auto; max-height: none; }
  .script-asset-controls { border-top: 1px solid rgba(255,255,255,.07); border-left: 0; }
  .script-asset-zone-head { gap: 10px; padding: 10px 12px; }
  .script-asset-breadcrumb { gap: 5px; }
  .script-asset-breadcrumb span { font-size: 13px; }
  .script-asset-detail .script-asset-breadcrumb h2 { font-size: 13px; }
  .script-asset-preview { height: calc(52vh - 24px); min-height: 316px; margin: 12px; }
  .script-asset-controls > textarea { height: 260px; min-height: 240px; }
  .script-asset-upload-menu { width: min(236px,calc(96vw - 48px)); }
}
:root[data-theme="light"] .script-asset-controls { border-top-color: #e4e7ee; }

/* Three-category asset library, manual creation, and per-asset style references. */
.script-assets-pane > header h2 { margin: 0; }
.script-asset-card { min-height: 54px; }
.script-asset-card-info { min-width: 0; }
.script-asset-card-state { margin-top: 4px !important; }
.script-asset-card-state.ready { color: #65c99b; }
.script-asset-card-state.generating { color: #e3ad55; }
.script-asset-card-state.failed { color: #df7587; }
.script-asset-add-card {
  width: 100%; min-height: 38px; margin: 0 0 8px; border: 1px dashed rgba(117,133,180,.24); border-radius: 10px;
  color: #7f8ba7; background: rgba(255,255,255,.012); font-size: 9px; cursor: pointer;
}
.script-asset-add-card:hover { border-color: rgba(117,98,232,.48); color: #beb5ff; background: rgba(117,98,232,.08); }
.script-asset-add-card:disabled { opacity: .62; cursor: wait; }
.script-asset-detail .script-asset-breadcrumb h2[contenteditable="true"] { min-width: 80px; padding: 5px 7px; border: 1px solid transparent; border-radius: 8px; outline: 0; cursor: text; }
.script-asset-detail .script-asset-breadcrumb h2[contenteditable="true"]:hover { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.025); }
.script-asset-detail .script-asset-breadcrumb h2[contenteditable="true"]:focus { border-color: rgba(117,98,232,.58); background: rgba(117,98,232,.09); }

.script-asset-style-references .script-asset-reference-list { display: flex; flex-wrap: wrap; gap: 7px; }
.script-style-reference-chip { position: relative; width: 76px; height: 76px; flex: 0 0 76px; overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: #090b10; }
.script-style-reference-chip img { width: 100%; height: 100%; display: block; object-fit: cover; cursor: pointer; }
.script-style-reference-label { position: absolute; left: 4px; bottom: 4px; padding: 3px 5px; border-radius: 5px; color: #fff; background: rgba(8,10,15,.74); font-size: 7px; line-height: 1; }
.script-style-reference-remove { position: absolute; right: 4px; top: 4px; width: 19px; height: 19px; padding: 0; border: 0; border-radius: 6px; color: #fff; background: rgba(8,10,15,.76); font-size: 13px; cursor: pointer; }
.script-style-reference-empty { color: #626e85; font-size: 8px; }
.script-style-restore-toggle { justify-self: start; padding: 0; border: 0; color: #8f82e7; background: transparent; font-size: 8px; cursor: pointer; }
.script-style-restore-list { display: grid; gap: 5px; }
.script-style-restore-item { min-width: 0; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 7px; align-items: center; padding: 4px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; color: #8994aa; background: rgba(255,255,255,.02); text-align: left; font-size: 8px; }
.script-style-restore-item img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.script-style-restore-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-style-restore-item b { padding-right: 6px; color: #a99df4; font-size: 8px; }

:root[data-theme="light"] .script-asset-add-card { border-color: #d5dbe7; color: #6d7789; background: #fafbfc; }
:root[data-theme="light"] .script-asset-add-card:hover { border-color: #aaa0e8; color: #5947ca; background: #f3f0ff; }
:root[data-theme="light"] .script-asset-detail .script-asset-breadcrumb h2[contenteditable="true"]:hover { border-color: #dfe3eb; background: #f8f9fc; }
:root[data-theme="light"] .script-asset-detail .script-asset-breadcrumb h2[contenteditable="true"]:focus { border-color: #9b8fe7; background: #f3f0ff; }
:root[data-theme="light"] .script-style-reference-chip,:root[data-theme="light"] .script-style-restore-item { border-color: #dfe3eb; background: #f8f9fc; }
:root[data-theme="light"] .script-style-reference-empty { color: #778195; }
:root[data-theme="light"] .script-style-restore-item { color: #5f6879; }
@media (max-width: 760px) { .script-style-reference-chip { width: 68px; height: 68px; flex-basis: 68px; } }
