:root{--bg:oklch(1 0 0);--surface:oklch(.97 .006 140);--ink:oklch(.23 .015 140);--muted:oklch(.45 .012 140);--primary:oklch(.43 .1 140);--line:oklch(.88 .008 140);--accent:oklch(.94 .05 90);--danger:oklch(.45 .17 25)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 'Segoe UI',system-ui,sans-serif}header{height:74px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:28px;padding:0 36px}.brand{font-size:20px;font-weight:650;text-decoration:none;display:flex;gap:10px;align-items:center}.symbol{display:grid;place-items:center;width:32px;height:32px;background:var(--primary);color:var(--bg);border-radius:8px;font-size:21px}.header-note{color:var(--muted)}header .status{margin-left:auto}a{color:var(--primary)}main{max-width:1440px;padding:32px 36px;margin:auto}.page-title{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}h1{font-size:28px;font-weight:650;letter-spacing:-.02em;line-height:1.25;margin:0 0 10px;text-wrap:balance}h2{font-size:18px;line-height:1.35;margin:0 0 14px;font-weight:650}h3{font-size:15px;margin:0 0 10px}p{max-width:72ch;margin:6px 0 14px;color:var(--muted)}button{font:inherit;font-weight:600;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:7px;padding:9px 15px;cursor:pointer;transition:background .15s,opacity .15s}button:hover{background:var(--surface)}button.primary{background:var(--primary);border-color:var(--primary);color:var(--bg)}button.primary:hover{filter:brightness(.92)}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid var(--primary);outline-offset:3px}input,select{font:inherit;border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:6px;padding:9px;min-width:0;width:100%}input::placeholder{color:var(--muted)}input[type=file]{font-size:12px;padding:7px}label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.help{font-size:13px;color:var(--muted)}details{border:1px solid var(--line);border-radius:8px;padding:14px 18px}summary{font-weight:600;cursor:pointer}details[open]>summary{margin-bottom:14px}.connect-form{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.connect-form label{width:min(380px,100%)}.connect-form .help{max-width:340px;align-self:center}.workspace{display:grid;grid-template-columns:238px minmax(0,1fr);gap:30px;margin-top:28px}aside{border-right:1px solid var(--line);padding-right:22px}aside details{margin-top:24px;padding:12px}aside label{margin:12px 0}nav button{display:block;width:100%;text-align:left;margin:0 0 8px;font-weight:500}nav button.selected{background:var(--surface);border-color:var(--primary)}nav small{display:block;color:var(--muted)}.empty{padding:70px 36px;background:var(--surface);border-radius:10px;min-height:420px}.empty-symbol{font-size:52px;color:var(--primary)}.job-head{display:flex;justify-content:space-between;align-items:start;gap:16px;margin-bottom:24px}.actions{display:flex;gap:8px;flex-wrap:wrap}.status{font-size:12px;padding:4px 9px;border-radius:5px;background:var(--surface);border:1px solid var(--line);white-space:nowrap}.status.success{color:var(--primary)}.status.failed{color:var(--danger)}.status.running{background:var(--accent)}.sources{display:grid;grid-template-columns:150px 1fr;gap:18px;margin-bottom:26px}.sources img{height:218px;max-width:100%;object-fit:contain;background:var(--surface);border-radius:7px}.sources video{height:218px;width:100%;background:oklch(.12 0 0);border-radius:7px}.media-meta{font-size:12px;color:var(--muted);margin-top:6px}.outfits{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin:12px 0 26px}.outfits figure{margin:0;min-width:0}.outfits img{width:100%;height:126px;object-fit:contain;border:1px solid var(--line);border-radius:6px;background:var(--bg)}figcaption{font-size:12px;margin-top:6px}.outfits .result{margin-top:7px;border-color:var(--primary)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}.section-heading p{font-size:13px;margin:0}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px}th{text-align:left;color:var(--muted);font-weight:600}td,th{padding:11px 8px;border-bottom:1px solid var(--line);vertical-align:top}td:first-child,th:first-child{padding-left:0}td .help{font-size:12px;max-width:52ch;overflow-wrap:anywhere}td button{font-size:12px;padding:5px 8px}code{font-size:11px;font-family:Consolas,monospace;color:var(--muted);overflow-wrap:anywhere}.params{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.cost{padding:16px 0;border-top:1px solid var(--line);margin-top:24px;display:flex;gap:20px;justify-content:space-between;align-items:center}.cost p{margin:0}.log{max-height:220px;overflow:auto;list-style:none;padding:0;font-size:12px}.log li{padding:7px 0;border-bottom:1px solid var(--line)}.log time{color:var(--muted);margin-right:12px}.final-video{display:block;width:100%;max-height:600px;background:oklch(.12 0 0);border-radius:8px;margin:14px 0}#message{padding:12px 16px;background:var(--accent);border-radius:7px;margin-bottom:20px;overflow-wrap:anywhere}footer{border-top:1px solid var(--line);padding:20px 36px;color:var(--muted);font-size:12px}.inline-task{display:flex;gap:6px;margin-top:8px}.inline-task input{width:190px;font-size:12px}
@media(max-width:1000px){header{padding:0 20px}.header-note{display:none}main{padding:24px 20px}.workspace{grid-template-columns:190px minmax(0,1fr);gap:20px}.outfits{grid-template-columns:repeat(4,minmax(0,1fr))}.page-title{align-items:start}h1{font-size:24px}.job-head{flex-direction:column}.params{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){header{gap:10px}.brand{font-size:17px}.workspace{grid-template-columns:1fr}aside{border-right:0;border-bottom:1px solid var(--line);padding:0 0 20px}nav{display:flex;gap:8px;overflow:auto}nav button{min-width:150px}.page-title{flex-direction:column}.sources{grid-template-columns:100px minmax(0,1fr)}.sources img,.sources video{height:185px}.outfits{grid-template-columns:repeat(3,minmax(0,1fr))}.cost{align-items:start;flex-direction:column}.empty{padding:32px 22px;min-height:300px}footer{padding:20px}.params{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.history{margin:0 0 32px}.history .section-heading{margin-top:0;align-items:baseline;flex-wrap:wrap}.history .section-heading h2{margin-bottom:8px}.history-wrap:focus-visible{outline:3px solid var(--primary);outline-offset:3px}.history-table{min-width:800px;font-variant-numeric:tabular-nums}.history-table thead{background:var(--surface)}.history-table td,.history-table th{padding:12px 10px}.history-table tbody th{font-weight:400;color:var(--ink);min-width:182px}.history-task{font-weight:600;display:block}.history-table small{display:block;font-size:12px;color:var(--muted);margin-top:3px}.history-table time{white-space:nowrap}.history-table code{display:block;margin-top:5px;font-size:10px}.history-number{text-align:right;white-space:nowrap}.history-coins{font-weight:650}.history-success{color:var(--primary)}.history-warning{color:var(--danger)}.history-table tbody tr:hover{background:var(--surface)}.history-table tfoot{background:var(--surface)}.history-table tfoot th{color:var(--ink)}.history-note{margin-top:10px}.history-table .history-number{min-width:102px}
@media(max-width:680px){.history .section-heading{gap:0}.history-table{font-size:12px}.history-table td,.history-table th{padding:10px 8px}.history-wrap{border:1px solid var(--line);border-radius:6px}}
#job-view{min-width:0}
.motion-preview{display:block;width:100%;max-height:380px;background:var(--surface);margin:12px 0}.step-actions{margin:12px 0}.step-action-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.step-action-row>span{flex:1;min-width:160px}.step-action-row small{width:100%;color:var(--muted)}#replace-motion{display:grid;gap:12px}
[hidden]{display:none!important}.source-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:20px}.outfit-upload-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px}.outfit-upload-title{margin:24px 0 14px}.upload-slot{min-width:0;border-radius:8px}.upload-slot h3{font-size:13px;margin-bottom:8px}.slot-preview{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border:2px dashed var(--line);border-radius:8px;background:var(--surface);text-align:center;padding:10px;cursor:pointer;font-size:12px;color:var(--muted)}.slot-preview small{font-size:11px}.upload-plus{font-size:30px;line-height:1;color:var(--primary)}.slot-preview img,.slot-preview video{width:100%;height:100%;min-height:0;object-fit:contain;border-radius:5px}.has-file .slot-preview{padding:4px}.slot-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:6px 0;min-height:18px}.upload-slot .actions{gap:6px}.upload-slot .actions button{font-size:12px;padding:6px 8px;min-height:36px!important}.upload-slot:focus-visible{outline:3px solid var(--primary);outline-offset:4px}.upload-slot:focus-within .slot-preview,.upload-slot.drag-over .slot-preview{border-color:var(--primary)}.upload-slot.drag-over .slot-preview{background:var(--accent)}@media(max-width:1100px){.outfit-upload-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:600px){.outfit-upload-grid,.source-upload-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.slot-preview{padding:6px}.slot-preview small{font-size:10px}}
#composer{margin-bottom:24px;scroll-margin-top:20px}#composer>summary{font-size:18px}.composer-form{display:grid;gap:16px}.composer-form>label{max-width:600px}.composer-form>button{justify-self:start}#input-previews{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}#input-previews:empty{display:none}#input-previews figure{margin:0;min-width:0}#input-previews img,#input-previews video{width:100%;height:180px;object-fit:contain;background:var(--surface);border-radius:6px}#input-previews figcaption{overflow-wrap:anywhere;margin-bottom:8px}#selection-state{margin:0;font-weight:600;color:var(--ink)}#composer button{min-height:44px}.demo-tools{margin-top:4px}
.stats{display:flex;gap:12px 24px;flex-wrap:wrap;padding:18px 0;font-variant-numeric:tabular-nums}.stats small{width:100%;color:var(--muted)}.management{display:grid;gap:10px;margin-bottom:16px}.management details{min-width:0}.config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin:14px 0}.check{display:flex;flex-direction:row;align-items:center;font-weight:400}.check input{width:auto;flex:0 0 auto}.studio-form{display:grid;gap:12px}.studio-form button{justify-self:start}.studio-form fieldset{margin:0;padding:12px;border:1px solid var(--line);min-width:0;border-radius:6px}.studio-form fieldset:disabled{opacity:.65}.studio-controls{display:grid;gap:12px;margin-bottom:28px}.review-banner,.quality{padding:16px;border:1px solid var(--line);border-radius:8px}.review-banner{background:var(--surface)}.quality ul{padding-left:20px;color:var(--danger);font-size:13px}.batch-row{padding:20px 0;border-top:1px solid var(--line);margin-top:20px}.batch-row ol{font-size:13px;overflow-wrap:anywhere}.limit-form{display:flex;gap:12px;align-items:end;margin-top:12px;flex-wrap:wrap}.outfits button{font-size:12px;padding:6px;width:100%;margin-top:6px}.job-head h2,nav button{overflow-wrap:anywhere}select:focus-visible{outline:3px solid var(--primary);outline-offset:3px}#new-options{margin-top:16px}#bulk-form{display:grid;gap:12px}.stats span{color:var(--muted)}
.library-dialog{border:1px solid var(--line);border-radius:10px;padding:22px;max-width:min(900px,92vw);width:100%;background:var(--bg);color:var(--ink)}.library-dialog::backdrop{background:oklch(.23 .015 140/.45)}.library-head{display:flex;align-items:start;gap:16px;flex-wrap:wrap}.library-head h3{font-size:18px;margin:0}.library-head p{flex:1;min-width:220px;margin:0}.library-head button{margin-left:auto}.library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;margin-top:18px;max-height:60vh;overflow:auto}.library-card{border:1px solid var(--line);border-radius:8px;padding:12px;min-width:0}.library-card h4{margin:10px 0 4px;font-size:14px;overflow-wrap:anywhere}.library-card p{margin:0 0 10px}.library-preview{aspect-ratio:1;background:var(--surface);border-radius:6px;display:grid;place-items:center;overflow:hidden}.library-preview img,.library-preview video{width:100%;height:100%;object-fit:contain}.library-card .actions button{font-size:12px;padding:6px 10px}
button.danger{color:var(--danger);border-color:var(--danger)}button.danger:hover{background:oklch(.97 .02 25)}.history>summary{font-size:15px}.history[open]>summary{margin-bottom:14px}#prepare-panel{max-width:900px}
