.character-library{width:min(950px,94vw);max-height:88vh;padding:0;border:1px solid #41444d;border-radius:16px;background:#17191e;color:#eee;box-shadow:0 24px 80px #000b}.character-library::backdrop{background:#000a}.character-shell{display:flex;flex-direction:column;max-height:88vh}.character-shell header,.character-shell footer,.character-actions{display:flex;align-items:center;gap:12px;padding:15px 20px;border-bottom:1px solid #30343b}.character-shell header h2{margin:2px 0;font-size:20px}.character-shell header small{font-size:10px;color:#858a94;letter-spacing:.14em}.character-shell header button{margin-left:auto;font-size:23px}.character-shell button,.character-shell select,.character-uploads label{border:1px solid #464a53;border-radius:8px;background:#292c33;color:#e9eaef;padding:6px 10px;cursor:pointer}.character-shell button:hover,.character-uploads label:hover{background:#383d47}.character-actions span{font-size:11px;color:#9298a3}.character-list{padding:16px 20px;overflow:auto;display:grid;gap:14px}.character-entry{border:1px solid #343841;border-radius:12px;background:#202329;padding:14px}.character-title{display:flex;align-items:center;gap:8px;margin-bottom:12px}.character-title strong{font-size:16px;margin-right:auto}.character-title button,.character-asset button,.character-voice button{font-size:11px;padding:4px 7px}.character-assets{display:flex;gap:10px;flex-wrap:wrap}.character-assets p,.character-empty{color:#8f96a1;font-size:12px}.character-asset{width:130px;border:1px solid #393e47;border-radius:8px;padding:6px;display:flex;flex-wrap:wrap;gap:4px}.character-asset label{display:flex;align-items:center;gap:5px;width:100%;font-size:11px;cursor:pointer;flex-wrap:wrap}.character-asset img{width:105px;height:90px;object-fit:cover;border-radius:5px}.character-asset span{overflow-wrap:anywhere}.character-asset select{width:100%;font-size:11px}.character-sounds{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;font-size:11px;color:#aab0bb}.character-sounds>select{max-width:180px}.character-voice{display:flex;align-items:center;gap:4px;border:1px solid #3b414a;border-radius:8px;padding:4px}.character-uploads{display:flex;gap:8px;margin-top:12px}.character-uploads label{font-size:12px}.character-shell footer{border-top:1px solid #30343b;border-bottom:0;justify-content:space-between}.character-status{font-size:12px;color:#a8bad8}.character-shell [data-character-apply]{background:#d9e8ff;color:#141922;border-color:#d9e8ff}.video-reference-bar [data-character-open],.image-reference-row [data-character-open]{margin-left:auto;border:1px solid #4b5260;border-radius:7px;background:#292e39;color:#dbe6fb;padding:5px 8px;font-size:11px;white-space:nowrap;cursor:pointer}.image-reference-row [data-character-open]{margin-left:0}
.character-uploads .character-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.character-upload-progress{padding:12px 20px;border-top:1px solid #30343b;background:#1e222a;display:flex;align-items:center;gap:12px;color:#b9c9e6;font-size:12px}.character-upload-progress[hidden]{display:none}.character-progress-ring{--progress:0;flex:none;width:42px;height:42px;border-radius:50%;background:conic-gradient(#a7c7ff calc(var(--progress)*1%),#3b414d 0);display:grid;place-items:center;position:relative}.character-progress-ring::before{content:"";position:absolute;inset:5px;border-radius:50%;background:#1e222a}.character-progress-ring strong{position:relative;font-size:10px;color:#edf4ff}.video-composer .video-ref[data-preview-ref]{cursor:zoom-in}.video-composer .video-ref[data-preview-ref]:hover,.video-composer .video-ref[data-preview-ref]:focus-visible{border-color:#a7c7ff;outline:1px solid #a7c7ff}.reference-preview{padding:0;border:1px solid #454b56;border-radius:14px;background:#171a20;color:#f3f5fa;max-width:min(90vw,1000px);max-height:90vh;box-shadow:0 30px 90px #000b}.reference-preview::backdrop{background:#000b}.reference-preview-shell{min-width:min(75vw,500px)}.reference-preview header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 16px;border-bottom:1px solid #343942}.reference-preview header strong{overflow-wrap:anywhere}.reference-preview header button{border:0;background:transparent;color:#ddd;font-size:24px;cursor:pointer}.reference-preview-content{display:grid;place-items:center;padding:16px;max-height:calc(90vh - 60px);overflow:auto}.reference-preview-content img,.reference-preview-content video{display:block;max-width:min(85vw,940px);max-height:calc(90vh - 100px);object-fit:contain}.reference-preview-content audio{width:min(75vw,600px)}
.character-library{width:min(1080px,95vw);max-height:90vh;border-color:#343a46;border-radius:18px;background:#111419}.character-library::backdrop{background:#03060bc9;backdrop-filter:blur(5px)}.character-shell{max-height:90vh}.character-shell header{padding:20px 24px;border-bottom:1px solid #29303a}.character-shell header h2{font-size:22px;letter-spacing:.02em}.character-shell header small{color:#7f9bc1}.character-shell header>button{width:34px;height:34px;padding:0;border-radius:9px;background:#222831;font-size:21px}.character-actions{padding:12px 24px;gap:12px;background:#151a21}.character-search{display:flex;align-items:center;gap:8px;flex:1;min-width:160px;height:38px;padding:0 12px;border:1px solid #353e4b;border-radius:10px;color:#8fa4c2;background:#0f1319}.character-search:focus-within{border-color:#82a9df}.character-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:#eaf1fb;font:inherit}.character-search input::placeholder{color:#758091}.character-count{white-space:nowrap;color:#919cab!important}.character-actions [data-character-add]{border-color:#82a9df;background:#d6e8ff;color:#172334;font-weight:650;white-space:nowrap}.character-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:14px;padding:20px 24px;background:#111419}.character-entry{min-width:0;border-color:#343d4a;border-radius:14px;background:#1a2028;padding:16px;box-shadow:0 5px 20px #0003}.character-entry[hidden]{display:none}.character-title{gap:8px;padding-bottom:12px;border-bottom:1px solid #303946}.character-title>div{min-width:0;margin-right:auto;display:grid;gap:3px}.character-title strong{font-size:17px}.character-title small{font-size:11px;color:#8d9aaa}.character-title button{background:transparent;border-color:#3b4552;color:#aebacd}.character-title [data-character-delete]{color:#cb8e92}.character-section-label{display:flex;align-items:center;justify-content:space-between;margin:15px 0 9px;color:#d4deeb;font-size:12px;font-weight:650}.character-section-label span{font-size:10px;font-weight:400;color:#8995a4}.character-assets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.character-asset{width:auto;min-width:0;padding:8px;border:1px solid #364252;border-radius:10px;background:#151a21;display:grid;grid-template-columns:1fr 1fr;gap:6px}.character-asset:has([data-character-image]:checked){border-color:#9bc4fb;background:#202d3d;box-shadow:inset 0 0 0 1px #78a8e780}.character-asset label{grid-column:1/-1;display:grid;grid-template-columns:17px 1fr;gap:7px;font-weight:600}.character-asset label img{grid-column:1/-1;grid-row:1;width:100%;height:110px;object-fit:contain;background:#0b0e13;border-radius:6px}.character-asset label input{grid-column:1;grid-row:2;accent-color:#a8cbff}.character-asset label span{grid-column:2;grid-row:2;align-self:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.character-asset select{grid-column:1/-1;background:#242c37}.character-asset button{min-width:0;padding:4px 6px;background:transparent;color:#a7b1bf}.character-sounds{display:flex;align-items:flex-start;gap:7px}.character-sounds>label{display:flex;align-items:center;gap:7px;width:100%;color:#9caabd}.character-sounds>label select{flex:1;max-width:none}.character-voice{background:#151a21;border-color:#364252}.character-voice span{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.character-uploads{padding-top:12px;margin-top:13px;border-top:1px solid #303946}.character-uploads button{flex:1;border-style:dashed;background:#171e27;color:#b7c9e2}.character-shell footer{padding:13px 24px;background:#151a21}.character-status{margin-right:auto}.character-selected{color:#9ec3f4;font-size:12px;white-space:nowrap}.character-selected[hidden]{display:none}.character-shell [data-character-apply]{font-weight:700;padding:9px 15px}.reference-preview{width:auto;max-width:92vw;max-height:92vh;border-color:#384455;border-radius:16px;background:#10151d;box-shadow:0 35px 110px #000d}.reference-preview-shell{min-width:0}.reference-preview header{padding:11px 15px;background:#19212c}.reference-preview header>div{min-width:0;display:grid;gap:3px}.reference-preview header small{font-size:10px;letter-spacing:.12em;color:#89a6cb}.reference-preview header strong{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reference-preview header button{flex:none;width:30px;height:30px;border-radius:8px;background:#2a3441}.reference-preview-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:16px;max-height:calc(90vh - 60px);overflow:auto;background:#0b0e13}.reference-preview[data-kind=image] .reference-preview-content img,.reference-preview[data-kind=video] .reference-preview-content video{display:block;width:auto;height:auto;max-width:calc(90vw - 32px);max-height:calc(82vh - 96px);object-fit:contain}.reference-preview[data-kind=audio] .reference-preview-content{min-height:210px;padding:22px;background:radial-gradient(circle at 50% 0%,#233448,#101720 60%,#0b0e13)}.reference-audio-stage{text-align:center;color:#a8b8cc}.reference-audio-icon{display:grid;place-items:center;margin:auto;width:70px;height:70px;border:1px solid #5c789b;border-radius:20px;background:#293b50;color:#c9dfff;font-size:34px}.reference-audio-stage p{margin:12px 0 0;font-size:12px}.reference-preview-content audio{width:min(500px,calc(90vw - 50px))}@media(max-width:760px){.character-list{grid-template-columns:1fr}.character-actions{flex-wrap:wrap}.character-search{flex-basis:100%}.character-entry{padding:13px}}

.reference-preview[data-kind=image]{overflow:hidden}.reference-preview[data-kind=image] .reference-preview-content{box-sizing:border-box;width:100%;min-width:0;overflow:hidden;max-height:calc(92dvh - 58px)}.reference-preview[data-kind=image] .reference-preview-content img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(92dvh - 94px);object-fit:contain}
