.reel-budget{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:18px}
.reel-budget>div{display:grid;gap:5px}
.reel-budget span{font-size:13px;color:var(--muted)}
.reel-budget strong{font-size:27px}
.reel-budget .budget-track{grid-column:1/-1;height:9px;border-radius:20px;background:#e6e9ee;overflow:hidden;display:block}
.budget-track i{display:block;height:100%;background:linear-gradient(90deg,#b9ff38,#2b73ed);border-radius:inherit}
.reel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px;margin-top:20px}
.reel-card{padding:20px;display:flex;flex-direction:column;gap:12px}
.reel-card-head{display:flex;justify-content:space-between;align-items:center}
.reel-card h2,.reel-card p{margin:0}
.reel-card p{line-height:1.6}
.reel-facts{display:flex;gap:8px;flex-wrap:wrap}
.reel-facts span{font-size:12px;background:#f1f3f6;padding:6px 9px;border-radius:20px}
.reel-master-dialog{width:min(1250px,calc(100% - 24px));height:min(94dvh,900px);max-height:94dvh;overflow:hidden}
.reel-dialog{display:flex;flex-direction:column;height:100%}
.reel-editor-layout{display:grid;grid-template-columns:minmax(280px,38%) minmax(0,62%);min-height:0;flex:1}
.reel-live-preview{background:#e9edf2;padding:20px;overflow:auto;display:flex;flex-direction:column;align-items:center}
.reel-phone{width:min(100%,340px);aspect-ratio:9/16;border-radius:25px;overflow:hidden;background:#0a101c;box-shadow:0 18px 45px #17203333}
.reel-phone-media{position:relative;width:100%;height:100%}
.reel-phone-media>img,.reel-phone-media>video{width:100%;height:100%;object-fit:cover}
.reel-placeholder{height:100%;display:grid;place-content:center;justify-items:center;gap:12px;color:white;text-align:center;padding:20px;background:radial-gradient(circle at 30% 20%,#286de0,#0a1020 65%)}
.reel-placeholder svg{width:42px;height:42px}
.reel-copy{position:absolute;right:0;bottom:0;left:0;display:flex;flex-direction:column;gap:8px;padding:70px 22px 26px;color:white;background:linear-gradient(transparent,#000c);text-align:right}
.reel-copy strong{font-size:25px;line-height:1.2}
.reel-copy span{font-size:14px;line-height:1.45}
.reel-preview-tabs{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}
.reel-preview-tabs button{width:34px;height:34px;border-radius:50%;border:1px solid #cbd1da;background:white}
.reel-preview-tabs button.active{background:#242c40;color:white}
.reel-scenes{overflow-y:auto;padding:22px}
.reel-scenes>label{display:block;margin-bottom:15px}
.reel-scene{border:1px solid #dce2e9;border-radius:15px;padding:16px;margin-bottom:15px;background:white}
.reel-scene>header{display:flex;align-items:center;gap:10px;margin-bottom:13px}
.reel-scene>header span{font-size:12px;color:var(--muted);margin-inline-end:auto}
.reel-scene>header>div{display:flex;gap:5px}
.reel-scene>img,.reel-scene>video{width:100%;max-height:260px;object-fit:cover;border-radius:11px;margin-bottom:12px;background:#08101c}
.reel-scene label{display:block;margin-top:10px}
.reel-scene details{margin-top:12px}
.reel-scene details p{direction:ltr;text-align:left;overflow-wrap:anywhere}
.reel-actions{position:sticky;bottom:0;display:flex;gap:8px;flex-wrap:wrap;background:#fff;padding:12px 0 2px;border-top:1px solid #e1e5eb}
.reel-actions .btn{flex:1;min-width:150px}

@media(max-width:720px){.reel-budget{grid-template-columns:repeat(3,1fr);gap:8px;padding:14px}
.reel-budget strong{font-size:19px}
.reel-master-dialog{inset:0;margin:0;width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
.reel-editor-layout{display:flex;flex-direction:column}
.reel-live-preview{flex:0 0 42dvh;padding:10px}
.reel-phone{height:calc(42dvh - 70px);width:auto}
.reel-live-preview>p{display:none}
.reel-preview-tabs{margin-top:7px}
.reel-preview-tabs button{width:30px;height:30px}
.reel-scenes{padding:14px;flex:1}
.reel-scene{padding:13px}
.reel-actions{display:grid;grid-template-columns:1fr}
.reel-actions .btn{width:100%}
}

.reel-production{display:grid;gap:8px;padding:12px;border:1px solid #d2deef;border-radius:12px;background:#eff5ff;color:#163457;overflow-wrap:anywhere}.reel-production progress{width:100%;height:10px;accent-color:#286de0}.reel-production small{line-height:1.5}.reel-fields{border:0;padding:0;margin:0;min-width:0}

.reel-voice-panel{min-width:0;border:1px solid #d9dfe8;border-radius:16px;padding:16px;display:grid;gap:14px}.reel-voice-panel label{display:grid;gap:7px;min-width:0}.reel-voice-panel textarea{width:100%;box-sizing:border-box}.reel-voice-panel audio{width:100%;max-width:100%}.reel-voice-panel legend{font-weight:700}.reel-voice-panel input[type=checkbox]{width:auto}.reel-phone .reel-copy:has(strong:empty):has(span:empty){display:none}

.reel-quality-panel{display:grid;gap:14px;min-width:0;padding:16px;border:1px solid #cdd6df;border-radius:16px}.reel-quality-panel fieldset{min-width:0;display:grid;gap:10px;border:1px solid #d9dfe8;border-radius:12px;padding:12px}.reel-quality-panel label{display:grid;gap:6px;min-width:0}.reel-quality-panel textarea,.reel-quality-panel select{width:100%;max-width:100%;box-sizing:border-box}.reel-approved-frame{width:100%;max-height:420px;object-fit:contain;border-radius:10px}.reel-qa{font-size:13px;padding:10px;background:#eef2f4;border-radius:9px}.reel-qa p{margin:5px 0}

.reel-source-picker{display:grid;gap:10px;padding:14px;background:#f3f6f8;border:1px solid #c9d6df;border-radius:12px;min-width:0}.reel-source-picker select{min-height:46px;background:#fff;border:1px solid #8c9dab;border-radius:8px;padding:8px}.reel-source-upload{padding:12px;border:2px dashed #8296a6;border-radius:10px;font-weight:700;background:white}.reel-source-upload input[type=file]{display:block!important;position:static!important;opacity:1!important;visibility:visible!important;width:100%;height:auto;min-height:44px;margin-top:8px;max-width:100%;font-size:16px}.reel-source-current img{display:block;max-width:100%;height:180px;object-fit:contain;margin:auto}.reel-source-current p,.reel-source-picker [role=status]{margin:0;overflow-wrap:anywhere}
/* Four-step guided editor. Footer is outside the scroll region, never an overlay. */
.reel-wizard{min-width:0;overflow:hidden}.reel-wizard .dialog-head{flex:none;padding:16px 22px}.reel-wizard .dialog-head h2{margin:4px 0}
.reel-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;list-style:none;margin:0;padding:12px 22px 18px;flex:none;border-bottom:1px solid #e0e5ec;background:#fff;direction:rtl}.reel-steps li{display:flex;align-items:center;gap:8px;font-size:13px;color:#677383;min-width:0}.reel-steps li>span{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e8edf2}.reel-steps .current{color:#1756b0}.reel-steps .current>span{background:#1756b0;color:white}.reel-steps .complete>span{background:#e0eee8;color:#236443}
.wizard-scroll{overflow:auto;min-height:0;flex:1;padding:20px 24px;overscroll-behavior:contain}.wizard-scroll form,.wizard-scroll fieldset{min-width:0}.wizard-scroll>form>fieldset{border:0;padding:0;margin:0}.wizard-scroll label{display:grid;gap:7px}.wizard-scroll textarea,.wizard-scroll input:not([type=checkbox]),.wizard-scroll select{max-width:100%;width:100%;box-sizing:border-box;font-size:16px}.wizard-scroll textarea{resize:vertical}.wizard-scroll input[type=checkbox]{width:auto}.wizard-scroll summary{cursor:pointer;padding:12px 0;font-weight:650;min-height:44px}.reel-options{padding:0 14px;border:1px solid #dbe2e9;border-radius:12px;margin:14px 0}.reel-options[open]{padding-bottom:16px}
.wizard-scene-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.wizard-scene{margin:0;padding:16px;overflow:hidden}.wizard-scene>header{flex-wrap:wrap}.wizard-scene>header .btn{min-width:40px;min-height:40px;padding:8px}.wizard-scene .wizard-frame{display:block;width:100%;height:340px;max-height:none;object-fit:contain;background:#edf1f5;border-radius:12px}.wizard-scene-empty{display:flex;align-items:center;justify-content:center;gap:12px;padding:24px;background:#eff3f7;border-radius:12px;color:#516174}.wizard-scene-empty svg{width:24px;height:24px}.wizard-scene-copy{display:grid;gap:9px;margin-top:15px}.wizard-scene-copy p{margin:0;line-height:1.6}.wizard-edit fieldset{padding:0;border:0;display:grid;gap:12px}.wizard-edit{margin-top:12px;border-top:1px solid #e0e5ec}.wizard-edit .form-row{grid-template-columns:1fr 1fr}.wizard-edit .reel-source-picker{padding:10px}.wizard-edit .reel-source-upload{padding:10px}.wizard-footer{flex:none;padding:14px 22px calc(14px + env(safe-area-inset-bottom));border-top:1px solid #dbe2e9;background:#fff;box-shadow:0 -4px 16px #182a3f08}.reel-wizard-action{display:flex;gap:18px;justify-content:space-between;align-items:center}.reel-wizard-action>div{display:grid;gap:6px;min-width:0}.reel-wizard-action small{color:#566577;font-size:12px}.reel-wizard-action>.btn{min-height:48px;flex:none;white-space:normal;max-width:45%}.reel-check{display:flex!important;align-items:flex-start;gap:8px!important;font-size:14px;line-height:1.45}.reel-check input{width:18px!important;height:18px;flex:none;margin:2px 0}.wizard-player{display:grid;justify-items:center;gap:14px;padding:14px;background:#e8eef4;border-radius:18px}.wizard-player canvas{display:block;max-width:100%;width:auto;height:min(56dvh,560px);aspect-ratio:9/16;background:#111b29;border-radius:12px}.wizard-player-controls{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}.wizard-final-notes{margin-top:16px}.wizard-final-notes details{border-bottom:1px solid #d9e1e9}.reel-wizard [hidden]{display:none!important}.reel-wizard .reel-actions{position:static}.reel-wizard [data-reel-error]:empty{display:none}
@media(max-width:760px){.reel-master-dialog{width:100%;height:100dvh;max-height:100dvh;max-width:100%;margin:0;inset:0;border-radius:0}.reel-wizard .dialog-head{padding:12px 14px}.reel-steps{padding:10px 12px;gap:4px}.reel-steps li{flex-direction:column;text-align:center;gap:5px;font-size:11px}.reel-steps li>span{width:24px;height:24px}.wizard-scroll{padding:14px;overflow-x:hidden}.wizard-scene-grid{grid-template-columns:1fr}.wizard-scene .wizard-frame{height:auto;max-height:48dvh}.wizard-footer{padding:10px 14px calc(10px + env(safe-area-inset-bottom))}.reel-wizard-action{display:grid;gap:9px}.reel-wizard-action>.btn{width:100%;max-width:100%;min-height:48px}.reel-wizard-action>div>strong{display:none}.wizard-player{padding:10px}.wizard-player canvas{height:auto;width:min(100%,300px);max-height:48dvh;object-fit:contain}.wizard-player-controls .btn{font-size:13px}.wizard-scroll .form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.wizard-scroll .reel-source-upload input{font-size:14px}}
@media(min-width:761px) and (max-width:1024px){.wizard-scene .wizard-frame{height:300px}.reel-master-dialog{width:96%;height:94dvh}}
