/* Studio extends the existing dark shell. Keep every rule locally scoped. */
.studio{max-width:1320px;margin:0 auto;min-width:0;--studio-border:1px solid var(--line)}
.studio [hidden]{display:none!important}.studio *{box-sizing:border-box}.studio :is(section,article,header,footer,div,fieldset,label){min-width:0}.studio h1,.studio h2,.studio h3,.studio p,.studio a,.studio strong,.studio span{overflow-wrap:anywhere}
.studio h1{font-size:clamp(27px,3vw,38px);line-height:1.18;letter-spacing:-.045em;margin:10px 0}.studio h2{font-size:17px;line-height:1.45;letter-spacing:-.025em;margin:0}.studio h3{font-size:14px;line-height:1.5;margin:0}.studio h4{font-size:18px;line-height:1.5;margin:18px 0 8px}.studio p{line-height:1.7}.studio a{color:var(--blue);text-underline-offset:4px}.studio :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid var(--red-bright);outline-offset:3px}.studio button:disabled{opacity:.46;cursor:not-allowed}.studio .btn{min-height:44px;padding:11px 15px;font-size:12px;line-height:1.5;white-space:normal;gap:8px}.studio .btn svg{width:16px;height:16px;flex:0 0 auto}.studio input,.studio textarea,.studio select{max-width:100%;width:100%}
.studio-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:24px}.studio-head>div:first-child{max-width:740px}.studio-head p{font-size:13px;color:var(--muted);margin:0;max-width:640px}.studio-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;flex:0 0 auto;max-width:40%}.studio-head .kicker{color:var(--red-bright);font-size:10px}
.studio-provider-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:var(--studio-border);border-radius:12px;background:var(--surface);margin:0 0 10px;overflow:hidden}.studio-provider-strip>div{display:grid;grid-template-columns:8px minmax(0,1fr);gap:4px 10px;padding:15px 18px;border-right:var(--studio-border);align-content:start}.studio-provider-strip>div:last-child{border-right:0}.studio-provider-strip>div>.studio-dot{grid-column:1;grid-row:1}.studio-provider-strip>div>strong{grid-column:2;grid-row:1;font-size:12px;font-weight:600}.studio-provider-strip>div>span:not(.studio-dot){grid-column:2;font-size:11px;line-height:1.5;color:var(--muted)}.studio-provider-strip>div>span:nth-child(3){grid-row:2}.studio-provider-strip>div>span:nth-child(4){grid-row:3}.studio-provider-strip>div>span:nth-child(5){grid-row:4}.studio-provider-strip>div>:not(.studio-dot){min-width:0;max-width:100%;white-space:normal;word-break:normal;overflow-wrap:anywhere}.studio-dot{width:6px;height:6px;background:var(--muted-2);border-radius:50%;margin-top:7px}.studio-dot.is-configured{background:var(--amber)}.studio-provider-note{font-size:11px;color:var(--muted);margin:0 0 24px}.studio-provider-note strong{color:var(--amber);font-weight:500}
.studio-note,.studio-notice,.studio-error,.studio-success,.studio-poll-note{padding:14px 16px;border:var(--studio-border);border-radius:10px;font-size:12px;line-height:1.7;margin:0 0 20px;overflow-wrap:anywhere}.studio-note{background:var(--surface-2);color:var(--muted)}.studio-note strong{color:var(--text)}.studio-notice,.studio-poll-note{background:rgba(255,182,72,.055);border-color:rgba(255,182,72,.24);color:#e7bd7d}.studio-error{background:var(--red-soft);border-color:rgba(255,67,89,.3);color:#ffb0bb}.studio-error p{margin:8px 0 12px}.studio-error .btn{margin:0 8px 4px 0}.studio-success{color:#9becc4;background:rgba(57,217,138,.055);border-color:rgba(57,217,138,.25)}
.studio-list-meta{display:flex;gap:12px;align-items:baseline;justify-content:space-between;margin:28px 0 16px}.studio-list-meta>span{font:10px/1.6 var(--mono);color:var(--muted)}.studio-project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.studio-project-card{display:flex;flex-direction:column;background:linear-gradient(145deg,var(--surface-2),var(--surface));border:var(--studio-border);border-radius:14px;padding:22px;transition:border-color .18s}.studio-project-card:hover{border-color:#545d70}.studio-card-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:24px}.studio-project-card h3{font-size:19px;letter-spacing:-.025em}.studio-project-card>p{margin:8px 0 20px;color:var(--muted);font-size:12px}.studio-project-card footer{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-top:auto;padding-top:18px;border-top:1px solid var(--line)}.studio-project-card footer>span{color:var(--muted);font-size:10px}.studio-project-card footer .btn{flex:0 0 auto}.studio-source-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:22px}.studio-source-summary>span{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted)}.studio-source-summary b{font:9px var(--mono);color:#c4c9d5}.studio-tag{display:inline-flex;align-items:center;padding:4px 8px;border-radius:5px;border:var(--studio-border);background:var(--surface-2);font:9px/1.5 var(--mono);letter-spacing:.025em;color:#c4c9d5}.studio-muted{color:var(--muted);font-size:11px}
.studio-empty,.studio-loading{border:1px dashed #394152;border-radius:14px;padding:50px 24px;background:var(--surface);text-align:center;color:var(--muted)}.studio-empty h3{font-size:21px;color:var(--text)}.studio-empty p{max-width:580px;font-size:13px;margin:12px auto 24px}.studio-loading{font-size:13px}.studio-loading::before{content:'';display:block;width:24px;height:24px;margin:0 auto 16px;border:2px solid var(--line);border-top-color:var(--red);border-radius:50%;animation:studio-spin 1s linear infinite}@keyframes studio-spin{to{transform:rotate(360deg)}}
.studio-form-fields{padding:0;margin:0;border:0;min-inline-size:0}.studio-editor-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:20px;align-items:start}.studio-panel{padding:24px;border:var(--studio-border);border-radius:14px;background:var(--surface)}.studio-panel-heading{display:flex;align-items:flex-start;gap:13px;margin-bottom:24px}.studio-panel-heading p{font-size:11px;margin:5px 0 0;color:var(--muted)}.studio-step{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border:1px solid rgba(255,67,89,.28);border-radius:8px;background:var(--red-soft);color:var(--red-bright);font:11px var(--mono)}.studio-fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.studio-wide{grid-column:1/-1}.studio-field{display:block;margin:0 0 18px;min-width:0}.studio-field>span{display:block;font-size:11px;font-weight:600;color:#c4cad5;margin-bottom:8px}.studio-field :is(input,textarea,select){display:block;min-height:44px;padding:11px 12px;background:var(--surface-2);border:1px solid #303745;border-radius:8px;color:var(--text);font-size:13px;line-height:1.65}.studio-field :is(input,textarea,select):focus{border-color:var(--red-bright);outline:none;box-shadow:0 0 0 2px var(--red-soft)}.studio-field textarea{resize:vertical;min-height:98px}.studio-field :is(input,textarea,select):disabled{opacity:.7}.studio-field small,.studio-help{display:block;font-size:11px;line-height:1.7;color:var(--muted);margin:7px 0 12px}.studio-field small{margin-bottom:0}.studio-warning{color:#e9bc77}.studio-field .custom-select-trigger,.studio-field .custom-select-menu button{font-size:12px}.studio .custom-select-menu{position:relative;top:auto;margin-top:6px;box-shadow:none}.studio .custom-select-menu input{font-size:13px}.studio .select-results{max-height:220px}
.studio-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.studio-mode>button,.studio-mode>div{padding:14px;border:var(--studio-border);border-radius:9px;background:var(--surface-2);text-align:left;cursor:pointer}.studio-mode strong,.studio-mode span{display:block}.studio-mode strong{font-size:13px}.studio-mode span{font-size:10px;color:var(--muted);margin-top:5px}.studio-mode [aria-pressed=true],.studio-mode .is-selected{border-color:var(--red);background:var(--red-soft)}#studioModeNote{margin:10px 0 24px}.studio-component{padding:18px 0;border-bottom:1px solid var(--line)}.studio-component:first-child{padding-top:0}.studio-component:last-child{border-bottom:0;padding-bottom:0}.studio-component-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:14px}.studio-component .studio-field{margin-bottom:12px}.studio-readiness{font-size:10px;line-height:1.5;color:var(--muted)}.studio-readiness.ready{color:var(--green)}.studio-readiness.pending{color:#e9bc77}.studio-component-title .studio-readiness{text-align:right;max-width:60%}.studio-manual{border:var(--studio-border);border-radius:8px;padding:0 12px;background:#0c1017}.studio-manual summary{padding:12px 0;cursor:pointer;color:#b9c1cf;font-size:11px;line-height:1.6}.studio-manual[open] summary{margin-bottom:8px;border-bottom:1px solid var(--line-soft)}.studio-manual>.studio-field:last-child{margin-bottom:14px}.studio-upload{padding-bottom:14px}.studio-upload input[type=file]{padding:8px;min-height:44px;font-size:11px}.studio-upload input::file-selector-button{padding:7px 9px;border:var(--studio-border);border-radius:5px;background:var(--surface-3);color:var(--text);font:11px var(--sans);margin-right:8px;cursor:pointer}.studio-file-name{color:#c4cad5}.studio-safety{padding:15px;border:1px solid rgba(255,182,72,.18);border-radius:9px;background:rgba(255,182,72,.035);margin-top:24px}.studio-safety strong{font-size:11px;color:#e9bc77}.studio-safety p{font-size:11px;color:var(--muted);margin:6px 0 0}
.studio-savebar{position:sticky;bottom:12px;z-index:15;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 20px;margin:20px 0 0;border:var(--studio-border);border-radius:12px;background:#141922;box-shadow:0 8px 35px #0006}.studio-savebar strong,.studio-savebar span{display:block}.studio-savebar strong{font-size:12px}.studio-savebar span{font-size:10px;color:var(--muted);margin-top:4px}.studio-savebar>.btn{flex:0 0 auto}.studio.is-dirty .studio-savebar{border-color:#71543b}.studio.is-dirty #studioSaveState{color:var(--amber)}
.studio-delivery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px}.studio-generation{grid-column:1/-1}.studio-generation-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}.studio-check{display:flex;align-items:flex-start;gap:10px;cursor:pointer;font-size:12px;line-height:1.7}.studio-check input{flex:0 0 17px;width:17px;height:17px;min-height:0;accent-color:var(--red);margin:3px 0 0}.studio-check>span{min-width:0}.studio-check strong,.studio-check small{display:block}.studio-check small{font-size:10px;font-weight:400;color:var(--muted);margin-top:4px}.studio-generation-options .studio-check{border:var(--studio-border);border-radius:9px;padding:12px;background:var(--surface-2)}.studio-generation-options .studio-check:has(:checked){border-color:var(--red)}.studio-check:has(:disabled){cursor:default;opacity:.58}.studio-consent{margin:16px 0}.studio-action-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;margin-top:16px}.studio-action-footer>p{margin:0;flex:1;font-size:11px;color:var(--muted)}.studio-action-footer>.btn{flex:0 0 auto}.studio-public-link{padding:12px;border:var(--studio-border);border-radius:8px;background:var(--surface-2);font-size:12px;margin:14px 0}.studio-public-link small{display:block;margin-bottom:5px;color:var(--muted)}.studio-transfer .studio-fields-grid{margin-top:18px}.studio-transfer .studio-fields-grid .studio-field{grid-column:1/-1}.studio-source-label{font-size:12px;color:var(--muted)}
.studio-previews{margin-top:32px}.studio-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.studio-preview-card{border:var(--studio-border);border-radius:12px;background:var(--surface);overflow:hidden;display:flex;flex-direction:column}.studio-preview-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}.studio-preview-card>footer{padding:13px 20px;border-top:1px solid var(--line);margin-top:auto}.studio-preview-body{padding:18px;min-height:180px}.studio-preview-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:170px;padding:20px;border:1px dashed #313949;border-radius:8px;background:#0b0e14}.studio-preview-empty strong{font-size:12px;color:var(--muted)}.studio-preview-empty p{font-size:11px;color:var(--muted);max-width:300px;margin:10px 0 0}.studio-copy-preview{padding:6px 4px;overflow-wrap:anywhere}.studio-copy-preview p{white-space:pre-wrap;font-size:13px;margin:0 0 14px}.studio-copy-preview a{display:block;max-width:100%}.studio-preview-body :is(img,video){display:block;width:100%;height:auto;max-height:400px;object-fit:contain;border-radius:8px;background:#090b10}.studio-preview-body iframe{display:block;width:100%;height:360px;border:0;border-radius:8px;background:#f8fafc}.studio-preview-body>.studio-help{margin:12px 0 0}.studio-history{margin-top:20px;padding:16px 20px;background:var(--surface);border:var(--studio-border);border-radius:12px;font-size:12px;color:var(--muted)}.studio-history summary{cursor:pointer;line-height:1.7}.studio-history ul{list-style:none;padding:0;margin:16px 0 0}.studio-history li{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr) minmax(0,1fr);gap:12px;padding:12px 0;border-top:1px solid var(--line-soft);overflow-wrap:anywhere}.studio-history strong{font-size:11px;color:#c4cad5;font-weight:500}.studio-history small{font:10px/1.6 var(--mono);color:var(--muted)}.studio-jobs{margin-top:20px}.studio-jobs article{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:16px 0;border-top:1px solid var(--line-soft);font-size:12px;line-height:1.7}.studio-jobs article>*{grid-column:1/-1;min-width:0;max-width:100%;overflow-wrap:anywhere}.studio-jobs article>strong{font:600 13px/1.7 var(--sans);color:var(--text)}.studio-jobs article p{margin:0}.studio-jobs article>span{color:var(--muted)}.studio-job-components{list-style:none;padding:0;margin:0;display:grid;gap:6px}.studio-job-components li{font-size:12px;line-height:1.7;overflow-wrap:anywhere}.studio-job-components strong{font-weight:600;color:#c4cad5}.studio-job-components .saved span{color:var(--green)}.studio-job-components .failed span{color:#ffb0bb}.studio-job-components .pending span,.studio-job-components .unknown span{color:var(--muted)}.studio-job-meta{font-size:11px;line-height:1.7}
/* Intake stays a real form; pending file objects live in Studio state. */
.studio-intake-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.studio-intake-grid>.studio-panel{background:linear-gradient(155deg,var(--surface-2),var(--surface) 60%)}
.studio-advanced{padding:0 16px;border:var(--studio-border);border-radius:10px;margin-top:6px;background:rgba(0,0,0,.12)}
.studio-advanced>summary{cursor:pointer;padding:16px 0;font-size:12px;color:#bbc4d4;line-height:1.6}
.studio-advanced[open]>summary{margin-bottom:16px;border-bottom:var(--studio-border)}
.studio-material-grid{display:grid;gap:14px;margin-top:16px}
.studio-material-card{border:1px solid #303745;border-radius:10px;padding:16px;background:rgba(8,12,19,.35)}
.studio-material-card .studio-field{margin-bottom:6px}.studio-material-card input[type=file]{font-size:12px;padding:7px;min-height:44px}
.studio-material-card input::file-selector-button{border:var(--studio-border);border-radius:6px;background:var(--surface-3);color:var(--text);padding:8px;font:inherit;margin-right:8px;cursor:pointer}
.studio-material-card>.studio-help{margin-bottom:12px}.studio-material-saved{display:flex;align-items:flex-start;gap:12px;padding-top:14px;margin-top:14px;border-top:var(--studio-border)}
.studio-material-saved>img{width:64px;height:64px;flex:0 0 64px;object-fit:contain;border-radius:8px;background:#0a0e15}
.studio-material-saved>div{flex:1;min-width:0}.studio-material-saved strong{font-size:12px}.studio-material-saved small{display:block;color:#9becc4;font-size:11px;margin:5px 0 10px}
.studio-material-saved summary{cursor:pointer;color:var(--muted);font-size:11px;line-height:1.7}.studio-material-saved pre{font:12px/1.7 var(--sans);white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;color:#c4cad5;margin:12px 0}
.studio-material-saved .btn{margin-top:8px}.studio-grouped-summary>p{font-size:12px}.studio-grouped-summary ul{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;list-style:none;padding:0;margin:16px 0}
.studio-grouped-summary li{border:var(--studio-border);border-radius:10px;padding:16px;background:var(--surface-2)}.studio-grouped-summary li strong{display:block;font-size:13px}.studio-grouped-summary li span{display:block;margin-top:7px;font-size:11px;line-height:1.7;color:var(--muted)}
.studio-video-note{border-top:var(--studio-border);padding-top:12px}.studio-field .studio-field-error{color:#ffb0bb}.studio-field [aria-invalid=true]{border-color:#f47f91}
@media(max-width:1150px){.studio-intake-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){.studio-grouped-summary ul{grid-template-columns:minmax(0,1fr);gap:8px}.studio-grouped-summary li{padding:13px}.studio-material-card{padding:13px}.studio-material-saved>img{width:52px;height:52px;flex-basis:52px}.studio-advanced{padding:0 12px}}
@media(min-width:1600px){.studio-project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1150px){.studio-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-editor-grid{grid-template-columns:minmax(0,1fr)}.studio-generation-options{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-head{gap:16px}.studio-actions{max-width:44%}}
@media(max-width:760px){.studio-head{flex-direction:column;gap:16px;margin-bottom:20px}.studio-head h1{font-size:28px}.studio-head p{font-size:12px}.studio-actions{max-width:none;width:100%;justify-content:flex-start}.studio-actions .btn{flex:1}.studio-provider-strip{grid-template-columns:minmax(0,1fr)}.studio-provider-strip>div{grid-template-columns:7px minmax(0,1fr);gap:4px 8px;padding:12px 14px;border-right:0;border-bottom:1px solid var(--line-soft)}.studio-provider-strip>div:last-child{border-bottom:0}.studio-provider-strip>div>strong{font-size:11px}.studio-provider-note{font-size:10px;margin-bottom:20px}.studio-project-grid,.studio-preview-grid,.studio-delivery{grid-template-columns:minmax(0,1fr);gap:16px}.studio-project-card{padding:20px}.studio-list-meta{align-items:flex-start;flex-direction:column;gap:5px}.studio-panel{padding:19px 16px}.studio-editor-grid{gap:16px}.studio-panel-heading{gap:10px;margin-bottom:20px}.studio h2{font-size:16px}.studio-panel-heading p{font-size:11px}.studio-fields-grid{grid-template-columns:minmax(0,1fr)}.studio-field :is(input,textarea,select),.studio .custom-select-menu input{font-size:16px}.studio-mode>button{padding:12px 10px}.studio-mode span{font-size:10px}.studio-component-title{align-items:flex-start}.studio-savebar{position:relative;bottom:auto;gap:14px;align-items:stretch;flex-direction:column;padding:16px;box-shadow:none}.studio-savebar>.btn{width:100%}.studio-generation-options{gap:8px}.studio-generation-options .studio-check{padding:10px;gap:8px;font-size:11px}.studio-action-footer{align-items:stretch;flex-direction:column;gap:12px}.studio-action-footer>.btn{width:100%}.studio-preview-card>header,.studio-preview-card>footer{padding:14px 16px}.studio-preview-body{padding:14px}.studio-preview-body iframe{height:330px}.studio-history{padding:15px}.studio-history li{grid-template-columns:minmax(0,1fr);gap:4px}.studio-empty{padding:32px 20px}.studio-empty h3{font-size:19px}.studio-empty .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.studio *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
