*{box-sizing:border-box}body{margin:0;background:var(--f-bg);color:var(--f-text);font:400 14px/1.55 var(--f-font);-webkit-font-smoothing:antialiased}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}button,a,textarea,input{ -webkit-tap-highlight-color:transparent}button{border:0}button:disabled{cursor:default;opacity:.4}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--f-accent);outline-offset:4px}button svg{pointer-events:none}svg.icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:550;line-height:1.15;letter-spacing:-.035em}h1{font-size:clamp(36px,3.65vw,60px)}h2{font-size:28px}h3{font-size:19px}textarea{resize:vertical}::selection{background:var(--f-primary);color:var(--f-on-primary)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.app{height:100dvh;min-height:560px;display:grid;grid-template-columns:88px minmax(0,1fr) 386px;overflow:hidden}.rail{background:#15171d;border-right:1px solid #272b34;padding:27px 9px 18px;display:flex;flex-direction:column;align-items:center;position:relative;z-index:25}.wordmark{font-size:38px;line-height:1;font-weight:650;letter-spacing:-3px;margin-bottom:54px}.wordmark span{color:var(--f-accent)}.rail-main{display:grid;gap:16px;width:100%}.rail-link{width:100%;display:flex;align-items:center;flex-direction:column;gap:8px;padding:14px 2px;background:transparent;border-radius:15px;color:var(--f-muted);font-size:10px;letter-spacing:0;line-height:1.2}.rail-link svg{width:23px;height:23px}.rail-link:hover{background:#20232d;color:var(--f-text)}.rail-link.active{background:var(--f-raised);color:var(--f-primary)}.rail-bottom{margin-top:auto;width:100%}.avatar{width:34px;height:34px;border-radius:50%;border:1px solid var(--f-line);display:grid;place-items:center;background:var(--f-raised)}.profile-menu{position:absolute;bottom:18px;left:94px;width:272px;border-radius:18px;border:1px solid var(--f-control-line);padding:19px;background:var(--f-raised);box-shadow:0 20px 90px #0007}.profile-menu p{font-size:12px;color:var(--f-muted);margin:9px 0 17px}.profile-menu button{width:100%;text-align:left;background:transparent;padding:10px 0;color:var(--f-text)}.workspace{display:flex;min-width:0;flex-direction:column;overflow:hidden}.workspace-header{height:84px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 34px}.workspace-location{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--f-muted);white-space:nowrap}.tiny-mark{width:6px;height:6px;background:var(--f-accent);border-radius:50%}.preview-tag{font-size:10px;line-height:1;padding:5px 7px;border:1px solid var(--f-line);border-radius:5px;color:var(--f-muted)}.header-actions{display:flex;align-items:center;gap:8px}.button{display:inline-flex;gap:9px;align-items:center;justify-content:center;border:1px solid var(--f-line);border-radius:11px;min-height:41px;padding:9px 15px;font-size:12px;line-height:1.4;background:var(--f-raised);white-space:nowrap}.button.primary{background:var(--f-primary);border-color:var(--f-primary);color:var(--f-on-primary);font-weight:550}.button.primary:hover{background:var(--f-primary-hover)}.button.quiet{background:transparent;border-color:transparent;color:var(--f-muted)}.button.quiet:hover{color:var(--f-text);background:var(--f-surface)}.button.outline{background:transparent}.button svg{width:17px;height:17px}.icon-button{width:34px;height:34px;display:inline-grid;place-items:center;border-radius:8px;color:var(--f-muted);background:transparent;flex-shrink:0}.icon-button:hover{background:var(--f-raised);color:var(--f-text)}.agent-toggle{display:none}.canvas{flex:1;min-height:0;overflow:auto;padding:35px 44px 40px;scrollbar-width:thin;scrollbar-color:var(--f-line) transparent}.welcome{max-width:740px;margin:10px auto 0;min-height:650px;display:flex;flex-direction:column;justify-content:center}.eyebrow{font-size:10px;letter-spacing:1.5px;text-transform:uppercase;color:var(--f-primary);margin-bottom:23px}.welcome h1{max-width:670px;line-height:1.09;font-weight:500}.welcome h1 span{color:var(--f-primary)}.welcome-copy{font-size:16px;line-height:1.75;color:var(--f-muted);max-width:470px;margin-top:23px}.direction{display:flex;align-items:center;gap:10px;margin-top:25px;color:var(--f-accent);font-size:12px}.direction svg{width:19px}.artwork{height:230px;position:relative;max-width:570px;margin:45px 0 15px;isolation:isolate}.art-text,.art-image,.art-video{position:absolute;border-radius:16px;box-shadow:0 18px 40px #0003}.art-text{width:230px;height:164px;left:5px;top:35px;background:#efe9dd;color:#292632;padding:21px;transform:rotate(-7deg);z-index:1}.art-label{font-size:8px;font-weight:600;letter-spacing:1.5px}.art-text strong{display:block;font-size:27px;font-weight:600;line-height:1.1;letter-spacing:-1px;margin-top:13px}.art-lines{display:flex;flex-direction:column;gap:6px;margin-top:15px}.art-lines i{height:3px;background:#c3b9ac;border-radius:5px;width:73%}.art-lines i:nth-child(2){width:58%}.art-image{width:230px;height:181px;left:162px;top:5px;background:linear-gradient(125deg,#6250a2,#b9a1db);transform:rotate(3deg);overflow:hidden;z-index:2;padding:17px;color:#f2e8fb}.orbital{position:absolute;width:119px;height:119px;border:10px solid #edafd5;border-radius:50%;left:64px;top:46px;box-shadow:inset 0 0 0 8px #7d67b9,inset 0 0 0 16px #e8b1db,inset 0 0 0 24px #8c6bc6,inset 0 0 0 31px #e8b1db}.art-video{width:187px;height:134px;left:343px;top:67px;background:linear-gradient(140deg,#e0b696,#cde4d8);transform:rotate(8deg);z-index:3;display:grid;place-items:center}.play{width:49px;height:49px;border-radius:50%;background:#f2f0eacb;display:grid;place-items:center}.play:after{content:'';border-left:12px solid #4b395c;border-top:8px solid transparent;border-bottom:8px solid transparent;margin-left:4px}.art-caption{font-size:11px;color:var(--f-muted)}.continue-link{margin:26px 0 0;align-self:flex-start;text-align:left}.continue-link small{display:block;font-weight:400;color:var(--f-muted);margin-top:3px}
.agent{min-width:0;background:#181b22;border-left:1px solid #303541;display:flex;flex-direction:column;overflow:hidden}.agent-header{display:flex;align-items:center;gap:12px;padding:24px 21px;border-bottom:1px solid #2a2e38;min-height:88px}.agent-avatar{width:35px;height:35px;border-radius:12px;background:#292637;color:var(--f-accent);display:grid;place-items:center}.agent-header strong{font-size:14px;font-weight:550;display:block}.agent-header div>span{display:block;color:var(--f-muted);font-size:11px;margin-top:3px}.agent-header>.icon-button{margin-left:auto}.agent-context{margin:15px 20px 0;padding:10px 12px;border:1px solid var(--f-line);border-radius:10px;font-size:11px;color:var(--f-muted);overflow-wrap:anywhere}.agent-context strong{color:var(--f-text);font-weight:500}.messages{flex:1;overflow:auto;padding:27px 21px;scrollbar-width:thin;scrollbar-color:var(--f-line) transparent}.message{margin-bottom:26px;font-size:13px;line-height:1.8;overflow-wrap:anywhere;white-space:pre-wrap}.message-label{display:flex;align-items:center;gap:7px;font-size:10px;margin-bottom:9px;color:var(--f-primary);white-space:normal}.message-label svg{width:13px;height:13px}.message.user{margin-left:28px;background:#262a34;border:1px solid var(--f-line);border-radius:15px 15px 4px 15px;padding:13px 16px;color:var(--f-text)}.message.user .message-label{color:var(--f-muted)}.message.welcome-message{padding-top:10px}.welcome-message strong{display:block;font-size:20px;font-weight:500;line-height:1.4;margin-bottom:13px;letter-spacing:-.4px}.welcome-message p{color:var(--f-muted);font-size:13px;line-height:1.85}.composer-area{padding:15px 17px 13px;background:linear-gradient(transparent,#181b22 15%)}.composer{border:1px solid #5b6376;border-radius:16px;background:#1d2029;padding:14px 12px 10px}.composer:focus-within{border-color:var(--f-accent)}.composer textarea{background:transparent;border:0;outline:0;box-shadow:none;width:100%;resize:none;min-height:56px;max-height:150px;font-size:13px;line-height:1.7;padding:0 4px}.composer textarea::placeholder{color:#9299a9}.composer textarea:focus-visible{outline:0}.composer-actions{display:flex;align-items:center;gap:6px}.composer-actions>span{color:#838b9b;font-size:9px;margin-left:3px}.send-button{width:31px;height:31px;display:grid;place-items:center;background:var(--f-primary);color:var(--f-on-primary);border-radius:9px;margin-left:auto}.send-button svg{width:18px;height:18px}.demo-note{color:#939bab;font-size:9px;text-align:center;margin-top:9px;letter-spacing:.1px}.pending-files{font-size:10px;color:var(--f-accent);padding:0 5px 10px;overflow-wrap:anywhere}
.editor{max-width:870px;margin:auto}.editor-top{display:flex;gap:16px;justify-content:space-between;align-items:center;margin-bottom:28px}.editor-top h1{font-size:30px}.editor-actions{display:flex;gap:8px;align-items:center}.save-status{font-size:10px;color:var(--f-muted)}.document{border:1px solid var(--f-line);border-radius:20px;background:var(--f-surface);overflow:hidden}.document-heading{display:flex;gap:10px;align-items:center;border-bottom:1px solid #30343f;padding:17px 23px;font-size:10px;color:var(--f-muted)}.document-heading .icon{width:15px;height:15px}.document-heading span:last-child{margin-left:auto}.title-input{background:transparent;border:0;border-radius:6px;width:100%;font-size:25px;letter-spacing:-.6px;font-weight:550;padding:25px 27px 12px;outline:none}.body-input{width:100%;background:transparent;border:0;min-height:280px;line-height:1.9;padding:8px 27px 27px;font-size:15px;outline:none;resize:vertical}.body-input::placeholder{color:#8d94a1}.title-input:focus-visible,.body-input:focus-visible{outline:0;background:#20242d}.media-area{padding:20px 24px;border-top:1px solid #30343f}.media-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.media-toolbar strong{font-weight:500;font-size:11px;color:var(--f-muted)}.media-toolbar>div{display:flex;gap:6px}.media-toolbar .button{font-size:10px;min-height:32px;padding:6px 9px}.media-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.media-empty{border:1px dashed #454c5c;border-radius:12px;padding:20px;font-size:11px;color:var(--f-muted)}.media-card{border:1px solid var(--f-line);border-radius:12px;padding:8px;background:var(--f-raised);min-width:0}.media-card img,.media-card video{width:100%;height:160px;object-fit:contain;display:block;border-radius:7px;background:var(--f-bg)}.media-card figcaption{padding:7px 3px 0;font-size:10px;overflow-wrap:anywhere;color:var(--f-muted)}.media-card figure{margin:0}.media-unavailable{padding:12px;font-size:11px;color:var(--f-muted)}.brief-note{font-size:11px;color:var(--f-muted);margin-top:17px;border-left:2px solid var(--f-line);padding-left:13px;white-space:pre-wrap;overflow-wrap:anywhere}.brief-note summary{cursor:pointer}.brief-note p{margin-top:8px}.script-box{margin-top:16px;border:1px solid var(--f-line);border-radius:15px;padding:20px;background:var(--f-surface)}.script-box h2{font-size:19px}.script-box small{display:block;color:var(--f-muted);font-size:10px;margin:9px 0 14px}.script-input{width:100%;min-height:160px;border:1px solid var(--f-line);border-radius:9px;padding:13px;background:var(--f-bg);font-size:12px;line-height:1.8}.script-box .button{margin-top:10px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:10px 0 29px}.section-heading h1{font-size:34px}.library{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px}.material-card{display:flex;flex-direction:column;background:var(--f-surface);border:1px solid var(--f-line);padding:0;overflow:hidden;text-align:left;border-radius:17px;color:var(--f-text)}.material-card:hover{border-color:var(--f-control-line)}.material-preview{height:150px;padding:22px;width:100%;overflow:hidden;position:relative;display:flex;align-items:center;background:linear-gradient(130deg,#373044,#242936)}.material-preview p{font-size:17px;font-weight:500;line-height:1.6;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.material-card:nth-child(3n+2) .material-preview{background:linear-gradient(120deg,#4f4569,#41323d)}.material-meta{padding:16px;display:flex;flex-direction:column;gap:6px;width:100%}.material-meta strong{font-size:13px;font-weight:500;overflow-wrap:anywhere}.material-meta span{font-size:10px;color:var(--f-muted)}.empty-state{padding:60px 0;color:var(--f-muted);max-width:450px}.empty-state h2{color:var(--f-text);margin-bottom:15px}.empty-state .button{margin-top:25px}.platforms{display:flex;flex-direction:column;gap:10px;max-width:620px;margin-top:26px}.platform-card{padding:17px 19px;border:1px solid var(--f-line);border-radius:13px;display:flex;gap:18px;align-items:center}.platform-card strong{font-weight:500;min-width:100px}.platform-card span{font-size:11px;color:var(--f-muted)}.platform-copy{max-width:520px;margin-top:18px;color:var(--f-muted);font-size:13px;line-height:1.8}.source-card{max-width:650px;padding:30px;border:1px solid var(--f-line);border-radius:18px;margin-top:28px;background:var(--f-surface);overflow-wrap:anywhere}.source-card h2{font-size:23px;margin-bottom:15px}.source-card p{font-size:14px;color:var(--f-muted);white-space:pre-wrap}.toast{position:fixed;z-index:100;bottom:24px;left:50%;transform:translateX(-50%);padding:12px 18px;background:var(--f-primary);color:var(--f-on-primary);border-radius:12px;box-shadow:0 10px 35px #0005;max-width:90vw;font-size:12px}dialog{color:var(--f-text);border:1px solid var(--f-control-line);background:var(--f-surface);border-radius:22px;padding:27px;max-width:480px;width:calc(100% - 32px)}dialog::backdrop{background:#080a10b8;backdrop-filter:blur(4px)}dialog p{color:var(--f-muted);font-size:13px;line-height:1.8;margin-top:18px}dialog>.button{margin-top:23px}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:18px}.dialog-header h2{font-size:24px}
/* Агент всегда отдельной колонкой. Сворачивание только по команде пользователя. */
.app{--agent-width:386px;grid-template-columns:88px minmax(280px,1fr) 8px var(--agent-width);min-width:636px}
.canvas{overflow-x:hidden}
.agent{position:static;border-left:0;width:auto;z-index:auto;box-shadow:none}
.resizer{cursor:col-resize;position:relative;background:#15181f;touch-action:none;outline-offset:-2px;display:flex;align-items:center;justify-content:center;z-index:2}
.resizer:before{content:'';position:absolute;top:0;bottom:0;left:3px;width:1px;background:#343945}
.resizer span{width:3px;height:34px;background:#555e71;border-radius:4px;z-index:1}
.resizer:hover span,.resizer:focus-visible span,.resizing .resizer span{background:var(--f-accent)}
.resizing{cursor:col-resize;user-select:none}.resizing textarea,.resizing input{pointer-events:none}
.app.agent-closed{grid-template-columns:88px minmax(280px,1fr);min-width:368px}
.agent-closed .agent,.agent-closed .resizer{display:none}
.agent-closed .agent-toggle{display:inline-flex}
@media(min-width:1450px){.canvas{padding-inline:58px}.welcome{margin-top:20px}.agent-header{padding-inline:25px}.messages{padding-inline:25px}}
@media(max-width:1150px){.app{grid-template-columns:72px minmax(280px,1fr) 8px var(--agent-width);min-width:620px}.app.agent-closed{grid-template-columns:72px minmax(280px,1fr);min-width:352px}.rail{padding-inline:6px}.workspace-header{padding-inline:20px}.canvas{padding:27px 26px}.workspace-location{font-size:10px}.header-actions>.button{padding:8px;font-size:11px}.preview-tag{display:none}.welcome{min-height:570px}.welcome h1{font-size:43px}.welcome-copy{font-size:14px}.artwork{transform:scale(.78);transform-origin:left center;width:535px;margin-block:25px 0;height:210px}.agent-header{gap:9px;padding:24px 15px}.agent-header strong{font-size:12px}.agent-header div>span{font-size:10px}.messages{padding:23px 17px}.editor-top{flex-wrap:wrap}.editor-top h1{font-size:27px}.media-toolbar{align-items:flex-start;flex-direction:column}.media-toolbar .button{font-size:10px}.editor-actions{flex-wrap:wrap}.title-input{font-size:22px}.body-input{font-size:14px}}
@media(max-width:800px){.workspace-header{padding-inline:14px;height:74px}.workspace-location{font-size:9px;gap:5px}.header-actions>.button{font-size:0;width:34px;padding:7px}.header-actions>.button svg{width:19px;height:19px}.canvas{padding:24px 20px}.welcome{min-height:540px;margin-top:25px;justify-content:flex-start}.welcome h1{font-size:35px}.welcome-copy{font-size:13px;line-height:1.85}.direction{font-size:10px}.eyebrow{font-size:8px;margin-bottom:18px}.artwork{transform:scale(.52);margin-top:23px;margin-bottom:-60px;height:210px}.art-caption{font-size:10px}.rail-link{font-size:9px}.profile-menu{left:76px}.editor-top{margin-bottom:20px}.editor-top h1{font-size:25px}.editor-actions{width:100%;justify-content:space-between;gap:8px}.document-heading{padding:14px}.title-input{padding:22px 16px 10px;font-size:21px}.body-input{padding:8px 16px 22px}.media-area{padding:15px}.media-list,.library{grid-template-columns:1fr}.section-heading{flex-wrap:wrap}.section-heading h1{font-size:28px}.agent-header{padding:22px 12px;gap:8px}.agent-header div>span{font-size:9px}.agent-avatar{width:30px;height:30px}.agent-header>.icon-button{width:25px}.messages{padding:22px 15px}.message{font-size:12px}.welcome-message strong{font-size:19px}.welcome-message p{font-size:12px}.composer-area{padding:12px 11px 11px}.composer textarea{font-size:12px}.agent-context{margin-inline:12px;font-size:10px}.platform-card{flex-wrap:wrap;gap:6px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Рабочий режим: контекст и серверные результаты, без API-настроек пользователя. */
.receipt-link{display:flex;margin-top:12px;white-space:normal;text-align:left;font-size:11px;justify-content:flex-start}.agent-progress{color:var(--f-accent);font-size:12px;margin:18px 0}.field-label{display:block;font-size:12px;color:var(--f-muted);margin:17px 0 7px}dialog input:not([type="checkbox"]),dialog textarea,dialog select{width:100%;background:var(--f-bg);border:1px solid var(--f-control-line);border-radius:10px;padding:11px 12px;color:var(--f-text);font:inherit}dialog textarea{line-height:1.8;resize:vertical}dialog form>.button{margin-top:20px}.form-error{color:var(--f-danger);min-height:12px}.context-dialog{max-width:650px}.check-label{display:flex;gap:9px;align-items:center;margin-top:15px;font-size:12px;color:var(--f-muted)}.category-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:24px}.category{display:flex;align-items:flex-start;gap:9px;flex-direction:column;background:var(--f-raised);border:1px solid var(--f-line);border-radius:13px;padding:17px;text-align:left}.category strong{font-size:13px;font-weight:500}.category small{font-size:10px;color:var(--f-muted)}.category:hover{border-color:var(--f-accent)}.quality-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:18px}.quality-actions>span{font-size:11px;color:var(--f-muted);margin-right:4px}.quality-actions .button{font-size:10px;min-height:33px}.proposal-card{background:var(--f-surface);border:1px solid var(--f-line);border-radius:20px;padding:27px;margin-bottom:20px}.proposal-card h2{font-size:25px}.proposal-body{white-space:pre-wrap;line-height:1.9;font-size:14px;margin:22px 0}.proposal-card>div:last-child{display:flex;gap:8px;flex-wrap:wrap}.media-card audio{width:100%}
.history-entry{border-top:1px solid var(--f-line);padding:18px 0}.history-entry strong{font-size:13px}.history-entry p{font-size:12px;white-space:pre-wrap;margin:11px 0 15px;max-height:180px;overflow:auto}
.draft-recovery{padding:14px 17px;border:1px solid var(--f-accent);border-radius:12px;font-size:12px;margin-bottom:20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
/* Рабочий путь: основа → создание → материал и предпросмотр */
.studio-home h1,.entry-page h1{font-size:clamp(32px,3.5vw,52px);margin:10px 0 18px}.studio-home h1 span{color:var(--f-accent)}.studio-home .welcome-copy,.entry-page .welcome-copy{max-width:630px;font-size:15px}.section-heading.compact{margin:32px 0 15px;align-items:center;gap:12px}.section-heading.compact h2{font-size:22px}.section-heading.compact>span,.form-note{color:var(--f-muted);font-size:12px;line-height:1.7}.basis-grid{display:grid;gap:12px}.basis-card{display:flex;justify-content:space-between;align-items:center;gap:18px;background:var(--f-surface);border:1px solid var(--f-line);border-radius:20px;padding:20px}.basis-card .eyebrow{font-size:10px;margin-bottom:7px;color:var(--f-accent)}.basis-card h3{font-size:18px}.basis-card p{color:var(--f-muted);font-size:12px;line-height:1.7;margin-top:9px;white-space:pre-line}.basis-card .button{flex-shrink:0;font-size:12px;padding:10px 14px}.home-categories{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.home-categories .category{min-height:145px}.home-categories small{font-size:11px;line-height:1.5}.workspace-form{display:grid;gap:12px;max-width:700px;margin-top:26px}.workspace-form>label{font-size:13px;color:var(--f-muted);margin-top:6px}.workspace-form input:not([type=checkbox]),.workspace-form textarea,.workspace-form select,.preview-controls select{width:100%;background:var(--f-surface);border:1px solid var(--f-control-line);border-radius:13px;padding:13px 15px;line-height:1.6;color:var(--f-text);font:inherit}.workspace-form textarea{min-height:170px;resize:vertical}.form-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.form-actions .button{font-size:12px}.basis-page h1,.creation-page h1{font-size:36px;margin:10px 0 18px}.basis-page>.button,.creation-page>.button{margin-bottom:20px}.segmented{display:flex;gap:6px;border:1px solid var(--f-line);border-radius:14px;padding:5px;margin-top:24px;max-width:700px}.segmented button{flex:1;padding:11px 6px;background:transparent;border-radius:10px;color:var(--f-muted);font-size:12px}.segmented .active{background:var(--f-raised);color:var(--f-text)}.entry-page{max-width:730px}.entry-card{max-width:490px;border:1px solid var(--f-line);background:var(--f-surface);padding:25px;border-radius:22px}.entry-card h2{font-size:22px}.entry-card p{font-size:13px;color:var(--f-muted)}.entry-card small{font-size:11px;color:var(--f-muted)}.entry-card .button{justify-self:start;margin-top:5px}.preview-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:23px 0}.preview-controls select{width:160px}.publication-preview h1{font-size:33px}.social-preview{max-width:510px;border-radius:22px;background:#f5f5f5;color:#20222a;overflow:hidden;border:1px solid #ffffff24;margin:26px auto 18px;box-shadow:0 24px 70px #0003}.preview-network{font-size:12px;padding:11px 19px;border-bottom:1px solid #0001;color:#67717e}.preview-author{display:flex;align-items:center;gap:11px;padding:18px}.preview-author>span{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#d5cae8;color:#493763;font-size:19px}.preview-author>div{display:grid;gap:3px;font-size:13px}.preview-author small{font-size:10px;color:#79818c}.preview-author b{margin-left:auto}.preview-content{padding:0 20px 20px;white-space:pre-wrap;line-height:1.7;font-size:14px;overflow-wrap:anywhere}.social-preview img,.social-preview video{display:block;width:100%;max-height:440px;object-fit:contain;background:#e7e3e3}.preview-reactions{padding:13px 20px;border-top:1px solid #0001;color:#687585}.social-preview.telegram{background:#fff9ed}.telegram .preview-network{background:#c6e3de;color:#366766}.vk .preview-network{background:#447bba;color:white}.instagram .preview-network{background:linear-gradient(110deg,#f7cedd,#e8daff);color:#674960}.tiktok{background:#171719;color:#f5f5f5}.tiktok .preview-reactions{color:#eee}.youtube .preview-network{color:#cf2828}.editor-actions{flex-wrap:wrap}.editor-actions .button{font-size:11px;padding:10px 12px}@media(max-width:1050px){.home-categories{grid-template-columns:repeat(2,minmax(0,1fr))}.basis-card{align-items:flex-start;flex-direction:column}.basis-card .button{align-self:flex-start}.section-heading.compact{align-items:flex-start;flex-direction:column}.segmented{flex-wrap:wrap}.segmented button{min-width:70px}.entry-card{padding:19px}.publication-preview .section-heading{flex-wrap:wrap}}
/* Контент и персонализация разделены; настройки находятся вне студии */
.compact-foundation{margin-top:35px;padding-top:20px;border-top:1px solid var(--f-line)}.compact-foundation>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}.compact-foundation strong{font-size:13px}.foundation-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:15px}.foundation-links button{text-align:left;background:var(--f-surface);border:1px solid var(--f-line);border-radius:14px;padding:13px;display:grid;gap:7px;min-width:0}.foundation-links span{color:var(--f-muted);font-size:10px}.foundation-links strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:450}.workspace-location select{max-width:210px;background:transparent;color:var(--f-text);border:0;font:inherit;font-size:12px;padding:8px 4px}.workspace-location select option{background:var(--f-surface)}.workspace-location .icon-button{width:28px;height:28px}.workspace-location{gap:7px;min-width:0}.home-categories{margin-top:28px}.basis-page .segmented{overflow-x:auto}.basis-page .segmented button{min-width:95px}.format-toolbar{display:flex;gap:3px;flex-wrap:wrap;padding:8px 20px;border-block:1px solid var(--f-line)}.format-toolbar button{display:grid;place-items:center;min-width:34px;height:34px;background:transparent;border-radius:7px;color:var(--f-muted);font-size:14px}.format-toolbar button:hover{background:var(--f-raised);color:var(--f-text)}.body-input[contenteditable]{white-space:normal;overflow-wrap:anywhere;cursor:text;min-height:300px}.body-input[contenteditable]:empty::before{content:'Напишите текст или поручите его агенту';color:var(--f-muted);pointer-events:none}.rich-text{white-space:normal;overflow-wrap:anywhere}.rich-text p{margin:0 0 .9em}.rich-text p:last-child{margin-bottom:0}.rich-text strong{font-weight:650;color:inherit}.rich-text em{font-style:italic}.rich-text h2,.rich-text h3{font-size:1.23em;line-height:1.4;margin:1em 0 .5em;font-weight:650;letter-spacing:-.015em}.rich-text h2:first-child,.rich-text h3:first-child{margin-top:0}.rich-text ul,.rich-text ol{margin:.7em 0 1em;padding-left:1.5em}.rich-text li{margin:.35em 0}.rich-text blockquote{margin:1em 0;padding:5px 0 5px 14px;border-left:3px solid #ad9cc7;color:inherit;opacity:.85}.rich-text code{font-family:ui-monospace,monospace;font-size:.9em;background:#7e7e7e18;padding:2px 5px;border-radius:4px}.rich-text pre{white-space:pre-wrap;background:#7e7e7e12;padding:12px;border-radius:10px;overflow:auto}.rich-text pre code{background:none;padding:0}.rich-text a{color:inherit;text-decoration:underline;text-underline-offset:3px}.message{white-space:normal}.message .rich-text{line-height:1.8}.preview-content.rich-text{white-space:normal}.proposal-body.rich-text{white-space:normal}.typewriting{position:relative}.typewriting::after{content:'▍';font-size:.9em;color:var(--f-accent);animation:agent-caret .7s steps(1) infinite}.shimmer-text{background:linear-gradient(100deg,var(--f-muted) 10%,#f7edff 45%,var(--f-muted) 75%);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:agent-shimmer 1.8s linear infinite}.agent-work-status{background:var(--f-surface);border:1px solid var(--f-line);border-radius:16px;padding:15px 18px;margin-bottom:20px;display:grid;gap:9px;font-size:12px}.agent-work-status i{display:block;height:7px;width:75%;border-radius:4px;background:linear-gradient(90deg,#ffffff08,#c8b7ff32,#ffffff08);background-size:220% 100%;animation:agent-shimmer 1.8s linear infinite}.agent-work-status i:last-child{width:45%}.agent-is-working .agent-avatar{box-shadow:0 0 22px #c1a5ff30}.agent-is-working .composer{border-color:#a18bb565}.agent-is-working .agent-avatar svg{animation:agent-pulse 1.7s ease-in-out infinite}@keyframes agent-shimmer{from{background-position:160% 0}to{background-position:-60% 0}}@keyframes agent-caret{50%{opacity:0}}@keyframes agent-pulse{50%{opacity:.35;transform:scale(.9)}}@media(prefers-reduced-motion:reduce){.shimmer-text,.agent-work-status i,.typewriting::after,.agent-is-working .agent-avatar svg{animation:none}.shimmer-text{background:none;color:var(--f-muted)}}@media(max-width:1050px){.foundation-links{grid-template-columns:1fr}.workspace-location select{max-width:135px}.format-toolbar{padding-inline:12px}.home-categories .category{min-height:120px}}
/* Переключение продуктов и видимый контекст над перепиской */
.workspace-header{position:relative;z-index:35}.space-picker{position:relative;min-width:0}.space-trigger{display:flex;align-items:center;gap:10px;max-width:250px;min-width:165px;padding:7px 12px 7px 7px;border:1px solid #373741;background:linear-gradient(115deg,#24232c,#1b1c23);border-radius:15px;text-align:left;box-shadow:inset 0 1px #ffffff05;transition:border-color .18s,background .18s}.space-trigger:hover,.space-trigger[aria-expanded=true]{border-color:#9d8dbf70;background:#282632}.space-avatar{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:linear-gradient(135deg,#d3c3e6,#a795c4);color:#302a3b;font-size:15px;font-weight:600}.space-title{display:grid;gap:2px;min-width:0}.space-title small{font-size:9px;color:#9a96a7;font-weight:400;letter-spacing:.025em}.space-title strong{font-size:12px;line-height:1.45;letter-spacing:0;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:156px}.space-trigger>.icon{width:15px;height:15px;margin-left:7px;color:#a59eaf;transition:transform .18s}.space-trigger[aria-expanded=true]>.icon{transform:rotate(180deg)}.space-menu{position:absolute;top:calc(100% + 10px);left:0;min-width:275px;width:100%;max-width:calc(100vw - 110px);padding:9px;border:1px solid #45404f;border-radius:19px;background:#202028;box-shadow:0 24px 70px #0008,0 3px 12px #0003;z-index:60;animation:space-menu-in .16s ease-out}.space-menu-heading{display:flex;justify-content:space-between;align-items:center;padding:8px 10px 12px;font-size:10px;color:#9e98aa;letter-spacing:.02em}.space-menu-heading span{font-size:9px;background:#34313e;border-radius:6px;padding:2px 6px}.space-option{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:9px;border:1px solid transparent;background:transparent;border-radius:12px;transition:background .15s}.space-option>span:nth-child(2){font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.space-option:hover,.space-option:focus-visible{background:#31303b}.space-option.selected{background:#bda4df12;border-color:#bda4df25}.space-option>.icon{width:16px;height:16px;color:#ccb3ec}.space-avatar.tone-1{background:linear-gradient(135deg,#e5d8bd,#b9a384);color:#413427}.space-avatar.tone-2{background:linear-gradient(135deg,#c4d9d5,#8ea9ad);color:#283c42}.space-menu-divider{height:1px;background:#36323e;margin:8px 6px}.space-create{display:flex;align-items:center;gap:12px;width:100%;background:transparent;border-radius:11px;padding:12px 13px;color:#c8b8db;text-align:left;font-size:12px}.space-create:hover{background:#bda4df12}.space-create>.icon{width:17px;height:17px}.agent-header,.composer-area{flex-shrink:0}.messages{min-height:0}.agent-context{position:static;flex:0 0 auto;display:flex;flex-wrap:wrap;gap:7px;margin:0;padding:12px 16px;border:0;border-bottom:1px solid #2a2e38;border-radius:0;background:#181b22;max-height:176px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}.context-chip{display:flex;align-items:center;gap:7px;min-width:0;max-width:100%;flex:1 1 calc(50% - 7px);padding:8px 10px;border-radius:11px;border:1px solid #ffffff0d;background:#23252e;text-align:left;transition:background .15s,border-color .15s}.context-chip:hover{background:#2c2b37;border-color:#b9a4d245}.chip-copy{display:grid;gap:2px;min-width:0;flex:1}.chip-copy>span{color:#8c8b9c;font-size:9px;line-height:1.3}.chip-copy>strong{font-size:10px;font-weight:500;color:#dad5e2;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chip-dot{width:5px;height:5px;flex-shrink:0;border-radius:50%;background:#b7a0d6}.context-chip.product .chip-dot{background:#d4bd90}.context-chip.material .chip-dot{background:#a2bfcc}.context-chip.style .chip-dot{background:#d7a7c9}@keyframes space-menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@media(max-width:1050px){.space-trigger{min-width:135px;gap:8px;padding-right:9px}.space-title strong{max-width:113px;font-size:11px}.space-avatar{width:30px;height:30px;flex-basis:30px;border-radius:9px;font-size:13px}.space-menu{min-width:240px}.agent-context{padding:10px;gap:6px}.context-chip{padding:7px 8px}.chip-copy>strong{font-size:10px}}@media(max-width:720px){.space-title small{font-size:8px}.space-trigger{min-width:120px;padding:5px 7px 5px 5px;gap:7px}.space-title strong{max-width:92px;font-size:10px}.space-trigger>.icon{margin-left:0;width:12px;height:12px}}@media(prefers-reduced-motion:reduce){.space-menu{animation:none}.space-trigger,.space-trigger>.icon,.context-chip{transition:none}}
/* Формат, канал и цель относятся к отдельному материалу */
.brief-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.brief-grid>div{display:grid;gap:8px;min-width:0}.brief-grid label{font-size:12px;color:var(--f-muted)}.task-summary{font-size:12px;color:#c9badb;background:#c9a9ef0b;border:1px solid #c9a9ef20;border-radius:12px;padding:12px 14px;line-height:1.7}.material-task{margin:0 0 18px}.seo-fields{margin-top:22px;padding:18px;border:1px solid var(--f-line);border-radius:15px}.seo-fields summary{cursor:pointer;color:var(--f-muted);font-size:13px}.seo-fields label{display:block;margin:15px 0 7px;font-size:12px;color:var(--f-muted)}.seo-fields input,.seo-fields textarea{width:100%;background:var(--f-surface);border:1px solid var(--f-control-line);border-radius:10px;padding:12px;color:var(--f-text)}.website-paper{margin-top:24px;padding:35px;border:1px solid var(--f-line);background:#f8f6f1;color:#282a32;border-radius:20px}.website-paper>h1{font-size:30px;line-height:1.25;margin:15px 0 26px;letter-spacing:-.02em}.website-label{font-size:11px;color:#777984}.website-paper .rich-text{font-size:15px;line-height:1.85}.rich-text h1{font-size:1.42em;line-height:1.4;margin:1em 0 .55em;font-weight:650;letter-spacing:-.02em}.rich-text h1:first-child{margin-top:0}.seo-preview{margin:20px 0;padding:18px;border:1px solid var(--f-line);border-radius:14px;display:grid;gap:9px}.seo-preview>span{font-size:10px;color:var(--f-muted)}.seo-preview>strong{color:var(--f-accent);font-size:15px;font-weight:500}.seo-preview p{font-size:13px;color:var(--f-muted);line-height:1.7}@media(max-width:1050px){.brief-grid{grid-template-columns:1fr}.website-paper{padding:21px}.website-paper>h1{font-size:24px}}

/* Компактная строка контекста: один ряд, без карточек в две строки */
.agent-context{flex-wrap:nowrap;gap:5px;padding:7px 12px;max-height:none;min-height:0;overflow-x:auto;overflow-y:hidden;background:transparent;scrollbar-width:thin}.context-chip{flex:0 1 auto;gap:5px;padding:5px 8px;min-height:28px;max-width:180px;border-radius:8px;background:#ffffff04;border-color:#ffffff0a}.chip-copy{display:flex;align-items:baseline;gap:4px;min-width:0}.chip-copy>span{display:none}.chip-copy>strong{font-size:10px;line-height:1.35;font-weight:450;max-width:125px}.chip-dot{width:4px;height:4px}.context-chip.material{max-width:200px}.context-chip:focus-visible{outline:2px solid var(--f-accent);outline-offset:1px}.message-error{border-left:2px solid #c5aa87;padding:10px 12px;background:#c5aa8708;border-radius:0 10px 10px 0}.message-error .message-label{color:#c9b293}.message-error .rich-text{font-size:12px;color:var(--f-muted);line-height:1.65}@media(max-width:1050px){.agent-context{gap:4px;padding:6px 10px}.context-chip{padding:5px 7px;max-width:150px}.chip-copy>strong{font-size:10px;max-width:110px}}

/* Файлы сообщения не являются медиа материала */
.chat-files{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}.chat-file{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;padding:7px 9px;border:1px solid var(--f-line);background:var(--f-surface);border-radius:10px;font-size:11px}.chat-file img{width:38px;height:38px;object-fit:cover;border-radius:6px}.chat-file a{color:var(--f-text);overflow-wrap:anywhere;text-decoration:none}.chat-file button{background:transparent;color:var(--f-muted);padding:4px;display:grid;place-items:center}.chat-file .icon{width:15px;height:15px}.attachment-note{font-size:10px;color:var(--f-muted);line-height:1.5;margin:8px 0}.pending-files{max-height:180px;overflow:auto;padding:0 4px 8px}.message-error .rich-text{font-size:12px}
/* Шаблоны площадок */
.preview-media{overflow:hidden}.preview-media>img,.preview-media>video{display:block;width:100%;height:auto;max-height:480px;object-fit:contain;margin:0;background:#161820}.preview-media.album{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.preview-media.album>img,.preview-media.album>video{height:200px;object-fit:contain}.preview-placeholder{display:grid;place-items:center;min-height:240px;padding:25px;background:#20232c;color:#92939e;font-size:13px;text-align:center}.social-preview.telegram .preview-media{margin:0 10px;border-radius:10px}.social-preview.instagram .preview-media>img{max-height:600px}.social-preview.instagram .preview-reactions{border:0;padding-bottom:0}.youtube-video-title{font-size:17px;font-weight:550;padding:17px 20px 0}.tiktok-stage{position:relative;min-height:480px;aspect-ratio:9/16;max-height:700px;overflow:hidden;background:#101114}.tiktok-stage>.preview-media,.tiktok-stage>.preview-placeholder{position:absolute;inset:0;height:100%;width:100%}.tiktok-stage .preview-media>img,.tiktok-stage .preview-media>video{height:100%;max-height:none;object-fit:contain}.tiktok-caption{position:absolute;bottom:0;left:0;right:0;padding:60px 55px 20px 20px;background:linear-gradient(transparent,#000c);color:#fff}.tiktok-caption>strong{font-size:14px}.tiktok-caption .preview-content{padding:10px 0 0;font-size:12px;line-height:1.5;max-height:150px;overflow:auto}.tiktok-actions{position:absolute;right:15px;bottom:65px;font-size:26px;line-height:2;color:#fff}
/* Библиотека: категории и неизменяемое происхождение */
.library-filters{display:flex;gap:7px;overflow-x:auto;padding:4px 1px 17px;margin-bottom:10px;scrollbar-width:thin}.library-filter{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:8px 11px;border:1px solid var(--f-line);border-radius:10px;background:transparent;color:var(--f-muted);font-size:11px}.library-filter .icon{width:14px;height:14px}.library-filter>span{font-size:10px;opacity:.6}.library-filter.active{color:var(--f-text);border-color:#baa9d064;background:#b39bc210}.material-category-label{font-size:10px;color:#b7a8cd}.material-meta time{font-size:10px;color:var(--f-muted);line-height:1.6}.material-meta>span{font-size:11px}.material-meta{gap:7px}

/* Иллюстрация — самостоятельная операция внутри сохранённого материала. */
.image-choice{display:grid;grid-template-columns:20px minmax(0,1fr) auto;margin:18px 0;gap:12px;align-items:center;padding:15px 16px;border:1px solid var(--f-line);border-radius:14px;background:linear-gradient(110deg,#d5c6ae0d,#b9b0ff08);color:var(--f-text);cursor:pointer;transition:border-color .18s ease,background-color .18s ease}.image-choice:hover{border-color:#d5c6ae80}.image-choice:has(input:checked){border-color:#d5c6ae99;background-color:#d5c6ae0d}.image-choice-label{font-size:13px;font-weight:550;line-height:1.5}.image-choice-price{padding:4px 8px;background:#d5c6ae12;border-radius:8px;color:var(--f-primary);font-size:12px;font-weight:550;white-space:nowrap}
.image-choice input{width:20px;height:20px;margin:0;accent-color:var(--f-primary);cursor:pointer}
.media-area>[data-action="make-image"]{margin-bottom:14px}
.image-progress{margin:12px 0;padding:14px;border:1px solid var(--f-line);border-radius:12px;font-size:12px;line-height:1.7}
.image-progress p{margin-bottom:10px}.image-progress .button{margin:8px 8px 0 0;font-size:11px}
.media-card figcaption .button{font-size:11px;padding:5px 8px;min-height:28px;margin-top:6px}

/* Изображения: явное действие, настоящие состояния, галерея и просмотр. */
.media-toolbar{margin-bottom:12px}.image-create-cta{width:100%;justify-content:center;min-height:46px;margin-bottom:18px!important;font-size:13px}
.image-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}.image-asset{min-width:0;overflow:hidden;border:1px solid var(--f-line);border-radius:17px;background:var(--f-surface)}
.image-asset-preview,.image-task-preview{display:block;width:100%;padding:0;border:0;overflow:hidden;background:transparent;cursor:zoom-in}.image-asset-preview img,.image-task-preview img{display:block;width:100%;height:auto;max-height:none;border-radius:0}
.image-material-editor>label{display:block;color:var(--f-muted);font-size:12px;margin:0 0 9px}.image-material-editor .image-material-title{display:block;width:100%;box-sizing:border-box;min-height:48px;padding:12px 16px;border:1px solid var(--f-line);border-radius:14px;background:var(--f-surface);color:var(--f-text);font:inherit;font-size:18px;margin:0 0 12px}.image-material-format{display:flex;align-items:center;gap:8px;color:var(--f-muted);font-size:12px;margin:4px 0 18px}.image-material-format svg{width:16px;height:16px}.image-material-gallery .image-asset{max-width:100%;margin-top:0}.image-material-editor .image-task{max-width:100%}.image-material-editor .image-asset-preview img{width:100%;height:auto;max-height:none}.image-material-editor .image-asset-actions{flex-wrap:wrap}
.image-asset-info{padding:14px}.image-asset-info>strong{display:block;font-size:12px;overflow-wrap:anywhere}.image-asset-info>small{display:block;font-size:10px;color:var(--f-muted);margin-top:6px}.image-asset-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:12px}.image-asset-actions .button{font-size:10px;padding:6px 8px;min-height:30px}.image-asset-actions .icon{width:13px;height:13px}.remove-image{color:#d4b7bb}
.gallery-asset .image-asset-preview{aspect-ratio:4/5;display:grid;place-items:center;background:linear-gradient(140deg,#292831,#181b24)}.gallery-asset .image-asset-preview img{max-height:100%;max-width:100%;width:100%;height:100%;object-fit:contain}
.image-material-links{display:grid;gap:6px;border-top:1px solid var(--f-line);padding-top:12px;margin-top:14px}.image-material-links>span{font-size:11px;color:var(--f-muted)}.image-material-links button{display:flex;align-items:center;gap:7px;text-align:left;font-size:11px;color:var(--f-muted);line-height:1.5;padding:5px 0}.image-material-links button:hover{color:var(--f-text)}.image-material-links .icon{width:14px;height:14px;flex-shrink:0}.image-material-links .icon:last-child{margin-left:auto}
.category-empty{padding:45px 0 60px;max-width:520px}.category-empty .empty-orbit{display:grid;place-items:center;width:66px;height:66px;border:1px solid #c3afd64d;background:radial-gradient(at 10% 10%,#d3b8ed23,transparent);border-radius:21px;margin-bottom:24px}.empty-orbit .icon{width:28px;height:28px;color:var(--f-primary)}.category-empty h2{font-size:28px;line-height:1.25;letter-spacing:-.7px;margin-bottom:14px}.category-empty p{font-size:13px;line-height:1.8}.category-empty .button{margin-top:22px;min-height:45px;font-size:13px}
.image-task{overflow:hidden;border:1px solid #c3afd63c;border-radius:18px;background:var(--f-surface);max-width:520px;margin:14px 0 20px}.image-task-info{padding:17px}.image-task-info>strong{display:block;font-size:15px;font-weight:550}.image-task-info>p{font-size:11px;line-height:1.7;color:var(--f-muted);margin:7px 0 0}.image-task-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.image-task-actions .button{font-size:11px;min-height:32px;padding:7px 10px}.chat-image-tasks .image-task,#chat-image-pending .image-task{width:100%;max-width:none}.image-task.in-chat .image-task-info{padding:13px}.image-task.in-chat .image-task-info>strong{font-size:13px}.image-task.in-chat .image-task-actions .button{font-size:10px}.image-task.in-chat .image-task-preview img{max-height:420px;object-fit:contain}
.image-noise{position:relative;isolation:isolate;overflow:hidden;aspect-ratio:4/5;min-height:210px;background:#171923}.noise-light{position:absolute;inset:-25%;background:radial-gradient(ellipse at 30% 25%,#dbc9ae9c 0,transparent 50%),radial-gradient(ellipse at 70% 65%,#9e8bc392 0,transparent 55%),linear-gradient(135deg,#272b36,#393244);filter:blur(23px);animation:image-light 8s ease-in-out infinite alternate;will-change:transform}.noise-grain{position:absolute;inset:-45%;background-image:url('/image-noise.svg');background-size:160px 160px;opacity:.36;mix-blend-mode:normal;filter:contrast(240%) brightness(.85);will-change:transform;animation:image-grain 4.8s ease-in-out infinite}.noise-mark{position:absolute;inset:0;display:grid;place-items:center;font-size:38px;color:#e7dff0d4;text-shadow:0 0 35px #d6c5ed;animation:image-breathe 2s ease-in-out infinite}.image-noise::after{content:'';position:absolute;inset:0;background:linear-gradient(115deg,transparent 20%,#fff1 45%,transparent 70%);background-size:240% 100%;animation:image-scan 5.6s ease-in-out infinite alternate;will-change:transform}
.image-reveal .image-asset-preview{position:relative;animation:image-arrive 1.1s ease-out both}.image-reveal .image-asset-preview::after{content:'';position:absolute;inset:-40%;pointer-events:none;background-image:url('/image-noise.svg');animation:image-grain 4.8s ease-in-out infinite,image-noise-out 1.6s ease-out forwards;mix-blend-mode:soft-light}
#canvas-image-pending{max-width:520px;margin:0 auto 25px}.image-viewer{max-width:1100px;width:calc(100vw - 44px);max-height:94dvh;padding:20px}.image-viewer .dialog-header h2{font-size:18px}.image-viewer .dialog-header p{font-size:11px;margin:5px 0 0}.image-viewer-stage{display:flex;justify-content:center;align-items:center;margin-top:18px}.image-viewer-stage img{display:block;max-width:100%;width:auto;max-height:65dvh;height:auto;border-radius:10px}.image-viewer-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:17px}.image-viewer-actions .button{font-size:12px}.image-edit-dialog{max-width:560px}.image-edit-dialog h2{font-size:22px}.image-edit-thumb{max-width:100%;max-height:190px;display:block;border-radius:12px;margin:0 auto 10px}.image-edit-dialog .workspace-form{margin-top:22px}.image-edit-dialog [hidden]{display:none!important}
/* Telegram/VK/фото-пост: высота фотографии следует оригиналу, без добавленных полос. */
.social-preview.telegram .preview-media:not(.album)>img,.social-preview.vk .preview-media:not(.album)>img,.social-preview.youtube .preview-media:not(.album)>img{width:100%;height:auto;max-height:none;object-fit:initial;background:transparent}
@keyframes image-grain{0%,100%{transform:translate3d(-1%,-1%,0)}25%{transform:translate3d(1%,-1.5%,0)}50%{transform:translate3d(1.5%,1%,0)}75%{transform:translate3d(-1.5%,1.5%,0)}}
@keyframes image-light{0%{transform:translate3d(-3%,-2%,0) scale(1)}100%{transform:translate3d(3%,2%,0) scale(1.08)}}
@keyframes image-breathe{0%,100%{opacity:.4;transform:scale(.9)}50%{opacity:1;transform:scale(1.05)}}
@keyframes image-scan{0%{transform:translate3d(-18%,0,0);opacity:.2}100%{transform:translate3d(18%,0,0);opacity:.7}}
@keyframes image-arrive{from{filter:blur(10px);opacity:.35}to{filter:blur(0);opacity:1}}
@keyframes image-noise-out{from{opacity:.9}to{opacity:0}}
@media(prefers-reduced-motion:reduce){.noise-light,.noise-grain,.noise-mark,.image-noise::after,.image-reveal .image-asset-preview,.image-reveal .image-asset-preview::after{animation:none}.image-reveal .image-asset-preview::after{display:none}}
@media(max-width:800px){.image-gallery{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.image-viewer{padding:14px;width:calc(100vw - 24px)}.image-viewer-actions .button{font-size:11px}.image-task-info>strong{font-size:14px}.category-empty h2{font-size:25px}}
.image-explanation{border-top:1px solid var(--f-line);margin-top:13px;padding-top:10px}.image-explanation p{font-size:11px;line-height:1.65;color:var(--f-muted);margin:0 0 10px}.image-explanation p:last-child{margin-bottom:0}.image-explanation strong{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--f-text);margin-bottom:4px;font-weight:500}
/* Стабильная высота карточки: загрузка PNG не сдвигает переписку. */
.image-task.in-chat .image-noise,.image-task.in-chat .image-task-preview{aspect-ratio:4/5;min-height:0;height:auto}.image-task.in-chat .image-task-preview img{height:100%;max-height:none;object-fit:contain}.image-task.in-chat .image-task-actions{min-height:66px;align-content:start}.messages{overflow-anchor:none}
.library-create-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;min-height:260px;padding:26px;border:1px dashed #cdbb986b;border-radius:17px;background:radial-gradient(at 50% 10%,#c2a6d51c,transparent 70%);color:var(--f-primary);text-align:center;transition:border-color .18s,background .18s}.library-create-tile:hover{border-color:var(--f-primary);background:radial-gradient(at 50% 10%,#c2a6d52d,transparent 75%)}.create-tile-plus{display:grid;place-items:center;width:70px;height:70px;border:1px solid #cdbb9875;border-radius:22px;background:#cdbb9812}.create-tile-plus .icon{width:29px;height:29px}.library-create-tile strong{font-size:15px;font-weight:550;line-height:1.5}.empty-orbit{cursor:pointer}.empty-orbit:hover{border-color:var(--f-primary)!important}

.empty-orbit:has(.empty-price){display:flex;flex-direction:column;gap:4px}.empty-price{font-size:12px;font-weight:500;line-height:1.2}
.search-select{position:relative;min-width:0}.search-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:12px 14px;text-align:left;background:var(--f-bg);border:1px solid var(--f-control-line);border-radius:12px;font:inherit}.search-select-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-select-trigger[aria-expanded=true]{border-color:var(--f-accent)}.search-select-trigger .icon{width:18px;height:18px}.search-select-panel{margin-top:8px;border:1px solid var(--f-control-line);border-radius:12px;background:var(--f-raised);padding:8px;box-shadow:0 10px 30px #0003}.search-select-search{display:flex;align-items:center;gap:8px;padding:0 9px;background:var(--f-bg);border:1px solid var(--f-line);border-radius:9px}.search-select-search>.icon{width:17px;height:17px;color:var(--f-muted)}dialog .search-select-search input{background:transparent;border:0;padding:10px 0;min-width:0;border-radius:0;outline:none}.search-select-search:focus-within{border-color:var(--f-accent)}.search-select-options{max-height:230px;overflow:auto;overscroll-behavior:contain;margin-top:6px}.search-select-options>button{display:block;width:100%;padding:11px 10px;border-radius:8px;text-align:left;background:transparent;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.search-select-options>button:hover,.search-select-options>button.highlighted{background:#b9b0ff13}.search-select-options>button[aria-selected=true]{color:var(--f-primary);background:#d5c6ae12}.search-select-empty{padding:13px 10px!important;color:var(--f-muted);font-size:12px!important}
.library-search{display:flex;align-items:center;gap:10px;margin:24px 0 0;padding:0 14px;max-width:660px;background:var(--f-surface);border:1px solid var(--f-line);border-radius:12px;color:var(--f-muted)}.library-search:focus-within{border-color:var(--f-accent)}.library-search .icon{width:19px;height:19px}.library-search input{width:100%;min-width:0;padding:13px 0;border:0;background:transparent;outline:none;font:inherit;font-size:13px;color:var(--f-text)}.library-search input::placeholder{color:var(--f-muted)}.library-result-count:empty{display:none}.library-result-count,.library-search-state{font-size:12px;color:var(--f-muted);margin:0 0 18px}.library-search-state{padding:30px 0}.library-search-empty{padding:30px 0}.library-search-empty h2{font-size:24px}.library-search-empty p{margin:12px 0 20px;color:var(--f-muted)}.space-menu input[type=search]{width:100%;background:var(--f-bg);padding:10px 12px;color:var(--f-text);font:inherit;font-size:12px;border:1px solid var(--f-line);border-radius:10px;margin:3px 0 9px}
/* Живой шум с бесшовным движением текстур: без ступенчатых кадров и скачка в конце цикла. */
.noise-grain{opacity:.64;filter:contrast(380%) brightness(.92);animation:image-grain-flow 2.4s linear infinite}.noise-grain::after{content:'';position:absolute;inset:-160px;background:url('/image-noise.svg') repeat;background-size:160px 160px;mix-blend-mode:soft-light;animation:image-grain-cross 1.8s linear infinite;will-change:transform}.noise-light{filter:blur(23px);opacity:.95}.image-task[aria-busy=true] .image-task-info>strong::after{content:' · · ·';color:var(--f-accent);animation:image-working 1.4s ease-in-out infinite}.image-task.in-chat .image-noise,.image-task.in-chat .image-task-preview{height:clamp(150px,24dvh,220px);aspect-ratio:auto}.image-task.in-chat[aria-busy=true] .image-explanation{display:none}.image-task.in-chat .image-task-actions{min-height:0}
@keyframes image-grain-flow{from{transform:translate3d(0,0,0)}to{transform:translate3d(160px,-160px,0)}}
@keyframes image-grain-cross{from{transform:translate3d(0,0,0)}to{transform:translate3d(-160px,160px,0)}}
@keyframes image-working{0%,100%{opacity:.3}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.noise-grain,.noise-grain::after,.image-task[aria-busy=true] .image-task-info>strong::after{animation:none;will-change:auto}}
.noise-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .4s ease}.noise-art-ready .noise-canvas{opacity:1}.noise-art-ready .noise-light,.noise-art-ready .noise-grain,.noise-art-ready .noise-mark,.noise-art-ready::after{display:none}.image-task.in-chat .image-noise{border-bottom:1px solid #b9b0ff22}
@media(prefers-reduced-motion:reduce){.noise-canvas{display:none;transition:none}}
/* Общий вид фиксированных списков: единая стрелка, отступ и фокус вместо нативной синей рамки. */
select:not([multiple]){appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaeb9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:17px 17px;padding-inline-end:44px;min-height:44px;cursor:pointer;min-width:0;text-overflow:ellipsis}
select:focus-visible{outline:2px solid var(--f-accent);outline-offset:3px;border-color:var(--f-accent)}select:disabled{cursor:default;opacity:.55}.preview-controls select{max-width:100%;flex:0 1 160px}.dialog-header h2{min-width:0;overflow-wrap:anywhere}.dialog-header>.icon-button{flex-shrink:0}dialog{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.title-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;border-bottom:1px solid var(--f-line)}.title-row .title-input{min-width:0;border-bottom:0;padding-inline-end:8px}.copy-title{margin:23px 18px 0 0;color:var(--f-muted)}.copy-title:hover{color:var(--f-primary);background:var(--f-raised)}
@media(max-width:800px){.copy-title{margin:17px 12px 0 0}.title-row .title-input{padding-inline-end:6px}}
@media(max-width:800px){.header-actions .agent-toggle{display:inline-flex}.header-actions{flex-shrink:0}.editor-actions{justify-content:flex-start}.section-heading>.button{max-width:100%}}
.preview-controls>label{flex:0 0 100%;font-size:12px;color:var(--f-muted)}.preview-controls select,.preview-controls>.button{height:48px;min-height:48px}.title-row{background:var(--f-raised)}
@media(max-width:640px){.preview-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.preview-controls select,.preview-controls>.button{width:100%;max-width:none}}
@media(max-width:1050px){.basis-page .segmented{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.basis-page .segmented button{min-width:0}}
.image-frame-preview{max-height:240px;overflow:auto;padding:18px;border:1px solid var(--f-line);border-radius:12px;background:var(--f-bg);font-size:13px}.image-frame-preview h2{font-size:18px}
.image-format-picker{margin:16px 0 8px}.image-format-picker>label{display:block;margin-bottom:9px}.image-format-row{display:flex;align-items:center;gap:14px}.image-format-row select{flex:1;min-width:0;width:100%}.image-format-picker .form-note{margin:8px 0 0;font-size:11px;line-height:1.6}.aspect-sample{display:block;flex:none;width:34px;height:34px;border:1px solid var(--f-accent);border-radius:6px;background:linear-gradient(140deg,#b9b0ff28,#d5c6ae16);box-shadow:inset 0 0 14px #b9b0ff15}.aspect-sample[data-aspect="4:5"]{width:28px;height:35px}.aspect-sample[data-aspect="9:16"]{width:23px;height:41px}.aspect-sample[data-aspect="16:9"]{width:42px;height:24px}.image-format-picker[hidden]{display:none}
.content-set-entry{background:linear-gradient(130deg,#b9b0ff12,#d5c6ae0a)!important;border-color:#b9b0ff55!important}.content-set-card,.set-material-card,.series-frame{padding:22px;border:1px solid var(--f-line);border-radius:18px;background:var(--f-surface);text-align:left;min-width:0}.content-set-card h2,.set-material-card h2{font-size:20px;line-height:1.5;overflow-wrap:anywhere;margin:12px 0}.content-set-card p,.set-material-card p{font-size:13px;line-height:1.8;color:var(--f-muted)}.content-set-card small,.set-material-card small{display:block;margin:14px 0;color:var(--f-primary);font-size:11px}.set-materials,.series-frames{display:grid;gap:18px;margin:24px 0}.set-settings{border:1px solid var(--f-line);border-radius:14px;padding:15px 18px;margin:22px 0}.set-settings summary{cursor:pointer;color:var(--f-muted);font-size:13px}.set-settings form{margin-top:20px}.series-editor>.series-title,.series-frame input,.series-editor>select{width:100%;padding:13px 16px;border-radius:12px;border:1px solid var(--f-line);background:var(--f-bg);color:var(--f-text);font:inherit}.series-editor>label,.series-frame>label{display:block;font-size:12px;color:var(--f-muted);margin:16px 0 9px}.series-editor>select{width:auto;min-width:180px}.series-frame-heading{display:flex;justify-content:space-between;gap:15px;align-items:center}.series-frame-heading strong{color:var(--f-primary);font-size:14px}.series-frame-heading>span{color:var(--f-muted);font-size:11px}.series-frame .frame-body{min-height:120px;padding:16px;border:1px solid var(--f-line);border-radius:12px;margin:0;background:var(--f-bg);font-size:15px}.series-frame>.button{margin-top:14px}.series-frame .image-asset{margin-top:18px}.series-frame .image-asset-preview img{max-height:380px}.content-set-page .form-actions{flex-wrap:wrap}
@media(max-width:640px){.series-frame,.set-material-card{padding:16px}.image-format-row{gap:10px}.image-format-row select{font-size:11px;padding-left:11px}.series-frame-heading{align-items:flex-start}.content-set-card h2,.set-material-card h2{font-size:18px}}
.image-format-dimensions{margin:8px 0 0;color:var(--f-primary);font-size:12px;font-variant-numeric:tabular-nums}.materials-page .section-heading{flex-wrap:wrap;gap:12px}.content-set-entry{grid-column:1/-1!important}.content-set-card{font:inherit;color:var(--f-text);cursor:pointer}
@media(max-width:640px){.materials-page .section-heading h1{width:100%}.series-editor .editor-actions{flex-wrap:wrap}.series-frame-heading{flex-wrap:wrap}}
/* Макет экрана рядом с редактором: пропорции содержимого, оформление площадки. */
.series-editor{container-type:inline-size}.frame-compose-layout{display:grid;grid-template-columns:minmax(190px,.85fr) minmax(0,1fr);gap:26px;align-items:start;margin-top:18px}.frame-controls{min-width:0}.frame-controls>label{display:block;font-size:12px;color:var(--f-muted);margin:0 0 9px}.frame-controls>input{margin-bottom:18px}.frame-controls .image-format-picker>label{font-size:12px;color:var(--f-muted)}.frame-controls>.button{margin-top:16px;width:100%;justify-content:center}.series-frame-heading{gap:12px}.series-frame-heading>.frame-state{margin-left:auto;padding:5px 9px;border:1px solid #d5c6ae22;border-radius:7px;color:var(--f-muted)}.series-frame-heading>.quiet{padding:5px;min-height:28px;color:var(--f-muted)}
.image-format-row select{background-color:var(--f-bg);border:1px solid var(--f-line);border-radius:12px;color:var(--f-text);font:inherit;font-size:12px;padding:12px 42px 12px 13px;min-height:48px}.frame-preview{min-width:0;position:sticky;top:18px}.frame-preview-platform{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--f-muted);margin-bottom:12px}.frame-preview-platform strong{color:var(--f-text);font-weight:500}.frame-preview-platform>span{margin-left:auto;font-size:10px}.frame-preview-platform[data-platform=instagram] .platform-glyph{color:#da9dd2}.frame-preview-platform[data-platform=telegram] .platform-glyph{color:#8fcbdc}.frame-preview-platform[data-platform=vk] .platform-glyph{color:#9cbbef}.frame-preview-platform[data-platform=tiktok] .platform-glyph{color:#acd9db;filter:drop-shadow(1px 0 #d99bb9)}.frame-preview-platform[data-platform=youtube] .platform-glyph{color:#e9a0a8}
.frame-social-surface{overflow:hidden;border:1px solid #ffffff17;border-radius:22px;box-shadow:0 14px 36px #0003;background:#14161c;max-width:340px;margin:0 auto;transition:max-width .25s ease}.frame-social-surface[data-aspect="9:16"]{max-width:280px}.frame-social-surface[data-aspect="16:9"]{max-width:390px;border-radius:16px}.frame-artboard{position:relative;isolation:isolate;overflow:hidden;aspect-ratio:1;transition:aspect-ratio .25s ease;background:#24232e}.frame-artboard[data-aspect="4:5"]{aspect-ratio:4/5}.frame-artboard[data-aspect="9:16"]{aspect-ratio:9/16}.frame-artboard[data-aspect="16:9"]{aspect-ratio:16/9}.frame-visual{position:absolute;inset:0;background:radial-gradient(ellipse at 10% 0%,#b5a4db38,transparent 58%),radial-gradient(ellipse at 96% 90%,#dbc5a437,transparent 58%),linear-gradient(150deg,#2c2939,#161a23 65%)}.frame-visual img{width:100%;height:100%;object-fit:cover;display:block}.frame-visual::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#0004 0%,transparent 24%,#08091022 40%,#08091066 100%)}.frame-visual-orbit{position:absolute;width:130%;aspect-ratio:1;left:20%;top:20%;border:1px solid #ded3f316;border-radius:50%;box-shadow:0 0 0 30px #ded3f305,0 0 0 90px #ded3f303;transform:rotate(-25deg)}.frame-visual-spark{position:absolute;right:13%;top:28%;font-size:46px;color:#d9c9ec77;text-shadow:0 0 30px #b5a4db66}.frame-social-header{display:flex;gap:8px;align-items:center;padding:12px 13px;color:#f7f5f8}.frame-social-avatar{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#d4c6e8;color:#332b48;font-size:12px;border:2px solid #28232e;box-shadow:0 0 0 1px #d9b4c5}.frame-social-surface[data-platform=instagram] .frame-social-avatar{box-shadow:0 0 0 1.5px #db8eab,0 0 0 3px #bca2de44}.frame-social-surface[data-platform=telegram] .frame-social-avatar{box-shadow:0 0 0 1.5px #8cc5d5;background:#b6d8df}.frame-social-surface[data-platform=vk] .frame-social-avatar{box-shadow:0 0 0 1.5px #9dbbeb;background:#c3d3ee}.frame-social-surface[data-platform=youtube] .frame-social-avatar{box-shadow:0 0 0 1.5px #d99da6}.frame-social-name{min-width:0;font-size:10px;line-height:1.4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.frame-social-name small{display:block;font-size:8px;color:#d2ced9;opacity:.7}.frame-social-dots{margin-left:auto;font-size:20px;line-height:1}.frame-story-chrome{position:absolute;inset:10px 0 auto;z-index:4}.frame-story-progress{display:flex;gap:3px;padding:0 10px}.frame-story-progress>span{height:2px;flex:1;border-radius:4px;background:#fff4}.frame-story-progress>span.active{background:#f7f4fb}.frame-story-chrome .frame-social-header{padding-top:9px}.frame-caption{position:absolute;z-index:3;left:9%;right:9%;top:29%;max-height:52%;overflow:hidden;color:#faf8f4;text-align:left;font-weight:500;font-size:clamp(16px,2.9cqw,24px);line-height:1.4;letter-spacing:-.035em;text-shadow:0 1px 18px #0008}.frame-caption>p{margin:0 0 .7em}.frame-caption strong{color:inherit}.frame-caption[data-density=dense]{font-size:clamp(13px,2.4cqw,18px)}.frame-caption h2{font-size:1.1em}.frame-caption ul,.frame-caption ol{padding-left:1.1em;font-size:.85em}.frame-story-footer{position:absolute;z-index:4;left:12px;right:12px;bottom:12px;display:flex;align-items:center;gap:12px;color:#fff9}.frame-story-footer>span{flex:1;border:1px solid #fff4;border-radius:24px;padding:8px 12px;font-size:9px}.frame-story-footer .icon{width:17px;height:17px}.frame-carousel-footer{display:flex;align-items:center;justify-content:space-between;padding:10px 13px;color:#eae6ef;font-size:10px}.frame-carousel-footer>span:first-child{font-size:22px;line-height:1}.frame-carousel-dots{display:flex;gap:4px}.frame-carousel-dots i{width:4px;height:4px;border-radius:50%;background:#fff3}.frame-carousel-dots i.active{background:#c3b2e0}.frame-preview-note,.frame-preview-warning{font-size:10px;line-height:1.6;text-align:center;margin:10px 0 0;color:var(--f-muted)}.frame-preview-warning{color:var(--f-primary)}.frame-preview-warning[hidden]{display:none}
.frame-asset-details .image-asset-preview{display:none}.frame-asset-details .image-asset{margin-top:12px}.frame-asset-details .image-asset-info{padding:13px}.frame-asset-details .image-asset-info>strong{font-size:10px;max-height:32px;overflow:hidden;display:block;overflow-wrap:anywhere}.frame-asset-details .image-asset-actions{gap:4px}.frame-asset-details .image-asset-actions>.button,.frame-asset-details .image-asset-actions>a{font-size:10px;padding:6px}.frame-asset-details .image-asset-info>small{display:none}.frame-image-task{position:absolute;inset:0;z-index:2;pointer-events:none}.frame-image-task:empty{display:none}.frame-image-task .image-task{height:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent}.frame-image-task .image-noise{height:100%;aspect-ratio:auto;border:0;border-radius:0}.frame-image-task .image-task-info{display:none}.frame-social-surface[data-platform=tiktok] .frame-story-progress{opacity:.4}.frame-social-surface[data-platform=youtube] .frame-story-footer>span{border-radius:5px;border-color:#ffffff1f}
@container(max-width:680px){.frame-compose-layout{grid-template-columns:minmax(0,1fr);gap:24px}.frame-preview{position:static}.frame-preview-platform{max-width:340px;margin-left:auto;margin-right:auto}.frame-controls .frame-body{min-height:95px}.frame-preview-note{max-width:340px;margin-left:auto;margin-right:auto}.frame-social-surface[data-aspect="9:16"]{max-width:260px}.frame-caption{font-size:23px}.frame-caption[data-density=dense]{font-size:17px}}
@media(prefers-reduced-motion:reduce){.frame-social-surface,.frame-artboard{transition:none}}
.frame-visual:has(img)::after{background:linear-gradient(180deg,#08091055,#1010194d 22%,#10101988 45%,#10101966 72%,#10101999)}.frame-artboard[data-aspect="16:9"] .frame-caption{top:32%;max-height:35%;font-size:16px;line-height:1.35}.frame-artboard[data-aspect="16:9"] .frame-story-chrome{top:6px}.frame-artboard[data-aspect="16:9"] .frame-social-header{padding:6px 10px}.frame-artboard[data-aspect="16:9"] .frame-social-avatar{width:20px;height:20px;font-size:9px}.frame-artboard[data-aspect="16:9"] .frame-social-name{font-size:8px}.frame-artboard[data-aspect="16:9"] .frame-social-name small{display:none}.frame-artboard[data-aspect="16:9"] .frame-story-footer{left:10px;right:10px;bottom:8px}.frame-artboard[data-aspect="16:9"] .frame-story-footer>span{padding:4px 8px;font-size:7px}
/* DEC-090: shared selection menus in the top layer, including modal dialogs. */
.search-select{min-width:0;width:100%}.search-select-trigger{min-height:46px;padding:11px 14px;gap:14px;color:var(--f-text);background:var(--f-bg);border-color:var(--f-control-line);border-radius:13px;line-height:1.45;font-size:13px;cursor:pointer;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}.search-select-trigger:hover{border-color:#d5c6ae66;background:#ffffff04}.search-select-trigger:focus-visible{outline:2px solid var(--f-accent);outline-offset:3px}.search-select-trigger[aria-expanded=true]{border-color:#d5c6ae88;box-shadow:0 0 0 3px #d5c6ae0b}.search-select-trigger:disabled{opacity:.45;cursor:default}.search-select-trigger>.icon{flex:none;color:var(--f-muted);width:17px;height:17px;transition:transform .16s ease}.search-select-trigger[aria-expanded=true]>.icon{transform:rotate(180deg)}
.search-select-panel{position:fixed;inset:auto;margin:0;padding:7px;box-sizing:border-box;overflow:hidden;z-index:1000;border:1px solid #ffffff22;border-radius:15px;background:#1b1e26;color:var(--f-text);font-family:inherit;box-shadow:0 18px 55px #0007,0 2px 7px #0004}.search-select-panel[hidden]{display:none}.search-select-options{position:relative;margin:0;scrollbar-width:thin;scrollbar-color:#6d6577 transparent}.search-select-options>button{display:flex;align-items:center;gap:18px;min-height:42px;padding:10px 12px;margin:0;border:0;color:var(--f-text);font:inherit;font-size:13px;line-height:1.4;cursor:pointer}.select-option-copy{display:block;min-width:0;flex:1}.select-option-copy>span{display:block}.select-option-copy small{display:block;margin-top:4px;color:var(--f-muted);font-size:11px;font-weight:400}.search-select-options>button>.icon{flex:none;width:16px;height:16px;opacity:0;color:var(--f-primary)}.search-select-options>button[aria-selected=true]>.icon{opacity:1}.search-select-options>button:hover,.search-select-options>button.highlighted{background:#b9b0ff15}.search-select-options>button[aria-selected=true]{color:var(--f-primary);background:#d5c6ae12}.search-select-options>button.highlighted{box-shadow:inset 0 0 0 1px #b9b0ff44}.search-select-search{margin-bottom:7px}.search-select-search input,dialog .search-select-search input{width:100%;min-width:0;padding:10px 0;border:0;border-radius:0;outline:none;background:transparent;color:var(--f-text);font:inherit;font-size:12px}.search-select-empty{margin:0;padding:12px 10px!important}
.image-format-row>.search-select{flex:1;min-width:0}.image-format-row .search-select-trigger{font-size:12px}.frame-preview>.image-format-picker{margin:0 0 20px}.frame-preview>.image-format-picker>label{font-size:12px;color:var(--f-muted)}.frame-preview .image-format-dimensions{font-size:12px}.frame-preview .image-format-row{gap:10px}.preview-controls>.search-select{width:160px}.preview-controls .search-select-trigger{min-height:40px}.frame-preview:has(.search-select.is-open){z-index:5}
@media(prefers-reduced-motion:reduce){.search-select-trigger,.search-select-trigger>.icon{transition:none}}
.workspace-form{grid-template-columns:minmax(0,1fr)}.workspace-form>*{min-width:0;max-width:100%}.image-format-picker,.image-format-row{min-width:0}.preview-controls>.search-select{flex:0 1 160px}.library-filters .library-filter{flex-shrink:0}
/* DEC-092: compact search, opened deliberately from the magnifier. */
.compact-search,.search-select-search.compact-search{display:flex;align-items:center;gap:0;width:max-content;max-width:100%;min-height:36px;margin:0 0 6px;padding:0;border:1px solid transparent;border-radius:11px;background:transparent;box-sizing:border-box}.compact-search[data-expanded=true]{width:100%;border-color:var(--f-control-line);background:var(--f-bg)}.compact-search:focus-within{border-color:var(--f-accent)}.compact-search .search-toggle{display:grid;place-items:center;flex:none;width:36px;height:36px;padding:8px;border:0;border-radius:10px;background:transparent;color:var(--f-muted);cursor:pointer}.compact-search .search-toggle:hover{color:var(--f-text);background:#b9b0ff13}.compact-search .search-toggle .icon{width:18px;height:18px}.compact-search input[type=search],dialog .compact-search input[type=search],.workspace-form .compact-search input[type=search]{flex:1;min-width:0;width:0;max-width:100%;height:36px;padding:7px 10px 7px 0;margin:0;border:0;border-radius:0;outline:none;background:transparent;box-shadow:none;color:var(--f-text);font:inherit;font-size:12px}.compact-search input[hidden]{display:none!important}.library-search.compact-search{margin:0;max-width:340px}.library-search.compact-search[data-expanded=false]{width:38px}.library-search.compact-search[data-expanded=true]{width:min(340px,100%)}.materials-page>.section-heading{flex-wrap:wrap;margin-bottom:20px}.library-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}.library-toolbar .button{flex:none}.space-menu .compact-search{margin:4px 6px 8px}.space-menu .compact-search[data-expanded=true]{width:calc(100% - 12px)}
/* A named set has local direction, kept separate from workspace settings. */
.set-settings{padding:0;margin:24px 0 30px;border-color:#ffffff12;background:linear-gradient(110deg,#b9b0ff06,transparent);overflow:hidden}.set-settings summary{display:flex;align-items:center;gap:12px;padding:16px 18px;list-style:none;color:var(--f-text)}.set-settings summary::-webkit-details-marker{display:none}.set-settings summary::marker{content:''}.set-settings-icon{display:grid;place-items:center;width:34px;height:34px;flex:none;border:1px solid #b9b0ff22;border-radius:10px;color:var(--f-accent);background:#b9b0ff0b}.set-settings-icon .icon{width:17px;height:17px}.set-settings summary>span:nth-child(2){min-width:0;flex:1}.set-settings summary strong{display:block;font-size:13px;font-weight:500}.set-settings summary small{display:block;margin-top:4px;font-size:11px;line-height:1.5;color:var(--f-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.set-settings summary>.icon{width:16px;height:16px;color:var(--f-muted);flex:none;transition:transform .18s ease}.set-settings[open] summary>.icon{transform:rotate(180deg)}.set-settings[open] summary{border-bottom:1px solid var(--f-line)}.set-settings .workspace-form{margin:0;max-width:none;padding:18px}.set-settings textarea,.set-addition textarea{min-height:80px}.set-style-hint{margin:0!important;line-height:1.65!important;font-size:11px!important}.set-materials-heading{margin:25px 0 16px}.set-materials-heading h2{font-size:19px;font-weight:500}.set-materials-heading h2 span{color:var(--f-muted);font-size:12px;margin-left:7px}.set-addition{padding:20px;margin-bottom:20px;border:1px solid #b9b0ff33;border-radius:18px;background:var(--f-surface)}.set-addition>.section-heading{margin:0 0 14px}.set-addition h3{font-size:17px;font-weight:500}.set-addition .workspace-form{margin-top:16px}.set-add-tabs{display:flex;gap:4px;flex-wrap:wrap}.set-add-tabs .button{font-size:12px;min-height:36px}.set-add-tabs .selected{background:#d5c6ae12;color:var(--f-primary);border-color:#d5c6ae44}.set-item-options{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.set-item-options>div{min-width:0}.set-item-options label{display:block;margin-bottom:8px;color:var(--f-muted);font-size:12px}.set-addition .optional{color:var(--f-muted);font-size:10px;margin-left:5px}
@media(max-width:640px){.library-toolbar{width:100%}.library-toolbar .compact-search[data-expanded=true]{flex:1}.set-materials-heading{gap:10px;flex-wrap:wrap}.set-item-options{grid-template-columns:minmax(0,1fr)}.set-addition{padding:16px}}
@media(prefers-reduced-motion:reduce){.set-settings summary>.icon{transition:none}}
.library-toolbar{flex:1}.library-search.compact-search[data-expanded=true]{width:340px;flex:0 1 340px}.compact-search input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.frame-export-controls{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 18px}.frame-export-controls .button{font-size:11px;min-height:34px;padding:7px 10px}.frame-background-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}.frame-background-option{min-width:0;text-align:left;border:1px solid var(--f-line);border-radius:12px;overflow:hidden;background:var(--f-bg)}.frame-background-option:hover{border-color:var(--f-accent)}.frame-background-option img{display:block;width:100%;height:140px;object-fit:cover}.frame-background-option span{display:block;padding:10px;font-size:11px;overflow-wrap:anywhere;color:var(--f-muted)}.frame-output-stage{margin:18px 0;display:flex;justify-content:center}.frame-output-stage img{display:block;max-width:100%;max-height:70dvh;border-radius:12px;object-fit:contain}#frame-output-dialog>.button{margin-top:0}
.frame-artboard{container-type:inline-size}.frame-artboard .frame-caption[data-fitted=true]{top:29%;max-height:52%}.frame-caption[data-fitted=true]>p{margin:0 0 1.2em}.frame-caption[data-fitted=true]>p:last-child{margin-bottom:0}
.wordmark .icon{width:36px;height:36px;color:var(--f-primary);filter:drop-shadow(0 3px 12px #d5c6ae20)}.agent-avatar{background:linear-gradient(140deg,#d5c6ae18,#b8a5de20);color:#ddd0ec;border:1px solid #d5c6ae18}.agent-avatar .icon{width:23px;height:23px}
.frame-preview .frame-image-create{width:100%;min-height:42px;justify-content:center;margin:0 0 14px}.frame-preview .frame-image-create[aria-busy=true]{opacity:1;color:var(--f-on-primary);cursor:progress}.frame-preview .frame-export-controls{margin:14px 0 0;justify-content:center}
.frame-preview .image-asset-preview{display:none}.frame-preview .image-asset{border:0;background:transparent;margin-top:10px}.frame-preview .image-asset-info{padding:10px 0 0}.frame-preview .image-asset-info>strong{font-size:11px;line-height:1.5}.frame-preview .image-asset-info>small,.frame-preview .image-asset-actions [data-action=edit-image]{display:none}.frame-preview .image-asset-actions{gap:5px}.frame-preview .image-asset-actions .button{min-height:32px;font-size:11px;padding:6px 8px}
.image-edit-choice{padding:16px;border:1px solid var(--line,#353941);border-radius:20px;margin:12px 0;background:var(--panel,#191d24)}
.image-edit-choice p{margin:8px 0 12px}.image-edit-choice>div:not(.message-label){display:grid;gap:8px}.image-edit-choice .button{white-space:normal;text-align:left;justify-content:flex-start;max-width:100%}
.image-edit-choice img{width:48px;height:54px;object-fit:cover;border-radius:8px;flex:none}.image-edit-choice small{display:block;color:var(--f-muted);margin-bottom:12px}.image-edit-choice .search-select{margin:12px 0}.image-edit-choice>button{margin-top:8px}
/* Video studio: one project, saved fragments and an independent export. */
.video-start h1{font-size:36px;margin:12px 0 18px}.video-start>p{color:var(--f-muted);max-width:620px;line-height:1.7}.video-start-drop{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;min-height:310px;padding:32px;margin:30px 0;border:1px dashed #d5c6ae55;border-radius:28px;background:radial-gradient(ellipse at top,#b9b0ff0c,transparent 75%),var(--f-surface)}.video-start-drop>.icon{width:42px;height:42px;color:var(--f-accent)}.video-start-drop strong{font-size:22px;font-weight:500}.video-start-drop span{color:var(--f-muted);font-size:12px;text-align:center}.video-start-details{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.video-start-details span{padding:9px 12px;border:1px solid var(--f-line);border-radius:12px;font-size:11px;color:var(--f-muted)}
.video-result-card{margin-top:24px;padding:20px;border-radius:22px;border:1px solid #b9b0ff33;background:var(--f-surface)}.video-result-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.video-result-heading .icon{color:var(--f-accent)}.video-result-heading strong{font-size:15px;font-weight:500}.video-result-heading>span{font-size:10px;color:var(--f-muted)}.video-result-card video{display:block;width:100%;max-height:500px;background:#08090c;border-radius:14px;margin-top:16px}.video-result-card p{color:var(--f-muted);font-size:12px;line-height:1.7;margin-top:12px}.video-result-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.video-progress{height:6px;background:#ffffff09;border-radius:5px;overflow:hidden;margin-top:15px}.video-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--f-accent),var(--f-primary));border-radius:5px;transition:width .4s ease}.video-result-card[aria-busy=true]{box-shadow:inset 0 1px #b9b0ff22}.video-result-card.in-chat{padding:14px;margin-top:12px}.video-result-card.in-chat video{max-height:220px}.video-result-card.in-chat .video-result-heading strong{font-size:12px}.video-result-card.in-chat .button{font-size:11px;padding:9px 11px}@media(prefers-reduced-motion:reduce){.video-progress i{transition:none}}
/* Direct timeline editing: canvas first, separate video/audio lanes. */
#canvas:has(.timeline-editor){padding:18px 22px;overflow:hidden}.timeline-editor{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(150px,1fr) auto;gap:14px;container-type:inline-size}.tl-header{display:flex;align-items:center;gap:12px;justify-content:space-between}.tl-header>div:first-child{min-width:90px;flex:1}.tl-header .eyebrow{font-size:8px;color:var(--f-muted);letter-spacing:.13em}.tl-title{display:block;background:none;border:0;color:var(--f-text);font:inherit;font-size:17px;font-weight:500;width:100%;padding:5px 0}.tl-header-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.tl-header-actions .button{font-size:11px;min-height:35px;padding:8px 12px;border-radius:11px}.tl-header-actions #save-status{font-size:9px;color:var(--f-muted);margin-right:3px}.tl-workspace{min-height:0;display:grid;grid-template-rows:auto minmax(80px,1fr) auto;gap:8px;position:relative;background:linear-gradient(150deg,#1a1c2300,#b9b0ff05);border:1px solid var(--f-line);border-radius:20px;padding:10px 14px}.tl-canvas-toolbar{display:flex;align-items:center;gap:5px;min-width:0}.tl-canvas-toolbar .button{font-size:10px;min-height:30px;padding:5px 8px}.tl-toolbar-spacer{flex:1;min-width:0}.tl-canvas-toolbar .search-select{width:auto;min-width:0;max-width:150px}.tl-canvas-toolbar .search-select-trigger{min-height:30px;padding:5px 9px;font-size:10px;background:#171a20;border-color:#ffffff16;border-radius:9px;gap:6px}.tl-canvas-toolbar .search-select-trigger .icon{width:12px;height:12px}.tl-stage{min-height:0;display:flex;justify-content:center;align-items:center;padding:8px;overflow:hidden;background:radial-gradient(ellipse at center,#23232e,#12151b 80%);border-radius:14px}.tl-screen{height:100%;max-height:100%;max-width:100%;position:relative;box-shadow:0 10px 40px #0006;background:#050609;overflow:hidden}.tl-screen video{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.tl-transport{display:flex;gap:9px;align-items:center;min-height:34px}.tl-history{display:flex;gap:2px}.tl-history .icon-button{width:26px;height:26px;font-size:20px;color:var(--f-muted)}.tl-playback{display:flex;align-items:center;gap:5px;flex:none}.tl-playback .icon{width:19px;height:19px}.tl-stop{border:1px solid #ffffff19;background:#ffffff05;width:31px;height:31px}.tl-stop:hover{border-color:#d5c6ae66;background:#d5c6ae12}.tl-play{display:grid;place-items:center;width:31px;height:31px;flex:none;background:var(--f-primary);color:#18191d;border-radius:50%;font-size:12px}.tl-transport output{font-size:10px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--f-text)}.tl-current-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:var(--f-muted)}.tl-resolution{font-size:9px;color:var(--f-muted);white-space:nowrap}.tl-timeline{border:1px solid var(--f-line);border-radius:16px;padding:8px 0 9px;background:#171a20;min-width:0}.tl-edit-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 10px 8px;position:relative;border-bottom:1px solid #ffffff0a}.tl-edit-tools .button{font-size:11px;padding:6px 9px;min-height:32px}.tl-edit-tools .button .icon{width:15px;height:15px}.tl-edit-tools>.icon-button{width:30px;height:30px}.tl-selection-name{font-size:9px;color:var(--f-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-zoom{display:flex;align-items:center;gap:2px;flex:none;border-left:1px solid #ffffff18;padding-left:10px}.tl-zoom .icon-button{height:30px;width:30px}.tl-zoom .icon{width:18px;height:18px}.tl-zoom [data-tl-zoom-label]{font-size:10px;color:var(--f-muted);width:34px;text-align:center;font-variant-numeric:tabular-nums}.tl-zoom-title{font-size:10px;color:var(--f-muted);margin-right:4px}.tl-volume{position:relative;font-size:11px;color:var(--f-text);flex:none;margin-left:auto}.tl-volume summary{display:flex;align-items:center;gap:7px;cursor:pointer;list-style:none;min-height:32px;padding:6px 9px;border:1px solid #d5c6ae40;background:#d5c6ae0a;border-radius:9px}.tl-volume summary::-webkit-details-marker{display:none}.tl-volume summary>.icon{width:16px;height:16px;color:var(--f-primary)}.tl-volume summary>.icon:last-child{width:12px;height:12px;color:var(--f-muted)}.tl-volume summary [data-tl-volume-value]{font-size:10px;color:var(--f-muted);font-variant-numeric:tabular-nums}.tl-volume summary:hover,.tl-volume[open] summary{border-color:#d5c6ae88;background:#d5c6ae14}.tl-volume summary:focus-visible{outline:2px solid var(--f-accent);outline-offset:2px}.tl-volume[open] summary>.icon:last-child{transform:rotate(180deg)}.tl-volume>div{position:absolute;right:0;bottom:calc(100% + 12px);width:220px;max-width:calc(100cqw - 24px);background:#22252d;padding:18px;border:1px solid #ffffff20;border-radius:14px;z-index:45;box-shadow:0 10px 30px #0005}.tl-volume label{display:flex;justify-content:space-between;gap:10px;color:var(--f-text);margin-bottom:14px}.tl-volume input{display:block;width:100%;margin:0;accent-color:var(--f-primary);height:20px;cursor:ew-resize}.tl-volume input:focus-visible{outline-offset:3px;border-radius:8px}.tl-volume .button{margin-top:7px}.tl-track-grid{display:grid;grid-template-columns:64px minmax(0,1fr)}.tl-track-labels{display:grid;grid-template-rows:40px 63px 43px var(--tl-text-height,34px);gap:7px;border-right:1px solid #ffffff0b;padding-right:3px}.tl-track-labels>button{display:flex;align-items:center;justify-content:center;gap:4px;flex-direction:column;background:transparent;color:var(--f-muted);font-size:9px}.tl-track-labels .icon{width:16px;height:16px}.tl-scroll{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#545163 #171a20;min-width:0}.tl-content{position:relative;min-width:100%;height:auto;padding-bottom:8px;user-select:none;touch-action:none}.tl-ruler{height:40px;margin-inline:12px;position:relative;cursor:crosshair;border-bottom:1px solid #ffffff09}.tl-ruler span{position:absolute;top:15px;font-size:8px;color:#8c8d9c;transform:translateX(3px);font-variant-numeric:tabular-nums;pointer-events:none}.tl-ruler span.tick-end{transform:translateX(-100%)}.tl-ruler span.tick-end::after{left:100%}.tl-ruler span::after{content:'';position:absolute;left:0;top:15px;height:6px;border-left:1px solid #ffffff22}.tl-video-lane,.tl-audio-lane{position:relative;margin:7px 12px 0;height:63px;background:repeating-linear-gradient(90deg,transparent 0 79px,#ffffff04 79px 80px);border-radius:4px}.tl-audio-lane{height:43px}.tl-clip{position:absolute;height:61px;min-width:2px;display:flex;overflow:hidden;border-radius:7px;border:1px solid #b9b0ff45;background:#292c3b;cursor:grab;outline:none}.tl-clip:active{cursor:grabbing}.tl-clip img{display:block;pointer-events:none;height:100%;width:50%;object-fit:cover;opacity:.65;flex:1;min-width:0}.tl-clip small{position:absolute;bottom:6px;left:9px;background:#0008;border-radius:4px;padding:2px 4px;color:white;font-size:8px}.tl-clip.selected,.tl-audio-block.selected{border:2px solid #c6b8f3;box-shadow:0 0 0 1px #c6b8f315}.tl-trim{position:absolute;z-index:4;top:0;bottom:0;width:8px;border:0;background:#c6b8f3;opacity:0;cursor:ew-resize;padding:0;touch-action:none}.tl-trim::after{content:'';position:absolute;left:3px;top:30%;bottom:30%;border-left:1px solid #303044}.tl-trim.in{left:0}.tl-trim.out{right:0}.selected>.tl-trim,.tl-clip:hover>.tl-trim,.tl-audio-block:hover>.tl-trim,.tl-trim:focus-visible{opacity:1}.tl-audio-block{position:absolute;height:41px;border:1px solid #b9b0ff44;border-radius:7px;overflow:hidden;background:#a98bdf20;cursor:grab}.tl-wave-window{position:absolute;inset:0;overflow:hidden;pointer-events:none}.tl-wave-window img{position:absolute;height:38px;max-width:none;opacity:.75;top:0}.tl-add-audio{display:flex;align-items:center;gap:7px;height:37px;min-width:0;max-width:100%;width:100%;border:1px dashed #b9b0ff33;border-radius:7px;padding:0 10px;background:none;color:var(--f-muted);font-size:10px;white-space:nowrap}.tl-add-audio>.icon{width:16px;height:16px}.tl-add-audio:hover{border-color:#b9b0ff88;color:var(--f-text);background:#b9b0ff08}.tl-playhead{position:absolute;top:0;bottom:8px;height:auto;width:12px;margin-left:-6px;border:0;background:none;z-index:8;padding:0;cursor:ew-resize;touch-action:none}.tl-playhead::before{content:'';position:absolute;width:10px;height:13px;left:1px;top:1px;background:#e1d2b9;clip-path:polygon(0 0,100% 0,100% 60%,50% 100%,0 60%)}.tl-playhead:focus-visible{outline:0}.tl-playhead:focus-visible::before{background:var(--f-accent);filter:drop-shadow(0 0 3px #b9b0ff99)}.tl-playhead i{display:block;position:absolute;top:40px;bottom:0;left:5px;width:1px;background:#e1d2b9;box-shadow:0 0 4px #0009}.tl-footer{display:flex;justify-content:space-between;gap:10px;padding:8px 12px 0 72px;font-size:8px;color:#858492}.tl-export-dialog{width:min(650px,calc(100vw - 32px));max-width:650px;max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border-radius:20px}.tl-export-dialog:focus{outline:0}.tl-export-dialog .dialog-header{position:sticky;top:-22px;z-index:1;background:var(--f-surface);padding:4px 0 12px}.tl-export-dialog .dialog-header h2{font-size:22px}.tl-export-dialog .video-result-card{margin-top:12px;padding:0 0 20px;border:0;border-radius:0;background:none}.tl-export-dialog .video-result-card+.video-result-card{padding-top:20px;border-top:1px solid var(--f-line)}.tl-export-dialog .video-result-card:last-child{padding-bottom:0}.tl-export-dialog .video-result-card video{max-height:max(120px,calc(100dvh - 260px));object-fit:contain;margin-top:12px}.tl-export-dialog .video-result-card p{margin-top:10px}.tl-export-dialog .video-result-actions{margin-top:12px}
@container(max-width:520px){.tl-header{align-items:start}.tl-header-actions{justify-content:end}.tl-header-actions #save-status{display:none}.tl-header-actions .button{font-size:10px;padding:7px 8px}.tl-canvas-toolbar{flex-wrap:wrap}.tl-canvas-toolbar .search-select{max-width:125px}.tl-current-name,.tl-resolution{display:none}.tl-selection-name{display:none}.tl-volume summary>.tl-volume-title,.tl-zoom-title{display:none}.tl-zoom{padding-left:7px}.tl-volume summary{gap:5px;padding:6px 7px}.tl-edit-tools{gap:4px}.tl-footer>span:last-child{display:none}.tl-footer{line-height:1.5;padding-left:12px}.tl-screen{max-width:100%}.tl-track-grid{grid-template-columns:45px minmax(0,1fr)}.tl-track-labels{font-size:8px}}
#canvas.video-drop-active{box-shadow:inset 0 0 0 2px var(--f-accent);background:#b9b0ff0b}
.material-preview:has(.material-video-mark){position:relative;padding:0;overflow:hidden}.material-preview>img{display:block;width:100%;height:100%;object-fit:cover}.material-video-mark{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;gap:6px;font-size:10px;color:white;border-radius:8px;background:#111a;padding:6px 9px}.material-video-mark .icon{width:14px;height:14px}
.tl-fullscreen{flex:none;width:27px;height:27px;font-size:21px;color:var(--f-muted)}
@container(max-width:520px){.tl-canvas-toolbar{flex-wrap:nowrap}.tl-canvas-toolbar>.button{font-size:0;gap:0;padding:5px 7px}.tl-canvas-toolbar>.button .icon{width:15px;height:15px}.tl-canvas-toolbar .search-select{max-width:125px}.tl-canvas-toolbar .search-select-trigger{font-size:9px;max-width:125px}.tl-footer{font-size:8px}}
@media(max-height:650px){#canvas:has(.timeline-editor){overflow-y:auto;padding:12px 16px}.timeline-editor{height:max(590px,calc(100dvh - 108px));min-height:590px;grid-template-rows:auto minmax(245px,1fr) auto;gap:10px}.tl-track-labels{grid-template-rows:36px 48px 32px var(--tl-text-height,34px);gap:5px}.tl-content{height:auto}.tl-ruler{height:36px}.tl-ruler span{top:13px}.tl-ruler span.tick-end{transform:translateX(-100%)}.tl-ruler span.tick-end::after{left:100%}.tl-ruler span::after{top:14px}.tl-video-lane{height:48px;margin-top:5px}.tl-clip{height:46px}.tl-audio-lane{height:32px;margin-top:5px}.tl-audio-block{height:30px}.tl-wave-window img{height:29px}.tl-playhead{height:auto}.tl-playhead i{top:36px}.tl-add-audio{height:30px}.tl-footer{padding-top:5px}.tl-header .eyebrow{font-size:7px}.tl-title{font-size:15px}.tl-timeline{padding-top:5px}}
.timeline-editor.preview-expanded{height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr)}.preview-expanded .tl-timeline{display:none}.tl-fullscreen[aria-pressed=true]{color:var(--f-primary);background:#d5c6ae16}

/* Text is the same server raster in the canvas and exported video. */
.tl-render-status{font-size:10px;color:var(--f-muted);white-space:nowrap}
.tl-track-grid{max-height:34dvh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#545163 transparent}
.tl-text-lane{height:var(--tl-text-height,34px);position:relative;margin:7px 12px 0}
.tl-text-block{position:absolute;display:flex;align-items:center;height:28px;min-width:3px;overflow:hidden;border-radius:6px;background:#d5c6ae1a;border:1px solid #d5c6ae44;cursor:grab;touch-action:none;color:var(--f-primary)}
.tl-text-block>span{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 10px;pointer-events:none}
.tl-text-block.selected{border:2px solid var(--f-primary)}
.tl-text-block .tl-trim{background:var(--f-primary)}
.tl-add-text{display:flex;align-items:center;gap:7px;width:100%;height:28px;padding:0 10px;text-align:left;border-radius:6px;border:1px dashed #d5c6ae33;background:none;color:var(--f-muted);font-size:10px}
.tl-add-text .icon{width:15px;height:15px}
.tl-add-text:hover{color:var(--f-primary);border-color:#d5c6ae88}
.video-text-object{position:absolute;cursor:move;touch-action:none;outline:0;line-height:0}
.video-text-object>img{display:block;width:100%;height:auto;pointer-events:none}
.video-text-object.selected{outline:1px solid #c6b8f3;outline-offset:2px}
.video-text-object:focus-visible{outline:2px solid var(--f-accent);outline-offset:2px}
.tl-text-resize{display:none;position:absolute;right:0;bottom:0;width:14px;height:14px;border:2px solid #171a20;border-radius:3px;background:#d5c6ae;cursor:nwse-resize;touch-action:none}
.selected>.tl-text-resize{display:block}
.tl-text-loading{display:grid;place-items:center;width:100%;height:100%;min-height:24px;border:1px dashed #d5c6ae66;border-radius:6px;background:#14171bcc;color:var(--f-primary);font-size:10px;line-height:1.5}
.tl-text-inspector{position:absolute;right:14px;top:50px;z-index:30;width:min(310px,calc(100% - 28px));max-height:calc(100% - 66px);overflow:auto;padding:14px;border:1px solid #d5c6ae44;border-radius:14px;background:#20232bf5;box-shadow:0 14px 40px #0008;scrollbar-width:thin}
.tl-text-inspector>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px;font-size:12px}
.tl-text-inspector .icon-button{width:26px;height:26px}
.tl-text-inspector textarea{display:block;width:100%;min-height:68px;padding:9px;border:1px solid var(--f-control-line);border-radius:8px;background:var(--f-bg);font:inherit;font-size:12px;line-height:1.5;resize:vertical}
.tl-text-size{display:flex;align-items:center;gap:8px;font-size:10px;margin:13px 0}
.tl-text-size input{min-width:0;width:100%;accent-color:var(--f-primary)}
.tl-text-size output{white-space:nowrap;font-size:10px;color:var(--f-muted)}
.tl-text-inspector small{display:block;margin-top:12px;font-size:9px;line-height:1.6;color:var(--f-muted)}
.tl-text-inspector [data-text-error]{font-size:10px;line-height:1.5;margin-top:10px;color:#edc7b6}
@container(max-width:520px){.tl-render-status{font-size:9px}.tl-header-actions{max-width:52%}.tl-text-inspector{right:9px;top:43px;width:calc(100% - 18px)}.tl-track-grid{max-height:230px}}
@media(max-height:650px){.tl-text-lane{margin-top:5px}.tl-track-grid{max-height:200px}}

/* Playback controls share one size and SVG geometry. */
.tl-transport{gap:8px;min-height:38px;line-height:1}
.tl-history{gap:3px;margin-right:2px;padding-right:9px;border-right:1px solid #ffffff16}
.tl-history .icon-button,.tl-play,.tl-stop,.tl-fullscreen{display:grid;place-items:center;width:34px;height:34px;min-width:34px;padding:7px;border-radius:9px;font-size:inherit;line-height:1}
.tl-transport .icon{width:19px;height:19px}
.tl-play{border:1px solid var(--f-primary)}
.tl-fullscreen{border:1px solid #ffffff1b;background:#ffffff03}
.tl-transport button:focus-visible{outline:2px solid var(--f-accent);outline-offset:-2px}
.tl-transport output{line-height:1.4}
.tl-canvas-toolbar .search-select:last-child{max-width:185px}
.video-result-heading>div{min-width:0;flex:1}
.video-result-heading h3{font-size:16px;line-height:1.4;letter-spacing:-.01em;overflow-wrap:anywhere;margin:0 0 3px}
.video-result-heading>div>span{font-size:11px;color:var(--f-muted)}
.video-result-card .video-result-meta{margin-top:7px;font-size:10px;color:var(--f-muted)}
.video-result-card.in-chat .video-result-heading h3{font-size:12px}
.tl-export-help{font-size:11px!important;line-height:1.6!important;margin:5px 0 12px!important}
.tl-export-search{display:flex;justify-content:flex-end;margin-bottom:10px}
.tl-export-search .compact-search{margin:0}
.tl-exports-empty{font-size:12px;color:var(--f-muted);padding:20px 0}
.tl-color-field{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;font-size:11px}
.tl-color-field>div{display:flex;gap:7px;align-items:center}
.tl-color-field input[type=color]{width:30px;height:28px;padding:2px;border:1px solid var(--f-control-line);border-radius:7px;background:var(--f-bg);cursor:pointer}
.tl-color-field input[type=text]{width:78px;min-width:0;border:1px solid var(--f-control-line);border-radius:7px;background:var(--f-bg);padding:5px 7px;font-size:10px;letter-spacing:.02em}
.tl-color-field input[aria-invalid=true]{border-color:#e6a68f}
.tl-background-toggle{display:flex;gap:7px;align-items:center;padding-top:8px;border-top:1px solid #ffffff10;font-size:11px}
.tl-background-toggle input{accent-color:var(--f-primary)}
.tl-text-inspector [data-text-retry]{font-size:10px;margin-top:8px;min-height:30px}
@container(max-width:520px){.tl-transport{gap:5px}.tl-history{gap:0;padding-right:4px;margin-right:0}.tl-history .icon-button,.tl-play,.tl-stop,.tl-fullscreen{width:30px;height:30px;min-width:30px;padding:6px}.tl-transport .icon{width:17px;height:17px}.tl-canvas-toolbar .search-select:last-child{max-width:150px}.tl-header{flex-wrap:wrap}.tl-header-actions{max-width:none}.tl-render-status{font-size:9px}}

.video-result-card video{height:auto;object-fit:contain}
.video-result-preview{margin-top:12px}
.video-result-preview summary{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:6px 10px;border:1px solid var(--f-control-line);border-radius:9px;background:#ffffff03;color:var(--f-text);font-size:11px;cursor:pointer;list-style:none}
.video-result-preview summary::-webkit-details-marker{display:none}
.video-result-preview summary>.icon{width:15px;height:15px}
.video-result-preview summary:focus-visible{outline:2px solid var(--f-accent);outline-offset:2px}
.tl-export-dialog .video-result-card video{max-height:max(100px,min(280px,calc(100dvh - 380px)))}
/* Video clarity: distinguish edit handles, framing and the current save from history. */
.tl-header #save-status{display:block;font-size:10px;color:var(--f-muted);line-height:1.4}
.tl-header-actions{flex-wrap:nowrap;flex:none}
.tl-screen{overflow:visible}
.tl-screen video{overflow:hidden}
.tl-text-resize{right:-7px;bottom:-7px;width:20px;height:20px;padding:3px;border:1px solid #ddd3ff;border-radius:50%;background:#302b45;color:#fff;box-shadow:0 2px 6px #0007;align-items:center;justify-content:center}
.selected>.tl-text-resize{display:flex}
.tl-text-resize .icon{width:13px;height:13px;stroke-width:1.8}
.tl-text-resize:hover{background:#51466f}
.tl-text-resize:focus-visible{outline-offset:2px}
.tl-current-name{font-size:10px}
.tl-framing-trigger{white-space:nowrap;flex:none}
.tl-framing-trigger .icon{width:15px;height:15px}
.tl-framing-dialog,.tl-save-dialog{width:min(600px,calc(100vw - 32px));max-width:600px;max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border-radius:24px}
.tl-framing-dialog:focus,.tl-save-dialog:focus{outline:none}
.tl-framing-dialog .dialog-header,.tl-save-dialog .dialog-header{gap:18px;align-items:center;margin-bottom:12px}
.tl-framing-dialog h2,.tl-save-dialog h2{font-size:24px}
.tl-dialog-help{font-size:12px;line-height:1.6;color:var(--f-muted);margin:8px 0 18px}
.tl-framing-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tl-framing-choice{position:relative;display:flex;flex-direction:column;gap:11px;padding:12px;border:1px solid var(--f-line);border-radius:16px;background:#ffffff03;cursor:pointer}
.tl-framing-choice:has(input:checked){border-color:#b9b0ff;background:#b9b0ff0b;box-shadow:0 0 0 1px #b9b0ff}
.tl-framing-choice:has(input:focus-visible){outline:2px solid var(--f-accent);outline-offset:4px}
.tl-framing-choice input{position:absolute;width:1px;height:1px;opacity:0}
.tl-framing-example{display:block;position:relative;max-height:210px;width:100%;border-radius:9px;background:repeating-linear-gradient(135deg,#242731 0 8px,#20232a 8px 16px);overflow:hidden}
.tl-framing-example img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.tl-framing-example[data-fit=cover] img{object-fit:cover}
.tl-framing-example>span{display:grid;place-items:center;height:100%;padding:16px;text-align:center;font-size:11px;color:var(--f-muted)}
.tl-framing-choice-title{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;font-weight:550}
.tl-framing-choice-title .icon{visibility:hidden;width:18px;height:18px;color:var(--f-primary)}
.tl-framing-choice:has(input:checked) .tl-framing-choice-title .icon{visibility:visible}
.tl-framing-choice small{font-size:11px;line-height:1.55;color:var(--f-muted)}
.tl-framing-note{font-size:11px;line-height:1.6;padding:10px 12px;border-radius:10px;background:#b9b0ff0a;color:var(--f-muted);margin-top:14px}
.tl-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:20px;flex-wrap:wrap}
.tl-dialog-actions .button,.tl-save-download .button{min-height:40px;padding:10px 15px;font-size:12px;border-radius:12px}
.tl-save-summary{display:flex;flex-direction:column;gap:5px;padding:0 0 18px;margin-bottom:18px;border-bottom:1px solid var(--f-line)}
.tl-save-summary strong{font-size:15px;font-weight:500;line-height:1.45;overflow-wrap:anywhere}
.tl-save-summary>span{font-size:11px;color:var(--f-muted)}
.tl-save-state{min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;padding:18px 12px}
.tl-save-state h3{font-size:18px;letter-spacing:-.02em}
.tl-save-state p{font-size:12px;color:var(--f-muted);line-height:1.6;max-width:360px}
.tl-save-state .video-progress{width:min(260px,100%);margin-top:5px}
.tl-save-spinner{width:28px;height:28px;border:2px solid #d5c6ae22;border-top-color:var(--f-primary);border-radius:50%;animation:video-save-spin 1s linear infinite}
@keyframes video-save-spin{to{transform:rotate(360deg)}}
.tl-saved-player{display:flex;justify-content:center;background:#080a0e;border-radius:14px;overflow:hidden}
.tl-saved-player video{display:block;max-height:min(42dvh,360px);width:100%;height:auto;object-fit:contain}
.tl-save-ready{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px;color:var(--f-muted);margin-top:12px}
.tl-save-ready .icon{width:15px;height:15px;color:var(--f-primary)}
.tl-save-download{display:flex;justify-content:center;gap:10px;margin-top:20px;flex-wrap:wrap}
.tl-save-library{display:flex;margin:12px auto 0;font-size:11px;color:var(--f-muted)}
.tl-save-library .icon{width:14px;height:14px;transform:rotate(-90deg)}
@container(max-width:520px){.tl-header{display:grid;grid-template-columns:minmax(0,1fr)}.tl-header-actions{justify-content:flex-start}.tl-header-actions .button{min-height:34px}.tl-header #save-status{display:block}.tl-canvas-toolbar{flex-wrap:wrap}.tl-canvas-toolbar .tl-toolbar-spacer{display:none}.tl-framing-trigger{margin-left:auto}.tl-current-name{display:none}}
@media(max-width:480px){.tl-framing-dialog,.tl-save-dialog{padding:18px}.tl-framing-dialog h2,.tl-save-dialog h2{font-size:21px}.tl-framing-choice{padding:9px;gap:8px}.tl-framing-choice-title{font-size:12px}.tl-framing-example{max-height:170px}.tl-framing-choice small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.tl-save-spinner{animation:none;border-color:var(--f-primary)}}
.tl-header .eyebrow{display:block;margin:0;line-height:1.3}
.tl-header .tl-title{padding:4px 0;line-height:1.35}
.tl-track-grid{max-height:clamp(140px,24dvh,205px)}
.tl-framing-example{--preview-height:210px;align-self:center;width:min(100%,calc(var(--preview-height) * var(--frame-ratio)));max-height:none;background:#080a0e}
@media(max-width:480px){.tl-framing-example{--preview-height:170px;max-height:none}}
/* Keep the canvas usable when the agent and several text tracks are open. */
.tl-track-labels{grid-template-rows:32px 44px 30px var(--tl-text-height,34px);gap:5px}
.tl-ruler{height:32px}
.tl-ruler span{top:10px}
.tl-video-lane{height:44px;margin-top:5px}
.tl-audio-lane{height:30px;margin-top:5px}
.tl-text-lane{margin-top:5px}
@container(max-width:520px){.tl-header{display:flex;flex-wrap:nowrap}.tl-header-actions{justify-content:flex-end}.tl-canvas-toolbar .tl-framing-trigger{font-size:10px;gap:5px}}
@container(max-width:400px){.tl-header{display:grid;grid-template-columns:minmax(0,1fr)}.tl-header-actions{justify-content:flex-start}}
.tl-clip{height:42px}
.tl-audio-block{height:28px}
.tl-wave-window img{height:27px}
.tl-add-audio{height:28px}
.tl-playhead i{top:32px}
.tl-ruler span::after{top:14px}
@media(max-height:600px){
 .tl-framing-dialog,.tl-save-dialog{padding:18px}
 .tl-framing-dialog h2,.tl-save-dialog h2{font-size:21px}
 .tl-framing-example{--preview-height:130px}
 .tl-dialog-help{font-size:11px;margin:6px 0 12px}
 .tl-framing-choice{gap:8px;padding:10px}
 .tl-framing-note{margin-top:10px;padding:7px 10px}
 .tl-dialog-actions{margin-top:14px}
 .tl-save-summary{padding-bottom:12px;margin-bottom:12px;gap:3px}
 .tl-saved-player video{max-height:max(100px,calc(100dvh - 320px))}
 .tl-save-download{margin-top:12px}
 .tl-save-library{margin-top:6px;min-height:26px;padding:4px 8px}
 .tl-save-state{min-height:125px;padding:12px}
}
.tl-saved-player{background:transparent;overflow:visible}
.tl-saved-player video{width:auto;max-width:100%;border-radius:12px;background:#080a0e}
.tl-saved-player video:focus-visible{outline:2px solid var(--f-accent);outline-offset:2px}
/* Format labels must not reflow the video toolbar. */
.tl-canvas-toolbar{display:grid;grid-template-columns:repeat(3,max-content) minmax(0,1fr) 120px;gap:5px;align-items:center}
.tl-canvas-toolbar .tl-toolbar-spacer{display:none}
.tl-canvas-toolbar .search-select{justify-self:end;width:100%;min-width:0;max-width:150px}
.tl-canvas-toolbar .search-select-trigger{width:100%;min-width:0;max-width:none;height:32px}
.tl-canvas-toolbar .tl-framing-trigger{width:120px;min-width:0;height:32px;margin-left:0;justify-content:center;font-size:10px;gap:5px}
.tl-canvas-toolbar>.button{height:32px}
@container(max-width:340px){
 .tl-canvas-toolbar{grid-template-columns:repeat(6,minmax(0,1fr));row-gap:7px}
 .tl-canvas-toolbar>.button:not(.tl-framing-trigger){grid-column:span 2}
 .tl-canvas-toolbar .search-select{grid-column:1 / span 3;grid-row:2;max-width:none}
 .tl-canvas-toolbar .tl-framing-trigger{grid-column:4 / span 3;grid-row:2;width:100%}
}
/* Transitions are selected at UUID clip joins, not added as unrelated layers. */
.tl-join{position:absolute;top:10px;z-index:12;transform:translateX(-50%);width:28px;height:24px;padding:4px;border:1px solid #a49fae;border-radius:7px;background:#252730;color:#d7d1e2;box-shadow:0 2px 5px #0007}
.tl-join .icon{width:16px;height:16px}
.tl-join:hover,.tl-join:focus-visible{background:#40394f;border-color:var(--f-accent)}
.tl-join.has-transition{background:#d5c6ae;color:#17191d;border-color:#eee0c9}
.tl-buffering{position:absolute;bottom:58px;left:50%;transform:translateX(-50%);z-index:25;font-size:10px;padding:5px 10px;border-radius:20px;background:#151820e8;color:#e5decf;pointer-events:none}
.tl-transition-dialog{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:22px;border-radius:22px}
.tl-transition-dialog:focus{outline:none}
.tl-transition-dialog h2{font-size:23px}
.tl-transition-dialog .dialog-header{margin-bottom:18px;gap:12px}
.tl-join-label{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--f-muted);margin-bottom:18px}
.tl-join-label .search-select{flex:1;min-width:0}
.tl-transition-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tl-transition-choices>label{position:relative;display:flex;align-items:center;flex-direction:column;gap:10px;cursor:pointer;padding:13px 7px;border:1px solid var(--f-line);border-radius:13px;background:#ffffff03}
.tl-transition-choices input{position:absolute;width:1px;height:1px;opacity:0}
.tl-transition-choices strong{font-size:12px;font-weight:500;white-space:nowrap}
.tl-transition-choices>label:has(input:checked){border-color:var(--f-accent);box-shadow:0 0 0 1px var(--f-accent);background:#b9b0ff0a}
.tl-transition-choices>label:has(input:focus-visible){outline:2px solid var(--f-accent);outline-offset:3px}
.tl-transition-choices>label>.icon{position:absolute;right:6px;top:6px;width:13px;height:13px;visibility:hidden}
.tl-transition-choices>label:has(input:checked)>.icon{visibility:visible}
.tl-transition-symbol{display:flex;width:64px;height:34px;border-radius:6px;overflow:hidden;background:#090b10}
.tl-transition-symbol i,.tl-transition-symbol b{display:block;width:50%;height:100%;background:#d5c6ae}
.tl-transition-symbol b{background:#afa0dd}
.tl-transition-symbol[data-kind=dissolve]{background:linear-gradient(90deg,#d5c6ae,#b7abc8,#afa0dd)}
.tl-transition-symbol[data-kind=dissolve]>*{visibility:hidden}
.tl-transition-symbol[data-kind=fade-black]{background:linear-gradient(90deg,#d5c6ae,#090b10 50%,#afa0dd)}
.tl-transition-symbol[data-kind=fade-black]>*{visibility:hidden}
.tl-transition-duration{display:flex;align-items:center;gap:12px;margin:22px 0 16px;font-size:12px}
.tl-transition-duration input{flex:1;min-width:30px;accent-color:var(--f-primary)}
.tl-transition-duration output{width:42px;text-align:right;font-variant-numeric:tabular-nums}
.tl-transition-all{display:flex;gap:9px;align-items:center;font-size:12px;color:var(--f-text)}
.tl-transition-all input{width:16px;height:16px;accent-color:var(--f-primary)}
.tl-transition-impact{font-size:13px;color:var(--f-primary);margin-top:18px}
.tl-transition-error{font-size:12px;color:#efbeac;line-height:1.5}
@container(max-width:520px){.tl-edit-tools [data-tl-transitions]{font-size:0;padding:6px}.tl-edit-tools [data-tl-transitions] .icon{width:17px;height:17px}}
@media(max-height:600px){.tl-transition-dialog{padding:17px}.tl-transition-dialog h2{font-size:20px}.tl-transition-dialog .dialog-header{margin-bottom:12px}.tl-join-label{margin-bottom:12px}.tl-transition-choices>label{padding:10px 5px;gap:7px}.tl-transition-duration{margin:15px 0 12px}.tl-transition-impact{margin-top:12px}}
.tl-join.selected-join{outline:2px solid var(--f-accent);outline-offset:2px}

/* Speech stays a separate, editable version of the publication. */
.speech-editor{max-width:1000px}.speech-editor h1{font-size:clamp(25px,3vw,38px)}.speech-editor textarea{width:100%;line-height:1.65;resize:vertical;min-height:120px}.speech-script-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 10px}.speech-script-head label{margin:0}.speech-settings{display:grid;grid-template-columns:minmax(140px,1fr) minmax(140px,1fr);gap:20px;margin:20px 0}.speech-settings label{min-width:0}.speech-settings output{float:right;color:var(--f-primary)}.speech-settings input[type=range]{width:100%;margin-top:18px}.speech-dictionary,.speech-source{border-top:1px solid var(--f-line);padding:18px 0}.speech-dictionary summary,.speech-source summary{cursor:pointer;color:var(--f-text)}.speech-dictionary summary span{color:var(--f-primary);margin-left:10px}.speech-source p{white-space:pre-wrap;color:var(--f-muted);line-height:1.6}.speech-launch{margin:22px 0}.speech-review{display:flex;align-items:center;gap:10px;font-size:13px;margin-bottom:14px}.speech-review input{width:18px;height:18px;accent-color:var(--f-primary)}.speech-launch .button.primary{min-width:200px}.speech-launch [data-speech-warnings] p,.speech-notes{font-size:12px;color:var(--f-muted)}.speech-error{color:#e9bba8;font-size:13px;line-height:1.5}.speech-result{padding:18px;border:1px solid var(--f-line);border-radius:18px;margin:14px 0;background:#ffffff03}.speech-result>div:first-child{display:flex;flex-direction:column;gap:6px}.speech-result span{font-size:12px;color:var(--f-muted)}.speech-result audio{display:block;width:100%;margin:16px 0}.speech-wave{height:45px;display:flex;align-items:center;gap:5px}.speech-wave i{height:16px;width:4px;background:var(--f-primary);border-radius:4px;animation:speech-pulse 1.4s ease-in-out infinite alternate}.speech-wave i:nth-child(2n){animation-delay:-.7s}.speech-wave i:nth-child(3n){animation-delay:-.3s}@keyframes speech-pulse{to{transform:scaleY(2.1);opacity:.4}}@media(prefers-reduced-motion:reduce){.speech-wave i{animation:none}}@media(max-width:700px){.speech-settings{grid-template-columns:1fr}.speech-script-head{align-items:flex-start;flex-wrap:wrap}}
.tl-narration-lane{height:30px;position:relative;margin:5px 12px 0;background:repeating-linear-gradient(90deg,transparent 0 79px,#ffffff04 79px 80px);border-radius:4px}.has-narration .tl-track-labels{grid-template-rows:32px 44px 30px 30px var(--tl-text-height,34px)}.tl-narration-lane .tl-audio-block{background:#d5c6ae20;border-color:#d5c6ae60}.speech-video-choice .search-select{width:100%}
/* Clip sound is visible separately; the link preserves sync on trim/reorder. */
.tl-source-sound-lane{height:30px;position:relative;margin:5px 12px 0;background:#ffffff02;border-radius:4px}.tl-source-sound{height:30px;position:absolute;top:0;border:1px solid #8fabc555;border-radius:6px;background:#7298b61a;overflow:hidden;padding:0}.tl-source-sound.selected{border-color:#d5c6ae;box-shadow:inset 0 0 0 1px #d5c6ae}.tl-source-sound .tl-wave-window{display:block;position:absolute;inset:0;overflow:hidden}.tl-source-sound img{position:absolute;top:0;height:100%;max-width:none}.tl-no-source-sound{font-size:10px;color:var(--f-muted);display:block;padding:6px 9px}.tl-track-labels{grid-template-rows:32px 44px 30px 30px var(--tl-text-height,34px)}.has-narration .tl-track-labels{grid-template-rows:32px 44px 30px 30px 30px var(--tl-text-height,34px)}
.speech-editor #speech-script{border:1px solid var(--f-line);border-radius:16px;background:#181b23;color:var(--f-text);padding:18px;font:inherit;font-size:15px;line-height:1.7;outline:none}.speech-editor #speech-script:focus{border-color:#b9b0ff}.speech-voice-choice{width:100%;display:flex;align-items:center;gap:9px;background:#1c1e27;border:1px solid var(--f-line);border-radius:12px;color:var(--f-text);padding:12px;text-align:left;margin-top:7px}.speech-voice-choice>span{font-weight:600}.speech-voice-choice>small{flex:1;text-align:right;color:var(--f-muted);font-size:10px}.speech-dictionary{padding:0;border:1px solid var(--f-line);border-radius:16px;overflow:hidden;background:#ffffff02}.speech-dict-trigger{width:100%;display:flex;gap:10px;align-items:center;text-align:left;padding:16px;background:none;color:var(--f-text);font:inherit;font-size:14px}.speech-dict-trigger>span{flex:1}.speech-dict-trigger b{font-size:11px;font-weight:500;min-width:23px;line-height:23px;text-align:center;background:#b9b0ff18;border-radius:7px;color:var(--f-primary)}.speech-dict-trigger[aria-expanded=true]>.icon:last-child{transform:rotate(180deg)}#speech-pronunciation-panel{padding:0 16px 14px}#speech-pronunciation-panel>.form-note{font-size:11px;margin:0 0 14px}.speech-pronunciation-rows{display:grid;gap:9px}.speech-pronunciation-row{display:grid;grid-template-columns:minmax(0,1fr) 15px minmax(0,1.3fr) 28px;align-items:center;gap:8px;padding:10px;border:1px solid #ffffff0b;border-radius:12px;background:#181b23}.speech-pronunciation-row label{margin:0;min-width:0}.speech-pronunciation-row input{box-sizing:border-box;width:100%;min-width:0;background:#101319;border:1px solid #ffffff10;border-radius:9px;padding:9px 10px;color:var(--f-text);font:inherit;font-size:13px;outline:none}.speech-pronunciation-row input:focus{border-color:#b9b0ff}.speech-pron-arrow{color:var(--f-muted)}.speech-pronunciation-row>.icon-button{width:28px;height:28px;color:var(--f-muted)}.speech-stress-tools{grid-column:3/5;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.speech-stress-tools>button{background:transparent;color:var(--f-primary);font-size:15px;display:flex;align-items:center;gap:5px;padding:2px}.speech-stress-tools>button span{font-size:10px}.speech-stress-letters{display:flex;align-items:center;gap:2px;flex-wrap:wrap}.speech-stress-letters[hidden]{display:none}.speech-stress-letters>button{background:#b9b0ff22;border:1px solid #b9b0ff35;border-radius:5px;color:var(--f-text);font-size:13px;min-width:22px;height:26px}.speech-stress-letters>span{font-size:12px;color:var(--f-muted)}.speech-pron-add{font-size:12px;margin-top:10px}.speech-voice-dialog{width:min(600px,calc(100vw - 32px));max-height:85dvh}.speech-voice-dialog .dialog-header h2{font-size:24px}.speech-voice-list{display:grid;grid-template-columns:1fr 1fr;gap:9px;max-height:45dvh;overflow:auto;padding:8px 1px}.speech-voice-card{display:flex;align-items:center;gap:9px;border:1px solid var(--f-line);border-radius:13px;padding:11px;min-width:0;background:#ffffff02}.speech-voice-card.selected{border-color:#b9b0ff80;background:#b9b0ff09}.speech-voice-card strong{font-size:13px;flex:1;min-width:0}.speech-voice-card .button{font-size:10px;min-height:28px;padding:5px 8px;border-radius:8px}.speech-voice-play{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#d5c6ae18;color:var(--f-primary);flex:none}.speech-voice-play .icon{width:14px;height:14px}.speech-audition{padding-top:13px;border-top:1px solid var(--f-line);margin-top:10px}.speech-audition strong{font-size:12px}.speech-audition audio{display:block;width:100%;height:36px;margin-top:8px}@media(max-width:600px){.speech-voice-list{grid-template-columns:1fr}.speech-pronunciation-row{gap:5px;padding:8px}.speech-pronunciation-row input{font-size:12px;padding:8px}.speech-settings{gap:14px}}
.tl-source-sound.muted{opacity:.35}.tl-source-sound.muted:after{content:'Без звука';position:absolute;left:7px;top:7px;font-size:9px;background:#101319;color:#faf8f4;padding:1px 4px;border-radius:4px;white-space:nowrap;pointer-events:none}
.speech-delivery{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:-4px 0 22px}.speech-delivery>span{font-size:12px;color:var(--f-muted);margin-right:8px}.speech-delivery>button{padding:8px 11px;border-radius:9px;border:1px solid var(--f-line);background:transparent;color:var(--f-muted);font-size:12px}.speech-delivery>button[aria-pressed=true]{border-color:#d5c6ae88;background:#d5c6ae16;color:var(--f-primary)}
.speech-sample-language{display:block;font-size:9px;font-weight:400;color:var(--f-muted);margin-top:4px}
.speech-sample-languages{display:flex;gap:7px;margin:14px 0}.speech-sample-languages button{padding:8px 14px;background:transparent;color:var(--f-muted);border:1px solid var(--f-line);border-radius:10px;font-size:13px}.speech-sample-languages button[aria-pressed=true]{color:var(--f-primary);border-color:#d5c6ae88;background:#d5c6ae15}
/* One image option and its price are selected before dispatch. */
.image-mode-picker{min-width:0;margin:0;padding:0;border:0}
.image-mode-picker legend{padding:0;margin-bottom:8px;font-weight:550}
.image-mode-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr));gap:8px}
.image-mode-option{display:flex!important;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--f-control-line);border-radius:10px;cursor:pointer}
.image-mode-option:has(:checked){border-color:var(--f-accent);background:var(--f-raised)}
.workspace-form .image-mode-option input[type=radio]{flex:0 0 16px;width:16px;height:16px;margin:0;padding:0;accent-color:var(--f-accent)}
.image-mode-option small{display:block;color:var(--f-muted)}

.image-edit-dialog .workspace-form textarea{min-height:105px}
.image-edit-dialog .image-format-picker,#image-frame-dialog .image-format-picker{margin:4px 0 0}

.generation-editor{margin:18px 0;max-width:720px}
.generation-editor .editor-top h2{font-size:21px;margin:0}
.generation-editor .workspace-form{padding:18px;max-width:none}
.generation-editor textarea{width:100%;min-height:110px;resize:vertical}
.generation-parameters,.generation-actions,.generation-entry{display:flex;gap:12px;flex-wrap:wrap;align-items:end}
.generation-parameters label{display:grid;gap:6px;min-width:128px;max-width:100%;flex:1}
.generation-entry{margin:20px 0}
.generation-source{display:flex;gap:12px;align-items:center;font-size:13px;color:var(--f-muted)}
.generation-source img{width:64px;height:48px;object-fit:cover;border-radius:8px}
.generated-media-player{display:block;width:100%;max-height:430px;margin-top:10px}
.generated-material>label{margin:0 0 8px}
.generated-material .generated-material-title{display:block;width:100%;max-width:720px;min-height:46px;box-sizing:border-box;padding:10px 15px;border:1px solid var(--f-line);border-radius:12px;background:var(--f-surface);color:var(--f-text);font:inherit}
.generation-editor>.editor-top:empty{display:none}
.generation-editor>.editor-top{margin-bottom:14px}
.generation-settings>summary{display:none}
.generation-settings.has-generation-result>summary{display:flex;align-items:center;gap:9px;width:fit-content;max-width:100%;list-style:none;cursor:pointer;border:1px solid var(--f-line);border-radius:10px;padding:8px 12px;color:var(--f-muted);font-size:13px;margin:10px 0}
.generation-settings>summary::-webkit-details-marker{display:none}
.generation-settings>summary .icon{width:15px;height:15px;flex:none}
.generation-settings[open]>summary .icon{transform:rotate(180deg)}
.generation-settings .workspace-form{margin-top:0}
.generation-result[hidden]{display:none}
.generation-result .image-task{margin:0;max-width:none}
.generation-result .image-task-actions a[download]{background:var(--f-primary);color:var(--f-bg);padding-inline:14px}
.creation-motion{position:relative;display:grid;place-items:center;isolation:isolate;overflow:hidden;height:clamp(86px,15vw,148px);background:radial-gradient(ellipse at 46% 130%,#2c2147 0%,#191724 55%,#13131b 85%);pointer-events:none}
.creation-motion>b{position:absolute;inset:-48%;z-index:-1;display:block;background:radial-gradient(ellipse at 40% 43%,#8761db90,transparent 34%),radial-gradient(ellipse at 62% 56%,#d3b0f075,transparent 31%),radial-gradient(ellipse at 42% 68%,#e8bb855e,transparent 33%);transform:rotate(-12deg);animation:creation-light 8s ease-in-out infinite alternate}
.creation-motion>span{position:absolute;inset:8% 0;z-index:-1;background:linear-gradient(95deg,transparent 20%,#d5bcff12 40%,#f0dcff29 50%,#d5bcff12 60%,transparent 80%);mask-image:linear-gradient(transparent,#000 28%,#000 72%,transparent);animation:creation-sweep 5s ease-in-out infinite alternate}
.creation-motion>svg{display:block;width:min(64%,260px);height:80%;overflow:visible;stroke:#e7d8ff;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;opacity:.92;filter:drop-shadow(0 0 7px #c2a7ffb0)}
.creation-motion svg>path{animation:creation-trace 2.4s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:left center}
.creation-motion svg>path:nth-child(2){animation-delay:-.55s}
.creation-motion svg>path:nth-child(3){animation-delay:-1.1s}
.creation-motion svg>path:nth-child(4){animation-delay:-1.65s}
.creation-motion--audio>svg{width:min(76%,320px)}
.creation-motion--audio line{transform-origin:50% 50%;animation:creation-wave 1.45s var(--phase) ease-in-out infinite alternate}
.creation-motion--audio line:nth-child(4n){stroke:#ebd5ad}
.creation-motion--video>svg{stroke:#e1d4bf}
.image-task>.creation-motion{border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}
.agent-progress{overflow:hidden;border:1px solid var(--f-line);border-radius:12px;background:var(--f-surface)}
.agent-progress>.creation-motion{height:60px}
.agent-progress>p{padding:8px 12px;margin:0}
.agent-work-status:has(>.creation-motion){display:flex;align-items:center;gap:11px;padding:7px 11px;margin-bottom:12px}
.agent-work-status>.creation-motion{flex:none;width:74px;height:35px;border-radius:7px}
.speech-result>.creation-motion,.video-result-card>.creation-motion,.tl-save-state>.creation-motion{width:100%;border-radius:12px}
@keyframes creation-light{to{transform:translate(5%,1%) rotate(9deg) scale(1.12)}}
@keyframes creation-sweep{from{transform:translateX(-52%)}to{transform:translateX(52%)}}
@keyframes creation-trace{from{opacity:.36;transform:scaleX(.8)}to{opacity:1;transform:scaleX(1)}}
@keyframes creation-wave{from{opacity:.48;transform:scaleY(var(--rise))}to{opacity:1;transform:scaleY(1.12)}}
@media(prefers-reduced-motion:reduce){.creation-motion>b,.creation-motion>span,.creation-motion svg>*{animation:none}}
