/* Studio layout: the prompt stays in document flow, with optional tools nearby. */
body.content-studio { display:block; height:auto; min-height:100dvh; overflow-y:auto; }
body.content-studio .product-shell { height:auto; min-height:100dvh; overflow:visible; }
body.content-studio .explore-nav { background:#060909b8; backdrop-filter:blur(16px); }
body.content-studio .product-title { margin:18px 0 10px; }
body.content-studio .product-title strong { font:500 11px var(--mono); letter-spacing:.13em; text-transform:uppercase; color:#95978d; }
body.content-studio .product-local-nav { display:flex; flex-direction:column; gap:5px; }
body.content-studio .nav-action-primary { background:transparent; border:1px solid #ffffff1b; margin-bottom:14px; }
body.content-studio .nav-action.is-active { background:#d0b47710; border-color:#d0b47735; }
body.content-studio .ml-xnav a[aria-current="page"] { display:none; }
body.content-studio .studio-view { padding:0; height:auto; overflow:visible; }
body.content-studio .studio-head { min-height:68px; background:transparent; padding:10px 32px; display:flex; justify-content:space-between; }
body.content-studio .studio-head .stages { gap:16px; margin-right:auto; }
body.content-studio .studio-head .stage-l { font-size:10px; }
body.content-studio .studio-head-actions { gap:8px; }
body.content-studio .studio-head .studio-link { font-size:12px; }
body.content-studio[data-state="IDEA_EMPTY"] .studio-head .stages,
body.content-studio[data-state="IDEA_EMPTY"] #aicDownloadBrief,
body.content-studio[data-state="IDEA_EMPTY"] .studio-controls>.sheet { display:none; }
body.content-studio .studio-back { font-size:12px; color:#c6c5b8; }
body.content-studio .studio-grid,
body.content-studio[data-view="studio"][data-has-canvas="0"] .studio-grid { height:auto; min-height:calc(100dvh - 68px); overflow:visible; padding:30px clamp(20px,4vw,64px) 70px; display:grid; grid-template-columns:minmax(0,1fr); gap:30px; }
body.content-studio .studio-controls,
body.content-studio[data-view="studio"][data-has-canvas="0"] .studio-controls { width:100%; max-width:1040px; padding:0; margin:0 auto; overflow:visible; background:transparent; border:0; }
.creation-welcome { padding:18px 0 32px; text-align:center; }
.creation-eyebrow { font:10px/1.4 var(--mono); letter-spacing:.17em; color:#c5b180; }
.creation-welcome h1 { margin:16px 0 13px; font:500 clamp(34px,4.4vw,58px)/1.12 var(--sans); letter-spacing:-.055em; color:#f1eee6; }
.creation-welcome h1 em { font-family:var(--serif); font-weight:500; letter-spacing:-.04em; color:#d2b477; }
.creation-welcome>p:last-child { margin:auto; max-width:550px; color:#a6aaa1; font:14px/1.7 var(--sans); }
body.content-studio[data-view="studio"] .composer-dock { display:block; position:relative; left:auto; bottom:auto; transform:none; width:100%; z-index:5; margin:0; }
body.content-studio[data-view="studio"] .composer { padding:20px 22px 16px; border-radius:18px; background:#0a0e0bb8; border:1px solid #c7b48145; box-shadow:0 12px 50px #0002; backdrop-filter:blur(8px); }
body.content-studio[data-view="studio"] .composer:focus-within { border-color:#d5bd7a99; box-shadow:0 0 0 3px #cbb77b08; }
body.content-studio[data-view="studio"] .cmp-row { align-items:flex-end; padding:22px 0 16px; gap:16px; }
body.content-studio[data-view="studio"] .cmp-input { min-height:88px; max-height:180px; width:100%; font:16px/1.7 var(--sans); resize:vertical; color:#f0ede3; }
body.content-studio[data-view="studio"] .cmp-input::placeholder { color:#898e84; }
body.content-studio[data-view="studio"] .send { flex:0 0 auto; width:auto; height:46px; padding:0 18px; border-radius:10px; display:flex; gap:15px; align-items:center; font:500 13px var(--sans); background:#d0b477; color:#171913; }
body.content-studio .cmp-tools { padding:0; border:0; gap:8px; flex-wrap:wrap; }
body.content-studio .cmp-tools .tool { min-height:38px; font-size:12px; padding:7px 12px; border:1px solid #ffffff13; background:#ffffff04; border-radius:8px; }
body.content-studio .composer-mode { font-size:10px; color:#969b90; }
body.content-studio[data-view="studio"] .prompt-choices { display:none; }
body.content-studio .creative-settings { margin:12px 0 24px; border:0; border-radius:12px; background:transparent; }
body.content-studio .creative-settings>summary { padding:10px 2px; min-height:44px; font-size:12px; color:#a8ac9f; }
body.content-studio .creative-settings:not([open]) #aicSettingsLabel { display:none; }
body.content-studio .settings-body { padding:16px; border:1px solid #ffffff12; border-radius:12px; background:#090e0bb5; }
body.content-studio .control-shortcuts { display:none; }
body.content-studio .studio-controls>.sheet { background:#080d0ab0; margin-top:20px; }
body.content-studio .studio-controls .stream,
body.content-studio[data-view="studio"][data-has-canvas="0"] .studio-controls .stream { max-height:none; min-height:0; overflow:visible; padding:24px; }
body.content-studio .studio-controls .foot { background:transparent; padding:0 24px 24px; }
body.content-studio .studio-grid .canvas { min-height:0; width:100%; max-width:1040px; margin:auto; padding:20px; background:#080d0877; border-radius:16px; }
body.content-studio .canvas::before { display:none; }
.creation-inspiration { margin:36px 0 0; }
.creation-inspiration>header { display:flex; align-items:flex-end; justify-content:space-between; gap:15px; margin:0 0 20px; }
.creation-inspiration h2 { font:500 21px var(--sans); letter-spacing:-.025em; color:#e3e4da; margin-top:8px; }
.creation-inspiration>header>span { font:11px var(--sans); color:#858d80; }
.creation-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.creation-cards .template-card { position:relative; display:block; padding:0; min-width:0; overflow:hidden; border:1px solid #ffffff18; border-radius:14px; background:#090d0a; color:#eee9de; aspect-ratio:4/4.6; cursor:pointer; text-align:left; transition:transform .25s,border-color .25s; }
.creation-cards .template-card:hover { transform:translateY(-4px); border-color:#d1b47780; }
.creation-cards img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .45s; }
.creation-cards .template-card:hover img { transform:scale(1.04); }
.creation-cards .template-card>span { position:absolute; inset:auto 0 0; display:grid; gap:7px; padding:40px 15px 16px; background:linear-gradient(transparent,#070b09eb); }
.creation-cards small { font:9px var(--mono); letter-spacing:.14em; color:#ddd5bd; }
.creation-cards strong { max-width:90%; font:500 14px/1.4 var(--sans); }
.creation-cards i { position:absolute; right:12px; bottom:17px; font-style:normal; color:#d5c38e; }
body.content-studio .overview-view, body.content-studio .explore-view { height:auto; min-height:100dvh; overflow:visible; }
/* Native top-layer help remains visible regardless of canvas position. */
body.content-studio .studio-info { position:fixed; inset:0; margin:auto; width:min(480px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:30px 26px; background:#0b100ef5; border-color:#c5b18055; color:#f1eee6; overscroll-behavior:contain; }
body.content-studio .studio-info::backdrop { background:#02050499; }
body.content-studio .studio-info h2 { padding-right:28px; font-size:26px; }
body.content-studio .studio-info li { font-size:14px; line-height:1.7; }
body.content-studio .studio-info ol { gap:14px; }
body.content-studio .studio-info-close:focus-visible { outline:2px solid #d2b477; outline-offset:-4px; border-radius:50%; }
@media(min-width:1550px) { body.content-studio[data-has-canvas="1"]:not([data-state="IDEA_EMPTY"]) .studio-grid { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:start; } }
@media(max-width:1050px) { .model-picker { align-items:flex-start; flex-direction:column; } .model-toolbar { width:100%; } .model-trigger { max-width:none; flex:1; } .creation-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .creation-cards .template-card { aspect-ratio:4/3.5; } body.content-studio .studio-head .stages { display:none; } }
@media(max-width:760px) {
 body.u-night.content-studio:has(.product-shell) { display:block; height:auto; overflow:visible; }
 body.content-studio .explore-nav { width:100%; position:relative; padding:12px 16px; }
 body.content-studio .product-title { display:none; }
 body.content-studio .product-local-nav { flex-direction:row; gap:8px; }
 body.content-studio .product-local-nav .nav-action-primary { margin:0; font-size:12px; }
 body.content-studio .product-local-nav .nav-action { font-size:12px; min-height:42px; }
 body.content-studio .product-shell { margin:0; width:100%; }
 body.content-studio .studio-head { min-height:52px; padding:4px 14px; display:flex; }
 body.content-studio .studio-head-actions { gap:0; }
 body.content-studio .studio-head .studio-link { font-size:11px; }
 body.content-studio .studio-grid, body.content-studio[data-view="studio"][data-has-canvas="0"] .studio-grid { padding:12px 16px 80px; min-height:0; }
 .creation-welcome { padding:25px 0; }
 .creation-welcome h1 { font-size:38px; }
 .creation-welcome>p:last-child { font-size:13px; }
 body.content-studio[data-view="studio"] .composer { padding:14px; }
 body.content-studio[data-view="studio"] .cmp-row { flex-direction:column; align-items:stretch; gap:6px; padding:16px 0 12px; }
 body.content-studio[data-view="studio"] .send { align-self:flex-end; height:42px; }
 body.content-studio[data-view="studio"] .cmp-input { min-height:100px; }
 body.content-studio .composer-mode { flex-basis:100%; margin-top:6px; text-align:left; }
 .creation-type-tabs { width:100%; }
 .creation-type-tabs button { flex:1; padding-inline:10px; }
 .creation-inspiration { margin-top:26px; }
 .creation-inspiration>header>span { display:none; }
 .creation-cards { gap:10px; }
 .creation-cards strong { font-size:12px; }
 .creation-cards .template-card>span { padding:35px 10px 12px; }
 body.content-studio .studio-controls .stream, body.content-studio[data-view="studio"][data-has-canvas="0"] .studio-controls .stream { padding:16px; }
 body.content-studio .studio-controls .foot { padding:0 16px 16px; }
}
@media(prefers-reduced-motion:reduce) { .creation-cards .template-card, .creation-cards img { transition:none; } }
@media(min-width:761px) {
 body.content-studio .explore-nav { position:fixed; inset:0 auto 0 0; width:224px; height:100dvh; z-index:20; }
 body.content-studio .product-shell { margin-left:224px; width:calc(100% - 224px); }
}
body.content-studio[data-view="studio"] .cmp-row { display:flex; }
body.content-studio[data-view="studio"] .cmp-input { flex:1; min-width:0; }
body.content-studio[data-view="studio"] .send { max-width:none; min-width:132px; white-space:nowrap; letter-spacing:normal; text-transform:none; overflow:visible; }
body.content-studio[data-state="IDEA_EMPTY"][data-content-track="long"] .canvas:not(:has(.studio-info:not([hidden]))) { display:none; }
body.content-studio .longform-head { flex-wrap:wrap; }
body.content-studio .longform-head h2 { font:500 27px/1.25 var(--sans); letter-spacing:-.035em; }
body.content-studio .longform-head p { font:13px/1.7 var(--sans); }
body.content-studio .longform-board { width:100%; max-width:none; padding:20px; background:transparent; }
body.content-studio .longform-universe { display:none; }
body.content-studio .longform-rail { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.content-studio .longform-step-copy small { font:12px/1.5 var(--sans); }
@media(max-width:600px) { body.content-studio .longform-rail { grid-template-columns:1fr; } body.content-studio .longform-board { padding:4px; } }

/* Real writing keeps the same open studio, with readable scripts. */
.baba-writing-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 24px}
.baba-writing-status:empty{display:none}
.baba-writing-status{color:var(--brass);line-height:1.6}
.baba-writing .longform-chapters li{grid-template-columns:28px minmax(0,1fr);align-items:start}
.baba-script-text{white-space:pre-wrap;font-size:16px;line-height:1.85;margin:16px 0;max-width:68ch;color:var(--ink)}
.baba-scene-direction,.baba-writing-next{font-size:13px;line-height:1.65;opacity:.78}
.baba-writing-next{margin-top:24px;border-top:1px solid rgba(197,162,86,.18);padding-top:18px}
.baba-writing{overflow-wrap:anywhere}

.auth-notice{color:#d9bd77;line-height:1.6;margin:12px 0}.auth-notice:empty{display:none}
[data-account-status]:disabled{opacity:1;color:#d9bd77;cursor:default}

.creative-requirements{margin:20px 0;padding:20px;border:1px solid #c9a25745;border-radius:12px;background:#c9a25708}
.creative-requirements h3{font:500 18px/1.4 var(--sans);color:#e6d8af;margin-bottom:16px}
.creative-requirements .spec-v{white-space:pre-wrap;overflow-wrap:anywhere}
body.content-studio .studio-head{flex-wrap:wrap;gap:10px}
body.content-studio .studio-head-actions{flex-wrap:wrap;justify-content:flex-end}
body.content-studio .studio-link,body.content-studio .rev-edit{min-height:40px;padding:8px 10px}
body.content-studio .signature-engine{transition:padding .25s ease}
body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine{padding:14px 20px;display:flex;align-items:center;flex-wrap:wrap;gap:12px}
body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-copy p,body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-sample,body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-copy .eyebrow{display:none}
body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine h2{font-size:20px;margin:0}
body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-actions{margin:0 0 0 auto}
body.content-studio:not([data-state="IDEA_EMPTY"]) .creation-welcome{display:none}
@media(max-width:760px){
 body.content-studio .signature-engine{padding:16px;margin:12px 16px}
 body.content-studio .signature-engine h2{font-size:22px;margin:6px 0}
 body.content-studio .signature-engine-copy p{font-size:12px;line-height:1.5}
 body.content-studio .signature-engine-actions{gap:8px;margin-top:12px}
 body.content-studio .signature-engine-actions button{min-height:40px}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine{padding:10px 14px;gap:6px}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-copy p,body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-description,body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-kicker{display:none}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-actions{display:flex;flex-wrap:wrap;width:100%;margin:6px 0 0}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .signature-engine-actions button{flex:1;font-size:11px}
 body.content-studio .model-picker{padding-block:12px;gap:10px}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .studio-head{padding:8px 14px}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .studio-head .clarity{display:none}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .cmp-input{min-height:44px;max-height:100px}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .cmp-row{padding:8px 0}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .studio-controls{display:flex;flex-direction:column}
 body.content-studio:not([data-state="IDEA_EMPTY"]) .studio-controls>.sheet{order:-1;margin:0 0 16px}
 .creative-requirements{padding:14px}.creative-requirements .spec-row{grid-template-columns:1fr;gap:5px}
 body.content-studio .studio-head-actions{gap:4px}.creation-welcome h1{font-size:32px}.creation-welcome{padding:14px 0 20px}
}
@media(prefers-reduced-motion:reduce){body.content-studio .signature-engine{transition:none}}
/* On a phone the first idea should be within reach, not below a stack of tools. */
@media(max-width:600px){
 body.content-studio .signature-engine{margin:10px 16px;padding:12px 14px;gap:10px;border-radius:13px}
 body.content-studio .signature-engine-copy{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 10px}
 body.content-studio .signature-engine-copy>small{font-size:8px;letter-spacing:.08em}
 body.content-studio .signature-engine-copy h2{font-size:21px;margin:0}
 body.content-studio .signature-engine-copy p{grid-column:1/-1;font-size:11px;line-height:1.45}
 body.content-studio .signature-engine-actions{width:100%;grid-template-columns:1fr 1fr auto;gap:6px}
 body.content-studio .signature-engine-actions button{font-size:11px;min-height:44px;padding:7px 9px}
 body.content-studio .signature-engine-actions .signature-engine-preview{grid-column:auto;padding:5px;font-size:10px;min-height:44px}
 body.content-studio .model-nav-bar{padding:8px 0;gap:7px;min-height:0}
 body.content-studio .model-nav-tab{min-height:44px;padding:7px 10px}
 body.content-studio .model-selection{min-height:22px}
 body.content-studio .model-toolbar{padding:5px 0 8px}
 body.content-studio .studio-head{padding:4px 16px;min-height:48px;gap:4px}
 body.content-studio .studio-head-actions{width:100%;justify-content:space-between;gap:5px}
 body.content-studio .studio-back{display:none}
 body.content-studio .studio-grid,body.content-studio[data-view="studio"][data-has-canvas="0"] .studio-grid{padding-top:10px;gap:14px}
 body.content-studio .creation-welcome{padding:8px 0 16px}
 body.content-studio .creation-eyebrow{display:none}
 body.content-studio .creation-welcome h1{font-size:30px;margin:0 0 8px}
 body.content-studio .creation-welcome>p:last-child{display:none}
 body.content-studio .composer-agent small{font-size:11px}
 body.content-studio[data-view="studio"] .cmp-row{padding-top:12px}
}
