.mistplay-shell{min-height:100vh;background:linear-gradient(180deg,#12171efa,#0b0d12),#0b0d12;color:#f7f8fb;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;padding:20px}.login-shell{display:grid;min-height:100vh;place-items:center;background:#0b0d12;color:#f7f8fb;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;padding:20px}.login-panel{display:grid;width:min(380px,100%);gap:14px;border:1px solid rgba(255,255,255,.09);border-radius:8px;background:#ffffff0b;padding:20px}.login-panel h1{margin:2px 0 0;font-size:22px}.login-panel p{margin:0;color:#f7f8fb99;font-size:13px}.login-error{border-radius:7px;background:#ff5b5b21;color:#ffdada;font-size:13px;font-weight:700;padding:10px 12px}.mistplay-topbar,.input-band,.section-heading,.editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px}.mistplay-topbar{margin:0 auto 16px;max-width:1540px}.mistplay-brand{display:flex;align-items:center;gap:14px;min-width:0}.mistplay-mark{display:grid;height:44px;width:44px;place-items:center;border-radius:8px;background:#53de8f;color:#07100c}.mistplay-brand h1,.input-band h2,.section-heading h2,.editor-library h2{margin:0;font-size:20px;line-height:1.1}.mistplay-brand p,.input-band p,.section-heading p,.asset-card p,.script-panel p,.editor-library p,.character-card p{margin:4px 0 0;color:#f7f8fb8f;font-size:13px}.mistplay-actions,.dialog-actions{display:flex;align-items:center;gap:10px}.primary-button,.solid-button,.ghost-button,.file-button{display:inline-flex;min-height:40px;align-items:center;justify-content:center;gap:8px;border:0;border-radius:7px;padding:0 14px;font:inherit;font-size:14px;font-weight:700;text-decoration:none;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease}.primary-button{background:#53de8f;color:#06100b}.primary-button:hover{background:#68e8a0}.solid-button{background:#ffffff1a;color:#fff}.solid-button:hover,.ghost-button:hover,.file-button:hover{background:#ffffff24}.ghost-button,.file-button{background:#ffffff0f;color:#fff}.primary-button:disabled,.solid-button:disabled,.ghost-button:disabled{cursor:not-allowed;opacity:.45}.wide{width:100%}.metric-row{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin:0 auto 14px;max-width:1540px}.metric-row.simple{grid-template-columns:repeat(3,minmax(120px,1fr))}.storage-health{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1px;overflow:hidden;margin:0 auto 14px;max-width:1540px;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:#ffffff14}.storage-health>div{min-width:0;padding:10px 12px;background:#0b0d11b8}.storage-health span{display:block;margin-bottom:4px;color:#ffffff75;font-size:11px;font-weight:700;text-transform:uppercase}.storage-health strong{display:block;overflow:hidden;color:#ffffffe0;font-size:13px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.storage-health-path{grid-column:span 2}.metric{border:1px solid rgba(255,255,255,.08);border-radius:8px;background:#ffffff0b;padding:12px}.metric span{display:block;color:#f7f8fb8a;font-size:12px}.metric strong{display:block;margin-top:4px;font-size:22px}.mistplay-tabs{display:flex;gap:6px;margin:0 auto 14px;max-width:1540px;overflow-x:auto}.mistplay-tabs button,.segmented button{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:7px;background:transparent;color:#f7f8fb94;cursor:pointer;font:inherit;font-size:14px;font-weight:700;padding:10px 12px}.mistplay-tabs button[data-active=true],.segmented button[data-active=true]{background:#ffffff1a;color:#fff}.workspace-body{margin:0 auto;max-width:1540px}.workspace-alert,.busy-bar{display:flex;align-items:center;gap:10px;margin:0 auto 14px;max-width:1540px;border-radius:8px;padding:12px 14px}.workspace-alert{justify-content:space-between;background:#ff5b5b21;color:#ffdada}.workspace-alert button{display:grid;place-items:center;border:0;background:transparent;color:inherit;cursor:pointer}.busy-bar{background:#53de8f1f;color:#c7ffdc;font-weight:700}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.input-band,.script-panel,.game-section,.editor-library{border:1px solid rgba(255,255,255,.08);border-radius:8px;background:#ffffff0a;padding:16px}.input-band{margin-bottom:14px}.tag-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}.tag-row button,.asset-tag{border:0;border-radius:999px;background:#ffffff12;color:#f7f8fbad;font:inherit;font-size:12px;font-weight:800;padding:7px 10px}.tag-row button{cursor:pointer}.tag-row button[data-active=true]{background:#53de8f2e;color:#c7ffdc}.asset-tag{padding:3px 8px}.asset-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.asset-tag[data-source=uploaded]{background:#38bdf829;color:#9bdcff}.asset-tag[data-source=generated]{background:#53de8f2e;color:#9af3c0}.asset-tag[data-source=scraped]{background:#fbbf2429;color:#ffd98a}.asset-tag[data-source=rendered]{background:#a78bfa2e;color:#cdbcff}.url-entry,.upload-form{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:10px;min-width:min(720px,100%)}.upload-form{grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) auto auto}.character-form{grid-template-columns:minmax(160px,1fr) minmax(220px,1fr) auto auto}.video-upload-form{grid-template-columns:minmax(240px,1fr) auto auto}.generation-form{grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto}input,textarea,select{min-height:40px;border:1px solid rgba(255,255,255,.1);border-radius:7px;background:#080a0ed1;color:#fff;font:inherit;padding:10px 12px}textarea{min-height:96px;resize:vertical;line-height:1.45}.file-button input{display:none}.asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}.asset-grid.small{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}.asset-card,.character-card{overflow:hidden;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:#ffffff0b}.asset-card-thumb{display:block;aspect-ratio:16 / 9;width:100%;background:#050608;object-fit:cover}.asset-card-thumb-empty{display:grid;place-items:center;color:#ffffff6b}.asset-card-body{display:grid;gap:12px;padding:12px;min-width:0}.asset-card-body>div{min-width:0}.asset-card h3,.script-panel h3,.game-section h3,.character-card h3{margin:0;font-size:15px}.asset-card h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.script-stack,.game-stack{display:grid;gap:14px}.script-panel-header,.compact{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.script-lines,.manual-lines,.single-script-entry{display:grid;gap:10px}.single-script-entry textarea{min-height:260px;width:100%}.script-line-editor{border-radius:8px;background:#0000002e;padding:10px}.script-line-editor textarea{width:100%}.line-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;color:#f7f8fb94;font-size:12px;font-weight:700}.line-meta span[data-valid=true]{color:#88e2a9}.line-meta span[data-valid=false]{color:#ffd27d}.line-tools{display:inline-flex;align-items:center;gap:8px}.line-tools button{display:grid;height:24px;width:24px;place-items:center;border:0;border-radius:5px;background:#ffffff14;color:#f7f8fbb8;cursor:pointer}.line-tools button:disabled{cursor:not-allowed;opacity:.35}.add-script-line{margin-top:12px}.character-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}.character-card{display:flex;flex-direction:column}.character-card img{display:block;aspect-ratio:16 / 9;width:100%;background:#050608;object-fit:cover}.character-card-body{display:grid;gap:12px;padding:12px;min-width:0}.character-card-body h3,.character-card-body p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.job-strip{display:flex;gap:8px;margin:0 auto 14px;max-width:1540px;overflow:hidden}.job-pill{display:inline-flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(83,222,143,.18);border-radius:999px;background:#53de8f1a;color:#ccffdf;font-size:12px;font-weight:800;padding:8px 12px}.job-pill span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.job-pill[data-status=completed]{border-color:#ffffff1a;background:#ffffff0f;color:#f7f8fbad}.job-pill[data-status=error]{border-color:#ff5b5b3d;background:#ff5b5b1f;color:#ffdada}.editor-workspace{display:grid;grid-template-columns:360px minmax(0,1fr);grid-template-rows:auto minmax(600px,calc(100vh - 245px));gap:12px;min-height:680px}.editor-toolbar{grid-column:1 / -1}.segmented{display:inline-flex;border-radius:8px;background:#ffffff0e;padding:3px}.dialog-segmented{width:fit-content}.dialog-content{display:grid;gap:14px}.link-entry-panel{display:grid;gap:8px}.editor-library{overflow:hidden}.library-list{display:grid;gap:8px;margin-top:14px}.library-list a{display:flex;align-items:center;gap:10px;border-radius:7px;background:#ffffff0e;color:#fff;padding:10px;text-decoration:none}.library-list span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-frame{height:100%;width:100%;border:1px solid rgba(255,255,255,.08);border-radius:8px;background:#0b0d12}.editor-workspace[data-view=library],.editor-workspace[data-view=focused]{grid-template-columns:1fr}.dialog-backdrop{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background:#0000009e;padding:20px}.dialog{width:min(980px,100%);max-height:min(760px,92vh);overflow:auto;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:#12161d;box-shadow:0 30px 90px #00000073;padding:16px}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.dialog-header h2{margin:0;font-size:18px}.dialog-header button{display:grid;height:34px;width:34px;place-items:center;border:0;border-radius:7px;background:#ffffff14;color:#fff;cursor:pointer}.dialog-grid{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(320px,1fr);gap:14px}.dialog-grid video{aspect-ratio:9 / 16;max-height:620px;width:100%;border-radius:8px;background:#050608;object-fit:contain}.field-label{display:block;margin-bottom:8px;color:#f7f8fb94;font-size:12px;font-weight:800;text-transform:uppercase}.prompt-textarea{min-height:360px;width:100%;margin-bottom:12px}.empty-state{border:1px dashed rgba(255,255,255,.14);border-radius:8px;color:#f7f8fb8f;padding:18px}.library-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.library-controls .tag-row{margin:0}.search-input{display:inline-flex;align-items:center;gap:8px;min-width:240px;border:1px solid rgba(255,255,255,.1);border-radius:7px;background:#080a0ed1;padding:0 10px;color:#f7f8fb99}.search-input input{flex:1;min-height:38px;border:0;background:transparent;padding:8px 0;color:#fff}.search-input input:focus{outline:none}.search-input button{display:grid;height:24px;width:24px;place-items:center;border:0;border-radius:6px;background:#ffffff14;color:#ffffffb3;cursor:pointer}.asset-card-actions{display:flex;align-items:center;gap:8px}.asset-card-actions .ghost-button{flex:1;min-height:36px;padding:0 10px;font-size:13px}.asset-card-actions .ghost-button.danger{flex:0 0 auto;width:40px;padding:0}.ghost-button.danger{color:#ff9b9b}.ghost-button.danger:hover{background:#f871712e;color:#ffc2c2}.primary-button.danger{background:#f0556a;color:#1a0408}.primary-button.danger:hover{background:#f66e80}.confirm-message{margin:0;color:#f7f8fbb8;font-size:14px;line-height:1.5}.dialog.dialog-sm{width:min(520px,100%)}.dialog-actions{justify-content:flex-end}.create-video-character{display:flex;align-items:center;gap:12px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:#ffffff0a;padding:10px 12px}.create-video-character img{height:44px;width:44px;flex-shrink:0;border-radius:8px;background:#050608;object-fit:cover}.create-video-character h3{margin:0;font-size:15px;line-height:1.2}.create-video-character p{margin:2px 0 0;color:#f7f8fb85;font-size:12px}.create-video-modes{display:grid;width:100%;grid-template-columns:1fr 1fr}.create-video-modes button{justify-content:center}.field-hint{margin:0;color:#f7f8fb80;font-size:12px;line-height:1.5}.create-video-naming{display:flex;align-items:center;gap:8px;border-top:1px solid rgba(255,255,255,.08);padding-top:12px}@media (max-width: 980px){.mistplay-topbar,.input-band,.section-heading,.editor-toolbar{align-items:stretch;flex-direction:column}.metric-row,.storage-health,.upload-form,.character-form,.video-upload-form,.url-entry,.generation-form,.dialog-grid,.editor-workspace{grid-template-columns:1fr}.editor-workspace{grid-template-rows:auto auto minmax(620px,70vh)}.storage-health-path{grid-column:auto}}
