/* Shared account styles; deliberately scoped to avoid studio collisions. */
.site-icp{position:static;display:block;clear:both;margin:24px auto 0;padding:12px 4px;text-align:center;font:12px/1.8 system-ui,sans-serif;overflow-wrap:anywhere}.site-icp a{color:inherit;opacity:.78;text-decoration:underline;text-underline-offset:3px}.site-icp a:hover,.site-icp a:focus-visible{opacity:1}.site-icp a:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.account-page{margin:0;min-height:100vh;display:grid;place-items:center;background:#0b1320;color:#edf3ff;font:15px/1.7 system-ui,sans-serif;padding:24px;box-sizing:border-box}.account-card{width:min(100%,420px);padding:34px;border:1px solid #2c3b52;background:#131e30;border-radius:20px;box-sizing:border-box}.account-brand{color:#ac9bff;text-decoration:none;font-weight:750}.account-card h1{font-size:28px;margin:22px 0 4px}.account-muted,.account-card small{color:#9db0c9}.account-tabs{display:flex;gap:8px;margin:24px 0}.account-card button,.account-bar button{font:inherit;cursor:pointer;border:1px solid #415474;border-radius:9px;background:#1b2a42;color:#edf3ff;padding:9px 15px}.account-tabs button{flex:1}.account-tabs button[aria-pressed=true],.account-card .account-primary{background:#b5a5ff;border-color:#b5a5ff;color:#161329}.account-card label{display:block;margin:15px 0 6px}.account-card input,.account-bar input{box-sizing:border-box;width:100%;font:inherit;background:#0c1625;color:#edf3ff;border:1px solid #415474;border-radius:8px;padding:11px}.account-card input:focus-visible,.account-bar input:focus-visible,.account-card button:focus-visible,.account-bar button:focus-visible{outline:2px solid #c2b5ff;outline-offset:3px}.account-card small{display:block;font-size:12px;margin-top:5px}.account-card .account-primary{width:100%;margin-top:24px;font-weight:700}.account-card button:disabled,.account-bar button:disabled{opacity:.55;cursor:wait}.account-notice{padding:13px;border:1px solid #536b8c;border-radius:10px;background:#1b2b43;font-size:13px}#account-message{min-height:25px;color:#ffc7cd;font-size:13px;overflow-wrap:anywhere}.account-bar{border:1px solid #31445f;background:#142136;border-radius:12px;margin:0 0 22px;padding:12px 16px;color:#e7f0ff;font:13px/1.6 system-ui,sans-serif}.account-bar-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.account-bar-user{margin-right:auto;overflow-wrap:anywhere}.account-bar button{font-size:12px;padding:6px 10px}.account-bar form{max-width:420px;padding-top:14px}.account-bar label{display:block;margin:10px 0 5px}.account-bar input{font-size:14px;padding:9px}.account-bar form button{margin-top:12px}.account-bar-status{color:#ffd0d3;margin:8px 0 0}.account-card [hidden],.account-bar [hidden]{display:none!important}@media(max-width:480px){.account-page{padding:15px}.account-card{padding:25px}}
/* Sidebar account entry and focused account dialog. */
.sidebar #projects{min-height:0;overflow-y:auto;flex:1}.sidebar-bottom.has-account{flex-shrink:0;padding-top:12px}.has-account .account-bar{position:relative;margin:0 0 16px;padding:0;border:0;background:none}.account-bar-row{display:block}.account-bar .account-trigger{display:flex;align-items:center;gap:10px;width:100%;padding:10px 8px;text-align:left;background:transparent;border:1px solid transparent;border-radius:10px}.account-trigger:hover,.account-trigger[aria-expanded=true]{background:#1b2c40;border-color:#324b60}.account-avatar{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:11px;background:#9ae7d7;color:#102b31;font-size:16px;font-weight:800}.account-identity{display:flex;flex:1;min-width:0;flex-direction:column}.account-identity strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.account-identity small{font-size:10px;line-height:1.7;color:#8da3bc}.account-chevron{color:#96a9c2}.account-menu{position:absolute;bottom:calc(100% + 10px);left:0;width:230px;padding:7px;background:#152234;border:1px solid #3c526a;border-radius:14px;box-shadow:0 14px 48px #0008;z-index:210}.account-menu-heading{padding:10px 12px 13px;border-bottom:1px solid #304258;margin-bottom:6px}.account-menu-heading strong,.account-menu-heading small{display:block;overflow-wrap:anywhere}.account-menu-heading small{color:#8da3bc;font-size:11px;line-height:1.8}.account-menu button{display:block;width:100%;text-align:left;background:transparent;border:0;padding:11px 12px;font-size:13px}.account-menu button:hover{background:#24374c}.account-menu .account-logout{color:#ffb4b4;border-top:1px solid #304258;border-radius:0;margin-top:5px;padding-top:13px}.account-dialog{width:min(440px,calc(100vw - 32px));max-height:85dvh;overflow:auto;padding:28px;border:1px solid #3c526a;border-radius:18px;background:#131f30;color:#edf3ff;box-shadow:0 24px 100px #0008;font:14px/1.7 system-ui,sans-serif}.account-dialog::backdrop{background:#020713b8;backdrop-filter:blur(5px)}.account-dialog h2{font-size:22px;margin:0 0 12px}.account-dialog .account-description{color:#9db0c9;margin-bottom:20px}.account-dialog-close{float:right;font-size:12px;padding:5px 10px}.account-dialog label{display:block;margin:14px 0 6px}.account-dialog input{width:100%;padding:12px;background:#0c1625;border:1px solid #415474;color:#edf3ff;border-radius:8px}.account-dialog button[type=submit]{margin-top:22px;background:#98e3d3;color:#102b31;border:0;width:100%;font-weight:700}.account-dialog input:focus-visible{outline:2px solid #98e3d3;outline-offset:2px}.account-dialog [hidden]{display:none!important}.account-bar-status:empty{display:none}@media(max-width:650px){.sidebar-bottom.has-account{display:block;width:100%;border:0;padding:0}.has-account .account-bar{margin:0}.has-account>.dot,.has-account>small{display:none}.sidebar-bottom.has-account{font-size:0}.account-menu{bottom:auto;top:calc(100% + 6px);width:min(280px,calc(100vw - 34px))}.account-trigger{max-width:280px}}

/* Account summary: clear identity, aligned facts, separate retention reminder. */
.account-dialog{box-sizing:border-box;width:min(500px,calc(100vw - 32px));padding:28px;font-family:system-ui,"Microsoft YaHei",sans-serif}
.account-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}
.account-dialog-header h2{margin:0;font-size:23px;line-height:1.3}
.account-dialog .account-dialog-close{float:none;flex-shrink:0;font:inherit;font-size:12px;padding:6px 12px;border:1px solid #3c526a;border-radius:9px;background:#1b2a3e;color:#c8d6e7;cursor:pointer}
.account-dialog .account-dialog-close:focus-visible{outline:2px solid #98e3d3;outline-offset:3px}
.account-profile-identity{display:flex;align-items:center;gap:14px;padding:18px;border:1px solid #315357;border-radius:12px;background:#172c36}
.account-profile-avatar{display:grid;place-items:center;width:48px;height:48px;flex-shrink:0;border-radius:14px;background:#98e3d3;color:#102b31;font-size:22px;font-weight:800}
.account-profile-identity>div{min-width:0}.account-profile-identity strong{display:block;font-size:19px;line-height:1.4;overflow-wrap:anywhere}.account-profile-identity div>span{display:block;margin-top:4px;font-size:12px;color:#a5bdca}
.account-profile-facts{margin:22px 0}.account-profile-facts>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:16px;padding:14px 0;border-bottom:1px solid #2a3c50}.account-profile-facts>div:first-child{padding-top:0}.account-profile-facts dt{color:#9db0c9;font-size:13px}.account-profile-facts dd{margin:0}.account-profile-facts strong{display:block;font-size:14px;font-weight:650}.account-profile-facts dd span{display:block;margin-top:3px;font-size:12px;color:#90a6bc;overflow-wrap:anywhere}
.account-profile-reminder{border-left:3px solid #98e3d3;padding:12px 15px;background:#1a2b3c;border-radius:0 9px 9px 0}.account-profile-reminder strong{font-size:13px;color:#b2f1e3}.account-profile-reminder p{font-size:12px;line-height:1.8;color:#b4c4d6;margin:5px 0 0}.account-dialog .account-profile-footnote{font-size:11px;line-height:1.7;color:#849bb2;margin:16px 0 0}.account-dialog input{box-sizing:border-box}
@media(max-width:480px){.account-dialog{padding:22px}.account-dialog-header{margin-bottom:20px}.account-profile-facts>div{grid-template-columns:80px minmax(0,1fr);gap:12px}}

.account-theme-control{margin-bottom:14px;font:12px/1.5 system-ui,sans-serif}.account-theme-label{display:block;color:#91a7bd;font-size:11px;margin:0 2px 7px}.account-theme-options{display:flex;gap:4px;padding:4px;background:#0b1725;border:1px solid #2d4259;border-radius:11px}.account-theme-options button{flex:1;padding:7px 8px;border:0;background:transparent;color:#9eb2c9;border-radius:7px;font-size:12px}.account-theme-options button[aria-pressed=true]{background:#24434a;color:#adf6e4;font-weight:700}.account-theme-options button:focus-visible{outline:2px solid #75d6c3;outline-offset:2px}
html[data-theme=light]{color-scheme:light;--ui-text:#192e3d;--ui-muted:#526879;--ui-border:#d0dee4;--ui-accent:#087c70}
html[data-theme=light] body{background:#f3f6f8;color:var(--ui-text)}
html[data-theme=light] :is(.sidebar,.account-page){background:#f8fafb;color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme=light] :is(.panel,.flow-card,.task-brief,.production-progress,.creative-panel,.github-panel,.tool-panel,.account-card,.account-dialog,.setup-dialog,.history-card,#scene-editor){background:#fff;color:var(--ui-text);border-color:var(--ui-border);box-shadow:0 5px 22px #29475806}
html[data-theme=light] :is(button,.quiet){color:#385267;background:#edf3f6;border-color:#c9d8e1}
html[data-theme=light] button:hover{filter:brightness(.97)}
html[data-theme=light] :is(input:not([type=range]):not([type=checkbox]),textarea,select){background:#fff;color:var(--ui-text);border-color:#c3d4dd}
html[data-theme=light] :is(input,textarea)::placeholder{color:#6e8293}
html[data-theme=light] :is(label,.flow-card label,.creative-panel label,.panel label){color:#385267}
html[data-theme=light] :is(.nav-label,.eyebrow,.section-help,.help,.script-footer,.label-row small,.action-row p,.flow-card small,.task-brief dt,.task-brief>p,.task-brief>small,.history-card p,.creative-heading span,.creative-panel article small,.cover-images figcaption,.github-panel small,.github-panel p,.setup-dialog p,.account-description,.account-profile-facts dt,.account-profile-facts dd span,.account-profile-footnote,.account-identity small,.account-menu-heading small,.sidebar-bottom,.sidebar-bottom small,.account-theme-label){color:var(--ui-muted)}
html[data-theme=light] :is(.workflow,.action-row,.sidebar-bottom,.account-menu-heading,.account-profile-facts>div,.creative-panel article){border-color:var(--ui-border)}
html[data-theme=light] :is(.nav,.project-link){color:#526779;background:transparent}
html[data-theme=light] :is(.nav.active,.project-link.selected,.sidebar [aria-expanded=true]){background:#dcefe9;color:#076e62}
html[data-theme=light] :is(.section-number,.brief-label,.workflow .current,.progress-heading strong,.cover-images a,.github-record a,#flow-voice-message,#flow-image-status,#clean-status,#transcription-status,.creative-panel [role=status]){color:#087569}
html[data-theme=light] :is(.primary,#generate,#clean-submit,.setup-dialog .primary,.account-dialog button[type=submit]){background:#087d70;border-color:#087d70;color:#fff}
html[data-theme=light] :is(.voice-choice,.bg-choice,.scene-card,.flow-card details,.retention-policy,.account-menu,.api-beginner-guide,.account-profile-reminder,#cover-connection,.notice,.status){background:#f0f5f7;color:var(--ui-text);border-color:#cbdde2}
html[data-theme=light] :is(.bg-choice.selected,.scene-card.selected){background:#e6f3ee;border-color:#248f7f;color:#126a60}
html[data-theme=light] :is(.flow-card summary,.retention-policy summary,.api-beginner-guide>summary,.account-profile-reminder strong){color:#146f65}
html[data-theme=light] :is(.flow-card details p,.api-beginner-guide p,.api-beginner-guide>small,.api-beginner-guide>summary>span,.account-profile-reminder p,.creative-shortcuts small,.progress-heading span,#production-help,#production-error-text){color:#536a79}
html[data-theme=light] .creative-shortcuts button{background:linear-gradient(120deg,#e1f2ed,#ebeffa);color:#224959;border-color:#aacdc9}
html[data-theme=light] :is(.api-beginner-guide a,.setup-dialog small,#model-result,#personal-voice-result,.history-expiry){color:#09766b}
html[data-theme=light] :is(.notice.risk-clear,.production-steps .done,.output-chips span){background:#e2f2eb;color:#146d58;border-color:#adcfbf}
html[data-theme=light] .production-steps span{color:#50677b;border-color:#c5d5e0}
html[data-theme=light] :is(#production-error summary,.api-guide-errors>summary,#setup-status){color:#935708}
html[data-theme=light] .account-menu button{background:transparent;color:#314d60}
html[data-theme=light] .account-menu button:hover{background:#e4edf2}
html[data-theme=light] .account-menu .account-logout{color:#aa3546}
html[data-theme=light] .account-trigger{color:#294457;background:transparent}
html[data-theme=light] .account-profile-identity{background:#e9f5f0;border-color:#bfdad0}
html[data-theme=light] .account-profile-identity div>span{color:#4b706a}
html[data-theme=light] :is(.account-dialog .account-dialog-close,.setup-dialog button){background:#eef3f6;color:#3a5263;border-color:#c9d7e0}
html[data-theme=light] .setup-dialog .primary{background:#087d70;color:white;border-color:#087d70}
html[data-theme=light] .setup-dialog .setup-steps .active{background:#def0e9;color:#096b60;border-color:#55a594}
html[data-theme=light] :is(.account-dialog,.setup-dialog)::backdrop{background:#29425755}
html[data-theme=light] .account-theme-options{background:#e9eff3;border-color:#d0dce5}
html[data-theme=light] .account-theme-options button{background:transparent;color:#526879}
html[data-theme=light] .account-theme-options button[aria-pressed=true]{background:white;color:#086d63;box-shadow:0 1px 5px #1c425e18}
html[data-theme=light] .tag{color:#65509e;background:#f1edf8;border-color:#d8cfe9}
html[data-theme=light] #toast{background:#fff;color:#273d4f;border-color:#c9d7e1;box-shadow:0 8px 30px #29425722}
html[data-theme=light] .account-bar-status{color:#a13545}
html[data-theme=light] .api-guide-links{border-color:#c6dcd8}
@media(max-width:650px){.account-theme-control{max-width:280px;width:100%}}

html[data-theme=light] .brief-preview{color:#f2f7ff}html[data-theme=light] .brief-preview h2,html[data-theme=light] .brief-preview strong{color:#f2f7ff}html[data-theme=light] .api-beginner-guide li::marker{color:#087569}
/* Complete light surfaces for the project view, including nested editors. */
html[data-theme=light]{--ink:#192e3d;--muted:#526879;--line:#d0dee4;--card:#fff;--mint:#087c70;--surface:#fff;--surface-soft:#f0f5f7}
html[data-theme=light] :is(.preview-panel,.editor,#personal-model-settings){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=light] :is(.preview-top,.preview-top small,.transport span,.editor small,#copy-fields label,#scene-editor>label,.asset-decision small,.asset-decision p,.tool-heading small,#model-fields>label,#model-fields details>label){color:var(--muted)}
html[data-theme=light] :is(.preview-panel,.editor,.asset-decision,.speed-control,.background-control,.transport,#scene-editor){border-color:var(--line)}
html[data-theme=light] :is(.editor h2,.editor h3,.preview-panel h2,#personal-model-settings summary){color:var(--ink)}
html[data-theme=light] :is(.screen,#preview-empty,.asset-thumbnail,#clean-report){background:var(--surface-soft);color:var(--muted)}
html[data-theme=light] #clean-report li{color:#425c70}
html[data-theme=light] :is(.downloads,.background-control a,#back-input){color:#08766b}
html[data-theme=light] :is(details,.brief>p,.brief>small,.brief-spec,.brand small){color:var(--muted)}
html[data-theme=light] .upload-button{background:#f3f7f9;color:#355369;border-color:#c7d9e2}
html[data-theme=light] :is(.speed-control select,.background-control select,.asset-decision select,#model-fields select){background:#fff;color:var(--ink);border-color:#c3d4dd}
html[data-theme=light] :is(.speed-control,.background-control) label{color:#425c70}
html[data-theme=light] :is(.transport input,.background-control input,.creative-panel progress,#production-bar,#transcription-progress){accent-color:#087d70}
html[data-theme=light] .large-mark{color:#91afa9}
html[data-theme=light] .notice:not(.risk-clear){background:#fff5eb;border-color:#e7c8a6;color:#80501d}
html[data-theme=light] #tool-frames iframe{background:#fff}
html[data-theme=light] .studio-embedded{background:#f3f6f8!important;color:var(--ink)}
html[data-theme=light] :is(.poster,.brief-preview){color:#f2f7ff}
html[data-theme=light] .generated-asset-card{background:#f7fafb;border-color:var(--line)}
html[data-theme=light] .asset-review-heading strong,html[data-theme=light] .generated-asset-card strong{color:var(--ink)}
html[data-theme=light] .generated-asset-card small{color:var(--muted)}
html[data-theme=light] .asset-review-heading span,html[data-theme=light] .generated-asset-card.reviewed span{color:var(--mint)}
html[data-theme=light] :is(.account-muted,.account-card small){color:var(--muted)}
html[data-theme=light] .account-notice{background:#eef5f7;border-color:#c3d7e0;color:#39596a}
html[data-theme=light] input[type=checkbox]{background:#fff;border-color:#b4cbd5;accent-color:#087d70;color:#192e3d}
