/* Content-first shell and reusable example card. Live cabinet only. */
.content-first-shell.app{
 display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0;
}
.content-first-shell.app.agent-closed{grid-template-columns:minmax(0,1fr);min-width:0}
.content-first-shell>.rail{
 grid-column:1/-1;grid-row:1;display:flex;flex-direction:row;gap:clamp(8px,2vw,26px);
 padding:10px clamp(12px,2.6vw,36px);min-height:64px;border:0;border-bottom:1px solid var(--f-line);
}
.content-first-shell .wordmark{display:grid;place-items:center;margin:0;flex:0 0 30px}
.content-first-shell .wordmark svg{width:25px;height:25px}
.content-first-shell .rail-main{display:flex;justify-content:center;gap:3px;width:auto;margin-inline:auto}
.content-first-shell .rail-link{
 width:auto;min-height:40px;padding:0 12px;flex-direction:row;justify-content:center;
 gap:7px;border-radius:10px;font-size:13px;white-space:nowrap;
}
.content-first-shell .rail-link svg{width:17px;height:17px}
.content-first-shell .rail-bottom{position:relative;margin:0;width:auto;flex:none}
.content-first-shell .rail-bottom .rail-link{padding:0 3px}
.content-first-shell .profile-menu{top:calc(100% + 10px);bottom:auto;left:auto;right:0;width:min(272px,85vw)}
.content-first-shell .space-trigger{min-width:0;padding:6px 9px;max-width:230px}
.content-first-shell .space-trigger>.space-avatar{width:32px;height:32px}
.content-first-shell>.workspace{grid-row:2;grid-column:1}
.content-first-shell>.agent{
 position:fixed;z-index:45;inset:auto var(--x-right,12px) var(--x-bottom,12px) auto;
 width:min(var(--agent-width,386px),calc(100vw - 36px));height:min(540px,80dvh);
 min-height:0;border:1px solid var(--f-line);border-radius:22px;
 background:var(--f-bg);box-shadow:0 14px 60px #08081090;overflow:hidden;
}
.content-first-shell .agent-header{padding:10px 13px 10px 17px;min-height:54px;cursor:grab;touch-action:none;user-select:none}
.content-first-shell .agent-header>.agent-move{margin-left:auto;cursor:grab}
.content-first-shell .agent-header>.icon-button:last-child{margin-left:0}
.content-first-shell.agent-dragging .agent-header,.content-first-shell.agent-dragging .agent-move{cursor:grabbing}
.content-first-shell #agent-resizer{
 position:absolute;z-index:1;inset:14px auto 14px 0;width:7px;height:auto;background:transparent;
 cursor:ew-resize;touch-action:none;
}
.content-first-shell #agent-resizer:focus-visible{outline:2px solid var(--f-accent);outline-offset:-2px}
.content-first-shell .studio-agent-entry{
 display:none;position:fixed;z-index:40;right:12px;bottom:12px;
 min-height:42px;gap:10px;padding:7px 13px;color:var(--f-text);border-radius:14px;background:var(--f-bg);
 box-shadow:0 5px 16px #09090a56;
}
.content-first-shell.agent-closed .studio-agent-entry{display:inline-flex}
.content-first-shell .studio-agent-entry:hover{background:var(--f-surface)}
.studio-agent-entry .icon:first-child{color:var(--f-accent)}
.studio-agent-entry .icon:last-child{margin-inline-start:8px;width:15px;height:15px}
.content-first-shell.agent-is-working .studio-agent-entry{border-color:var(--f-accent)}
.content-first-shell .canvas{scroll-padding-bottom:66px}
.content-first-shell .studio-home{max-width:1210px;margin:0 auto}
.studio-showcase{
 --showcase-height:clamp(250px,34vw,385px);
 overflow:hidden;border:1px solid var(--f-line);border-radius:clamp(18px,2.4vw,28px);background:#1a1622;
}
.studio-showcase-slide{
 display:grid;grid-template-columns:minmax(230px,.82fr) minmax(0,1.5fr);
 align-items:stretch;height:var(--showcase-height);
}
.studio-showcase-copy{padding:clamp(20px,4vw,54px);align-self:center}
.studio-showcase-copy>.eyebrow{margin:0 0 12px;color:#d6c7f3}
.studio-showcase h1{font-size:clamp(29px,3.5vw,56px);line-height:1.04;margin:0;letter-spacing:-.05em}
.studio-showcase h1+p{margin:14px 0 0;max-width:34ch;color:var(--f-muted);font-size:14px}
.studio-showcase-controls{
 display:flex;gap:8px;justify-content:space-between;align-items:center;padding:8px 12px;
 border-top:1px solid var(--f-line);background:#17151d;
}
.studio-showcase-tabs{display:flex;gap:3px;overflow:auto;scrollbar-width:thin}
.studio-showcase-tabs button{
 appearance:none;border:0;border-radius:8px;background:transparent;color:var(--f-muted);
 padding:7px 10px;white-space:nowrap;font:inherit;cursor:pointer;font-size:12px;
}
.studio-showcase-tabs button:hover,.studio-showcase-tabs button[aria-pressed="true"]{background:#2d2539;color:var(--f-text)}
.studio-showcase-cycle{flex:none;color:var(--f-muted)}
.studio-showcase-cycle[hidden]{display:none}
.studio-showcase-photo{position:relative;min-width:0;margin:0;overflow:hidden;background:#21172b}
.studio-showcase-photo img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
.studio-showcase-photo figcaption{position:absolute;bottom:12px;left:12px;border-radius:18px;padding:7px 11px;background:#18121dd9;color:#f6edf8;font-size:11px}
.studio-art{
 display:flex;min-width:0;flex-direction:column;justify-content:center;align-items:flex-start;
 gap:clamp(10px,2vw,22px);padding:clamp(24px,5vw,70px);overflow:hidden;
 background:radial-gradient(ellipse at 80% 22%,#453364,#231d35 64%,#191623);
}
.studio-art>span{font-size:10px;letter-spacing:.16em;color:#d2bfdc}
.studio-art>strong{font-size:clamp(20px,3.6vw,44px);max-width:15ch;line-height:1.05}
.studio-art p{max-width:38ch;margin:0;line-height:1.45;color:#eadff0}
.studio-art-text{background:linear-gradient(135deg,#513144,#291f36 74%)}
.studio-art-audio svg{width:min(100%,360px);max-height:90px;stroke:#d1b6ff;stroke-width:4;stroke-linecap:round}
.studio-art-set>div{display:flex;gap:14px;align-items:center;align-self:stretch;background:#1e1b2da8;border-radius:10px;padding:8px 12px}
.studio-art-set>div strong{color:var(--f-accent)}
.studio-art-x>svg{color:var(--f-accent);width:28px;height:28px}
.studio-art-x>strong{font-size:clamp(19px,3vw,35px);max-width:22ch}
.studio-art-social>div{display:flex;align-items:flex-end;gap:8px;height:65px}
.studio-art-social i{width:clamp(13px,4vw,38px);height:36%;background:#bda8ef;border-radius:4px 4px 0 0}
.studio-art-social i:nth-child(2n){height:56%}
.studio-art-social i:nth-child(n+4){height:73%}
.studio-art-social i:last-child{height:100%}
.studio-main-cta.button{min-height:44px;padding-inline:16px;font-size:14px;gap:12px}
.studio-example-media{position:relative;margin:0;min-width:0;background:#171321;overflow:hidden;isolation:isolate}
.studio-example-media video{display:block;width:100%;height:100%;min-height:100%;object-fit:cover;aspect-ratio:16/9}
.studio-showcase-slide>.studio-example-media video{position:absolute;inset:0}
.studio-example-media::after{
 content:'';position:absolute;pointer-events:none;inset:auto 0 0;height:32%;
 background:linear-gradient(transparent,#100d18a1);
}
.studio-example-media figcaption,.studio-example-play{
 position:absolute;bottom:12px;z-index:1;min-height:33px;border-radius:100px;
 background:#15121dd9;border:1px solid #e6daf54f;color:#faf5ff;display:flex;align-items:center;
}
.studio-example-media figcaption{left:12px;padding:0 11px;font-size:11px}
.studio-example-play{right:12px;justify-content:center;width:35px;height:35px}
.studio-example-play:hover{background:#2b203b}
.studio-example-play .icon{width:17px;height:17px}
.studio-pause-icon{width:10px;height:11px;border-inline:3px solid currentColor}
.studio-formats{margin:clamp(25px,4vw,46px) 0 12px}
.studio-formats-heading{display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.studio-formats-heading .eyebrow{margin:0 0 5px}
.studio-formats h2{font-size:clamp(22px,3vw,34px);margin:0}
.studio-formats-heading .continue-link{margin:0}
.studio-format-grid{padding:0;margin:0;border:0;min-width:0}
.studio-format-grid .category{position:relative;cursor:pointer}
.studio-format-grid .category[data-selected]{outline:2px solid var(--f-accent);outline-offset:-2px}
.studio-format-grid .category:focus-visible{outline:2px solid var(--f-accent);outline-offset:2px}
.studio-create-actions{display:flex;justify-content:flex-start;padding-top:14px}
.studio-back-row{max-width:1210px;margin:0 auto 9px}
.studio-back.button{min-height:32px;padding:4px 8px;margin-inline-start:-8px;color:var(--f-muted)}
.studio-back .icon{transform:rotate(180deg)}
.content-first-shell #canvas:has(.timeline-editor) .timeline-editor{height:calc(100% - 41px)}
.studio-example-reference{
 grid-area:guide;align-self:start;min-width:0;overflow:hidden;border:1px solid var(--f-line);
 border-radius:var(--f-radius-card);background:var(--f-bg);
}
.studio-example-reference>p{padding:12px 14px;font-size:13px}
.studio-example-reference>p span{color:var(--f-muted)}
.studio-example-settings{border-block-start:1px solid var(--f-line);padding-top:9px}
.studio-example-settings>summary{cursor:pointer;display:flex;align-items:center;gap:8px;list-style:none;padding:8px 0;font-size:13px}
.studio-example-settings>summary::-webkit-details-marker{display:none}
.studio-example-settings[open]>summary .icon{transform:rotate(180deg)}
.studio-example-settings[open]{display:grid;gap:9px}
@container (max-width:719px){.video-generation-layout:has(.studio-example-reference){grid-template-areas:"form" "guide"}}
@media(max-width:790px){
 .content-first-shell>.rail{flex-wrap:wrap;gap:5px 10px}
 .content-first-shell .rail-main{order:4;width:100%;justify-content:space-between}
 .content-first-shell .rail-bottom{margin-left:auto}
 .content-first-shell .rail-link{padding-inline:8px;font-size:12px}
 .content-first-shell .space-trigger{max-width:calc(100vw - 124px)}
 .content-first-shell .profile-link>span:last-child{display:none}
}
@media(max-width:560px){
 .content-first-shell .canvas{padding:15px 12px 24px}
 .studio-showcase-slide{display:flex;flex-direction:column;height:365px}
 .studio-showcase-slide>:last-child{flex:1;min-height:0;order:-1}
 .studio-showcase-copy{align-self:stretch;padding:14px 16px}
 .studio-showcase h1{font-size:27px}
 .studio-showcase h1+p{margin-top:8px}
}
@media(max-height:650px){
 .content-first-shell #canvas:has(.timeline-editor){overflow-y:auto}
 .studio-showcase{--showcase-height:230px}
 .studio-showcase-copy{padding:16px 20px}
 .studio-showcase h1{font-size:clamp(27px,3.5vw,42px)}
}
.content-first-shell.studio-entry-shell .rail-main,
.content-first-shell.studio-entry-shell .rail-bottom,
.content-first-shell.studio-entry-shell>.agent,
.content-first-shell.studio-entry-shell .studio-agent-entry{display:none}

/* Studio work surfaces keep the brief, the artefact and the main action distinct. */
.studio-work{max-width:1100px;margin-inline:auto}
.studio-work-heading{margin-bottom:19px}
.studio-work-heading .eyebrow,.studio-work>.eyebrow{margin:0 0 8px}
.studio-work-heading h1{margin:0 0 8px}
.studio-work-heading p:last-child{color:var(--f-muted);margin:0}
.studio-media-work.editor{max-width:1100px}
.studio-media-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(240px,1fr);gap:15px;align-items:start}
.studio-media-layout .workspace-form{
 padding:15px;max-width:none;background:var(--f-surface);border-radius:16px;border:1px solid var(--f-line);
}
.studio-media-layout .workspace-form textarea{min-height:120px}
.studio-media-preview{min-width:0;display:grid;gap:10px}
.studio-media-preview .generation-guide{background:var(--f-surface)}
.studio-media-preview .generation-demo{max-height:clamp(120px,22vw,235px)}
.generation-empty{
 min-height:185px;display:grid;place-content:center;justify-items:center;gap:12px;
 background:radial-gradient(ellipse at 65% 30%,#32243e,#191725 72%);
 border:1px solid var(--f-line);border-radius:16px;color:var(--f-muted);
}
.generation-empty[hidden]{display:none}
.generation-empty .icon{width:36px;height:36px;color:var(--f-accent)}
.content-set-page .set-settings{margin-top:20px}
@media(max-width:700px){
 .studio-media-layout{grid-template-columns:minmax(0,1fr)}
}
.studio-writing-form{padding:16px;border:1px solid var(--f-line);border-radius:16px;background:var(--f-surface)}
.studio-writing-form textarea{min-height:130px}
.studio-writing-settings{padding-block:4px 8px;border-bottom:1px solid var(--f-line)}
.studio-writing-settings>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;color:var(--f-muted)}
.studio-writing-settings>summary::-webkit-details-marker{display:none}
.studio-writing-settings[open]>summary{margin-bottom:12px}
.studio-writing-settings[open]>summary .icon{transform:rotate(180deg)}
.studio-writing-settings>input{margin-top:4px}
