/* One Studio layout for every medium. Shared theme tokens come from the chat app. */
.studio-nav{display:grid;gap:2px;padding:8px 0;border-block:1px solid var(--line,#eee);margin:7px 0}.studio-nav-button{border:0;background:transparent;color:var(--ink,#333);text-align:start;padding:8px 12px;font-family:inherit;font-weight:500;font-size:12px;line-height:1.3;border-radius:9px}.studio-nav-button:hover{background:#f8eeee}.studio-launchers{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:7px}.studio-launchers button{border:1px solid #eadde0;border-radius:10px;padding:5px 9px;background:#fff8f9;color:#725761;font-size:12px;display:flex;gap:5px;align-items:center}
#studioPage.studio-page{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;padding:0;border:0;border-radius:0;background:var(--panel,#fff);color:var(--ink,#292329);overflow:hidden;font-family:inherit;font-size:14px;box-sizing:border-box}
.studio-page::backdrop,.studio-warning::backdrop{background:#625b6470;backdrop-filter:blur(8px)}.studio-header{display:flex;align-items:center;gap:16px;justify-content:space-between;height:64px;padding:12px 24px;box-sizing:border-box;border-bottom:1px solid var(--line,#eee)}.studio-brand{display:flex;align-items:center;gap:10px;min-width:0}.studio-brand img{width:32px;height:32px}.studio-brand strong{font-size:15px;white-space:nowrap}.studio-header>.studio-button{order:3}.studio-tabs{height:54px;box-sizing:border-box;display:flex;align-items:center;gap:6px;padding:8px 24px;overflow-x:auto;border-bottom:1px solid var(--line,#eee)}.studio-tabs button{white-space:nowrap;flex:none}.studio-tabs .studio-button{background:transparent;border-color:transparent;color:var(--muted,#72656c)}.studio-tabs .studio-button[aria-pressed=true]{background:#fff0f1;color:var(--red,#ef4148);border-color:#f8cdd1}
#studioPage .studio-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);height:calc(100% - 118px);overflow:hidden}.studio-workspace,.studio-side{min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px;box-sizing:border-box}.studio-workspace{background:linear-gradient(180deg,#fff9fa 0,#fff 70%)}.studio-side{border-inline-start:1px solid var(--line,#eee);background:#fcf9fa}
.studio-page input,.studio-page select,.studio-page textarea,.studio-warning input,.studio-warning textarea{font:inherit;border:1px solid var(--line,#e7dce0);border-radius:10px;padding:9px;box-sizing:border-box;background:var(--panel,#fff);color:var(--ink,#292329);max-width:100%;min-width:0}.studio-page input:focus,.studio-page textarea:focus,.studio-page select:focus{outline:2px solid #ef414830;outline-offset:1px;border-color:#ef8189}
.studio-button,.studio-primary,.market-use{font-family:inherit;font-size:12px;line-height:1.4;cursor:pointer;border:1px solid var(--line,#e7dce0);background:var(--panel,#fff);color:var(--ink,#292329);padding:8px 12px;border-radius:10px;text-decoration:none}.studio-button:hover{background:#fff1f3;border-color:#f2c1c8}.studio-primary,.market-use{background:var(--red,#ef4148);border-color:var(--red,#ef4148);color:#fff;font-weight:600}.studio-primary:disabled,.market-use:disabled{opacity:.5;cursor:wait}.studio-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:12px}.studio-toolbar input{width:100%;flex:1;font-weight:600}.studio-file-select{max-width:180px}.studio-config{display:flex;gap:8px;margin:16px 0 10px}.studio-config select{font-size:12px}.studio-config select:first-child{flex:1}.studio-source{display:block;width:100%;min-height:240px;resize:vertical;font:13px/1.6 ui-monospace,monospace!important}.studio-preview{display:grid;place-items:center;max-height:48dvh;overflow:auto;margin:12px 0}.studio-preview:empty{display:none}.studio-preview img,.studio-preview video{max-width:100%;max-height:45dvh;object-fit:contain;border-radius:16px}.studio-preview audio{width:100%}.studio-app-preview{width:100%;height:350px;border:1px solid var(--line,#eee);border-radius:14px;background:white}.studio-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;min-height:210px;width:100%;padding:25px;box-sizing:border-box;border:1px solid #f1d9de;border-radius:22px;background:radial-gradient(ellipse at top,#ffe9ed,transparent 70%),#fff}.studio-empty-symbol{font-size:34px;color:var(--red,#ef4148);width:64px;height:64px;display:grid;place-items:center;background:#fff;border-radius:20px;box-shadow:0 8px 28px #d7496212}.studio-empty h2{font-size:24px;letter-spacing:-.5px;margin:16px 0 6px}.studio-empty p{font-size:13px;line-height:1.6;max-width:320px;color:var(--muted,#7d6974);margin:0}
.studio-prompt-box{padding:12px;border:1px solid #ead7dd;border-radius:18px;background:#fff;box-shadow:0 4px 18px #af3b5510}.studio-page textarea.studio-prompt{width:100%;min-height:110px;max-height:40dvh;resize:vertical;border:0;padding:8px;font-size:14px;line-height:1.6;box-shadow:none;background:transparent}.studio-page textarea.studio-constraints{width:100%;min-height:46px;max-height:180px;resize:vertical;font-size:12px;background:#fff9fa;border-style:dashed}.studio-prompt-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.studio-prompt-actions .studio-primary{width:auto;min-width:110px;margin:0;min-height:38px}.studio-attach{font-size:20px;line-height:1;width:38px;height:38px;padding:0}.studio-advanced{margin-top:12px;border-top:1px solid #f0e3e7;padding-top:10px;font-size:12px}.studio-advanced summary,.studio-history summary{cursor:pointer;color:var(--muted,#7d6974);font-size:12px}.studio-video-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.studio-video-options label{display:flex;flex-direction:column;gap:5px;font-size:11px}.studio-video-options input{width:100%;font-size:13px}.studio-lyrics{width:100%;min-height:110px;margin:10px 0}.studio-instrumental{display:flex;gap:8px;align-items:center}.studio-reference{display:flex;gap:8px;align-items:center;margin-bottom:8px}.studio-reference img{width:64px;height:64px;object-fit:cover;border-radius:10px}.studio-actions{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.studio-actions:not(.studio-actions-expanded)>:nth-child(n+4):not(.studio-actions-more){display:none}.studio-actions-more{letter-spacing:0}.studio-status{font-size:12px;color:var(--muted,#7d6974);white-space:pre-wrap;overflow-wrap:anywhere}.studio-history{margin-top:20px;border-top:1px solid #eee2e6;padding-top:12px}.studio-library{max-height:240px;overflow:auto;margin-top:10px}.studio-library-item{display:block;width:100%;text-align:start;padding:10px;border:1px solid #eee2e6;border-radius:10px;background:#fff;font-family:inherit;font-size:12px;line-height:1.5;color:var(--ink,#292329);margin:5px 0}
.market-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.market-heading h2{font-size:24px;letter-spacing:-.7px;margin:0}.market-count{font-size:12px;background:#fbe6eb;color:#ad4057;padding:5px 9px;border-radius:20px}.market-intro{font-size:13px;color:var(--muted,#7d6974);margin:8px 0 18px}.market-search{width:100%;height:42px}.market-filters{display:flex;gap:6px;margin:12px 0}.market-filters button{border-radius:20px;font-size:11px}.market-filters button[aria-pressed=true]{border-color:#eaaaB9;background:#fff0f4;color:#b53f59}.market-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding-bottom:20px}.market-card{display:flex;flex-direction:column;min-width:0;border:1px solid #ecdfe3;border-radius:16px;background:#fff;padding:8px;transition:transform .15s,border-color .15s;overflow:hidden}.market-card:hover{transform:translateY(-2px);border-color:#e896aa}.market-card.selected{border-color:var(--red,#ef4148);box-shadow:0 0 0 2px #ef414815}.market-card>img{display:block;width:100%;height:180px;object-fit:cover;border-radius:11px;background:#f8eef1}.market-card h3{font-size:13px;font-weight:600;line-height:1.45;margin:7px 4px;overflow-wrap:anywhere}.market-reference-label,.market-attribution{font-size:10px;color:var(--muted,#7d6974);margin:5px 4px 0;overflow-wrap:anywhere}.market-source{font-size:10px;color:#a04e65;margin:5px 4px;text-decoration:none}.market-use{width:100%;margin-top:auto;font-size:11px;padding:8px}.market-import{border:1px dashed #e6cdd5;border-radius:12px;margin:10px 0;padding:10px}.market-import summary{font-size:12px;cursor:pointer}.market-import input,.market-import textarea{width:100%;margin:5px 0}.market-import textarea{min-height:90px}.studio-view-toggle{display:none}
.studio-warning{width:min(430px,90vw);border:1px solid #e4ccd5;border-radius:18px;padding:20px;background:var(--panel,#fff);color:var(--ink,#292329)}.studio-warning label{display:block;margin:8px 0}.studio-warning input,.studio-warning textarea{display:block;width:100%;margin:5px 0}.studio-warning button{margin:4px}.studio-warning textarea{min-height:120px}.studio-crop-inputs{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:1500px){.market-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.studio-header{height:62px;padding:10px 12px;gap:8px}.studio-brand strong{font-size:12px}.studio-brand img{width:26px;height:26px}.studio-header>.studio-button{padding:7px;font-size:11px}.studio-view-toggle{display:flex;gap:3px;margin-inline-start:auto}.studio-view-toggle button{font-size:10px;padding:6px;border-radius:8px}.studio-view-toggle button[aria-pressed=true]{background:#ffeaee;border-color:#f1bac7;color:#b3425c}.studio-tabs{height:48px;padding:7px 10px;gap:2px}.studio-tabs button{font-size:11px;padding:7px 9px}#studioPage .studio-layout{height:calc(100% - 110px);display:block;overflow:hidden}.studio-workspace,.studio-side{height:100%;padding:16px;overflow-y:auto}.studio-side{border:0}#studioPage[data-view=workspace] .studio-side,#studioPage[data-view=market] .studio-workspace{display:none}.studio-toolbar{flex-wrap:wrap}.studio-toolbar input{flex-basis:100%}.studio-empty{min-height:180px}.studio-empty h2{font-size:22px}.studio-page input,.studio-page select,.studio-page textarea{font-size:16px!important}.studio-page .studio-video-options input{font-size:16px!important}.studio-prompt-box{padding:9px}.studio-source{min-height:190px}.market-heading h2{font-size:22px}.market-grid{gap:10px}.market-card>img{height:155px}.market-card h3{font-size:12px}.studio-preview{max-height:40dvh}}
@media(max-width:370px){.studio-brand strong{max-width:76px;white-space:normal;font-size:11px}.studio-brand{gap:5px}.studio-view-toggle button{font-size:9px}.market-card>img{height:120px}.studio-workspace,.studio-side{padding:12px}.market-grid{gap:8px}.studio-video-options{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.market-card{transition:none}.market-card:hover{transform:none}}
/* Media stages live inside the existing Studio workspace. */
.studio-media-integration{margin-top:18px;display:grid;gap:16px;min-width:0}.studio-media-integration[hidden],.studio-local-controls[hidden],.studio-local-music-options[hidden],.studio-local-video-options[hidden],.studio-music-workflow[hidden],.studio-media-availability[hidden],.studio-experimental-settings[hidden],.studio-local-history[hidden]{display:none}.studio-media-integration p{font-size:12px;line-height:1.65;color:var(--muted,#72656c);overflow-wrap:anywhere}.studio-media-availability{padding:12px 14px;margin:0;background:#f2f8f4;border:1px solid #d1e8d9;border-radius:12px}.studio-media-availability[data-worker-status=offline]{background:#fff8ec;border-color:#ead5ad}.studio-local-music-options,.studio-experimental-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.studio-media-integration label{display:flex;flex-direction:column;gap:6px;font-size:12px;margin:8px 0}.studio-media-integration label:has(input[type=checkbox]){flex-direction:row;align-items:center}.studio-media-integration input[type=checkbox]{min-width:20px;min-height:20px}.studio-media-integration select,.studio-media-integration textarea,.studio-media-integration input:not([type=checkbox]){width:100%}.studio-local-video-options>select{margin-bottom:8px}.studio-music-workflow{display:grid;gap:12px}.studio-music-stage{border:1px solid var(--line,#e7dce0);border-radius:14px;padding:14px;background:var(--panel,#fff);min-width:0}.studio-music-stage>summary{cursor:pointer;font-weight:650;padding:3px 0 8px}.studio-music-stage .studio-button{margin:5px 6px 5px 0;min-height:38px;white-space:normal;text-align:start}.studio-music-stage textarea{min-height:85px;resize:vertical}.studio-music-stage audio,.studio-music-stage video{max-width:100%;width:100%}.studio-music-stage video{max-height:48vh}.studio-cover-preview img{max-width:100%;max-height:260px;object-fit:contain;border-radius:10px}.studio-media-footer{display:flex;gap:8px;flex-wrap:wrap}.studio-cue-preview{position:relative;background:#201e24;min-height:110px;aspect-ratio:16/9;border-radius:12px;overflow:hidden;margin:12px 0}.studio-cue-preview img{width:100%;height:100%;object-fit:contain}.studio-cue-preview p{position:absolute;inset:auto 8px 12px;text-align:center;color:white;background:#0008;border-radius:4px;padding:5px;white-space:pre-wrap;margin:0;font-size:16px}.studio-cue-preview p:empty{display:none}.studio-cue-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;border-top:1px solid var(--line,#eee);padding:8px 0}.studio-cue-row label:nth-child(3){grid-column:1/-1}.studio-cue-rows{max-height:520px;overflow-y:auto;padding-inline:2px}.studio-h3-terms pre{white-space:pre-wrap;max-height:260px;overflow:auto;overflow-wrap:anywhere;font:12px/1.5 inherit}.studio-local-history h3{font-size:12px;margin:14px 0 8px}.studio-local-library{display:grid;gap:6px;max-height:240px;overflow:auto}.studio-local-library button{text-align:start}.studio-media-integration button:focus-visible,.studio-music-stage summary:focus-visible{outline:2px solid #e74256;outline-offset:3px}
@media(max-width:760px){.studio-music-stage{padding:12px}.studio-music-stage .studio-button,.studio-media-footer .studio-button{min-height:44px}.studio-cue-preview p{font-size:15px}.studio-media-integration input[type=file]{font-size:12px!important}.studio-local-music-options{gap:7px}.studio-media-integration{gap:12px}}
@media(max-width:370px){.studio-local-music-options,.studio-experimental-settings{grid-template-columns:1fr}}

#studioPage [hidden]{display:none!important}

.studio-musical-details{grid-column:1/-1}.studio-musical-details>summary{cursor:pointer;font-size:12px;color:var(--muted,#72656c)}.studio-music-stage-nav{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 12px}.studio-music-stage-nav button{font-size:11px;flex:1;padding:8px 6px;min-width:75px;min-height:38px}.studio-music-stage{scroll-margin-block:12px}
