:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#f7f8fb;background:#05070b;--bg:#07090e;--panel:#10141c;--panel2:#151a23;--line:#252c39;--muted:#8e96a7;--text:#f7f8fb;--red:#ef3340;--red2:#ff5963;--green:#68d49c;--amber:#f4be62;--danger:#ff6b73}
*{box-sizing:border-box}html{background:#05070b}body{margin:0;min-height:100vh;background:linear-gradient(180deg,#06080c 0,#0a0d13 55%,#07090d 100%);color:var(--text);overflow-x:hidden}
button,input,select,textarea{font:inherit}button{cursor:pointer}.ambient{position:fixed;pointer-events:none;filter:blur(80px);opacity:.3;z-index:0;border-radius:50%}.ambient-a{width:360px;height:360px;background:#6b1520;right:-120px;top:-80px}.ambient-b{width:280px;height:280px;background:#1c2743;left:-100px;bottom:8%}
.app-shell{position:relative;z-index:1;max-width:1120px;margin:0 auto;min-height:100vh;padding-bottom:110px}.app-bar{height:86px;position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;padding:12px 22px;background:rgba(7,9,14,.88);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.07)}
.brand-button{display:flex;align-items:center;gap:12px;background:none;border:0;color:white;padding:0;text-align:left}.brand-logo{width:52px;height:52px;background:white;border-radius:15px;padding:6px;display:grid;place-items:center;box-shadow:0 10px 30px rgba(0,0,0,.22)}.brand-logo img{width:100%;height:100%;object-fit:contain}.brand-button b,.brand-button small{display:block}.brand-button b{font-size:16px}.brand-button small{font-size:11px;color:var(--muted);margin-top:3px}.app-status{text-align:right}.app-status span,.app-status i{display:block;font-style:normal;font-size:10px;font-weight:800;letter-spacing:.12em}.app-status span{color:var(--green)}.app-status i{color:#6f7788;margin-top:4px}
.screen{display:none;padding:24px 22px 12px}.screen.active{display:block}.hidden{display:none!important}
h1,h2,h3,p{margin-top:0}.kicker,.screen-heading small,.section-title small,.panel-head small,.step-header small,.episode-hero>small,.detail-card>small,.script-card>small,.assembly-card>small{font-size:10px;letter-spacing:.15em;font-weight:800;color:var(--red2)}
.hero-card{border:1px solid var(--line);border-radius:28px;padding:30px;background:radial-gradient(circle at 95% 10%,rgba(239,51,64,.18),transparent 38%),linear-gradient(145deg,#151923,#0a0d13 72%);box-shadow:0 28px 80px rgba(0,0,0,.32)}.hero-card h1{font-size:clamp(42px,7vw,72px);line-height:.94;letter-spacing:-.055em;margin:14px 0 18px;max-width:780px}.hero-card h1 em{font-style:normal;color:var(--red2)}.hero-card p{max-width:730px;color:#aab2c1;line-height:1.7;font-size:16px}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}.primary,.secondary{border:0;border-radius:14px;padding:14px 18px;font-weight:800}.primary{background:linear-gradient(135deg,var(--red),#d72431);color:white;box-shadow:0 12px 28px rgba(239,51,64,.18)}.secondary{background:#171c25;color:#edf0f6;border:1px solid #303847}.compact{padding:10px 14px;border-radius:11px}.safety-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px}.safety-row span{font-size:10px;color:var(--green);background:rgba(104,212,156,.08);border:1px solid rgba(104,212,156,.2);padding:7px 9px;border-radius:999px}
.section-title,.screen-heading,.panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.section-title{margin:28px 2px 14px}.section-title h2,.screen-heading h2,.panel-head h3{margin:5px 0 0}.screen-heading{margin:8px 2px 22px}.screen-heading p{margin:7px 0 0;color:var(--muted);max-width:640px;line-height:1.55}.text-btn,.back-link{background:none;border:0;color:#b7bfce;font-weight:700}.back-link{padding:8px 0;margin-bottom:12px}
.stat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.stat-card{border:1px solid var(--line);background:linear-gradient(145deg,#121720,#0b0e14);border-radius:18px;padding:16px;min-width:0}.stat-card span,.stat-card b{display:block}.stat-card span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.stat-card b{font-size:30px;margin-top:8px}
.panel{border:1px solid var(--line);border-radius:22px;background:rgba(16,20,28,.88);padding:22px;margin-top:16px}.pill{display:inline-flex;align-items:center;width:max-content;border-radius:999px;padding:6px 9px;font-size:9px;font-weight:800;letter-spacing:.04em;border:1px solid var(--line);font-style:normal}.pill.safe{color:var(--green);background:rgba(104,212,156,.08);border-color:rgba(104,212,156,.24)}.pill.warn{color:var(--amber);background:rgba(244,190,98,.08);border-color:rgba(244,190,98,.24)}.pill.danger{color:var(--danger);background:rgba(255,107,115,.08);border-color:rgba(255,107,115,.24)}.pill.neutral{color:#a9b1c0;background:#141923}
.chip-row{display:flex;gap:7px;flex-wrap:wrap}.chip-row>span:not(.pill){font-size:10px;color:#b9c1cf;background:#171c25;border:1px solid #2b3340;padding:7px 9px;border-radius:9px}.progress-panel{overflow:hidden}.stage-strip{display:flex;gap:8px;overflow:auto;padding:17px 1px 3px;scrollbar-width:none}.stage{min-width:112px;padding:12px;border-radius:13px;border:1px solid #2b3340;background:#0d1117}.stage span,.stage small{display:block}.stage span{font-size:16px}.stage small{font-size:9px;margin-top:7px;color:#7f8798}.stage.done{border-color:rgba(104,212,156,.28);background:rgba(104,212,156,.05)}.stage.done span,.stage.done small{color:var(--green)}
.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}.quick-card{border:1px solid var(--line);border-radius:18px;background:#10141c;color:white;text-align:left;padding:18px}.quick-card>span{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:#1b202a;color:var(--red2);font-size:18px;margin-bottom:18px}.quick-card b,.quick-card small{display:block}.quick-card small{color:var(--muted);margin-top:5px;font-size:10px}
.series-list{display:grid;gap:10px}.series-card{width:100%;display:grid;grid-template-columns:72px 1fr 24px;align-items:center;gap:14px;text-align:left;background:#10141c;border:1px solid var(--line);border-radius:20px;padding:12px;color:white}.series-cover{width:72px;aspect-ratio:3/4;border-radius:15px;display:grid;place-items:center;background:linear-gradient(160deg,#40202a,#141b28);border:1px solid #3b2d35}.series-cover span{font-size:12px;font-weight:900;letter-spacing:.12em}.series-cover.large{width:94px;min-width:94px}.series-card-body small,.series-card-body b{display:block}.series-card-body small{color:var(--muted);font-size:10px}.series-card-body b{font-size:16px;margin:5px 0 9px}.series-card-body>div{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.series-card-body>div>span:not(.pill){font-size:10px;color:#aeb6c4}.chev{font-size:28px;color:#596173}
.series-hero{display:flex;gap:18px;align-items:center;border:1px solid var(--line);background:linear-gradient(145deg,#141923,#0c0f15);border-radius:24px;padding:18px}.series-hero h2{margin:4px 0 7px;font-size:28px}.series-hero p{color:var(--muted);margin-bottom:10px}.series-hero>div>small{color:var(--red2);font-size:10px;font-weight:800;text-transform:uppercase}
.tabbar{display:flex;gap:5px;overflow:auto;margin:14px 0;padding:5px;background:#0c1016;border:1px solid var(--line);border-radius:15px;scrollbar-width:none}.tabbar button{white-space:nowrap;border:0;background:none;color:#858e9f;padding:10px 12px;border-radius:10px;font-size:11px;font-weight:800}.tabbar button.active{background:#1b212c;color:white}
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.detail-card{background:#10141c;border:1px solid var(--line);border-radius:17px;padding:17px}.detail-card b{display:block;margin:9px 0 6px}.detail-card p{color:#9ca5b5;line-height:1.5;margin:0 0 8px}.detail-card>small:last-child{color:#768092;letter-spacing:0}
.character-card{display:grid;grid-template-columns:54px 1fr;gap:13px;background:#10141c;border:1px solid var(--line);border-radius:18px;padding:15px;margin-bottom:10px}.avatar{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#44212a,#20283a);font-weight:900}.character-card h3{margin:3px 0 6px}.character-card>div>small{color:var(--red2);font-size:10px}.character-card p{color:#a1a9b8;font-size:12px;line-height:1.5}
.episode-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.episode-card{background:#10141c;border:1px solid var(--line);border-radius:18px;padding:17px;text-align:left;color:white}.episode-card>span{font-size:9px;color:var(--red2);font-weight:900;letter-spacing:.12em}.episode-card>b{display:block;margin:7px 0}.episode-card p{color:#8f98a9;font-size:11px;line-height:1.45;min-height:32px}.episode-card>div{display:flex;align-items:center;justify-content:space-between}.episode-card strong{font-size:24px;color:#657084}
.wizard-shell{max-width:780px;margin:0 auto}.wizard-progress{display:flex;align-items:center;justify-content:center;max-width:430px;margin:0 auto 18px}.wizard-progress span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;border:1px solid #343c49;background:#10141c;color:#6f7786;font-size:11px;font-weight:900}.wizard-progress span.active{color:white;background:var(--red);border-color:var(--red);box-shadow:0 0 0 5px rgba(239,51,64,.08)}.wizard-progress i{height:1px;flex:1;background:#303745}.wizard-step{display:none;border:1px solid var(--line);border-radius:24px;background:linear-gradient(155deg,#121720,#0c0f15);padding:24px}.wizard-step.active{display:block}.step-header{display:grid;grid-template-columns:48px 1fr;gap:14px;margin-bottom:22px}.step-header>span{width:44px;height:44px;border-radius:13px;background:rgba(239,51,64,.12);color:var(--red2);display:grid;place-items:center;font-weight:900}.step-header h3{font-size:24px;margin:5px 0 7px}.step-header p{color:var(--muted);font-size:12px;line-height:1.55}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid label{font-size:10px;color:#a8b0bf;font-weight:800}.form-grid .wide{grid-column:1/-1}input,select,textarea{width:100%;margin-top:7px;background:#080b10;color:white;border:1px solid #2a3240;border-radius:12px;padding:14px;outline:none;min-height:48px}textarea{min-height:100px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--red);box-shadow:0 0 0 3px rgba(239,51,64,.1)}
.culture-preview{display:grid;grid-template-columns:48px 1fr 24px;align-items:center;gap:12px;margin:16px 0;padding:13px;background:#0b1017;border:1px solid #26303f;border-radius:15px}.culture-flag{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;background:#1a2130;color:white;font-size:11px;font-weight:900}.culture-preview small,.culture-preview b,.culture-preview span{display:block}.culture-preview small{font-size:8px;color:var(--red2);font-weight:800}.culture-preview b{font-size:12px;margin:3px 0}.culture-preview span{font-size:10px;color:var(--muted)}.culture-preview i{color:var(--green);font-style:normal;font-weight:900}.wide-btn{width:100%;margin-top:6px}.wizard-actions{display:flex;justify-content:space-between;gap:10px;margin-top:20px}.wizard-actions button{flex:1}.review-card{border:1px solid #2a3341;border-radius:17px;overflow:hidden;background:#0b0f15}.review-top{padding:18px;background:linear-gradient(135deg,rgba(239,51,64,.13),transparent)}.review-top span,.review-top b{display:block}.review-top span{font-size:8px;color:var(--red2);font-weight:900;letter-spacing:.12em}.review-top b{font-size:20px;margin-top:6px}.review-row{display:flex;justify-content:space-between;gap:20px;padding:12px 16px;border-top:1px solid #202632}.review-row small{color:#838c9d}.review-row b{text-align:right;font-size:11px}.review-safe{padding:12px 16px;color:var(--green);font-size:10px;border-top:1px solid #202632}.form-result{margin-top:12px;font-size:12px}.form-result.success{color:var(--green)}.form-result.error{color:var(--danger)}
.mini-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.mini-stats>div{background:#0f141c;border:1px solid var(--line);border-radius:14px;padding:13px}.mini-stats b,.mini-stats small{display:block}.mini-stats b{font-size:22px}.mini-stats small{font-size:9px;color:var(--muted);margin-top:5px}.list-stack{display:grid;gap:8px}.list-row{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#0f141c;border:1px solid var(--line);border-radius:14px;padding:13px;color:white;text-align:left;width:100%}.list-row b,.list-row small,.list-row span{display:block}.list-row small{color:var(--red2);font-size:9px}.list-row b{margin:3px 0;font-size:12px}.list-row div>span{font-size:10px;color:var(--muted)}.action-row:hover{border-color:#3b4657}
.qc-matrix{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.qc-matrix>div{display:grid;grid-template-columns:10px 1fr auto;gap:8px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:11px;background:#0f141c}.qc-matrix small{color:#aeb6c4}.qc-matrix b{font-size:9px}.dot{width:7px;height:7px;border-radius:50%;background:#6f7786}.dot.safe{background:var(--green)}.dot.warn{background:var(--amber)}.dot.danger{background:var(--danger)}
.episode-hero{border:1px solid var(--line);border-radius:24px;padding:24px;background:radial-gradient(circle at 95% 5%,rgba(239,51,64,.15),transparent 40%),#10141c}.episode-hero h2{font-size:34px;margin:7px 0}.episode-hero p{color:#9da6b6;line-height:1.5}.episode-section{margin-top:22px}.beat-card{display:grid;grid-template-columns:38px 1fr;gap:12px;border:1px solid var(--line);background:#10141c;border-radius:15px;padding:13px;margin-bottom:8px}.beat-card>span{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#1b212b;color:var(--red2);font-size:10px;font-weight:900}.beat-card small{color:#9ca5b4;font-size:9px}.beat-card p{margin:5px 0 0;color:#d2d7e0;font-size:12px;line-height:1.45}.script-card{border:1px solid var(--line);background:#0d1117;border-radius:18px;padding:17px;margin-top:14px}.script-card pre{white-space:pre-wrap;font-family:inherit;color:#c7ced9;font-size:12px;line-height:1.65;margin-bottom:0}
.scene-card{border:1px solid var(--line);border-radius:18px;background:#10141c;padding:17px;margin-bottom:10px}.scene-top{display:flex;align-items:center;justify-content:space-between}.scene-top>span{font-size:9px;color:var(--red2);font-weight:900;letter-spacing:.12em}.scene-card h3{margin:12px 0 9px}.scene-card p{color:#99a2b2;font-size:12px;line-height:1.55;margin:12px 0 0}.scene-card blockquote{margin:12px 0 0;padding:12px;border-left:2px solid var(--red);background:#0b0f15;color:#d5d9e1;font-size:12px}.assembly-card{border:1px dashed #3a4352;border-radius:15px;padding:15px}.assembly-card b{display:block;margin:6px 0}.assembly-card p{margin:0;color:var(--muted);font-size:11px}
.pipeline-wrap{display:flex;gap:7px;overflow:auto;padding-top:14px;scrollbar-width:none}.pipeline-wrap span{white-space:nowrap;border:1px solid #303746;border-radius:999px;padding:8px 10px;font-size:9px;color:#858e9f}.pipeline-wrap span.done{border-color:rgba(104,212,156,.25);color:var(--green);background:rgba(104,212,156,.05)}
.settings-card{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid var(--line);border-radius:18px;background:#10141c;padding:16px;margin-bottom:10px}.settings-card b,.settings-card small{display:block}.settings-card small{font-size:10px;color:var(--muted);margin-top:5px}.brand-settings{justify-content:flex-start}.big-logo{width:74px;height:58px;background:white;border-radius:14px;display:grid;place-items:center;padding:7px}.big-logo img{width:100%;height:100%;object-fit:contain}.install-help{border:1px dashed #343d4b;border-radius:16px;padding:15px;color:#a6aebd}.install-help p{font-size:11px;margin:5px 0 0}.empty-state{border:1px dashed #313947;border-radius:16px;padding:30px;text-align:center;color:#8e97a8}.empty-state b{color:white}
.bottom-nav{position:fixed;z-index:50;left:50%;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(680px,calc(100% - 24px));height:72px;display:grid;grid-template-columns:repeat(5,1fr);align-items:center;padding:7px;background:rgba(15,19,27,.94);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.09);border-radius:22px;box-shadow:0 18px 55px rgba(0,0,0,.5)}.bottom-nav button{height:58px;border:0;background:none;color:#798293;border-radius:15px}.bottom-nav button span,.bottom-nav button small{display:block}.bottom-nav button span{font-size:20px;line-height:20px}.bottom-nav button small{font-size:9px;margin-top:6px;font-weight:800}.bottom-nav button.active{color:white;background:#1b212c}.bottom-nav .create-nav{background:linear-gradient(145deg,#ef3340,#ca2230);color:white;transform:translateY(-11px);box-shadow:0 10px 28px rgba(239,51,64,.26)}
@media(max-width:900px){.stat-grid{grid-template-columns:repeat(3,1fr)}.quick-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){
  .app-shell{max-width:none;padding-bottom:102px}.app-bar{height:76px;padding:10px 15px}.brand-logo{width:46px;height:46px;border-radius:13px}.app-status i{display:none}.screen{padding:18px 14px 8px}
  .hero-card{padding:22px 18px;border-radius:24px}.hero-card h1{font-size:46px}.hero-card p{font-size:13px}.hero-actions{display:grid;grid-template-columns:1fr 1fr}.hero-actions button{padding:13px 10px}
  .stat-grid{grid-template-columns:repeat(3,1fr);gap:7px}.stat-card{padding:13px;border-radius:15px}.stat-card b{font-size:25px}.stat-card span{font-size:8px}.panel{padding:17px;border-radius:19px}
  .screen-heading{align-items:flex-start}.screen-heading h2{font-size:26px}.screen-heading p{font-size:12px}.quick-card{padding:14px}.quick-card>span{margin-bottom:12px}
  .series-card{grid-template-columns:62px 1fr 18px;padding:10px}.series-cover{width:62px}.series-hero{align-items:flex-start}.series-cover.large{width:76px;min-width:76px}.series-hero h2{font-size:23px}
  .detail-grid,.episode-grid,.qc-matrix{grid-template-columns:1fr}.wizard-step{padding:19px 15px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.step-header{grid-template-columns:40px 1fr}.step-header>span{width:40px;height:40px}.step-header h3{font-size:21px}
  .mini-stats{grid-template-columns:repeat(2,1fr)}.episode-hero{padding:20px}.episode-hero h2{font-size:29px}.bottom-nav{height:68px;border-radius:20px;bottom:max(8px,env(safe-area-inset-bottom));width:calc(100% - 16px)}
}
@media(max-width:380px){.brand-button small{display:none}.stat-grid{grid-template-columns:repeat(2,1fr)}.hero-card h1{font-size:39px}.hero-actions{grid-template-columns:1fr}.bottom-nav button small{font-size:8px}}
@media(min-width:1200px){body:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at center top,rgba(255,255,255,.025),transparent 36%)}}
/* Phase F production controls */
.sub-title{margin:20px 2px 10px}.sub-title small{font-size:9px;letter-spacing:.14em;color:var(--red2);font-weight:900}.sub-title h3{margin:4px 0 0;font-size:16px}
.approval-list,.final-qc-list{display:grid;gap:8px}.approval-row,.final-qc-row,.qc-review-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);background:#0d1219;border-radius:14px;padding:12px}
.approval-row small,.approval-row b,.approval-row span,.final-qc-row small,.final-qc-row b,.qc-review-row small,.qc-review-row b{display:block}.approval-row small,.final-qc-row small,.qc-review-row small{font-size:9px;color:#8f98a9}.approval-row b{font-size:12px;margin:3px 0}.approval-row span{font-size:9px;color:#6f7889}
.action-buttons,.qc-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.mini-btn{border:1px solid #333c4b;background:#171c25;color:#dce1e9;border-radius:9px;padding:7px 9px;font-size:9px;font-weight:900}.mini-btn.approve{color:var(--green);border-color:rgba(104,212,156,.28);background:rgba(104,212,156,.06)}.mini-btn.reject{color:var(--danger);border-color:rgba(255,107,115,.28);background:rgba(255,107,115,.06)}.neutral-btn{color:#c3c9d4}
.scene-qc{margin-top:14px;border-top:1px solid #252c39;padding-top:12px}.scene-qc-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.scene-qc-title small{font-size:9px;letter-spacing:.12em;color:var(--red2);font-weight:900}.qc-review-row{padding:10px;margin-top:7px}
.safe-text{color:var(--green)}.warn-text{color:var(--amber)}.danger-text{color:var(--danger)}.neutral-text{color:#9aa3b2}
.readiness-card{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:16px;padding:15px;margin:12px 0;background:#0d1219}.readiness-card.ready{border-color:rgba(104,212,156,.3);background:rgba(104,212,156,.05)}.readiness-card.blocked{border-color:rgba(244,190,98,.22)}.readiness-card small,.readiness-card b{display:block}.readiness-card small{font-size:9px;color:var(--red2);font-weight:900}.readiness-card b{font-size:13px;margin:4px 0}.readiness-card p{margin:0;color:#8e97a7;font-size:10px;line-height:1.45}.readiness-card button:disabled{opacity:.35;cursor:not-allowed}
.assembly-card button{margin-top:10px}.compact-empty{padding:18px}
@media(max-width:680px){.approval-row,.final-qc-row,.qc-review-row,.readiness-card{align-items:flex-start;flex-direction:column}.action-buttons,.qc-actions{justify-content:flex-start}.readiness-card button{width:100%}.final-qc-row .qc-actions{width:100%}.final-qc-row .qc-actions button{flex:1}}

/* Drama Prompt Intelligence */
.prompt-summary,.prompt-intel-card{border:1px solid var(--line);background:#0d1219;border-radius:16px;padding:14px}
.prompt-summary{display:flex;align-items:center;justify-content:space-between;gap:14px}
.prompt-summary.ready,.prompt-intel-card.ready{border-color:rgba(104,212,156,.28);background:rgba(104,212,156,.045)}
.prompt-summary.blocked,.prompt-intel-card.blocked{border-color:rgba(255,107,115,.28)}
.prompt-summary small,.prompt-summary b,.prompt-intel-head small,.prompt-intel-head b{display:block}
.prompt-summary small,.prompt-intel-head small{font-size:9px;letter-spacing:.1em;color:var(--red2);font-weight:900}
.prompt-summary b,.prompt-intel-head b{font-size:12px;margin:4px 0}
.prompt-summary p{margin:0;font-size:10px;color:#8e97a7}
.prompt-intel-card{margin:12px 0}.prompt-intel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.prompt-intel-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.prompt-intel-meta span{font-size:9px;color:#9ca5b5;border:1px solid #28303d;border-radius:999px;padding:5px 8px}
.prompt-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}.prompt-actions button:disabled{opacity:.35;cursor:not-allowed}
.production-prompt-details{margin:10px 0;border:1px solid #252c39;border-radius:12px;padding:10px 12px;background:#090d13}
.production-prompt-details summary{cursor:pointer;font-size:10px;font-weight:800;color:#b8c0cc}.production-prompt-details p{font-size:10px;line-height:1.55;color:#a8b0bd;white-space:normal}.production-prompt-details small{font-size:9px;line-height:1.45;color:#7f8999}
@media(max-width:680px){.prompt-summary,.prompt-intel-head{align-items:flex-start;flex-direction:column}.prompt-actions button{flex:1 1 46%}}

.owner-duration-note{display:none;margin-left:6px;font-size:9px;font-weight:900;letter-spacing:.08em;color:var(--green)}.owner-duration-note.active{display:inline}


/* =========================================================
   MEC DRAMA AI — PREMIUM CINEMATIC UI V1 / 2026-09-28
   Public landing + secure sign-in + authenticated studio.
   ========================================================= */
:root{
  --cinema-bg:#05080d;
  --cinema-panel:#0a111a;
  --cinema-panel2:#0e1723;
  --cinema-panel3:#111d2b;
  --cinema-line:rgba(167,186,211,.15);
  --cinema-text:#f4f7fb;
  --cinema-muted:#8e9db0;
  --cinema-red:#b72d3d;
  --cinema-red2:#dc5360;
  --cinema-gold:#d7b16c;
  --cinema-gold2:#f0d69a;
  --cinema-green:#72d7a4;
}
body{
  overflow-x:hidden;
  background:
    radial-gradient(circle at 82% 6%,rgba(183,45,61,.11),transparent 26%),
    radial-gradient(circle at 10% 18%,rgba(58,96,145,.14),transparent 30%),
    linear-gradient(180deg,#05080d,#07101a 46%,#05080d)!important;
}
body:before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.16;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.014) 1px,transparent 1px);
  background-size:54px 54px;
  mask-image:linear-gradient(to bottom,#000,transparent 88%)
}

/* PUBLIC LANDING */
.drama-landing{position:relative;z-index:2;min-height:100vh;color:var(--cinema-text)}
.landing-header{
  width:min(1280px,calc(100% - 40px));height:82px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  border-bottom:1px solid rgba(215,177,108,.15)
}
.landing-brand{
  display:flex;align-items:center;gap:12px;border:0;background:transparent;color:#fff;text-align:left
}
.landing-brand-mark{
  width:46px;height:46px;display:grid;place-items:center;border-radius:14px;
  background:#fff;padding:5px;box-shadow:0 0 0 1px rgba(215,177,108,.25),0 10px 28px rgba(0,0,0,.30)
}
.landing-brand-mark img{width:100%;height:100%;object-fit:contain}
.landing-brand small{display:block;color:#c3a66f;font-size:8px;font-weight:900;letter-spacing:.23em}
.landing-brand b{display:block;margin-top:3px;font-size:17px;letter-spacing:.02em}
.landing-nav{display:flex;align-items:center;gap:12px}
.landing-nav a{color:#8e9daf;text-decoration:none;font-size:11px;font-weight:750;padding:10px}
.landing-nav a:hover{color:#dce4ee}
.landing-signin,.landing-enter{
  min-height:40px;padding:0 15px;border-radius:12px;font-size:11px;font-weight:850
}
.landing-signin{color:#dbe4ef;background:transparent;border:1px solid rgba(167,186,211,.14)}
.landing-signin:hover{background:rgba(255,255,255,.05)}
.landing-enter{
  color:#141820;background:linear-gradient(135deg,#f0d69a,#cc9d50);
  box-shadow:0 9px 24px rgba(215,177,108,.13)
}
.landing-main{width:min(1280px,calc(100% - 40px));margin:0 auto;padding:42px 0 55px}
.drama-hero{
  position:relative;overflow:hidden;display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(400px,.9fr);
  gap:34px;align-items:stretch;padding:55px 52px;min-height:560px;
  border:1px solid rgba(215,177,108,.18);border-radius:34px;
  background:
    radial-gradient(circle at 87% 5%,rgba(183,45,61,.14),transparent 30%),
    radial-gradient(circle at 12% 115%,rgba(68,111,164,.16),transparent 34%),
    linear-gradient(140deg,#0d1825,#07111c 62%,#0d1016);
  box-shadow:0 30px 100px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.025)
}
.drama-hero:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(115deg,rgba(255,255,255,.022),transparent 28%,transparent 70%,rgba(215,177,108,.025))
}
.drama-hero-copy{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center}
.drama-kicker-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.drama-kicker{color:var(--cinema-gold2);font-size:9px;font-weight:900;letter-spacing:.20em}
.private-pill{
  padding:6px 9px;border-radius:999px;border:1px solid rgba(215,177,108,.22);
  background:rgba(215,177,108,.07);color:#e8ca8d;font-size:8px;font-weight:900;letter-spacing:.12em
}
.drama-hero h1{
  max-width:770px;margin:18px 0 20px;font-size:clamp(47px,5.5vw,76px);line-height:.96;
  letter-spacing:-.055em;color:#f8f9fb
}
.drama-hero h1 em{font-style:normal;color:#e0bd7a}
.drama-hero-copy>p{max-width:720px;margin:0;color:#a3b0c0;font-size:15px;line-height:1.75}
.drama-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}
.drama-primary,.drama-secondary{
  min-height:49px;padding:0 21px;border-radius:14px;font-size:11px;font-weight:900
}
.drama-primary{
  color:#151920;background:linear-gradient(135deg,#f2dfb7,#d1a356);
  box-shadow:0 12px 28px rgba(215,177,108,.15)
}
.drama-primary:hover{filter:brightness(1.05);transform:translateY(-1px)}
.drama-secondary{
  color:#e7edf4;background:rgba(255,255,255,.035);border:1px solid rgba(167,186,211,.14)
}
.drama-secondary:hover{background:rgba(255,255,255,.07)}
.drama-trust-row{display:flex;gap:9px;flex-wrap:wrap;margin-top:31px}
.drama-trust-row span{
  padding:7px 10px;border:1px solid rgba(167,186,211,.12);border-radius:999px;
  background:rgba(3,9,15,.40);color:#8fa0b4;font-size:9px;font-weight:700
}
.drama-trust-row span:before{content:"✓";margin-right:6px;color:#d9b675}
.drama-command-card{
  position:relative;z-index:2;overflow:hidden;padding:24px;
  border:1px solid rgba(167,186,211,.13);border-radius:28px;
  background:
    radial-gradient(circle at 80% 5%,rgba(183,45,61,.10),transparent 28%),
    linear-gradient(155deg,#0d1a28,#060e18);
  box-shadow:0 24px 70px rgba(0,0,0,.27),inset 0 1px 0 rgba(255,255,255,.025)
}
.command-top{display:flex;align-items:center;justify-content:space-between;gap:14px}
.command-top small{display:block;color:#75869b;font-size:8px;font-weight:900;letter-spacing:.16em}
.command-top b{display:block;margin-top:4px;color:#eaf0f6;font-size:14px}
.command-top>span{
  padding:6px 9px;border-radius:999px;color:#8ee0b5;background:rgba(43,115,78,.12);
  border:1px solid rgba(114,215,164,.20);font-size:7px;font-weight:900;letter-spacing:.12em
}
.scene-monitor{margin-top:24px}
.scene-frame{
  overflow:hidden;border:1px solid rgba(167,186,211,.12);border-radius:20px;background:#050a10;
  box-shadow:0 14px 40px rgba(0,0,0,.30)
}
.frame-top{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid rgba(167,186,211,.10)}
.frame-top span{color:#d5b06a;font-size:8px;font-weight:900;letter-spacing:.14em}
.frame-top i{font-style:normal;color:#8cdcad;font-size:7px;font-weight:900}
.frame-visual{
  position:relative;overflow:hidden;height:210px;
  background:
    radial-gradient(circle at 72% 38%,rgba(221,165,101,.18),transparent 18%),
    linear-gradient(130deg,#111826 0%,#191b23 42%,#08101a 100%)
}
.frame-visual:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(8,12,20,.68),transparent 42%,rgba(5,9,15,.25))}
.subject{
  position:absolute;bottom:0;width:88px;height:154px;border-radius:48% 48% 12px 12px;
  background:linear-gradient(180deg,#2a3544,#101723);box-shadow:0 -16px 40px rgba(0,0,0,.3)
}
.subject:before{
  content:"";position:absolute;left:50%;top:-28px;transform:translateX(-50%);
  width:52px;height:57px;border-radius:50%;background:linear-gradient(160deg,#50443e,#1c2028)
}
.subject-a{left:24%}.subject-b{right:20%;transform:scaleX(-1)}
.frame-light{position:absolute;right:12%;top:18%;width:85px;height:85px;border-radius:50%;background:rgba(210,158,92,.11);filter:blur(8px)}
.frame-meta{padding:12px 13px}
.frame-meta b{display:block;color:#dfe6ef;font-size:11px}
.frame-meta small{display:block;margin-top:5px;color:#6f8298;font-size:8px}
.timeline-bars{height:34px;display:flex;align-items:center;gap:3px;padding:0 8px}
.timeline-bars i{display:block;flex:1;height:4px;border-radius:9px;background:#263445}
.timeline-bars i:nth-child(-n+7){background:linear-gradient(90deg,#9b3040,#d05a64)}
.command-pipeline{
  display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;gap:5px;align-items:center;margin-top:14px
}
.command-pipeline>div{
  min-width:0;padding:10px 5px;border:1px solid rgba(167,186,211,.10);border-radius:12px;background:rgba(5,12,20,.52);text-align:center
}
.command-pipeline span{display:block;color:#6d7f94;font-size:7px;font-weight:900}
.command-pipeline b{display:block;margin-top:3px;color:#bdc7d4;font-size:9px}
.command-pipeline small{display:block;margin-top:3px;color:#5d6d80;font-size:6px}
.command-pipeline>i{font-style:normal;color:#47586b;font-size:9px}
.command-pipeline .done{border-color:rgba(114,215,164,.14)}.command-pipeline .done span{color:#72d7a4}
.command-pipeline .active{border-color:rgba(215,177,108,.28);background:rgba(215,177,108,.055)}
.command-pipeline .active span,.command-pipeline .active b{color:#e2bf7a}
.drama-signal-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin-top:13px}
.drama-signal-strip>div{
  padding:16px;border:1px solid var(--cinema-line);border-radius:17px;background:rgba(10,20,32,.78)
}
.drama-signal-strip strong{display:block;color:#d7b16c;font-size:8px;letter-spacing:.15em}
.drama-signal-strip span{display:block;margin-top:5px;color:#76899f;font-size:9px}
.landing-section{padding:100px 0 6px}
.landing-section-head{max-width:760px;margin:0 auto 38px;text-align:center}
.landing-section-head h2,.drama-final-cta h2{
  margin:10px 0 12px;color:#f1f4f8;font-size:clamp(32px,3.7vw,49px);line-height:1.06;letter-spacing:-.045em
}
.landing-section-head p{margin:0 auto;max-width:650px;color:#899aaf;font-size:13px;line-height:1.7}
.capability-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
.capability-grid article,.audience-grid article{
  min-height:215px;padding:23px;border:1px solid var(--cinema-line);border-radius:22px;
  background:linear-gradient(150deg,rgba(13,26,41,.92),rgba(6,15,25,.96));
  box-shadow:0 14px 38px rgba(0,0,0,.17),inset 0 1px 0 rgba(255,255,255,.018)
}
.capability-grid article:hover,.audience-grid article:hover{transform:translateY(-2px);border-color:rgba(215,177,108,.27)}
.cap-icon{
  width:44px;height:44px;display:grid;place-items:center;border-radius:13px;
  color:#e7c683;background:linear-gradient(145deg,rgba(215,177,108,.12),rgba(66,106,157,.09));
  border:1px solid rgba(215,177,108,.17);font-size:17px;font-weight:900
}
.capability-grid h3{margin:17px 0 8px;color:#edf2f7;font-size:16px}
.capability-grid p,.audience-grid p,.workflow-grid p{margin:0;color:#8193a8;font-size:11px;line-height:1.65}
.workflow-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.workflow-grid article{
  padding:22px 18px;border-top:1px solid rgba(215,177,108,.24);
  background:linear-gradient(180deg,rgba(215,177,108,.035),transparent)
}
.workflow-grid strong{color:#d9b675;font-size:10px;letter-spacing:.14em}
.workflow-grid h3{margin:14px 0 8px;color:#ecf1f6;font-size:14px}
.audience-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
.audience-grid article{min-height:150px}
.audience-grid b{display:block;margin-bottom:9px;color:#edf2f7;font-size:15px}
.drama-final-cta{
  margin-top:95px;padding:62px 30px;text-align:center;border:1px solid rgba(215,177,108,.20);border-radius:30px;
  background:radial-gradient(circle at 50% 120%,rgba(71,112,164,.14),transparent 42%),linear-gradient(145deg,#0e1b2a,#070f19)
}
.drama-final-cta p{margin:0 auto 26px;color:#8b9caf;font-size:13px}
.drama-footer{
  display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:32px;padding:25px 4px 4px;
  border-top:1px solid rgba(167,186,211,.11);color:#6f8296;font-size:9px
}
.drama-footer>div{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.drama-footer b{color:#b4c1d0;font-size:10px;letter-spacing:.06em}

/* SIGN IN */
.drama-auth{
  position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;
  background:rgba(2,7,12,.82);backdrop-filter:blur(17px)
}
.drama-auth-card{
  position:relative;width:min(500px,100%);padding:32px;border-radius:28px;
  color:#f2f5f9;border:1px solid rgba(215,177,108,.20);
  background:radial-gradient(circle at 90% 0%,rgba(183,45,61,.10),transparent 30%),linear-gradient(155deg,#0e1c2b,#07111c);
  box-shadow:0 38px 120px rgba(0,0,0,.54),inset 0 1px 0 rgba(255,255,255,.025)
}
.auth-close{
  position:absolute;right:15px;top:14px;width:34px;height:34px;border-radius:10px;border:0;
  color:#94a4b7;background:rgba(255,255,255,.04);font-size:21px
}
.auth-close:hover{color:#fff;background:rgba(255,255,255,.08)}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}
.auth-brand img{width:47px;height:47px;border-radius:13px;background:#fff;padding:5px}
.auth-brand small{display:block;color:#9eacbd;font-size:8px;font-weight:900;letter-spacing:.17em}
.auth-brand b{display:block;margin-top:3px;font-size:16px}
.drama-auth-card h2{margin:10px 0 8px;font-size:32px;letter-spacing:-.035em}
.drama-auth-card>p{margin:0;color:#8e9fb4;font-size:12px;line-height:1.6}
#loginForm{display:grid;gap:13px;margin-top:23px}
#loginForm label{display:grid;gap:7px;color:#bac6d4;font-size:10px;font-weight:800}
#loginForm input{
  width:100%;min-height:48px;padding:0 14px;border:1px solid rgba(167,186,211,.15);border-radius:13px;
  color:#f2f5f9;background:#07111d;outline:none
}
#loginForm input:focus{border-color:rgba(215,177,108,.54);box-shadow:0 0 0 3px rgba(215,177,108,.08)}
.login-error{min-height:16px;color:#df858d;font-size:10px}
.auth-security{display:flex;gap:7px;flex-wrap:wrap;margin-top:20px}
.auth-security span{
  padding:6px 8px;border-radius:999px;color:#6f8297;background:rgba(255,255,255,.025);
  border:1px solid rgba(167,186,211,.09);font-size:7px;font-weight:800
}

/* AUTHENTICATED STUDIO */
body:not(.public-mode) .app-shell{max-width:1280px!important;padding-bottom:112px}
body:not(.public-mode) .app-bar{
  height:82px!important;background:rgba(5,11,18,.91)!important;border-bottom:1px solid rgba(215,177,108,.15)!important;
  box-shadow:0 12px 38px rgba(0,0,0,.23)!important
}
body:not(.public-mode) .brand-logo{
  box-shadow:0 0 0 1px rgba(215,177,108,.22),0 8px 24px rgba(0,0,0,.26)!important
}
body:not(.public-mode) .brand-button b{color:#f4f7fb}
body:not(.public-mode) .brand-button small{color:#8e9daf!important}
body:not(.public-mode) .app-status{display:flex;align-items:center;gap:7px}
body:not(.public-mode) .app-status span{
  color:#e2c27e!important;background:rgba(215,177,108,.07)!important;border-color:rgba(215,177,108,.19)!important
}
body:not(.public-mode) .app-status i{
  color:#84dcae!important;background:rgba(44,112,77,.12)!important;border-color:rgba(114,215,164,.18)!important
}
.app-logout{
  min-height:32px;padding:0 10px;border-radius:9px;border:1px solid rgba(167,186,211,.11);
  color:#9dadbf;background:rgba(255,255,255,.03);font-size:8px;font-weight:850
}
.app-logout:hover{color:#fff;background:rgba(255,255,255,.07)}
body:not(.public-mode) .screen{padding-top:25px}
body:not(.public-mode) .hero-card{
  position:relative;overflow:hidden;padding:36px 34px!important;border-color:rgba(215,177,108,.18)!important;
  background:
    radial-gradient(circle at 93% 8%,rgba(183,45,61,.11),transparent 31%),
    radial-gradient(circle at 12% 120%,rgba(68,111,164,.14),transparent 36%),
    linear-gradient(140deg,#0d1a28,#07111c 64%,#0d1118)!important;
  box-shadow:0 26px 80px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.022)!important
}
body:not(.public-mode) .hero-card h1{color:#f6f8fb!important}
body:not(.public-mode) .hero-card h1 em{color:#dfbd78!important}
body:not(.public-mode) .hero-card p{color:#9caabd!important}
body:not(.public-mode) .kicker,
body:not(.public-mode) .screen-heading small,
body:not(.public-mode) .section-title small,
body:not(.public-mode) .panel-head small,
body:not(.public-mode) .step-header small,
body:not(.public-mode) .episode-hero>small,
body:not(.public-mode) .detail-card>small,
body:not(.public-mode) .script-card>small,
body:not(.public-mode) .assembly-card>small{color:#d7b16c!important}
body:not(.public-mode) .primary{
  color:#161a20!important;background:linear-gradient(135deg,#f0d79b,#cf9f52)!important;
  box-shadow:0 11px 26px rgba(215,177,108,.14)!important
}
body:not(.public-mode) .secondary{
  color:#dce4ee!important;background:#101b28!important;border-color:rgba(167,186,211,.14)!important
}
body:not(.public-mode) .safety-row span{
  color:#82dcad!important;background:rgba(43,111,76,.10)!important;border-color:rgba(114,215,164,.18)!important
}
body:not(.public-mode) .stat-card,
body:not(.public-mode) .panel,
body:not(.public-mode) .quick-card,
body:not(.public-mode) .series-card,
body:not(.public-mode) .detail-card,
body:not(.public-mode) .character-card,
body:not(.public-mode) .episode-card,
body:not(.public-mode) .settings-card,
body:not(.public-mode) .beat-card,
body:not(.public-mode) .scene-card,
body:not(.public-mode) .script-card,
body:not(.public-mode) .prompt-summary,
body:not(.public-mode) .prompt-intel-card,
body:not(.public-mode) .readiness-card{
  color:#ebf0f6!important;border-color:rgba(167,186,211,.13)!important;
  background:linear-gradient(150deg,rgba(13,26,41,.94),rgba(6,15,25,.96))!important;
  box-shadow:0 13px 34px rgba(0,0,0,.17),inset 0 1px 0 rgba(255,255,255,.018)!important
}
body:not(.public-mode) .quick-card:hover,
body:not(.public-mode) .series-card:hover,
body:not(.public-mode) .episode-card:hover{
  transform:translateY(-2px);border-color:rgba(215,177,108,.26)!important
}
body:not(.public-mode) .quick-card>span{
  color:#e1bf7c!important;background:rgba(215,177,108,.08)!important;border:1px solid rgba(215,177,108,.13)!important
}
body:not(.public-mode) .section-title h2,
body:not(.public-mode) .screen-heading h2,
body:not(.public-mode) .panel-head h3{color:#eff3f8}
body:not(.public-mode) .screen-heading p,
body:not(.public-mode) .quick-card small,
body:not(.public-mode) .series-card-body small,
body:not(.public-mode) .detail-card p,
body:not(.public-mode) .character-card p,
body:not(.public-mode) .episode-card p,
body:not(.public-mode) .scene-card p,
body:not(.public-mode) .beat-card small,
body:not(.public-mode) .settings-card small{color:#8193a8!important}
body:not(.public-mode) .series-cover,
body:not(.public-mode) .avatar{
  background:linear-gradient(150deg,#36242c,#122133)!important;border-color:rgba(215,177,108,.14)!important
}
body:not(.public-mode) .series-hero,
body:not(.public-mode) .episode-hero{
  border-color:rgba(215,177,108,.17)!important;
  background:
    radial-gradient(circle at 95% 5%,rgba(183,45,61,.10),transparent 35%),
    linear-gradient(145deg,#0e1b2a,#07101a)!important
}
body:not(.public-mode) .series-hero>div>small,
body:not(.public-mode) .character-card>div>small,
body:not(.public-mode) .episode-card>span,
body:not(.public-mode) .scene-top>span{color:#d7b16c!important}
body:not(.public-mode) .tabbar{
  border-color:rgba(167,186,211,.12)!important;background:#08131f!important
}
body:not(.public-mode) .tabbar button{color:#8597aa!important}
body:not(.public-mode) .tabbar button.active{color:#f0d69a!important;background:rgba(215,177,108,.07)!important}
body:not(.public-mode) .pill.neutral{color:#94a4b8!important;background:#0f1c2a!important}
body:not(.public-mode) .chip-row>span:not(.pill){
  color:#a9b8c8!important;background:#0f1c2a!important;border-color:rgba(167,186,211,.12)!important
}
body:not(.public-mode) .stage{background:#08131f!important;border-color:rgba(167,186,211,.11)!important}
body:not(.public-mode) .stage.done{background:rgba(43,111,76,.10)!important;border-color:rgba(114,215,164,.20)!important}
body:not(.public-mode) .culture-preview,
body:not(.public-mode) .review-card,
body:not(.public-mode) .assembly-card,
body:not(.public-mode) .production-prompt-details,
body:not(.public-mode) .list-row,
body:not(.public-mode) .approval-row,
body:not(.public-mode) .final-qc-row,
body:not(.public-mode) .qc-review-row{
  color:#e2e9f1!important;background:#08131f!important;border-color:rgba(167,186,211,.12)!important
}
body:not(.public-mode) input,
body:not(.public-mode) select,
body:not(.public-mode) textarea{
  color:#eef2f7!important;background:#07111d!important;border-color:rgba(167,186,211,.16)!important
}
body:not(.public-mode) input:focus,
body:not(.public-mode) select:focus,
body:not(.public-mode) textarea:focus{
  border-color:rgba(215,177,108,.52)!important;box-shadow:0 0 0 3px rgba(215,177,108,.07)!important
}
body:not(.public-mode) .step-header>span,
body:not(.public-mode) .wizard-progress span.active{
  color:#151a20!important;background:linear-gradient(135deg,#efd698,#c99a4d)!important
}
body:not(.public-mode) .wizard-progress span{
  color:#8293a6!important;background:#101d2b!important;border-color:rgba(167,186,211,.13)!important
}
body:not(.public-mode) .review-top{background:linear-gradient(135deg,rgba(183,45,61,.10),transparent)!important}
body:not(.public-mode) .review-top span{color:#dfbd78!important}
body:not(.public-mode) .bottom-nav{
  background:rgba(7,15,25,.96)!important;border-color:rgba(167,186,211,.13)!important;
  box-shadow:0 20px 65px rgba(0,0,0,.42)!important
}
body:not(.public-mode) .bottom-nav button{color:#75879a!important}
body:not(.public-mode) .bottom-nav button.active{
  color:#f0d69a!important;background:rgba(215,177,108,.07)!important
}
body:not(.public-mode) .bottom-nav .create-nav{
  color:#fff!important;background:linear-gradient(145deg,#b82f40,#8d2534)!important;
  box-shadow:0 10px 28px rgba(183,45,61,.25)!important
}
body:not(.public-mode) .big-logo{box-shadow:0 0 0 1px rgba(215,177,108,.17)}
body:not(.public-mode) .install-help{color:#8698ac!important;border-color:rgba(167,186,211,.14)!important}
body:not(.public-mode) .empty-state{color:#8193a8!important;border-color:rgba(167,186,211,.14)!important}
body:not(.public-mode) .empty-state b{color:#e7edf4!important}

/* Responsive */
@media(max-width:1020px){
  .drama-hero{grid-template-columns:1fr;min-height:auto}
  .drama-command-card{min-height:410px}
  .capability-grid{grid-template-columns:1fr 1fr}
  .workflow-grid{grid-template-columns:repeat(3,1fr)}
  .drama-signal-strip{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
  .landing-header{width:calc(100% - 28px);height:72px}
  .landing-nav a{display:none}.landing-signin{display:none}.landing-enter{padding:0 12px}
  .landing-main{width:calc(100% - 28px);padding-top:24px}
  .drama-hero{padding:34px 24px;border-radius:27px}
  .drama-hero h1{font-size:clamp(43px,12vw,58px)}
  .drama-hero-copy>p{font-size:13px}
  .drama-hero-actions{display:grid}.drama-hero-actions button{width:100%}
  .drama-command-card{min-height:auto}
  .frame-visual{height:180px}
  .drama-signal-strip{grid-template-columns:1fr 1fr}
  .landing-section{padding-top:76px}
  .landing-section-head{text-align:left;margin-bottom:28px}
  .capability-grid,.audience-grid{grid-template-columns:1fr}
  .capability-grid article{min-height:auto}
  .workflow-grid{grid-template-columns:1fr 1fr}
  .drama-footer{align-items:flex-start;flex-direction:column}
  body:not(.public-mode) .app-status i{display:none!important}
  .app-logout{padding:0 8px;font-size:7px}
}
@media(max-width:520px){
  .landing-brand b{font-size:14px}.landing-brand small{font-size:7px}.landing-brand-mark{width:40px;height:40px}
  .drama-hero{padding:29px 20px}
  .command-pipeline{grid-template-columns:1fr 1fr;gap:7px}.command-pipeline>i{display:none}
  .drama-signal-strip,.workflow-grid{grid-template-columns:1fr}
  .drama-auth-card{padding:27px 21px}
  .drama-final-cta{text-align:left;padding:42px 23px}
  body:not(.public-mode) .app-status span{display:none!important}
  body:not(.public-mode) .hero-card{padding:24px 20px!important}
}

@media(max-width:600px){
  .landing-enter{display:none!important}
  .landing-nav{display:none!important}
  .landing-header{justify-content:flex-start!important}
}

/* STORY ARCHITECT — IDEA FIRST */
.story-architect-shell{max-width:900px}
.story-idea-input{min-height:190px!important;font-size:16px;line-height:1.7;padding:18px!important}
.idea-label{display:grid;gap:8px;color:#c3ceda;font-size:11px;font-weight:850}
.idea-helper{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:8px 2px 22px;color:#718397;font-size:9px}
.story-culture-grid{margin-top:4px}
.architect-advanced{margin:18px 0;border:1px solid rgba(167,186,211,.12);border-radius:16px;background:#08131f;overflow:hidden}
.architect-advanced>summary{padding:14px 16px;cursor:pointer;color:#b9c5d2;font-size:10px;font-weight:850}
.architect-advanced>summary span{float:right;color:#d7b16c}
.architect-advanced .owner-reference-card{margin:0;border:0;border-top:1px solid rgba(167,186,211,.1);border-radius:0}
.architect-generate{min-height:54px;font-size:13px}
.architect-safety{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.architect-safety span{padding:7px 9px;border-radius:999px;border:1px solid rgba(114,215,164,.15);background:rgba(43,111,76,.07);color:#78cfa1;font-size:8px}
.architect-loading{padding:28px;text-align:center;border:1px solid rgba(215,177,108,.18);border-radius:18px;background:rgba(215,177,108,.04)}
.architect-loading b{display:block;color:#e7c680}.architect-loading p{margin:7px 0 0;color:#8395a9;font-size:11px}
.story-blueprint{display:grid;gap:14px}
.architect-status{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px;border:1px solid rgba(215,177,108,.18);border-radius:20px;background:linear-gradient(145deg,#0e1b2a,#07111c)}
.architect-status small{color:#d7b16c;font-size:8px;font-weight:900;letter-spacing:.13em}.architect-status h3{margin:6px 0 0;font-size:27px}
.architect-title-options{padding:17px;border:1px solid rgba(167,186,211,.12);border-radius:17px;background:#08131f}
.architect-title-options>small{display:block;margin-bottom:10px;color:#8b9caf;font-size:8px;font-weight:900;letter-spacing:.12em}
.architect-character-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.architect-character{padding:18px;border:1px solid rgba(167,186,211,.13);border-radius:18px;background:linear-gradient(150deg,rgba(13,26,41,.94),rgba(6,15,25,.96))}
.architect-character small{color:#d7b16c;font-size:8px}.architect-character h4{margin:5px 0 8px;font-size:18px}.architect-character p{margin:8px 0;color:#91a1b4;font-size:10px;line-height:1.55}.architect-character p b{color:#c9d3de}
.architect-longform{padding:18px;border:1px solid rgba(167,186,211,.12);border-radius:17px;background:#08131f;color:#a9b7c7;font-size:11px;line-height:1.7}
.architect-format{display:grid;grid-template-columns:220px 1fr;gap:18px;align-items:center;padding:18px;border:1px solid rgba(215,177,108,.2);border-radius:17px;background:rgba(215,177,108,.045)}
.architect-format small,.architect-format b{display:block}.architect-format small{color:#d7b16c;font-size:8px;font-weight:900;letter-spacing:.1em}.architect-format b{margin-top:5px;font-size:15px}.architect-format p{margin:0;color:#8fa0b3;font-size:10px;line-height:1.55}
.architect-episode-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.architect-episode{padding:15px;border:1px solid rgba(167,186,211,.11);border-radius:15px;background:#08131f}
.architect-episode span{display:block;color:#d7b16c;font-size:8px;font-weight:900;letter-spacing:.1em}.architect-episode b{display:block;margin:5px 0 6px;font-size:13px}.architect-episode p{margin:0;color:#9aa9ba;font-size:10px;line-height:1.5}.architect-episode small{display:block;margin-top:8px;color:#6f8297;font-size:9px}
.architect-guardrail{padding:13px 15px;border:1px solid rgba(114,215,164,.16);border-radius:13px;background:rgba(43,111,76,.07);color:#7fd5a7;font-size:9px}
@media(max-width:680px){.architect-character-grid,.architect-episode-grid,.architect-format{grid-template-columns:1fr}.story-idea-input{min-height:170px!important}.architect-status{align-items:flex-start}.architect-status h3{font-size:23px}}

/* STORY ARCHITECT QC FIXES */
button:disabled{
  cursor:not-allowed!important;
  opacity:.42!important;
  filter:saturate(.45)!important;
  box-shadow:none!important;
  transform:none!important;
}
body:not(.public-mode) #screen-create,
body:not(.public-mode) #screen-episode{
  padding-bottom:170px!important;
}
@media(max-width:680px){
  body:not(.public-mode) #screen-create,
  body:not(.public-mode) #screen-episode{
    padding-bottom:190px!important;
  }
}

/* DIRECTOR REVIEW — HUMAN-GATED STORY APPROVAL */
.director-review-root{display:grid;gap:18px}
.dr-review-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;border:1px solid rgba(215,177,108,.2);border-radius:22px;background:linear-gradient(145deg,#0f1d2d,#07111c)}
.dr-review-hero small,.dr-section-head small,.dr-owner-head small,.dr-build-lock small{color:#d7b16c;font-size:8px;font-weight:900;letter-spacing:.13em}
.dr-review-hero h3{margin:6px 0 7px;font-size:27px}.dr-review-hero p{max-width:650px;margin:0;color:#8fa1b5;font-size:10px;line-height:1.6}
.dr-progress-ring{min-width:98px;height:98px;border:1px solid rgba(215,177,108,.24);border-radius:50%;display:grid;place-content:center;text-align:center;background:rgba(215,177,108,.04)}
.dr-progress-ring b{font-size:23px}.dr-progress-ring small{margin-top:3px;color:#788b9f;font-size:7px;letter-spacing:.12em}
.dr-progress-track{height:5px;border-radius:999px;background:#101c28;overflow:hidden}.dr-progress-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#9e753d,#e4c47f);transition:width .25s ease}
.dr-review-safety{display:flex;gap:7px;flex-wrap:wrap}.dr-review-safety span{padding:7px 10px;border:1px solid rgba(114,215,164,.15);border-radius:999px;background:rgba(43,111,76,.06);color:#77cba0;font-size:8px}
.dr-section-stack{display:grid;gap:11px}
.dr-section{padding:19px;border:1px solid rgba(167,186,211,.13);border-radius:19px;background:linear-gradient(145deg,rgba(12,25,39,.96),rgba(6,14,23,.98))}
.dr-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:13px}.dr-section-head h4{margin:5px 0 0;font-size:17px}
.dr-section-preview{display:grid;gap:10px;color:#a4b2c2;font-size:10px;line-height:1.6}.dr-title-main{font-size:20px;font-weight:850;color:#edf1f5}.dr-prose{margin:0;color:#9dabbc;line-height:1.7}.dr-prose b{color:#d4dde6}
.dr-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.dr-mini-grid article{padding:13px;border:1px solid rgba(167,186,211,.1);border-radius:13px;background:#07111b}.dr-mini-grid small{display:block;color:#d7b16c;font-size:7px}.dr-mini-grid b{display:block;margin:3px 0 5px;color:#e5ebf1;font-size:13px}.dr-mini-grid p,.dr-mini-grid span{margin:0;color:#8c9db0;font-size:9px;line-height:1.5}.dr-mini-grid span{display:block;margin-top:6px}
.dr-episode-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.dr-episode-list article{padding:12px;border:1px solid rgba(167,186,211,.1);border-radius:12px;background:#07111b}.dr-episode-list span{display:block;color:#d7b16c;font-size:7px;font-weight:900}.dr-episode-list b{display:block;margin:3px 0 5px;color:#e6ebf0;font-size:12px}.dr-episode-list p{margin:0;color:#92a2b3;font-size:9px;line-height:1.45}.dr-episode-list small{display:block;margin-top:6px;color:#718398;font-size:8px}
.dr-format-preview{padding:13px;border-left:2px solid rgba(215,177,108,.55);background:rgba(215,177,108,.035)}.dr-format-preview b{font-size:14px}.dr-format-preview p{margin:5px 0 0;color:#899aad;font-size:9px}
.dr-section-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin-top:15px;padding-top:13px;border-top:1px solid rgba(167,186,211,.09)}
.dr-section-editor{margin-top:10px;padding:15px;border:1px solid rgba(215,177,108,.14);border-radius:14px;background:#06101a}
.dr-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dr-edit-grid .wide{grid-column:1/-1}.dr-edit-grid label,.dr-edit-stack label,.dr-edit-single{display:grid;gap:6px;color:#8d9eb1;font-size:8px;font-weight:800}.dr-edit-grid input,.dr-edit-grid textarea,.dr-edit-stack input,.dr-edit-stack textarea,.dr-edit-single textarea{width:100%;box-sizing:border-box}
.dr-edit-grid textarea,.dr-edit-stack textarea,.dr-edit-single textarea{min-height:88px;line-height:1.55}.dr-edit-stack{display:grid;gap:10px}.dr-edit-single textarea{min-height:120px}
.dr-complex-edit{display:grid;gap:10px}.dr-char-editor,.dr-episode-editor{padding:13px;border:1px solid rgba(167,186,211,.1);border-radius:13px;background:#08131f}.dr-episode-editor-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}.dr-episode-editor-head span{color:#d7b16c;font-size:7px;font-weight:900}.dr-episode-editor-head b{font-size:12px}
.dr-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:13px}
.dr-owner-controls{padding:22px;border:1px solid rgba(215,177,108,.19);border-radius:21px;background:linear-gradient(145deg,rgba(25,20,13,.28),rgba(7,15,24,.96))}
.dr-owner-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}.dr-owner-head h3{margin:5px 0 6px;font-size:20px}.dr-owner-head p{margin:0;color:#8899ac;font-size:9px;line-height:1.55}
.dr-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dr-control-grid label{display:grid;gap:6px;color:#8e9fb1;font-size:8px;font-weight:850}.dr-control-grid .wide{grid-column:1/-1}.owner-inline-note{float:right;color:#d7b16c;font-size:7px}
.dr-reference-line{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:14px;padding:13px;border:1px solid rgba(167,186,211,.1);border-radius:13px;background:#07111b}.dr-reference-line small,.dr-reference-line b,.dr-reference-line span{display:block}.dr-reference-line small{color:#d7b16c;font-size:7px}.dr-reference-line b{margin-top:3px;font-size:11px}.dr-reference-line span{margin-top:3px;color:#74869a;font-size:8px}
.dr-owner-save{display:flex;align-items:center;gap:12px;margin-top:14px}.dr-owner-save span{color:#74869a;font-size:8px}
.dr-build-lock{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px;border:1px solid rgba(225,122,122,.16);border-radius:18px;background:rgba(107,38,38,.055)}.dr-build-lock.ready{border-color:rgba(114,215,164,.18);background:rgba(43,111,76,.055)}.dr-build-lock h3{margin:5px 0 5px;font-size:18px}.dr-build-lock p{max-width:620px;margin:0;color:#8799ac;font-size:9px;line-height:1.55}
.dr-bottom-actions{align-items:center}.dr-bottom-actions span{color:#607388;font-size:7px;word-break:break-all}
body:not(.public-mode) #screen-create{padding-bottom:210px!important}
@media(max-width:680px){
  .dr-review-hero,.dr-owner-head,.dr-build-lock,.dr-reference-line{align-items:flex-start;flex-direction:column}
  .dr-progress-ring{min-width:82px;width:82px;height:82px}
  .dr-mini-grid,.dr-episode-list,.dr-edit-grid,.dr-control-grid{grid-template-columns:1fr}
  .dr-edit-grid .wide,.dr-control-grid .wide{grid-column:auto}
  .dr-section-actions{justify-content:stretch}.dr-section-actions button{flex:1}
  .dr-owner-save{align-items:stretch;flex-direction:column}
  .dr-build-lock button{width:100%}
  body:not(.public-mode) #screen-create{padding-bottom:230px!important}
}

/* OWNER AI CREATIVE ASSIST */
.owner-ai-assist{
  margin:14px 0 10px;
  padding:18px;
  border:1px solid rgba(215,177,108,.2);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(21,18,12,.35),rgba(7,16,26,.96));
}
.owner-ai-assist-head,.owner-ai-result-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.owner-ai-assist-head small,.owner-ai-result-head small,.owner-ai-improvements small{
  color:#d7b16c;
  font-size:8px;
  font-weight:900;
  letter-spacing:.12em;
}
.owner-ai-assist-head h4,.owner-ai-result-head h4{
  margin:5px 0 5px;
  font-size:17px;
}
.owner-ai-assist-head p{
  margin:0;
  max-width:680px;
  color:#8ea0b3;
  font-size:9px;
  line-height:1.6;
}
.owner-ai-assist-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:14px;
}
.owner-ai-assist-actions span{
  color:#708398;
  font-size:8px;
}
.owner-ai-assist-result{
  display:grid;
  gap:12px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(167,186,211,.1);
}
.owner-ai-enhanced-copy{
  padding:15px;
  border:1px solid rgba(215,177,108,.14);
  border-radius:14px;
  background:rgba(215,177,108,.035);
  color:#d8e0e8;
  font-size:11px;
  line-height:1.75;
}
.owner-ai-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.owner-ai-detail-grid article{
  padding:12px;
  border:1px solid rgba(167,186,211,.1);
  border-radius:12px;
  background:#07111b;
}
.owner-ai-detail-grid article.wide{grid-column:1/-1}
.owner-ai-detail-grid small{
  display:block;
  margin-bottom:5px;
  color:#d7b16c;
  font-size:7px;
  font-weight:900;
  letter-spacing:.1em;
}
.owner-ai-detail-grid p{
  margin:0;
  color:#91a2b4;
  font-size:9px;
  line-height:1.55;
}
.owner-ai-improvements{
  display:grid;
  gap:7px;
}
.owner-ai-result-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.owner-ai-guardrail{
  padding:9px 11px;
  border:1px solid rgba(114,215,164,.14);
  border-radius:11px;
  background:rgba(43,111,76,.055);
  color:#75c79b;
  font-size:8px;
}
.owner-episode-ai-card{
  border-color:rgba(215,177,108,.2)!important;
  background:linear-gradient(145deg,rgba(19,17,11,.28),rgba(7,15,24,.96))!important;
}
.owner-episode-ai-copy{
  margin:0 0 12px;
  color:#899bad;
  font-size:9px;
  line-height:1.6;
}
.owner-episode-idea-input{
  width:100%;
  box-sizing:border-box;
  min-height:120px;
  resize:vertical;
  padding:14px;
  border:1px solid rgba(167,186,211,.14);
  border-radius:13px;
  background:#07111b;
  color:#e3e9ef;
  font:inherit;
  font-size:10px;
  line-height:1.65;
}
.owner-episode-idea-input:focus{
  outline:none;
  border-color:rgba(215,177,108,.5);
  box-shadow:0 0 0 2px rgba(215,177,108,.08);
}
@media(max-width:680px){
  .owner-ai-assist-head,.owner-ai-result-head{align-items:flex-start;flex-direction:column}
  .owner-ai-detail-grid{grid-template-columns:1fr}
  .owner-ai-detail-grid article.wide{grid-column:auto}
  .owner-ai-result-actions{justify-content:stretch}
  .owner-ai-result-actions button{flex:1}
  .owner-ai-assist-actions{align-items:stretch;flex-direction:column}
  .owner-ai-assist-actions button{width:100%}
}

/* OWNER SCENE PLANNING */
.dr-control-hint{display:block;margin-top:3px;color:#66798e;font-size:7px;font-weight:500;line-height:1.45}

/* EPISODE WRITER — SCENE BREAKDOWN & EXACT DURATION */
.episode-scene-planner{border-color:rgba(215,177,108,.2)!important;background:linear-gradient(145deg,rgba(21,18,12,.25),rgba(7,15,24,.98))!important}
.scene-planner-controls{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:9px;align-items:end;margin:12px 0}
.scene-planner-controls label{display:grid;gap:6px;color:#8ea0b3;font-size:8px;font-weight:850}
.scene-target-duration{display:grid;gap:3px;padding:10px 12px;border:1px solid rgba(215,177,108,.14);border-radius:12px;background:rgba(215,177,108,.035)}
.scene-target-duration small{color:#d7b16c;font-size:7px;font-weight:900;letter-spacing:.1em}.scene-target-duration b{font-size:14px}.scene-target-duration span{color:#73869a;font-size:7px}
.scene-plan-summary{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:14px 0;padding:13px;border:1px solid rgba(167,186,211,.1);border-radius:13px;background:#07111b}
.scene-plan-summary.ready{border-color:rgba(114,215,164,.17)}.scene-plan-summary.blocked{border-color:rgba(225,122,122,.17)}
.scene-plan-summary small,.scene-plan-objective small{display:block;color:#d7b16c;font-size:7px;font-weight:900;letter-spacing:.1em}
.scene-plan-summary b{display:block;margin:3px 0;font-size:16px}.scene-plan-summary p{margin:0;color:#7f91a5;font-size:8px}
.scene-plan-objective{display:grid;gap:5px;padding:13px;border-left:2px solid rgba(215,177,108,.45);background:rgba(215,177,108,.025)}
.scene-plan-objective p{margin:0 0 7px;color:#98a8b8;font-size:9px;line-height:1.55}
.scene-plan-scenes{display:grid;gap:10px;margin-top:13px}
.scene-plan-editor{padding:14px;border:1px solid rgba(167,186,211,.1);border-radius:14px;background:#07111b}
.scene-plan-editor-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:11px}
.scene-plan-editor-head>span{color:#d7b16c;font-size:8px;font-weight:900;letter-spacing:.1em}
.scene-plan-editor-head label{display:flex;align-items:center;gap:6px;color:#8395a8;font-size:8px}.scene-plan-editor-head input{width:68px}
.scene-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.scene-plan-grid .wide{grid-column:1/-1}
.scene-plan-grid label{display:grid;gap:5px;color:#8395a8;font-size:8px;font-weight:800}.scene-plan-grid textarea{min-height:70px;line-height:1.45}
.scene-plan-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:13px;border-top:1px solid rgba(167,186,211,.09)}
@media(max-width:760px){
 .scene-planner-controls{grid-template-columns:1fr}
 .scene-plan-summary{align-items:flex-start;flex-direction:column}
 .scene-plan-grid{grid-template-columns:1fr}.scene-plan-grid .wide{grid-column:auto}
 .scene-plan-actions{justify-content:stretch}.scene-plan-actions button{flex:1}
}

.episode-master-player{margin-top:18px;padding:18px;border:1px solid rgba(255,255,255,.12);border-radius:20px;background:rgba(8,10,18,.72)}
.episode-master-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.episode-master-head div{display:grid;gap:3px}.episode-master-head small{opacity:.65;letter-spacing:.08em}.episode-master-head b{font-size:1.08rem}
.episode-master-player video{display:block;width:min(100%,430px);aspect-ratio:9/16;max-height:72vh;margin:0 auto;border-radius:16px;background:#000;object-fit:contain}
.episode-master-player p{margin:12px 0 0;text-align:center;opacity:.68;font-size:.88rem}

/* PHASE C — EPISODE SCRIPT WRITER */
.episode-script-writer{border-color:rgba(144,122,215,.22)!important;background:linear-gradient(145deg,rgba(18,14,30,.32),rgba(7,15,24,.98))!important}
.script-writer-gate{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px;border:1px solid rgba(167,186,211,.11);border-radius:14px;background:#07111b}
.script-writer-gate.ready{border-color:rgba(114,215,164,.18)}.script-writer-gate.blocked{border-color:rgba(225,122,122,.15)}
.script-writer-gate small,.script-qc-summary small,.script-draft-meta small{display:block;color:#b9a3ef;font-size:7px;font-weight:900;letter-spacing:.1em}
.script-writer-gate b{display:block;margin:4px 0;font-size:14px}.script-writer-gate p{margin:0;color:#76899e;font-size:8px}
.script-qc-summary{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:12px 0;padding:13px;border:1px solid rgba(167,186,211,.11);border-radius:13px;background:#07111b}
.script-qc-summary.ready{border-color:rgba(114,215,164,.18)}.script-qc-summary.blocked{border-color:rgba(225,122,122,.18)}
.script-qc-summary b{display:block;margin:3px 0;font-size:16px}.script-qc-summary p{margin:0;color:#7e90a4;font-size:8px}
.script-stale-warning{padding:11px 13px;border:1px solid rgba(225,122,122,.18);border-radius:12px;background:rgba(110,38,38,.08)}.script-stale-warning b{font-size:10px;color:#d99a9a}.script-stale-warning p{margin:4px 0 0;color:#9b7d82;font-size:8px}
.script-draft-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.script-draft-meta>div{padding:12px;border:1px solid rgba(167,186,211,.1);border-radius:12px;background:#07111b}.script-draft-meta p{margin:4px 0 0;color:#94a4b5;font-size:9px;line-height:1.5}
.script-beats-editor,.script-scenes-editor{display:grid;gap:9px;margin-top:14px}
.script-beat-editor{padding:11px;border:1px solid rgba(167,186,211,.1);border-radius:12px;background:#07111b}.script-beat-editor>div{display:grid;grid-template-columns:auto minmax(150px,.45fr) auto;gap:10px;align-items:center;margin-bottom:8px}.script-beat-editor>div>span{color:#b9a3ef;font-size:7px;font-weight:900}.script-beat-editor>div>i{font-style:normal;color:#d7b16c;font-size:8px}.script-beat-editor label{display:grid;gap:4px;color:#7f91a5;font-size:7px}.script-beat-editor textarea{min-height:65px;width:100%;box-sizing:border-box}
.script-scene-editor{padding:14px;border:1px solid rgba(167,186,211,.1);border-radius:14px;background:#07111b}.script-scene-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:11px}.script-scene-head small{display:block;color:#b9a3ef;font-size:7px;font-weight:900;letter-spacing:.1em}.script-scene-head b{display:block;margin-top:3px;font-size:12px}.script-scene-head>span{color:#d7b16c;font-size:7px;font-weight:850}
.script-scene-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.script-scene-grid .wide{grid-column:1/-1}.script-scene-grid label{display:grid;gap:5px;color:#8395a8;font-size:8px;font-weight:800}.script-scene-grid label>span{font-weight:500;color:#62758a;font-size:7px}.script-scene-grid textarea{min-height:82px;line-height:1.5}
.script-scene-context{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.script-scene-context span{padding:5px 8px;border:1px solid rgba(167,186,211,.1);border-radius:999px;color:#72859a;font-size:7px}
.script-draft-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:13px;border-top:1px solid rgba(167,186,211,.09)}
.script-full-preview{margin-top:12px;padding:11px;border:1px solid rgba(167,186,211,.1);border-radius:12px;background:#06101a}.script-full-preview summary{cursor:pointer;color:#b9a3ef;font-size:8px;font-weight:850}.script-full-preview pre{white-space:pre-wrap;color:#9babbc;font:inherit;font-size:9px;line-height:1.65}
@media(max-width:760px){
 .script-writer-gate,.script-qc-summary,.script-scene-head{align-items:flex-start;flex-direction:column}
 .script-draft-meta,.script-scene-grid{grid-template-columns:1fr}.script-scene-grid .wide{grid-column:auto}
 .script-beat-editor>div{grid-template-columns:1fr}
 .script-draft-actions{justify-content:stretch}.script-draft-actions button{flex:1}
}


.owner-deep-card,.owner-deep-result{margin-top:14px;border:1px solid rgba(215,177,108,.2);border-radius:14px;padding:14px;background:rgba(7,17,29,.58)}
.owner-deep-card{display:flex;align-items:center;justify-content:space-between;gap:14px}
.owner-deep-card small,.owner-deep-head small,.owner-deep-grid small,.owner-deep-principles small{display:block;font-size:9px;letter-spacing:.09em;font-weight:900;color:#dfbd78}
.owner-deep-card b,.owner-deep-head b{display:block;margin:4px 0;font-size:13px}
.owner-deep-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.45}
.owner-deep-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.owner-deep-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:11px}
.owner-deep-grid>div{border:1px solid rgba(255,255,255,.07);background:rgba(0,0,0,.16);border-radius:11px;padding:11px}
.owner-deep-grid b{display:block;font-size:11px;margin:5px 0;line-height:1.4}.owner-deep-grid span{display:block;color:var(--muted);font-size:9px;line-height:1.45}
.owner-deep-principles{margin-top:10px;display:flex;gap:6px;flex-wrap:wrap}.owner-deep-principles small{width:100%}.owner-deep-principles span{font-size:9px;padding:6px 8px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.07)}
@media(max-width:680px){.owner-deep-card{align-items:flex-start;flex-direction:column}.owner-deep-card button{width:100%}.owner-deep-grid{grid-template-columns:1fr}}

/* PHASE D — APPLY TO EPISODE */
.script-apply-gate{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-top:14px;padding:13px;border:1px solid rgba(167,186,211,.11);border-radius:13px;background:#07111b}
.script-apply-gate.ready{border-color:rgba(114,215,164,.22);background:linear-gradient(145deg,rgba(18,52,39,.16),#07111b)}
.script-apply-gate.blocked{border-color:rgba(225,122,122,.16)}
.script-apply-gate small{display:block;color:#d7b16c;font-size:7px;font-weight:900;letter-spacing:.1em}
.script-apply-gate b{display:block;margin:4px 0;font-size:13px}
.script-apply-gate p{margin:0;color:#7d90a4;font-size:8px;line-height:1.5}
.apply-gate-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
.apply-gate-tags span{padding:4px 7px;border-radius:999px;font-size:6px;font-weight:800;letter-spacing:.03em}
.apply-gate-tags.blockers span{border:1px solid rgba(225,122,122,.18);color:#c98f93;background:rgba(110,38,38,.08)}
.apply-gate-tags.warnings span{border:1px solid rgba(215,177,108,.18);color:#caae78;background:rgba(105,82,35,.08)}
@media(max-width:760px){.script-apply-gate{flex-direction:column}}

/* PHASE D MOBILE SAFE CLEARANCE */
@media(max-width:760px){
  .episode-script-writer{padding-bottom:112px!important}
  .script-draft-actions{scroll-margin-bottom:120px}
}

/* PHASE E — PRODUCTION SCENE PACKAGES */
.scene-package-architect{border-color:rgba(84,176,210,.22)!important;background:linear-gradient(145deg,rgba(8,26,34,.28),rgba(7,15,24,.98))!important}
.scene-package-gate,.scene-package-qc{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:14px;border:1px solid rgba(167,186,211,.11);border-radius:14px;background:#07111b}
.scene-package-gate.ready,.scene-package-qc.ready{border-color:rgba(114,215,164,.2)}
.scene-package-gate.blocked,.scene-package-qc.blocked{border-color:rgba(225,122,122,.16)}
.scene-package-gate small,.scene-package-qc small,.scene-package-engine-note small{display:block;color:#77c7df;font-size:7px;font-weight:900;letter-spacing:.1em}
.scene-package-gate b,.scene-package-qc b,.scene-package-engine-note b{display:block;margin:4px 0;font-size:14px}
.scene-package-gate p,.scene-package-qc p,.scene-package-engine-note p{margin:0;color:#7d90a4;font-size:8px;line-height:1.5}
.scene-package-engine-note{margin-top:10px;padding:12px;border:1px solid rgba(119,199,223,.13);border-radius:12px;background:rgba(22,64,78,.08)}
.scene-package-list{display:grid;gap:11px;margin-top:14px}
.scene-package-card{padding:14px;border:1px solid rgba(167,186,211,.1);border-radius:14px;background:#07111b}
.scene-package-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:10px}
.scene-package-head small{display:block;color:#77c7df;font-size:7px;font-weight:900;letter-spacing:.1em}.scene-package-head b{display:block;margin-top:3px;font-size:12px}.scene-package-head>span{color:#d7b16c;font-size:7px;font-weight:850}
.scene-package-source{padding:10px 11px;border-left:2px solid rgba(119,199,223,.4);background:rgba(119,199,223,.025);margin-bottom:11px}.scene-package-source small{color:#77c7df;font-size:7px;font-weight:900}.scene-package-source p{margin:4px 0;color:#94a4b5;font-size:9px;line-height:1.55}.scene-package-source blockquote{margin:7px 0 0;color:#b4c1cc;font-size:8px;line-height:1.6}
.scene-package-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.scene-package-grid .wide{grid-column:1/-1}.scene-package-grid label{display:grid;gap:5px;color:#8395a8;font-size:8px;font-weight:800}.scene-package-grid textarea{min-height:74px;line-height:1.5}
.scene-package-prompt-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.scene-package-prompt-meta span{padding:5px 8px;border:1px solid rgba(167,186,211,.1);border-radius:999px;color:#75899c;font-size:7px}
.scene-package-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:13px;border-top:1px solid rgba(167,186,211,.09)}
@media(max-width:760px){
 .scene-package-gate,.scene-package-qc,.scene-package-head{flex-direction:column}
 .scene-package-grid{grid-template-columns:1fr}.scene-package-grid .wide{grid-column:auto}
 .scene-package-actions{justify-content:stretch}.scene-package-actions button{flex:1}
 .scene-package-architect{padding-bottom:112px!important}
}


/* Owner Reference Principle Controls + Influence Trace */
.reference-principle-panel{margin-top:14px;padding:14px;border:1px solid rgba(215,177,108,.2);border-radius:14px;background:rgba(7,17,29,.56)}
.reference-principle-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.reference-principle-head small,.reference-trace-head small{display:block;font-size:9px;letter-spacing:.09em;font-weight:900;color:#dfbd78}
.reference-principle-head b{display:block;margin:4px 0;font-size:12px}.reference-principle-head p{margin:0;color:var(--muted);font-size:10px}
.reference-principle-list{display:grid;gap:7px;margin:10px 0}
.reference-principle-row{display:grid;grid-template-columns:18px 1fr;align-items:start;gap:9px;padding:10px;border-radius:11px;border:1px solid rgba(255,255,255,.07);background:rgba(0,0,0,.14);cursor:pointer}
.reference-principle-row.enabled{border-color:rgba(111,226,170,.22);background:rgba(32,103,73,.08)}
.reference-principle-row input{margin-top:3px}.reference-principle-row span b{display:block;font-size:9px;color:#dfbd78}.reference-principle-row span em{display:block;font-style:normal;font-size:10px;line-height:1.45;color:var(--text)}
.owner-reference-approval{margin-top:14px;border:1px solid rgba(255,255,255,.10);border-radius:14px;padding:14px;background:rgba(0,0,0,.14);display:flex;align-items:center;justify-content:space-between;gap:14px}
.owner-reference-approval.approved{border-color:rgba(111,226,170,.34);background:rgba(32,103,73,.12)}
.owner-reference-approval small{display:block;font-size:9px;letter-spacing:.09em;font-weight:900;color:#dfbd78}.owner-reference-approval.approved small{color:var(--green)}
.owner-reference-approval b{display:block;font-size:12px;margin:4px 0}.owner-reference-approval p{margin:0;color:var(--muted);font-size:10px;line-height:1.45}
.reference-trace-card{margin:14px 0;padding:14px;border:1px solid rgba(84,171,255,.18);border-radius:14px;background:rgba(19,47,77,.12)}
.reference-trace-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.reference-trace-head b{display:block;margin-top:4px;font-size:12px}
.reference-trace-list{display:grid;gap:8px}.reference-trace-list article{display:grid;grid-template-columns:82px 1fr;gap:10px;padding:10px;border-radius:11px;border:1px solid rgba(255,255,255,.07);background:rgba(0,0,0,.14)}
.reference-trace-list article>span{font-size:9px;font-weight:900;color:#dfbd78}.reference-trace-list b{display:block;font-size:10px}.reference-trace-list p{margin:4px 0;font-size:10px;line-height:1.45}.reference-trace-list small{color:var(--muted);font-size:9px;line-height:1.4}
.reference-trace-notes{margin:10px 0 0;color:var(--muted);font-size:9px}
@media(max-width:680px){.reference-principle-head,.owner-reference-approval,.reference-trace-head{align-items:flex-start;flex-direction:column}.owner-reference-approval button{width:100%}.reference-trace-list article{grid-template-columns:1fr}}

/* PHASE F — CONTROLLED PRODUCTION CONVERSION */
.phase-f-conversion-gate{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-top:10px;padding:13px;border:1px solid rgba(167,186,211,.11);border-radius:13px;background:#07111b}
.phase-f-conversion-gate.ready{border-color:rgba(114,215,164,.22);background:linear-gradient(145deg,rgba(18,52,39,.14),#07111b)}
.phase-f-conversion-gate.blocked{border-color:rgba(225,122,122,.16)}
.phase-f-conversion-gate small{display:block;color:#d7b16c;font-size:7px;font-weight:900;letter-spacing:.1em}
.phase-f-conversion-gate b{display:block;margin:4px 0;font-size:13px}
.phase-f-conversion-gate p{margin:0;color:#7d90a4;font-size:8px;line-height:1.5}
@media(max-width:760px){
  .phase-f-conversion-gate{flex-direction:column}
  .scene-package-actions{scroll-margin-bottom:120px}
}

/* PHASE G — REFERENCE ASSETS + KEYFRAME LOCK */
.phase-g-preflight{border-color:rgba(118,208,167,.22)!important;background:linear-gradient(145deg,rgba(10,31,27,.24),rgba(7,15,24,.98))!important}
.phase-g-summary,.phase-g-prompt,.phase-g-keyframe{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:13px;border:1px solid rgba(167,186,211,.11);border-radius:13px;background:#07111b}
.phase-g-summary.ready,.phase-g-prompt{border-color:rgba(114,215,164,.18)}
.phase-g-summary.blocked{border-color:rgba(215,177,108,.16)}
.phase-g-summary small,.phase-g-prompt small,.phase-g-keyframe small,.phase-g-scene-head small{display:block;color:#7fd5ad;font-size:7px;font-weight:900;letter-spacing:.1em}
.phase-g-summary b,.phase-g-prompt b,.phase-g-keyframe b,.phase-g-scene-head b{display:block;margin:4px 0;font-size:13px}
.phase-g-summary p,.phase-g-prompt p,.phase-g-keyframe p{margin:0;color:#7d90a4;font-size:8px;line-height:1.5}
.phase-g-scene-list{display:grid;gap:12px;margin-top:14px}
.phase-g-scene-card{padding:14px;border:1px solid rgba(127,213,173,.12);border-radius:14px;background:#07111b}
.phase-g-scene-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:11px}
.phase-g-characters{display:grid;gap:8px}
.phase-g-character{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border-radius:11px;border:1px solid rgba(255,255,255,.06);background:rgba(0,0,0,.12)}
.phase-g-character.ready{border-color:rgba(114,215,164,.16)}.phase-g-character.blocked{border-color:rgba(225,122,122,.16)}
.phase-g-character b{display:block;font-size:10px}.phase-g-character small{display:block;margin-top:2px;color:#6f8498;font-size:7px}
.phase-g-lock-chips,.phase-g-continuity{display:flex;gap:5px;flex-wrap:wrap}
.phase-g-lock-chips span,.phase-g-continuity span{padding:5px 7px;border-radius:999px;border:1px solid rgba(167,186,211,.1);font-size:7px;font-weight:800}
.phase-g-lock-chips .ok,.phase-g-continuity .ok{color:#78d7a9;border-color:rgba(114,215,164,.2);background:rgba(29,91,62,.09)}
.phase-g-lock-chips .bad{color:#d08d92;border-color:rgba(225,122,122,.2)}.phase-g-continuity .wait{color:#8b9aab}
.phase-g-keyframe{margin-top:9px;align-items:center}.phase-g-keyframe select{min-width:240px;max-width:420px}
.phase-g-continuity{margin-top:9px;padding:8px 0}
.phase-g-prompt{margin-top:9px}
.phase-g-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid rgba(167,186,211,.08)}
@media(max-width:760px){
  .phase-g-summary,.phase-g-prompt,.phase-g-keyframe,.phase-g-scene-head,.phase-g-character{flex-direction:column}
  .phase-g-keyframe select{width:100%;min-width:0;max-width:none}
  .phase-g-actions{justify-content:stretch}.phase-g-actions button{flex:1}
  .phase-g-preflight{padding-bottom:112px!important}
}
