/* Studio extends the existing workspace palette; media keeps its own aspect ratio. */
#view-studio{--studio-warm:color-mix(in srgb,var(--accent-solid) 9%,var(--paper));color:var(--ink)}
.studio-topline{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px;flex-wrap:wrap}
.studio-mode{display:flex;padding:5px;border:1px solid var(--line);border-radius:13px;background:var(--paper);gap:4px}
.studio-mode button{display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;border:0;border-radius:9px;background:none;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer}
.studio-mode button[aria-pressed=true]{background:var(--studio-warm);color:var(--ink);box-shadow:0 1px 3px #00000008}
.studio-mode button[aria-pressed=true] .icon{color:var(--accent-solid)}
.studio-wallet{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--muted)}
.studio-wallet>.icon{width:17px;height:17px}.studio-wallet strong{color:var(--ink);font-size:17px;font-variant-numeric:tabular-nums;font-weight:650}.studio-wallet a{font-size:11px;color:var(--muted);margin-left:6px;text-decoration:none}.studio-wallet a:hover{color:var(--ink)}
.studio-layout{display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr);align-items:start;gap:26px}
.studio-composer{padding:25px;overflow:hidden;border-radius:17px;background:var(--paper)}
.studio-kicker{display:block;letter-spacing:1.5px;font-size:9px;font-weight:650;color:var(--muted);line-height:1.5}
.studio-composer-heading{padding-bottom:20px;border-bottom:1px solid var(--line-soft);margin-bottom:22px}.studio-composer-heading h2{font-size:23px;letter-spacing:-.7px;font-weight:650;margin:10px 0 7px;color:var(--ink)}.studio-composer-heading p{margin:0;color:var(--muted);font-size:12px;line-height:1.7}
.studio-field{margin-bottom:18px}.studio-field label,.studio-options>label{display:flex;flex-direction:column;gap:9px;font-size:12px;font-weight:550;color:var(--ink)}
#view-studio select,#view-studio input[type=number],#view-studio textarea{width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;background:var(--surface-alt);color:var(--ink);font-family:inherit;font-size:12px;line-height:1.5;padding:10px 12px;outline:none}
#view-studio select{padding-right:28px}#view-studio select:focus,#view-studio input:focus,#view-studio textarea:focus{border-color:var(--accent-solid);box-shadow:0 0 0 3px var(--studio-warm)}
#view-studio textarea{resize:vertical;min-height:158px;padding:13px 14px;line-height:1.85;font-size:13px;background:var(--paper)}#view-studio textarea::placeholder{color:var(--muted);opacity:.8}
.studio-prompt-wrap label{flex-direction:row;justify-content:space-between;align-items:center;margin-bottom:9px}.studio-prompt-wrap label>span:last-child{font-size:10px;font-weight:400;color:var(--muted)}
.studio-inspire{display:flex;align-items:center;gap:6px;border:0;background:none;padding:7px 0 0;color:var(--muted);font-size:11px;cursor:pointer}.studio-inspire .icon{height:14px;width:14px;color:var(--accent-solid)}.studio-inspire:hover{color:var(--ink)}
.studio-options{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px}.studio-span{grid-column:1/-1}.studio-options .studio-options{margin-bottom:0}
.studio-field-label{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--ink);font-size:12px;font-weight:550;margin-bottom:10px}.studio-field-label small,.studio-field-label>span:last-child{font-weight:400;font-size:10px;color:var(--muted)}.studio-field-label small{margin-left:4px}
.studio-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:125px;gap:6px;border:1px dashed var(--line-strong);border-radius:11px;background:var(--surface-alt);cursor:pointer;text-align:center;padding:14px;transition:background .15s,border-color .15s}.studio-drop:hover,.studio-drop.dragging{background:var(--studio-warm);border-color:var(--accent-solid)}.studio-drop strong{font-size:12px;font-weight:550;color:var(--ink)}.studio-drop small{font-size:10px;color:var(--muted);font-weight:400}.studio-upload-icon{display:grid;place-items:center;width:28px;height:28px;background:var(--paper);border:1px solid var(--line-soft);border-radius:8px;color:var(--muted);margin-bottom:3px}
.studio-help{font-size:10px;line-height:1.75;color:var(--muted);margin:8px 0 0;overflow-wrap:anywhere}.studio-reference-section{margin-top:22px}.studio-references{display:grid;gap:8px;margin-top:8px}.studio-reference{display:flex;align-items:center;gap:10px;padding:8px;border:1px solid var(--line);border-radius:9px;background:var(--paper);min-width:0}.studio-reference>img,.studio-reference>video{width:44px;height:44px;object-fit:cover;flex:none;border-radius:5px;background:var(--surface-alt)}.studio-reference>.icon-button{width:26px;height:26px;flex:none}.studio-ref-info{min-width:0;flex:1}.studio-ref-info>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--ink)}.studio-ref-info>span{display:block;font-size:10px;color:var(--muted);margin:4px 0;overflow-wrap:anywhere}.studio-ref-info>progress{width:100%;height:4px;accent-color:var(--accent-solid);display:block}.studio-ref-info>progress[hidden]{display:none}.studio-ref-info>.link-button{font-size:10px}
.studio-wait-note{display:flex;gap:10px;padding:12px;border:1px solid var(--line-soft);border-radius:10px;background:var(--studio-warm);margin-top:18px}.studio-wait-note>.icon{width:17px;height:17px;flex:none;color:var(--muted);margin-top:1px}.studio-wait-note p{font-size:11px;line-height:1.8;margin:0;color:var(--text)}.studio-wait-note strong{color:var(--ink);font-weight:550}
.studio-submit-area{border-top:1px solid var(--line-soft);padding-top:17px;margin-top:22px}.studio-quote{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--text)}.studio-quote strong{font-size:24px;letter-spacing:-.7px;font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}.studio-submit-area .studio-help{margin-top:4px;min-height:19px}.studio-submit{width:100%;justify-content:center;gap:8px;min-height:44px;border-radius:10px;margin-top:15px;font-size:13px!important}.studio-submit:disabled{opacity:.52;cursor:not-allowed}.studio-submit-area>small{display:block;text-align:center;font-size:10px;color:var(--muted);margin-top:11px}
.studio-error{padding:11px 12px;border:1px solid color-mix(in srgb,var(--warning) 28%,var(--line));background:color-mix(in srgb,var(--warning) 5%,var(--paper));border-radius:8px;font-size:11px;line-height:1.7;color:var(--text);margin-top:14px}
.studio-workspace{min-width:0}.studio-work-heading{display:flex;justify-content:space-between;align-items:center;padding:7px 2px 17px}.studio-work-heading h2{font-size:20px;margin:7px 0;font-weight:600;color:var(--ink)}.studio-work-heading h2 span{font-size:11px;font-weight:500;color:var(--muted);vertical-align:middle;margin-left:5px}.studio-work-heading p{font-size:12px;line-height:1.6;color:var(--muted);margin:0}.studio-work-heading .icon-button{border:1px solid var(--line);background:var(--paper);width:34px;height:34px;border-radius:9px}
.studio-work-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:17px}.studio-work-toolbar>.studio-help{margin:0;text-align:right}.studio-filters{display:flex;gap:4px}.studio-filters button{border:0;background:transparent;color:var(--muted);font-size:11px;padding:6px 10px;border-radius:6px;cursor:pointer}.studio-filters button[aria-pressed=true]{background:var(--paper);color:var(--ink);box-shadow:0 0 0 1px var(--line)}
.studio-jobs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.studio-empty{grid-column:1/-1;min-height:490px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;border:1px solid var(--line);border-radius:17px;background:radial-gradient(ellipse at 50% 35%,var(--studio-warm),transparent 65%),var(--paper)}.studio-empty-art{position:relative;display:grid;place-items:center;width:112px;height:112px;margin-bottom:30px;border:1px solid var(--line);border-radius:30px;transform:rotate(-8deg);background:var(--paper);box-shadow:12px 12px 0 var(--studio-warm)}.studio-empty-art>.icon{width:48px;height:48px;color:var(--accent-solid);opacity:.8;transform:rotate(8deg)}.studio-empty h3{font-size:18px;font-weight:550;color:var(--ink);margin:14px 0 12px;line-height:1.6}.studio-empty p{font-size:12px;color:var(--muted);line-height:1.95;white-space:pre-line;max-width:340px;margin:0}
.studio-job{background:var(--paper);border:1px solid var(--line);border-radius:13px;overflow:hidden;min-width:0;transition:border-color .15s,box-shadow .15s}.studio-job:hover{border-color:var(--line-strong);box-shadow:0 5px 16px #00000005}.studio-job-media{position:relative;aspect-ratio:4/3;overflow:hidden;background:var(--surface-alt)}.studio-media-button{display:block;border:0;background:transparent;padding:0;width:100%;height:100%;cursor:pointer;position:relative}.studio-media-button>img,.studio-media-button>video{display:block;object-fit:contain;width:100%;height:100%;transition:transform .2s}.studio-media-button:hover>img{transform:scale(1.025)}.studio-media-button>.icon{position:absolute;inset:0;margin:auto;width:42px;height:42px;padding:10px;border-radius:50%;color:#fff;background:#28261b99;backdrop-filter:blur(6px)}.studio-output-count{position:absolute;right:9px;bottom:9px;background:#27271dcc;color:#fff;font-size:10px;padding:4px 7px;border-radius:5px}.studio-expired{font-size:12px;color:var(--muted)}
.studio-job-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:20px;text-align:center;box-sizing:border-box;background:linear-gradient(150deg,var(--paper),var(--studio-warm))}.studio-job-placeholder>.icon{width:29px;height:29px;margin-bottom:3px;color:var(--muted)}.studio-job-placeholder>strong{font-size:14px;font-weight:550;color:var(--ink)}.studio-job-placeholder>span{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.studio-job-placeholder>small{font-size:10px;color:var(--muted)}.studio-job-placeholder.is-running>.icon{animation:studio-breathe 2s ease-in-out infinite}@keyframes studio-breathe{50%{opacity:.35;transform:translateY(-3px)}}
.studio-job-content{padding:15px}.studio-job-heading{display:flex;justify-content:space-between;align-items:center;gap:6px}.studio-job-heading>small{font-size:9px;color:var(--muted)}.studio-status{font-size:10px;display:inline-flex;align-items:center;gap:5px;color:var(--text)}.studio-status::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--muted)}.studio-status.completed::before{background:#6c977d}.studio-status.running::before,.studio-status.dispatching::before,.studio-status.saving::before,.studio-status.queued::before{background:#b99b59}.studio-status.failed::before,.studio-status.uncertain::before{background:#bc8276}.studio-job-prompt{font-size:12px;line-height:1.8;color:var(--ink);margin:12px 0 8px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere;min-height:42px}.studio-job-spec{font-size:9px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere;margin:0 0 13px}.studio-job-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line-soft);padding-top:11px;gap:10px}.studio-job-bill{display:flex;gap:7px;align-items:baseline}.studio-job-bill small{font-size:9px;color:var(--muted)}.studio-job-bill strong{font-size:13px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}.studio-reuse{border:0;border-radius:6px;background:var(--surface-alt);color:var(--text);font-size:10px;padding:6px 8px;cursor:pointer}.studio-reuse:hover{background:var(--studio-warm)}.studio-job-error{font-size:10px;line-height:1.7;color:var(--text);padding:9px;background:var(--surface-alt);border-radius:6px;overflow-wrap:anywhere}.studio-request-id{display:block;font-size:8px;line-height:1.6;color:var(--muted);margin-top:10px;overflow-wrap:anywhere;font-family:monospace}.studio-more{display:block;margin:22px auto 0;font-size:12px}
.studio-preview{max-width:980px;width:calc(100vw - 36px);max-height:92vh;padding:0;border:1px solid var(--line);border-radius:17px;background:var(--paper);color:var(--ink);overflow:auto}.studio-preview::backdrop{background:#181a225c;backdrop-filter:blur(5px)}.studio-preview>header{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid var(--line)}.studio-preview>header strong{font-size:16px}.studio-preview>header span{display:block;font-size:11px;color:var(--muted);margin-top:5px}.studio-preview>footer{display:flex;justify-content:flex-end;gap:10px;padding:0 22px 22px}.studio-preview>footer .button{font-size:12px}.studio-preview>p{font-size:12px;color:var(--text);line-height:1.9;margin:18px 22px;white-space:pre-wrap;overflow-wrap:anywhere}#studio-preview-media{background:var(--surface-alt);padding:16px;display:grid;gap:12px}#studio-preview-media>img,#studio-preview-media>video{display:block;max-width:100%;max-height:65vh;width:auto;height:auto;margin:auto;object-fit:contain}.studio-inline-download{display:block;font-size:12px;text-align:center;color:var(--text)}
#view-studio [hidden]{display:none!important}
.studio-reference-pickers.has-video{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.studio-reference-pickers.has-video .studio-drop{min-height:105px;padding:9px}
.studio-reference-pickers .studio-drop:focus-visible{outline:2px solid var(--accent-solid);outline-offset:2px}
#studio-reference-error{margin:8px 0 0}
.studio-ratios{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:0 0 16px}.studio-ratios button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:70px;border:1px solid var(--line);border-radius:8px;background:var(--surface-alt);color:var(--muted);font-size:10px;cursor:pointer}.studio-ratios button[aria-pressed=true]{background:var(--studio-warm);border-color:var(--accent-solid);color:var(--ink)}.studio-ratio-shape{display:block;border:1.5px solid currentColor;border-radius:2px;width:21px;height:21px;opacity:.8}.ratio-landscape{width:27px;height:18px}.ratio-portrait{width:18px;height:27px}.ratio-wide{width:29px;height:16px}.ratio-tall{width:16px;height:29px}
.studio-library-button{display:flex;align-items:center;gap:7px;width:100%;margin-top:8px;padding:11px;border:1px solid var(--line);border-radius:9px;color:var(--ink);background:var(--paper);font-size:11px;cursor:pointer}.studio-library-button:hover{background:var(--studio-warm)}.studio-library-button span{margin-left:auto;font-size:9px;color:var(--muted)}.studio-library-button .icon{width:14px;height:14px}.studio-library{max-width:720px}.studio-library-grid{padding:0 22px 22px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.studio-library-item{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;text-align:left;background:var(--paper);padding:0 0 10px;cursor:pointer;color:var(--ink)}.studio-library-item:hover{border-color:var(--accent-solid)}.studio-library-item>img,.studio-library-video{display:block;aspect-ratio:4/3;width:100%;object-fit:cover;background:var(--surface-alt)}.studio-library-video{display:grid;place-items:center;color:var(--muted)}.studio-library-video .icon{width:32px;height:32px}.studio-library-item>strong{font-size:11px;font-weight:500;margin:10px 10px 5px;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.studio-library-item>small{font-size:10px;color:var(--muted);margin:0 10px}.studio-video-cover{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;background:linear-gradient(145deg,var(--paper),var(--studio-warm));color:var(--muted);font-size:12px}.studio-video-cover .icon{width:42px;height:42px;color:var(--accent-solid)}.studio-mobile-jump{display:none}#studio-pending-notice .link-button{display:block;margin-top:8px;font-size:11px;color:var(--ink)}#studio-workspace{scroll-margin-top:25px}
@media(max-width:820px){.studio-mobile-jump{display:block;text-align:right;color:var(--text);font-size:12px;margin:-5px 0 15px;text-decoration:none}}
@media(max-width:480px){.studio-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:0 15px 15px}.studio-library-button span{font-size:8px}}
@media(min-width:1550px){.studio-jobs{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1150px){.studio-layout{grid-template-columns:minmax(280px,340px) minmax(0,1fr);gap:18px}.studio-composer{padding:21px}.studio-jobs{grid-template-columns:1fr}.studio-job-media{aspect-ratio:16/10}}
@media(max-width:820px){.studio-layout{grid-template-columns:1fr}.studio-composer{padding:23px}.studio-jobs{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-workspace{margin-top:12px}.studio-empty{min-height:330px}.studio-mode button{padding:10px 16px}.studio-wallet a{display:none}}
@media(max-width:480px){.studio-topline{gap:12px;margin-bottom:17px}.studio-mode{width:100%;box-sizing:border-box}.studio-mode button{flex:1}.studio-wallet{width:100%;justify-content:flex-start;font-size:11px}.studio-wallet strong{font-size:16px}.studio-wallet a{display:block;margin-left:auto}.studio-composer{padding:19px;border-radius:13px}.studio-composer-heading h2{font-size:22px}.studio-jobs{grid-template-columns:1fr}.studio-empty{padding:20px;min-height:340px}.studio-work-toolbar{gap:5px}.studio-work-toolbar>.studio-help{font-size:9px}.studio-preview>footer{justify-content:stretch;flex-wrap:wrap}.studio-preview>footer .button{flex:1}}
@media(prefers-reduced-motion:reduce){.studio-job-placeholder.is-running>.icon{animation:none}.studio-media-button>img{transition:none}}
.studio-job-actions{display:flex;align-items:center;gap:5px}
.studio-delete{width:29px;height:29px}
.studio-delete .icon{width:15px;height:15px}
.studio-delete:hover{background:var(--danger-soft);color:var(--danger)}
.studio-progress-detail{max-width:90%;text-align:center;overflow-wrap:anywhere}
#studio-delete-description{margin:0 0 18px;color:var(--text)}
