.live-login-gate{position:fixed;inset:0;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0e0c12;color:#eee;gap:20px;padding:24px;text-align:center}
.live-login-gate a{padding:12px 24px;border-radius:12px;background:#a855f7;color:#fff;text-decoration:none}
#desktop-titlebar{display:flex!important;position:fixed;z-index:50;inset:0 0 auto;height:30px;align-items:center;padding:0 12px;background:linear-gradient(180deg,#17141d,#131019);border-bottom:1px solid #a855f733;color:#e9e6ef}
#desktop-titlebar .desktop-window-brand{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700}
#desktop-titlebar .desktop-window-brand img{width:15px;height:15px;object-fit:contain}
#desktop-titlebar .desktop-window-brand small{font-size:8px;letter-spacing:.16em;color:#a855f7}
#desktop-titlebar .desktop-window-note{margin-left:20px;color:#8f8c9a;font-size:10px}
html:not(.tauri-client) .sidebar{top:30px;height:calc(100dvh - 30px)}
html:not(.tauri-client) .app-shell{margin-top:30px;min-height:calc(100dvh - 30px)}
.desktop-window-actions{display:none!important}
#shared-membership{display:block;color:#aaa;font-size:12px;margin-top:5px}
.account-menu-list button[hidden]{display:none!important}
#editing-file{max-width:100%}

#client-account-dialog{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;color:#eee;background:#19151f;border:1px solid #44344f;border-radius:22px;padding:0}
#client-account-dialog::backdrop{background:rgba(0,0,0,.65)}
#client-account-dialog .dialog-heading,#client-account-dialog .dialog-actions{padding:22px;display:flex;justify-content:space-between;align-items:center;gap:12px}
#client-account-dialog h2{margin:6px 0 0;font-size:22px}
.client-account-body{padding:0 22px 10px}.client-account-details{margin:0 0 24px}
.client-account-details>div{display:flex;justify-content:space-between;gap:20px;padding:14px 0;border-bottom:1px solid #332a3c}
.client-account-details dt{color:#a89eaf;flex-shrink:0}.client-account-details dd{margin:0;text-align:right;overflow-wrap:anywhere}
#client-account-expiry{display:block;color:#aaa;margin-top:5px}.client-account-body label{display:block;margin-bottom:10px}
#client-account-name{width:100%;box-sizing:border-box;border:1px solid #44344f;background:#100d15;color:#fff;padding:13px;border-radius:10px}
#client-account-status{min-height:24px;font-size:13px;color:#d5b6f3}.client-account-body .hint{font-size:12px;line-height:1.7;color:#a89eaf}
#client-account-save{background:#a855f7;color:#fff;border:0;border-radius:12px;padding:12px 20px}
#client-account-save:disabled{opacity:.5}.account-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.client-account-body input{width:100%;box-sizing:border-box;border:1px solid #44344f;background:#100d15;color:#fff;padding:13px;border-radius:10px}
.client-password-section{margin-top:24px;border-top:1px solid #44344f;padding-top:18px}.client-password-section summary{cursor:pointer;padding:8px 0;color:var(--live-menu-text)}
.client-password-section form{padding-top:4px}.client-password-section label{margin-top:15px}#client-password-status{font-size:13px;color:#d5b6f3;line-height:1.6}
.account-document-body a{color:#c798ef}.account-document-body a:hover{text-decoration:none;color:#e7c8ff}
@media(max-width:700px){#desktop-titlebar .desktop-window-note{display:none}html:not(.tauri-client) .sidebar{height:64px}html:not(.tauri-client) .app-shell{margin-top:94px}}

.live-login-notice{grid-column:1/-1;border:1px solid #493159;border-radius:18px;padding:24px;background:linear-gradient(110deg,#251630,#17111f);color:#eee}
.live-login-notice h2{font-size:22px;margin:0 0 10px}.live-login-notice p{font-size:13px;color:#bcb0c8;line-height:1.7;margin:0 0 18px}
.live-login-notice a{display:inline-block;padding:12px 22px;background:#a855f7;border-radius:12px;color:#fff;text-decoration:none;font-size:14px}
.live-anonymous #account-open{cursor:pointer}.live-anonymous .account-trigger-copy strong{color:#ddbcff}
.live-anonymous .app-shell button:disabled,.live-anonymous .sidebar nav button:disabled{cursor:default;opacity:.5}

/* Account row feedback has priority over the legacy global button seal. */
:root{--live-menu:#1b1821;--live-menu-hover:#343039;--live-menu-active:#44324f;--live-menu-text:#eeeaf4;--live-menu-muted:#a39daa}
#account-menu{width:310px;background:var(--live-menu);color:var(--live-menu-text)}
#account-menu button{cursor:pointer;transition:background-color .14s ease,color .14s ease;box-shadow:none!important;transform:none!important}
#account-menu button:not(.primary):not(.danger):not(.nav-item){background:transparent!important;color:var(--live-menu-text)!important;border-color:transparent!important}
#account-menu button:not(.primary):not(.danger):not(.nav-item):is(:hover,:focus-visible){background:var(--live-menu-hover)!important;color:var(--live-menu-text)!important}
#account-menu button:not(.primary):not(.danger):not(.nav-item):active{background:var(--live-menu-active)!important}
#account-menu button:focus-visible{outline:2px solid #b478ee;outline-offset:-2px}
#account-menu .account-menu-heading{padding:4px 0 10px;gap:4px;align-items:center}
#account-menu .account-identity{display:flex;align-items:center;gap:10px;text-align:left;flex:1;min-width:0;border:0;border-radius:8px;padding:10px}
#account-menu .account-identity>span:last-child{min-width:0;overflow:hidden}#account-menu .account-identity strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#account-menu #account-refresh{width:34px;height:34px;padding:7px;border:0;border-radius:8px;flex-shrink:0}#account-refresh svg{width:18px;height:18px}
#account-menu .account-menu-balance{border-radius:8px;color:var(--live-menu-muted);padding:9px 10px 12px}
#account-menu .account-menu-balance strong{color:var(--live-menu-text)}
#account-menu .account-action-copy{display:flex;flex-direction:column;gap:4px}#account-menu .account-action-copy strong{font-size:13px;font-weight:500}#account-menu .account-action-copy small{font-size:11px;color:var(--live-menu-muted)}
#account-menu .account-theme-row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:8px;font-size:13px;min-height:44px}
#account-menu .account-theme-row:hover{background:var(--live-menu-hover)}
#account-menu .account-theme-options{display:flex;gap:2px;margin-left:auto;padding:2px;border:1px solid #ffffff12;border-radius:9px}
#account-menu .account-theme-options button{min-height:28px;width:auto;padding:4px 7px;border:0;border-radius:7px;font-size:11px;white-space:nowrap}
#account-menu .account-theme-options button[data-live-theme][aria-checked="true"]:not(.primary):not(.danger):not(.nav-item){background:#53326f!important;color:#f7efff!important}
#account-menu .account-menu-balance{width:100%;text-align:left}
#account-menu button.account-menu-exit:not(.primary):not(.danger):not(.nav-item){color:#ffaba8!important}
.account-document{width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;color:var(--live-menu-text);background:var(--live-menu);border:1px solid #745b894d;border-radius:18px;overflow:auto}
.account-document .dialog-heading{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px;background:var(--live-menu);z-index:1}
.account-document h2{font-size:22px;margin:0;color:inherit}.account-document-body{padding:0 24px 24px;line-height:1.85;font-size:14px}
.account-document-body h3{font-size:16px;margin:24px 0 8px;color:inherit}.account-document-body p,.account-document-body li{color:var(--live-menu-muted)}.account-document-body ul{padding-left:20px}
/* Light appearance preserves the media stage while adapting every control surface. */
html[data-live-theme="light"]{color-scheme:light;--surface-0:#f4f2f7;--surface-1:#fff;--surface-2:#f5f2f8;--surface-3:#eee8f5;--apple-canvas:#f4f2f7;--apple-sidebar:#fbfaff;--apple-ink:#28232f;--apple-muted:#706779;--apple-hairline:#ddd7e5;--stroke:#ddd7e5;--line:#ddd7e5;--live-menu:#fff;--live-menu-hover:#eeebf2;--live-menu-active:#e5d8f4;--live-menu-text:#28232f;--live-menu-muted:#706779;--apple-blue:#7e39bc}
html[data-live-theme="light"] body,html[data-live-theme="light"] .app-shell,html[data-live-theme="light"] .wide-workspace{background:#f4f2f7!important;color:#28232f!important}
html[data-live-theme="light"] .sidebar{background:#fbfaff!important;border-color:#ddd7e5!important}
html[data-live-theme="light"] .topbar,html[data-live-theme="light"] .chat-panel,html[data-live-theme="light"] dialog,html[data-live-theme="light"] .settings-body,html[data-live-theme="light"] .editing-layout,html[data-live-theme="light"] .creation-layout,html[data-live-theme="light"] .media-surface,html[data-live-theme="light"] .output-surface,html[data-live-theme="light"] .result-preview,html[data-live-theme="light"] .image-picker,html[data-live-theme="light"] .component-output{background:#fff!important;color:#28232f!important;border-color:#ddd7e5!important;box-shadow:none!important}
html[data-live-theme="light"] .nav-item{color:#706779!important}html[data-live-theme="light"] .nav-item:hover{background:#eee8f5!important;color:#58287c!important}html[data-live-theme="light"] .nav-item.active{background:#eadcf8!important;color:#6d309d!important}
html[data-live-theme="light"] .nav-label,html[data-live-theme="light"] .sidebar-foot,html[data-live-theme="light"] .breadcrumb,html[data-live-theme="light"] .header-center,html[data-live-theme="light"] .hint,html[data-live-theme="light"] .footnote,html[data-live-theme="light"] .queue-info,html[data-live-theme="light"] .room-status,html[data-live-theme="light"] .toggle,html[data-live-theme="light"] .feed-empty p,html[data-live-theme="light"] .message-meta,html[data-live-theme="light"] .message-result,html[data-live-theme="light"] .composer>span,html[data-live-theme="light"] footer{color:#706779!important}
html[data-live-theme="light"] .breadcrumb strong,html[data-live-theme="light"] .section-heading h2,html[data-live-theme="light"] .page-heading h1,html[data-live-theme="light"] .feed-empty h3,html[data-live-theme="light"] dialog h2,html[data-live-theme="light"] dialog h3,html[data-live-theme="light"] dialog label,html[data-live-theme="light"] .composer>label,html[data-live-theme="light"] .message p,html[data-live-theme="light"] .preview-panel,html[data-live-theme="light"] .chat-panel{color:#28232f!important}
html[data-live-theme="light"] .inspector h3,html[data-live-theme="light"] .wide-workspace label,html[data-live-theme="light"] .media-empty strong,html[data-live-theme="light"] .surface-label,html[data-live-theme="light"] .surface-label span{color:#55475f!important}
html[data-live-theme="light"] .wide-workspace summary,html[data-live-theme="light"] .media-empty p,html[data-live-theme="light"] .image-picker>div,html[data-live-theme="light"] .image-picker small,html[data-live-theme="light"] .page-heading p,html[data-live-theme="light"] .workflow-line{color:#706779!important}
html[data-live-theme="light"] .status-badge{background:#f0edf4!important;color:#706779!important}html[data-live-theme="light"] .image-picker strong{color:#55475f!important}
html[data-live-theme="light"] .room-detail,html[data-live-theme="light"] .message,html[data-live-theme="light"] .message:nth-child(3n),html[data-live-theme="light"] .message:nth-child(3n+1),html[data-live-theme="light"] .surface-label b{background:#f5f2f8!important;border-color:#ddd7e5!important;color:#706779!important}
html[data-live-theme="light"] .composer input,html[data-live-theme="light"] .settings-body input,html[data-live-theme="light"] .settings-body textarea,html[data-live-theme="light"] .settings-body select,html[data-live-theme="light"] .wide-workspace input:not([type=checkbox]),html[data-live-theme="light"] .wide-workspace textarea,html[data-live-theme="light"] .wide-workspace select,html[data-live-theme="light"] .client-account-body input{background:#fff!important;color:#28232f!important;border-color:#cfc5da!important}
html[data-live-theme="light"] input::placeholder,html[data-live-theme="light"] textarea::placeholder{color:#93889e!important}
html[data-live-theme="light"] button:not(.primary):not(.danger):not(.nav-item):not(.stage-icon):not([aria-selected="true"]){background:#f0edf4!important;color:#55475f!important;border-color:#ddd7e5!important}
html[data-live-theme="light"] button:not(.primary):not(.danger):not(.nav-item):is(:hover,:focus-visible){background:#e7dfef!important;color:#40244f!important;border-color:#d4c3e4!important}
html[data-live-theme="light"] .topbar #settings-open{background:#f0edf4!important;color:#55475f!important;border-color:#ddd7e5!important}
html[data-live-theme="light"] .sidebar #account-open{background:transparent!important;color:#55475f!important}html[data-live-theme="light"] .sidebar #account-open:is(:hover,:focus-visible),html[data-live-theme="light"] .sidebar #account-open[aria-expanded="true"]{background:#eadcf8!important;color:#58287c!important}
html[data-live-theme="light"] #account-menu{background:#fff!important;color:#28232f!important;border-color:#d9cce7!important;box-shadow:0 18px 55px #39204826}
html[data-live-theme="light"] #account-menu button:not(.primary):not(.danger):not(.nav-item){background:transparent!important;color:var(--live-menu-text)!important}
html[data-live-theme="light"] #account-menu button:not(.primary):not(.danger):not(.nav-item):is(:hover,:focus-visible){background:var(--live-menu-hover)!important;color:var(--live-menu-text)!important}
html[data-live-theme="light"] #account-menu button:not(.primary):not(.danger):not(.nav-item):active{background:var(--live-menu-active)!important}
html[data-live-theme="light"] #account-menu .account-theme-options{border-color:#ddd7e5}html[data-live-theme="light"] #account-menu .account-theme-options button[data-live-theme][aria-checked="true"]:not(.primary):not(.danger):not(.nav-item){background:#eadcf8!important;color:#6d309d!important}
html[data-live-theme="light"] #account-menu button.account-menu-exit:not(.primary):not(.danger):not(.nav-item){color:#a73535!important}
html[data-live-theme="light"] .account-avatar,html[data-live-theme="light"] .user-icon{background:#eadcf8!important;color:#6d309d!important}
html[data-live-theme="light"] .account-menu-divider,html[data-live-theme="light"] .dialog-heading,html[data-live-theme="light"] .dialog-footer,html[data-live-theme="light"] .settings-tabs,html[data-live-theme="light"] .client-account-details>div{border-color:#ddd7e5!important}
html[data-live-theme="light"] #client-account-dialog,html[data-live-theme="light"] .account-document,html[data-live-theme="light"] .account-document .dialog-heading{background:#fff!important;color:#28232f!important}
html[data-live-theme="light"] #client-account-expiry,html[data-live-theme="light"] #client-account-status,html[data-live-theme="light"] .client-account-details dt,html[data-live-theme="light"] #shared-membership{color:#706779!important}
html[data-live-theme="light"] .chat-panel .tabs button:not(.primary):not(.danger):not(.nav-item):not(.stage-icon):not([aria-selected="true"]){background:transparent!important;border-color:transparent!important;color:#706779!important}
html[data-live-theme="light"] .chat-panel .tabs button[aria-selected="true"]{background:transparent!important;color:#7e39bc!important;border-color:#7e39bc!important}
html[data-live-theme="light"] .settings-tabs button:not(.primary):not(.danger):not(.nav-item):hover{background:#ede6f4!important;color:#58287c!important}
html[data-live-theme="light"] .settings-tabs button.active{background:#eadcf8!important;color:#6d309d!important;border-color:#7e39bc!important}
html[data-live-theme="light"] .stage h2,html[data-live-theme="light"] .stage-caption,html[data-live-theme="light"] .stage-caption strong{color:#fff!important}
html[data-live-theme="light"] .live-login-notice{background:#f0e7f9!important;border-color:#d9c4ef!important;color:#28232f!important}html[data-live-theme="light"] .live-login-notice h2{color:#28232f!important}html[data-live-theme="light"] .live-login-notice p{color:#706779!important}
@media(prefers-reduced-motion:reduce){#account-menu button{transition:none}}
