@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');
:root{--ink:#191817;--muted:#77736d;--line:#e7e3dc;--paper:#f7f5f1;--panel:#fff;--lime:#d8f06b;--lime-dark:#b8d33e;--rust:#b55d3f;--shadow:0 18px 55px rgba(42,38,31,.08)}
*{box-sizing:border-box}html{min-height:100%}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:15px}button,input,textarea,select{font:inherit;color:inherit}button,a{transition:.18s ease}.hidden{display:none!important}.app-shell{display:grid;grid-template-columns:256px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:#1d1c1a;color:#eee9df;padding:28px 20px 20px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;margin:0 4px 30px}.brand-mark{width:40px;height:40px;border-radius:12px;background:var(--lime);color:#1e2411;display:grid;place-items:center;font:800 14px 'Manrope';letter-spacing:-.5px}.brand strong{font:700 17px 'Manrope';display:block}.brand span{display:block;color:#8e8a83;font-size:10px;letter-spacing:1.2px;margin-top:2px}.button{border:0;border-radius:10px;padding:11px 17px;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;gap:7px;cursor:pointer;font-weight:700}.button:hover:not(:disabled){transform:translateY(-1px)}.button:disabled,.button.disabled{opacity:.45;pointer-events:none}.button.primary{background:var(--lime);color:#24271a;box-shadow:0 8px 22px rgba(177,202,72,.18)}.button.dark{background:#22211f;color:#fff}.button.ghost{background:#fff;border:1px solid var(--line);color:#4f4b46}.new-project{width:100%;background:#302f2c;color:#fff;border:1px solid #44423e}.new-project:hover{background:#3b3935}.sidebar-label,.eyebrow,.step-label{font-weight:800;font-size:10px;letter-spacing:1.5px}.sidebar-label{margin:30px 8px 10px;color:#77736d}.project-list{display:flex;flex-direction:column;gap:5px;overflow:auto}.project-item{border:0;background:transparent;color:#9e9991;text-align:left;border-radius:10px;padding:11px 12px;cursor:pointer;display:flex;justify-content:space-between;gap:8px;align-items:center}.project-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-item small{font-size:10px;color:#68655f}.project-item:hover,.project-item.active{background:#302f2c;color:#fff}.project-item.active{box-shadow:inset 3px 0 var(--lime)}.sidebar-footer{margin-top:auto;border-top:1px solid #33322f;padding:17px 4px 0;color:#88847d;font-size:12px;display:flex;align-items:center;gap:8px}.sidebar-footer a{margin-left:auto;color:#88847d;text-decoration:none}.status-dot{width:7px;height:7px;background:#ba5c51;border-radius:50%}.status-dot.online{background:#9ec941;box-shadow:0 0 0 4px rgba(158,201,65,.1)}.workspace{min-width:0}.topbar{height:94px;background:rgba(255,255,255,.88);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;position:sticky;top:0;z-index:10}.eyebrow,.step-label{margin:0 0 6px;color:#9a958c}.title-input{border:0;background:transparent;font:700 22px 'Manrope';padding:0;outline:none;max-width:480px}.top-actions{display:flex;align-items:center;gap:10px}.save-state{font-size:12px;color:#99948c;margin-right:8px}.content{max-width:1380px;margin:0 auto;padding:36px 42px 80px}.hero-grid{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(340px,.78fr);gap:20px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:26px;box-shadow:0 4px 25px rgba(38,35,30,.025)}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.section-head h2,.screenplay-header h2,.dialog-card h2{font:750 24px 'Manrope';letter-spacing:-.7px;margin:0}.hint{font-size:11px;background:#f3f1ec;border-radius:20px;padding:6px 9px;color:#77726b}.story-panel textarea,#scene-form textarea,#scene-form input,.dialog-card>label input,.dialog-card>label textarea{width:100%;border:1px solid var(--line);background:#fbfaf8;border-radius:10px;padding:13px 14px;outline:none;resize:vertical}.story-panel>textarea{border:0;background:transparent;padding:24px 2px 15px;font-size:16px;line-height:1.65;min-height:190px}.story-panel textarea:focus,#scene-form textarea:focus,#scene-form input:focus,.dialog-card input:focus,.dialog-card textarea:focus{border-color:#c3cd84;box-shadow:0 0 0 3px rgba(216,240,107,.2)}.settings-row{border-top:1px solid var(--line);padding-top:18px;display:flex;gap:28px;align-items:flex-end}.settings-row label{display:flex;align-items:center;gap:12px;font-size:12px;font-weight:700;color:#77726b}.stepper{display:flex;border:1px solid var(--line);border-radius:9px;overflow:hidden}.stepper button,.stepper input{border:0;background:#faf9f7;text-align:center;height:36px}.stepper button{width:34px;cursor:pointer;font-size:17px}.stepper input{width:42px;appearance:textfield;font-weight:800}.settings-row select{height:38px;padding:0 34px 0 12px;border:1px solid var(--line);border-radius:9px;background:#faf9f7}.panel-intro{color:var(--muted);font-size:13px;line-height:1.5;margin:13px 0 17px}.icon-button{width:34px;height:34px;border:1px solid var(--line);background:#faf9f7;border-radius:9px;cursor:pointer;font-size:20px}.character-list{display:grid;gap:9px;max-height:240px;overflow:auto}.character-card{display:grid;grid-template-columns:48px 1fr 28px;gap:11px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:9px}.character-photo{width:48px;height:48px;border-radius:9px;object-fit:cover;background:#eeeae3;display:grid;place-items:center;color:#999}.character-card strong{font-size:14px}.character-card span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:var(--muted);margin-top:3px}.delete-character{border:0;background:transparent;color:#aaa;cursor:pointer;font-size:16px}.delete-character:hover{color:#ba4b40}.add-character-row{width:100%;border:1px dashed #d8d3cb;background:#faf9f7;color:#747068;border-radius:10px;padding:12px;margin-top:11px;cursor:pointer;font-size:12px;font-weight:700}.generate-strip{margin:20px 0 42px;background:#24231f;border-radius:16px;color:#fff;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow)}.generate-copy{display:flex;align-items:center;gap:14px}.spark{width:42px;height:42px;border-radius:12px;background:#32312d;color:var(--lime);display:grid;place-items:center;font-size:20px}.generate-copy strong{display:block;font:700 15px 'Manrope'}.generate-copy span{display:block;color:#8f8b83;font-size:12px;margin-top:4px}.button.large{min-width:220px;flex-direction:column;gap:1px;padding:11px 22px}.button.large small{font-weight:500;opacity:.65;font-size:10px}.screenplay-section{padding-top:5px}.screenplay-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}.logline{color:var(--muted);margin:8px 0 0;max-width:760px}.image-button{background:#eee9df;color:#36332e}.generation-progress{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 18px;margin:0 0 18px}.generation-progress>div:first-child{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}.progress-track{height:5px;background:#eeeae2;border-radius:5px;margin-top:10px;overflow:hidden}.progress-track i{display:block;width:0;height:100%;background:var(--lime-dark);transition:width .3s}.scene-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.scene-card{background:#fff;border:1px solid var(--line);border-radius:15px;overflow:hidden}.scene-image{aspect-ratio:16/9;background:#ebe8e1;position:relative;display:grid;place-items:center;overflow:hidden}.scene-image.ratio-9-16{aspect-ratio:9/16;max-height:520px}.scene-image.ratio-1-1{aspect-ratio:1}.scene-image.ratio-4-3{aspect-ratio:4/3}.scene-image.ratio-3-4{aspect-ratio:3/4;max-height:520px}.scene-image img{width:100%;height:100%;object-fit:cover}.scene-placeholder{text-align:center;color:#aaa59d}.scene-placeholder b{font-size:28px;display:block;color:#c5c0b8;margin-bottom:8px}.scene-placeholder span{font-size:11px}.scene-number{position:absolute;left:12px;top:12px;background:rgba(24,23,21,.86);color:#fff;border-radius:7px;padding:6px 8px;font:700 10px 'Manrope';letter-spacing:1px}.scene-status{position:absolute;right:12px;top:12px;background:rgba(255,255,255,.9);border-radius:7px;padding:6px 8px;font-size:10px}.scene-body{padding:19px}.scene-body h3{font:700 17px 'Manrope';margin:0 0 7px}.scene-description{color:#716d67;font-size:13px;line-height:1.55;min-height:40px}.screenplay-preview{white-space:pre-wrap;background:#f8f6f2;border-left:3px solid #ddd7cc;padding:11px 12px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;max-height:120px;overflow:hidden;margin:14px 0}.scene-actions{display:flex;gap:8px}.scene-actions .button{padding:8px 11px;font-size:11px;flex:1}.empty-state{min-height:calc(100vh - 94px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px}.empty-icon{font-size:35px;color:#aec344}.empty-state h1{font:800 34px 'Manrope';margin:16px 0 8px}.empty-state p{color:var(--muted);max-width:480px;margin:0 0 24px}.login-body{min-height:100vh;display:grid;place-items:center;background:#1d1c1a;padding:20px}.login-card{width:min(420px,100%);background:#fff;padding:38px;border-radius:20px;box-shadow:0 35px 90px rgba(0,0,0,.35)}.login-card .brand-mark{margin-bottom:25px}.login-card h1{font:800 30px 'Manrope';margin:0}.muted{color:var(--muted)}.stack{display:grid;gap:16px;margin-top:25px}.stack label,.dialog-card>label{display:grid;gap:7px;font-size:12px;font-weight:700}.stack input{height:44px;border:1px solid var(--line);border-radius:9px;padding:0 12px}.alert{border-radius:8px;padding:11px;margin-top:16px;font-size:12px}.alert.error{background:#fae9e6;color:#983a31}dialog{border:0;padding:0;border-radius:18px;box-shadow:0 30px 90px rgba(20,18,14,.3);width:min(560px,calc(100% - 30px));max-height:90vh}dialog::backdrop{background:rgba(27,25,22,.58);backdrop-filter:blur(3px)}.dialog-card{padding:30px;display:grid;gap:17px;position:relative;overflow:auto;max-height:90vh}.scene-dialog-card{width:100%}.dialog-close{position:absolute;right:16px;top:13px;border:0;background:transparent;color:#999;font-size:25px;cursor:pointer}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:4px}.upload-zone{border:1px dashed #cfc9bf;border-radius:12px;padding:22px!important;text-align:center;cursor:pointer;background:#faf9f7}.upload-zone input{display:none}.upload-zone span,.upload-zone strong,.upload-zone small{display:block}.upload-icon{font-size:23px;color:#a5b84c}.upload-zone small{color:#999;font-weight:400;margin-top:3px}.screenplay-input{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.toast{position:fixed;z-index:100;right:24px;bottom:24px;background:#262521;color:#fff;border-radius:11px;padding:13px 17px;box-shadow:var(--shadow);transform:translateY(20px);opacity:0;pointer-events:none;transition:.2s;max-width:390px}.toast.show{transform:none;opacity:1}.toast.error{background:#9e4036}.loading{position:relative;pointer-events:none}.loading:after{content:'';width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite;margin-left:6px}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:980px){.app-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto;padding:16px 20px;display:grid;grid-template-columns:1fr auto;align-items:center}.brand{margin:0}.new-project{width:auto}.sidebar-label,.project-list,.sidebar-footer{display:none}.topbar{top:0;padding:0 20px}.content{padding:24px 20px 60px}.hero-grid{grid-template-columns:1fr}.scene-grid{grid-template-columns:1fr}}
@media(max-width:620px){.topbar{height:auto;min-height:90px;align-items:flex-start;padding-top:17px;padding-bottom:14px;gap:10px}.title-input{font-size:18px;max-width:180px}.save-state,.top-actions .ghost{display:none}.top-actions{margin-top:10px}.panel{padding:20px}.settings-row{align-items:flex-start;flex-direction:column;gap:14px}.generate-strip,.screenplay-header{align-items:stretch;flex-direction:column}.generate-copy span{line-height:1.4}.button.large{width:100%}.scene-grid{gap:13px}.content{padding-left:13px;padding-right:13px}.sidebar{padding:12px 14px}.brand span{display:none}}
.character-card{grid-template-columns:48px minmax(0,1fr) auto}.character-card code{display:block;font-size:9px;color:#9a958c;margin-top:4px}.character-buttons{display:flex;align-items:center;gap:3px}.generate-character,.delete-character{border:0;background:transparent;color:#999;cursor:pointer;font-size:16px;padding:4px}.generate-character:hover{color:#879b2f}.style-panel{grid-column:1/-1}.style-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr) minmax(190px,1fr) auto;gap:14px;align-items:end;margin-top:18px}.style-form label{display:grid;gap:7px;font-size:11px;font-weight:700;color:#77726b}.style-form textarea,.style-form input{width:100%;border:1px solid var(--line);border-radius:9px;background:#faf9f7;padding:10px 11px}.style-form textarea{resize:vertical}.style-reference img{height:58px;max-width:100px;border-radius:8px;object-fit:cover}.style-reference:empty{display:none}.seed-note{font-size:11px;color:#918c84;margin:13px 0 0}
@media(max-width:980px){.style-form{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.style-form{grid-template-columns:1fr}}
.error-console{background:#fff2ef;border:1px solid #eab8af;border-left:5px solid #b94f41;border-radius:12px;padding:15px 17px;margin-bottom:20px;display:flex;justify-content:space-between;gap:15px;color:#762d25}.error-console.global-error{margin:20px 42px 0}.error-console strong{font:700 14px 'Manrope'}.error-console pre{font:13px/1.5 'DM Sans',sans-serif;white-space:pre-wrap;margin:6px 0}.error-console small{color:#98665f}.error-console button{border:0;background:transparent;color:#9e5e55;font-size:22px;cursor:pointer;align-self:flex-start}.diagnostic-body{min-height:100vh;background:#efede7;padding:30px}.diagnostic-card{max-width:720px;margin:30px auto;background:#fff;border:1px solid var(--line);border-radius:18px;padding:32px;box-shadow:var(--shadow)}.diagnostic-card h1{font:800 30px 'Manrope';margin:0}.diagnostic-summary{padding:14px;border-radius:10px;margin:22px 0;font-weight:700}.diagnostic-summary.ok{background:#eff7d5;color:#586d17}.diagnostic-summary.bad{background:#fae8e4;color:#963d32}.diagnostic-list{border:1px solid var(--line);border-radius:12px;overflow:hidden}.diagnostic-row{display:flex;gap:12px;align-items:center;padding:13px 15px;border-bottom:1px solid var(--line)}.diagnostic-row:last-child{border:0}.diagnostic-row strong,.diagnostic-row small{display:block}.diagnostic-row small{color:var(--muted);margin-top:2px}.diagnostic-icon{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;font-weight:800}.diagnostic-icon.ok{background:#eef7d0;color:#647a21}.diagnostic-icon.bad{background:#fae4df;color:#9b3f34}
.prompt-length{font-size:10px;color:#99938a;margin-top:8px}.prompt-length.over{color:#ad4b3e;font-weight:700}
.character-list{max-height:380px}.voice-select-label{display:flex!important;align-items:center;gap:6px;margin-top:6px;font-size:9px!important;color:#858078}.voice-select-label select{min-width:105px;max-width:150px;border:1px solid var(--line);border-radius:6px;background:#faf9f7;padding:3px 5px;font-size:10px}.speech-block{border:1px solid var(--line);border-radius:10px;margin:14px 0;overflow:hidden}.speech-block>header{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#f4f1eb;padding:9px 11px}.speech-block>header strong{font-size:11px}.speech-block>header div{display:flex;gap:4px}.speech-block button{border:1px solid #d7d1c7;background:#fff;border-radius:6px;padding:4px 7px;cursor:pointer;font-size:10px}.speech-block>p{font-size:11px;color:var(--muted);padding:8px 11px;margin:0}.speech-line{display:flex;justify-content:space-between;gap:8px;padding:10px 11px;border-top:1px solid var(--line)}.speech-copy{min-width:0;flex:1}.speech-copy strong,.speech-copy span{display:block}.speech-copy strong{font-size:11px}.speech-copy strong small{color:#8a9670;font-weight:600;margin-left:4px}.speech-copy span{font-size:11px;line-height:1.4;color:#6e6962;margin-top:3px}.speech-copy audio{width:100%;height:30px;margin-top:7px}.speech-actions{display:flex;gap:3px;align-self:flex-start}.speech-actions button:first-child{color:#617523}.speech-actions button:last-child{color:#a74a40}
.pause-setting{display:flex;align-items:center;gap:3px;font-size:9px;color:#777}.pause-setting input{width:50px;border:1px solid #d7d1c7;border-radius:5px;padding:3px;font-size:9px}.scene-audio{background:#eef4dc;border-top:1px solid #d8e4b7;padding:10px 11px}.scene-audio strong{display:block;font-size:10px;color:#61742a;margin-bottom:5px}.scene-audio audio{width:100%;height:32px}
.duration-setting{display:flex;align-items:center;gap:9px;margin:0 0 13px;font-size:11px;font-weight:700;color:#77726b}.duration-setting input[type=range]{flex:1;accent-color:var(--lime-dark);cursor:pointer}.duration-setting output{min-width:36px;text-align:right;font-weight:800;color:#4f4b46}.mute-toggle{display:flex;align-items:center;gap:4px;white-space:nowrap;cursor:pointer}.mute-toggle input{accent-color:var(--lime-dark);cursor:pointer;margin:0}
.video-toolbar{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.video-toolbar .button{font-size:11px;padding:9px 12px}.video-toolbar select{height:36px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:0 9px;font-size:11px}.scene-video{background:#22211f;border-radius:10px;padding:10px;margin:13px 0;color:#fff}.scene-video>div{display:flex;justify-content:space-between;margin-bottom:7px}.scene-video strong{font-size:11px}.scene-video small{color:#a8a39b}.scene-video video{display:block;width:100%;border-radius:7px;background:#000;max-height:350px}.scene-video a{display:inline-block;color:var(--lime);font-size:10px;margin-top:7px}.final-video{background:#22211f;color:#fff;border-radius:15px;padding:18px;margin-bottom:20px;display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:16px;align-items:center}.final-video>div strong,.final-video>div span{display:block}.final-video>div span{color:#9e9990;font-size:11px;margin-top:4px}.final-video video{width:100%;max-height:320px;border-radius:9px;background:#000}.final-video .button{white-space:nowrap;background:var(--lime);color:#222}.scene-actions .button{min-width:0}@media(max-width:800px){.screenplay-header{align-items:stretch;flex-direction:column}.video-toolbar{justify-content:flex-start}.final-video{grid-template-columns:1fr}.final-video .button{width:100%}}
