:root{color-scheme:dark;font:13px Inter,Arial,sans-serif;--bg:#0B1020;--panel:#111A2E;--line:#25324A;--muted:#9AA8BE;--cyan:#22D3EE;--violet:#8B5CF6;--white:#F8FAFC;--mint:var(--cyan)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#E5EDF8}button,input,select,textarea{font:inherit}button,.upload{border:1px solid #33415B;background:#1A2740;color:inherit;border-radius:7px;padding:8px 11px;cursor:pointer;white-space:nowrap}button:hover,.upload:hover{background:#263653}button:disabled{opacity:.4;cursor:default}a{color:var(--cyan);text-decoration:none}input,select,textarea{background:#0D1628;color:var(--white);border:1px solid #33415B;border-radius:5px;padding:8px;min-width:0}button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.primary{background:var(--cyan);border-color:var(--cyan);color:#071323;font-weight:700}.primary:hover{background:#70E5F4}header{min-height:66px;display:flex;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid var(--line);background:#0B1020;position:relative;z-index:2}.brand{display:flex;align-items:center;gap:8px;font-size:22px;color:var(--white);margin-right:8px;white-space:nowrap}.brand img{width:34px;height:34px}.brand strong{font-size:17px;letter-spacing:-.4px}.brand span{font-size:8px;letter-spacing:2px;color:var(--cyan);line-height:1.4;border-left:1px solid #33415B;padding-left:9px}.productNav{display:flex;gap:4px;margin-right:8px}.productNav a{font-size:11px;color:#AAB7CB;padding:8px 10px;border-radius:6px}.productNav a:hover,.productNav a.selected{color:var(--white);background:#172540}.productNav a.selected{box-shadow:inset 0 -2px var(--cyan)}#projectName{max-width:180px;background:transparent;border-color:transparent;font-weight:600}#saveState{color:var(--muted);margin-right:auto;font-size:11px;max-width:220px}main{display:grid;grid-template-columns:300px minmax(280px,1fr) 280px;grid-template-rows:minmax(290px,1fr) 300px;height:calc(100dvh - 66px);gap:2px}.library,.preview,.inspector,.timeline{background:var(--panel)}.library{display:flex;overflow:hidden}nav:not(.productNav){width:65px;background:#0E1729;border-right:1px solid var(--line);flex-shrink:0;padding-top:12px}nav:not(.productNav) button{width:100%;border:0;border-radius:0;background:transparent;line-height:1.8;font-size:11px;color:var(--muted);margin-bottom:12px}nav:not(.productNav) button.active{color:var(--cyan);background:#123043}#libraryContent{flex:1;padding:20px 14px;overflow:auto}h2{font-size:14px;margin:0 0 16px}p{line-height:1.7;color:var(--muted);font-size:12px}.upload{display:block;text-align:center;border-style:dashed;margin:18px 0;color:var(--cyan)}.card{width:100%;padding:20px;text-align:left;margin-bottom:10px;background:#192641;border:1px solid #33415B;white-space:normal}.mediaItem{margin-top:10px;padding:12px;text-align:left;display:block;width:100%;overflow:hidden;text-overflow:ellipsis}.mediaItem small{display:block;color:var(--muted);margin-top:6px}.panelhead{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line);font-weight:600;font-size:12px}.panelhead span{font-size:10px;color:var(--muted);font-weight:400}.preview{display:flex;flex-direction:column;min-width:0}#stage{flex:1;position:relative;display:flex;justify-content:center;align-items:center;overflow:hidden;padding:24px;background:#0A1020}#frameBox{position:relative;box-shadow:0 8px 35px #0009;overflow:hidden;background:#101827}iframe{position:absolute;transform-origin:top left;border:0;left:0;top:0}#loading{position:absolute;background:#111A2EED;padding:14px;border-radius:8px;color:var(--cyan)}.transport{display:flex;align-items:center;height:52px;gap:12px;padding:0 15px}.transport button{border:0;background:transparent}#time{font-family:monospace;font-size:11px}.muted{color:var(--muted);font-size:10px;margin-left:auto}.inspector{overflow:auto}#inspectorContent{padding:15px}label{display:block;font-size:11px;color:#AFBED3;margin-bottom:16px}label input:not([type=color]),label select,label textarea{display:block;width:100%;margin-top:7px}label input[type=color]{display:block;margin-top:8px;width:100%;height:34px;padding:3px}.pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}textarea{resize:vertical;min-height:78px}#clipType{color:var(--cyan)}.timeline{grid-column:1/-1;display:flex;flex-direction:column;min-width:0}.toolbar{display:flex;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid var(--line);height:50px}.toolbar button{padding:6px 10px;font-size:11px}.toolbar i{height:20px;border-left:1px solid #3A4860;margin:0 5px}.spacer{flex:1}.toolbar label{display:flex;align-items:center;gap:10px;margin:0;white-space:nowrap}.toolbar label input{width:110px;margin:0;accent-color:var(--cyan)}.timelineBody{display:flex;flex:1;overflow:hidden}.trackNames{flex-shrink:0;width:114px;font-size:11px;color:var(--muted);border-right:1px solid var(--line);background:#101A2C}.trackNames>div{height:42px;padding:15px 14px;border-bottom:1px solid #25324A}.trackNames .rulerLabel{height:30px;font-size:9px;padding:11px 14px;letter-spacing:2px}#timelineScroll{overflow:auto;flex:1;position:relative}#timelineInner{position:relative;min-height:198px}#ruler{height:30px;border-bottom:1px solid var(--line);position:relative;cursor:crosshair}.tick{position:absolute;top:0;height:30px;border-left:1px solid #3B4961;padding:8px 5px;font:10px monospace;color:var(--muted)}.track{height:42px;position:relative;border-bottom:1px solid #25324A;background:#111A2E}.clip{position:absolute;height:32px;top:5px;border-radius:5px;min-width:6px;user-select:none;cursor:grab;border:1px solid #6075A2;overflow:hidden;background:#394568;color:#E7EBFA;font-size:10px;display:flex;align-items:center;padding:0 11px;touch-action:none}.clip.text{background:#655032;border-color:#C99B54}.clip.audio{background:#14545B;border-color:#28B6BC}.clip.image{background:#464166;border-color:#9585D1}.clip.selected{outline:2px solid var(--cyan);outline-offset:1px}.handle{position:absolute;width:8px;height:100%;top:0;cursor:ew-resize;background:#ffffff12}.handle.left{left:0}.handle.right{right:0}#playhead{position:absolute;top:0;bottom:0;left:0;border-left:1px solid var(--cyan);pointer-events:none;z-index:10}#playhead b{position:absolute;width:10px;height:12px;background:var(--cyan);left:-5px;clip-path:polygon(0 0,100% 0,100% 65%,50% 100%,0 65%)}footer{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);padding:8px 15px;border-top:1px solid var(--line)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:50;padding:12px 20px;background:#153C42;border:1px solid var(--cyan);border-radius:8px;max-width:80vw}dialog{width:min(440px,90vw);border:1px solid #33415B;border-radius:12px;background:#111A2E;color:var(--white);padding:24px}dialog::backdrop{background:#0009}.dialogHead{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.dialogHead h2{margin:0}.dialogHead button{border:0;background:transparent;font-size:20px}progress{width:100%;accent-color:var(--cyan);margin-top:20px}[hidden]{display:none!important}@media(max-width:1100px){main{grid-template-columns:235px minmax(260px,1fr) 230px}.brand span,.muted{display:none}.productNav{gap:0}.productNav a{padding:8px 7px}#projectName{width:110px}header{padding:0 10px;gap:6px}header button{font-size:11px}#saveState{max-width:100px}}@media(max-width:800px){header{flex-wrap:wrap;height:auto;min-height:112px;padding:10px}.brand{margin-right:0}.productNav{order:3;width:100%;justify-content:space-around}.productNav a{flex:1;text-align:center}#saveState{max-width:none}main{height:auto;min-height:calc(100dvh - 112px);grid-template-columns:1fr;grid-template-rows:360px auto auto 300px}.preview{grid-row:1}.library{grid-row:2;min-height:160px}.inspector{grid-row:3;max-height:350px}.timeline{grid-row:4}.library nav:not(.productNav){display:flex;width:72px;flex-direction:column}#libraryContent{width:100%}.toolbar{gap:4px;padding:6px}.toolbar button{font-size:10px;padding:6px}.toolbar label{display:none}.trackNames{width:80px}.trackNames>div{padding-left:8px}.transport .muted{display:none}}
/* AISpace product workspace */.toolHub{grid-column:1/-1;grid-row:1;background:radial-gradient(ellipse at 82% 0%,#1A2850 0,transparent 35%),#0E172A;padding:26px clamp(20px,5vw,64px);overflow:auto;border-bottom:1px solid var(--line)}.hubTitle{display:flex;align-items:center;justify-content:space-between;max-width:1200px;margin:0 auto 20px}.hubTitle small,.eyebrow{font-size:9px;letter-spacing:2px;color:var(--cyan);font-weight:700}.hubTitle h2{font-size:23px;margin:6px 0 4px;color:var(--white)}.hubTitle p{margin:0}.hubBadge,.statusPill{font-size:10px;color:#9BE9F4;background:#113142;border:1px solid #1E5867;padding:7px 10px;border-radius:99px}.toolGrid{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.toolCard{min-height:132px;padding:15px;background:linear-gradient(145deg,#17243E,#111A2E);border:1px solid #2A3A58;border-radius:11px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;color:var(--white);transition:transform .15s,border-color .15s}.toolCard:hover{transform:translateY(-2px);border-color:#54719B}.toolCard.current{border-color:#168CA0;box-shadow:inset 0 0 0 1px #168CA044}.toolIcon{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;color:var(--cyan);background:#123141;font-size:16px}.toolIcon.violet{color:#C4A8FF;background:#292044}.toolCard strong{font-size:12px}.toolCard small{font-size:10px;color:var(--muted);line-height:1.4}.toolCard b{font-size:9px;color:var(--cyan);font-weight:600;margin-top:auto}.toolCard em{font-size:9px;color:#B3A2DA;font-style:normal;margin-top:auto}.integrationPanels{max-width:1200px;margin:13px auto 0;display:grid;grid-template-columns:1fr 1fr;gap:10px}.integrationPanels article{padding:12px 15px;background:#111A2E;border:1px solid #293957;border-radius:9px;scroll-margin-top:12px}.integrationPanels h3{margin:4px 0;font-size:13px}.integrationPanels p{margin:4px 0 8px;font-size:10px;line-height:1.5}.integrationPanels code{font-size:10px;color:#BBA5FF}.integrationPanels .statusPill{font-size:9px;padding:4px 8px}header .productNav{flex-shrink:0}@media(max-width:1050px){.toolGrid{grid-template-columns:repeat(3,minmax(0,1fr))}.toolHub{padding:20px}.productNav a{font-size:10px}}@media(max-width:800px){.toolHub{grid-column:1;grid-row:auto;overflow:visible;padding:20px 14px}.hubTitle{align-items:flex-start;gap:10px}.hubTitle h2{font-size:20px}.hubBadge{white-space:nowrap}.toolGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.toolCard{min-height:128px;padding:12px}.integrationPanels{grid-template-columns:1fr}.productNav{order:3;width:100%;justify-content:space-around}.productNav a{flex:1;text-align:center}}
@media(min-width:801px){main{height:auto;min-height:calc(100dvh - 66px);grid-template-rows:auto minmax(430px,1fr) 300px}.library,.preview,.inspector{grid-row:2}.timeline{grid-row:3}}
@media(max-width:800px){main{grid-template-rows:auto 360px auto auto 300px}.toolHub{grid-row:1}.preview{grid-row:2}.library{grid-row:3}.inspector{grid-row:4}.timeline{grid-row:5}}
/* AISpace light workspace: keep cyan and violet as focused accents. */
:root{color-scheme:light;--bg:#F4F7FB;--panel:#FFFFFF;--line:#DFE6F0;--muted:#64748B;--white:#172033;--cyan:#087E95}
body{background:var(--bg);color:#253047}
header{background:#FFFFFF;border-color:var(--line);box-shadow:0 1px 3px #1720330A}
.brand{color:#172033}.brand span{border-color:#DFE6F0}
.productNav a{color:#526078}.productNav a:hover,.productNav a.selected{color:#172033;background:#EFF5FA}
button,.upload{background:#FFFFFF;color:#253047;border-color:#CDD7E5;box-shadow:0 1px 2px #17203308}
button:hover,.upload:hover{background:#F2F6FA}
button:disabled{box-shadow:none}
input,select,textarea{background:#FFFFFF;color:#172033;border-color:#CDD7E5}
.primary{background:#22D3EE;border-color:#22D3EE;color:#083344;box-shadow:none}
.primary:hover{background:#67E8F9}
#projectName{color:#172033}
main{background:#E9EEF5;gap:1px}
.library,.preview,.inspector,.timeline{background:#FFFFFF}
nav:not(.productNav){background:#F7F9FC;border-color:var(--line)}
nav:not(.productNav) button{background:transparent;color:#64748B;box-shadow:none}
nav:not(.productNav) button:hover{background:#F1F5F9}
nav:not(.productNav) button.active{color:#087E95;background:#E5F8FC}
.panelhead,.toolbar,footer{border-color:var(--line)}
#stage{background:#111827}
#frameBox{box-shadow:0 8px 28px #0008;background:#0B1020}
#loading{background:#FFFFFFF2;color:#087E95;box-shadow:0 4px 18px #17203320}
.transport button{background:transparent;box-shadow:none}
label{color:#526078}
.toolbar i{border-color:#CBD5E1}
.trackNames{background:#F7F9FC;color:#64748B;border-color:var(--line)}
.trackNames>div,.track,.tick,#ruler{border-color:#E2E8F0}
.track{background:#FFFFFF}
.track:nth-child(odd){background:#FAFBFD}
.tick{color:#64748B}
.clip{color:#F8FAFC;background:#586B91;border-color:#7183A6}
.clip.text{background:#947447;border-color:#B58A50}
.clip.audio{background:#197D84;border-color:#29AAB0}
.clip.image{background:#62558A;border-color:#8A7BBB}
.clip.selected{outline-color:#06B6D4}
.handle{background:#FFFFFF30}
#playhead{border-color:#06B6D4}#playhead b{background:#06B6D4}
#toast{background:#ECFEFF;border-color:#22D3EE;color:#164E63;box-shadow:0 4px 18px #17203318}
dialog{background:#FFFFFF;color:#172033;border-color:#D7E0EC;box-shadow:0 20px 70px #17203335}
dialog::backdrop{background:#17203366}
.dialogHead button{background:transparent;box-shadow:none}
progress{accent-color:var(--cyan)}
.toolHub{background:radial-gradient(ellipse at 82% 0%,#E8E4FF 0,transparent 38%),linear-gradient(135deg,#F8FBFF,#F1F7FC);border-color:var(--line)}
.hubTitle h2{color:#172033}
.hubBadge,.statusPill{color:#087E95;background:#E5F8FC;border-color:#B9EAF2}
.toolCard{background:linear-gradient(145deg,#FFFFFF,#F7F9FD);border-color:#DFE6F0;color:#172033;box-shadow:0 2px 8px #17203308}
.toolCard:hover{border-color:#8CCFDA;box-shadow:0 6px 16px #17203312}
.toolCard.current{border-color:#38B8CA;box-shadow:inset 0 0 0 1px #22D3EE35,0 2px 8px #17203308}
.toolIcon{color:#07849A;background:#E5F8FC}
.toolIcon.violet{color:#7651D5;background:#F0EBFF}
.toolCard em{color:#7651D5}
.integrationPanels article{background:#FFFFFF;border-color:#DFE6F0;box-shadow:0 2px 8px #17203308}
.integrationPanels code{color:#7651D5}
@media(max-width:800px){.library nav:not(.productNav){background:#F7F9FC}}


.card{background:#FFFFFF;border-color:#DFE6F0;color:#253047;box-shadow:0 2px 8px #17203308}.mediaItem{background:#FFFFFF;color:#253047}.mediaItem:hover{background:#F2F6FA}

/* Account and speech tools */
button.toolCard{text-align:left;font:inherit;cursor:pointer;color:inherit}#speechDialog{width:min(600px,94vw);max-height:90vh;overflow:auto}#speechDialog label{display:grid;gap:7px;margin:14px 0}#speechDialog input,#speechDialog select,#speechDialog textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:8px;background:white;color:#172033;font:inherit}#speechDialog textarea{resize:vertical}#speechDialog .muted{font-size:12px;line-height:1.6;white-space:normal}#speechProgress{line-height:1.5;color:#334155}#speechCost{font-weight:600;line-height:1.6}#speechTools{margin-top:20px;font-size:12px}#speechTools ul{padding-left:18px;columns:2}#speechTools li{break-inside:avoid;margin-bottom:6px}

#toolsDialog{width:min(760px,94vw);max-height:90vh;overflow:auto}#toolDescription{font-size:13px;line-height:1.5;max-height:9em;overflow:auto}#toolFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#toolFields label{display:flex;flex-direction:column;gap:6px}#toolFields small{font-size:11px;color:#64748b}#toolFields textarea{width:100%;font:inherit;resize:vertical}#toolFields select[multiple]{min-height:100px}#toolResults pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;max-height:300px;overflow:auto}.toolResult{padding:12px;border:1px solid #dbe3ef;border-radius:12px;margin:10px 0}.toolResult img{display:block;max-width:100%;max-height:160px;margin:8px 0;object-fit:contain}.toolResult button{margin:8px 0}@media(max-width:600px){#toolFields{grid-template-columns:1fr}}

#cloudDialog{width:min(760px,94vw);max-height:90vh;overflow:auto}.cloudActions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}#cloudDialog label:has(input[type=checkbox]){display:flex;gap:8px;align-items:flex-start}#cloudDialog input[type=checkbox]{width:auto}#cloudDownload{display:block;margin:12px 0}


.accountDialog{width:min(900px,95vw);max-height:90vh;overflow:auto}.accountDialog .accountTabs{width:auto;display:flex;gap:8px;background:transparent;border:0;margin:18px 0;padding:0}.accountTabs button{width:auto;margin:0;padding:10px 14px;color:#526078;font-size:12px}.accountTabs button.selected{background:#e5f8fc;color:#087e95;border-radius:8px}.accountSplit{display:grid;grid-template-columns:1fr 1fr;gap:24px}.balanceCard{display:grid;gap:8px;padding:22px;border:1px solid #b9eaf2;background:#effcfe;border-radius:12px}.balanceCard strong{font-size:30px;color:#087e95}.accountSectionHead,.accountRow{display:flex;justify-content:space-between;align-items:center;gap:16px}.accountSectionHead{margin-bottom:18px}.accountRow{padding:14px 0;border-bottom:1px solid #e2e8f0}.accountRow small{display:block;color:#64748b;margin-top:5px}.accountRow span{font-size:12px}.accountResult{background:#f6f8fb;white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;max-height:320px;overflow:auto;border-radius:8px}.accountActions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:14px 0}.accountActions .confirmCharge{display:flex;gap:8px;margin:0;max-width:360px}.accountActions .confirmCharge input{width:auto;margin:0}.accountEndpoint{display:block;overflow-wrap:anywhere}.newKeyNotice{padding:16px;background:#f0fdfa;border:1px solid #99f6e4;border-radius:8px;display:grid;gap:12px}.newKeyNotice code{overflow-wrap:anywhere;user-select:all}@media(max-width:600px){.accountSplit{grid-template-columns:1fr}.accountSectionHead{align-items:flex-start;flex-direction:column}}
