.studio-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px;margin:16px 0;color:var(--tx)}
.studio-card h2{font-size:17px;font-weight:600;font-family:inherit;margin:0 0 8px}.studio-card h3{font-size:14px;margin:14px 0 8px}
.studio-card p,.studio-help{font-size:12px;line-height:1.6;color:var(--tx3);margin:6px 0 12px}
.studio-row{display:flex;gap:10px;flex-wrap:wrap;align-items:end}.studio-row>*{flex:1 1 180px;min-width:0;max-width:100%}
.studio-card label{display:block;font-size:12px;line-height:1.5;margin:8px 0}.studio-card input:not([type=checkbox]),.studio-card select,.studio-card textarea{display:block;width:100%;box-sizing:border-box;padding:10px;border:1px solid var(--border);border-radius:8px;background:#fff;font:inherit;color:var(--tx);min-height:44px;min-width:0;max-width:100%}
.studio-card button,.studio-button{min-height:44px;padding:10px 14px;border:1px solid var(--gold);background:var(--warm);color:#775922;border-radius:8px;cursor:pointer;font-size:12px;font-weight:600;font-family:inherit}
.studio-card button:disabled{opacity:.55;cursor:wait}.studio-card button:focus-visible,.studio-card input:focus-visible,.studio-card select:focus-visible{outline:3px solid #7a9ec4;outline-offset:2px}
.studio-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}.studio-asset{border:1px solid var(--border);border-radius:10px;padding:10px;min-width:0}.studio-asset img,.studio-asset video{width:100%;max-height:210px;object-fit:contain;background:#181818;border-radius:6px}.studio-asset audio{width:100%}.studio-asset strong{display:block;font-size:12px;margin:6px 0;overflow-wrap:anywhere}
.studio-status{font-size:12px;line-height:1.6;padding:10px;background:#f5f1e9;border-radius:8px;margin:10px 0;white-space:pre-line}.studio-error{background:#fff0ed;color:#9d382d}.studio-plan{max-height:550px;overflow:auto}.studio-shot{padding:12px 0;border-bottom:1px solid var(--border)}.studio-shot p{margin:4px 0}.studio-shot .studio-row{align-items:center}.studio-shot select{max-width:100%}.studio-gap{color:#9d382d;font-weight:600}
.studio-card details{margin:12px 0}.studio-card summary{cursor:pointer;min-height:34px;font-weight:600;font-size:13px}.studio-pill{display:inline-block;font-size:11px;border-radius:12px;padding:3px 8px;background:#edf1e8;color:#4c693b}
.studio-review{border-top:1px solid var(--border);padding-top:8px}.studio-review blockquote{margin:6px 0;padding:8px 12px;border-left:3px solid var(--gold);font-size:12px;line-height:1.6;white-space:pre-wrap}.studio-asset a{font-size:13px;font-weight:600;color:#775922;overflow-wrap:anywhere}
@media(max-width:520px){.studio-grid{grid-template-columns:1fr}.studio-asset{padding:7px}.studio-asset input,.studio-asset select{font-size:12px}.studio-row>*{flex-basis:100%;min-width:0}.studio-card{padding:12px}.studio-card input,.studio-card textarea,.studio-card select{font-size:16px!important}.studio-asset video,.studio-asset img{max-height:160px}}
[hidden]{display:none!important}
.studio-library-work{border:1px solid var(--gold);border-radius:10px;padding:12px;margin:12px 0;background:var(--cream)}.studio-library-work progress{width:100%;height:12px;accent-color:var(--gold)}.studio-asset details textarea{min-height:100px}.studio-asset .studio-favorite{background:transparent;border:0;padding:6px;font-size:12px}.studio-asset p{color:var(--tx);font-size:12px}
.studio-library-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:var(--warm);border-radius:10px;padding:4px;margin:14px 0}
.studio-library-tabs button{border:0;background:transparent;color:var(--tx);min-width:0;padding:10px 8px}.studio-library-tabs button[aria-selected=true]{background:#fff;box-shadow:0 1px 4px #312c241a;color:#775922}
.studio-library-filters{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px;align-items:end}.studio-library-filters label{min-width:0}
.studio-library-settings{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0;padding:10px;background:var(--cream);border-radius:8px}.studio-library-settings p{margin:0;color:var(--tx);flex:1 1 180px}.studio-library-settings button{background:#fff}
.studio-card .studio-primary{background:#775922;color:#fff;width:100%;border-color:#775922}.studio-library-pages{display:flex;justify-content:space-between;gap:12px;margin:14px 0}.studio-library-pages button{flex:1}
.studio-media-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:start;margin:12px 0}.studio-media-tile{position:relative;min-width:0;border:1px solid var(--border);border-radius:10px;background:#fff;overflow:hidden;padding-bottom:10px}
.studio-card .studio-tile-preview{display:flex;position:relative;align-items:center;justify-content:center;width:100%;aspect-ratio:4/5;padding:0;border:0;border-radius:0;background:#eeeae2;overflow:hidden;color:var(--tx);min-height:0}
.studio-card .studio-tile-preview:disabled{opacity:1;cursor:default}.studio-tile-preview img,.studio-tile-preview video{display:block;width:100%;height:100%;object-fit:contain;background:#1c1c1b;pointer-events:none}.studio-tile-preview video{position:absolute;inset:0}
.studio-tile-preview img{position:absolute;inset:0}.studio-tile-preview:focus-visible{outline-offset:-3px}.studio-tile-kind{position:absolute;bottom:7px;left:7px;background:#27251de6;color:#fff;border-radius:5px;padding:4px 7px;font-size:11px}.studio-tile-symbol{font-size:40px;color:#775922}
.studio-tile-title{display:block;font-size:12px;line-height:1.45;font-weight:600;margin:10px 10px 5px;overflow-wrap:anywhere}.studio-tile-meta{display:block;color:var(--tx3);font-size:11px;line-height:1.4;margin:0 10px;overflow-wrap:anywhere}
.studio-tile-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;padding:18px;box-sizing:border-box;font-size:11px;color:#77674d}.studio-tile-frame{display:flex;align-items:center;justify-content:center;max-width:80%;max-height:70%;width:64%;border:1px dashed #ae9c7c;border-radius:4px;font-size:24px;font-weight:400;color:#998365}
.studio-tile-state{display:inline-block;margin:8px 10px 0;font-size:10px;line-height:1.4;padding:3px 6px;border-radius:5px;background:#f3f0e9;color:#71634c}.studio-media-tile[data-state=saved] .studio-tile-state{background:#eaf2ee;color:#406c54}.studio-media-tile[data-state=creating]{border-color:var(--gold)}.studio-media-tile[data-state=creating] .studio-tile-state{background:#775922;color:#fff}.studio-media-tile[data-state=failed] .studio-tile-state{background:#fff0ed;color:#9d382d}
.studio-library-empty{grid-column:1/-1;text-align:center;padding:28px 14px;background:var(--cream);border:1px dashed var(--border);border-radius:10px;font-size:14px}.studio-library-empty p{margin:10px auto;max-width:340px}
.studio-dialog{position:fixed;inset:0;width:calc(100% - 24px);max-width:620px;max-height:88dvh;margin:auto;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;box-shadow:0 20px 80px #0004}.studio-dialog::backdrop{background:#171612a6}.studio-dialog-head{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}.studio-dialog-head h2{margin:0;min-width:0;overflow-wrap:anywhere}.studio-dialog-head button{flex-shrink:0}
.studio-dialog .studio-asset{padding:0;border:0}.studio-dialog .studio-asset img,.studio-dialog .studio-asset video{max-height:56dvh}.studio-dialog .genLbl{font-size:12px;letter-spacing:0;text-transform:none}.studio-dialog #genSettings>div:last-child{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.studio-dialog #genSettings{margin:0!important}body:has(.studio-dialog[open]){overflow:hidden}
@media(max-width:760px){.studio-media-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.studio-media-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.studio-tile-title{font-size:12px;margin:9px 8px 5px}.studio-tile-meta{margin:0 8px}.studio-library-filters{grid-template-columns:minmax(0,1fr)}.studio-dialog #genSettings>div:last-child{grid-template-columns:minmax(0,1fr)!important}.studio-library-work .studio-row>*{flex:1 1 90px}.studio-library-tools>*{flex:1 1 120px}.studio-library-settings button{width:100%}}
.studio-idea{background:#fff;border:1px solid var(--border);border-radius:10px;padding:14px;margin-bottom:12px;overflow-wrap:anywhere}.studio-idea h3{font-size:16px;margin:10px 0}.studio-idea p,.studio-idea li{font-size:13px;line-height:1.6;margin:8px 0}.studio-idea ol{padding-left:20px}.studio-idea summary{font-size:13px;cursor:pointer;padding:8px 0}.studio-idea button{width:100%;margin-top:12px}.studio-search-credit{width:100%;height:170px;border:0;margin-top:12px}
.ahdr-l,.ahdr-r{min-width:0}.ahdr-l{flex:1}.ahdr-r{flex-shrink:0}.amain{overflow-wrap:break-word}
@media(max-width:520px){.ahdr{padding:10px 14px;gap:8px}.ahdr-r .badge{display:none}.studio-card input,.studio-card select,.studio-card textarea{appearance:none;-webkit-appearance:none}.studio-card select{background:var(--cream)}}

.studio-import-panel{margin-top:12px;padding:12px;background:var(--cream);border:1px solid var(--border);border-radius:10px}.studio-import-panel section{margin-top:12px}#libraryBring{width:100%;text-align:left;margin-top:12px}#libraryImportBusy{color:#775922}
.studio-plan{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:none;overflow:visible}.studio-shot{min-width:0;padding:10px;border:1px solid var(--border);border-radius:12px}.studio-plan-preview img,.studio-plan-preview video{width:100%;height:180px;object-fit:contain;background:#171717;border-radius:8px}.studio-shot details{margin-top:8px}.studio-shot select,.studio-shot input{width:100%;min-width:0}@media(min-width:900px){.studio-plan{grid-template-columns:repeat(3,minmax(0,1fr))}}

#scenePlan .studio-shot>strong{display:block;margin:8px 0;overflow-wrap:anywhere}
#projectList .studio-asset>button:first-child{width:100%;text-align:left}

/* Production controls retain the studio's image green and video blue accents. */
#genSettings>div:last-child{grid-template-columns:minmax(0,1fr)!important}
#genSettings .genLbl{font-size:11px;letter-spacing:.04em;min-width:0}
.studio-model-trigger{display:block;width:100%;margin-top:6px!important;padding:12px 14px!important;background:#fff!important;text-align:left;white-space:normal;line-height:1.45;font-size:14px!important;color:var(--tx)!important;border:1px solid var(--border)!important;border-radius:12px!important;box-shadow:0 2px 6px #30291b08}
.studio-model-dialog{padding:20px;border:1px solid var(--border);border-radius:18px;background:var(--cream);color:var(--tx)}
.studio-model-option{display:block;width:100%;padding:15px;margin:10px 0;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--tx);text-align:left;font:inherit}
.studio-model-option[aria-pressed=true]{border-color:var(--gold);background:var(--warm);box-shadow:inset 3px 0 var(--gold)}
#scenePlan{align-items:start}#scenePlan .studio-shot{background:#fff;box-shadow:0 3px 12px #30291b0a;padding:8px;border-radius:14px}
#scenePlan .studio-plan-preview{padding:0;border:0;overflow:hidden;margin:0}
#scenePlan .studio-shot>strong{font-size:12px;line-height:1.4;margin:8px 3px}
#scenePlan .studio-shot-actions{display:grid;gap:7px;margin:12px 0}
#scenePlan .studio-shot-actions button{padding:10px 6px;font-size:12px;line-height:1.4;width:100%;border-radius:9px}
#scenePlan .shot-image{background:#eaf2ee;color:#416e5b;border-color:#abc5b8}#scenePlan .shot-video{background:#e8f0f8;color:#476e95;border-color:#b5cce3}
#scenePlan summary{font-size:12px}#scenePlan .studio-plan-preview button{font-size:12px;padding:8px;width:100%}
@media(min-width:760px){#genSettings>div:last-child{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
