:root{color-scheme:dark;font-family:Inter,'Segoe UI','Microsoft YaHei',Arial,sans-serif;background:#0a0e18;color:#e9edf9}*{box-sizing:border-box}body{margin:0}.layout{display:flex;min-height:100vh}aside{width:246px;background:#0f1422;border-right:1px solid #252a3a;padding:30px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;margin:0 8px 42px}.brand-icon{height:40px;width:40px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(135deg,#835cff,#4c6dff);font-size:26px}.brand strong{display:block;font-size:15px;letter-spacing:.3px}.brand small{display:block;color:#838ca7;font-size:11px;margin-top:5px}.nav{width:100%;display:block;background:none;border:0;text-align:left;color:#94a0bc;padding:13px 17px;border-radius:10px;margin:3px 0;font-size:14px;cursor:pointer}.nav::before{content:attr(data-icon);display:inline-block;width:1.4em;text-align:center}
.nav:hover,.nav.active{background:#252044;color:#fff}.nav.active{box-shadow:inset 3px 0 #8b6aff}.aside-bottom{margin-top:auto;font-size:11px;color:#6e7890;padding:12px;line-height:2}main{flex:1;min-width:0;padding:40px max(28px,5vw);max-width:1550px;margin:auto}header{display:flex;justify-content:space-between;gap:20px;align-items:center}.eyebrow{font-size:10px;letter-spacing:2px;color:#8c85e8;font-weight:800}h1{font-size:30px;margin:9px 0}h2{font-size:17px;margin:0 0 16px}p{color:#9da8bf;line-height:1.65;margin:6px 0}.pill{background:#222741;color:#aebdff;border:1px solid #343b60;border-radius:40px;padding:10px 15px;white-space:nowrap;font-size:12px}.dot{display:inline-block;background:#40d6a0;width:7px;height:7px;border-radius:50%;margin-right:8px}.toolbar{display:flex;justify-content:space-between;align-items:center;margin:28px 0 22px;gap:10px}.toolbar label{display:flex;align-items:center;gap:12px;color:#8794ab;font-size:13px}.panel,.stat,.item{border:1px solid #283044;background:#141b2b;border-radius:16px;padding:23px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:23px}.stat .num{font-size:30px;font-weight:800;margin:13px 0 6px}.stat .label{font-size:12px;color:#91a0b8}.two{display:grid;grid-template-columns:1.25fr 1fr;gap:20px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.item{padding:18px}.item h3{margin:0 0 9px;font-size:15px}.meta{font-size:12px;color:#7f8ba5}.tag{display:inline-block;background:#272447;color:#b8a6ff;border-radius:6px;padding:4px 8px;font-size:11px;margin:8px 0}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}button{cursor:pointer;font-family:inherit}button.primary{background:#7558e8;color:white;border:0;padding:11px 15px;border-radius:9px;font-weight:700}button.outline,button.minor{background:#222c40;color:#d5dcf0;border:1px solid #3a455e;padding:9px 13px;border-radius:9px}button.minor{font-size:12px;padding:7px 10px}button.danger{background:#3a1f31;color:#ffb2c6;border:1px solid #633249;padding:7px 10px;border-radius:8px}input,textarea,select{background:#0e1524;border:1px solid #343f56;border-radius:9px;padding:11px 12px;color:#e8edfb;font:inherit;min-width:0}textarea{min-height:120px;resize:vertical;line-height:1.6}select{max-width:280px}form{display:grid;gap:13px}label.field{font-size:12px;color:#a4b0c7;display:grid;gap:7px}label.field input,label.field textarea,label.field select{width:100%}.muted{color:#8592a9;font-size:13px}.wide{grid-column:1/-1}.empty{padding:25px;text-align:center;color:#75829d;border:1px dashed #343b50;border-radius:10px}.shot-list{display:grid;gap:12px}.shot{display:grid;grid-template-columns:42px 1fr auto;gap:14px;align-items:start}.shot-num{background:#302650;color:#c8b1ff;border-radius:9px;padding:12px;text-align:center;font-weight:700}.shot p{font-size:12px;overflow-wrap:anywhere}.right{text-align:right}.task-status{font-size:11px;color:#9fd8c2}.hint{background:#1c2539;border-left:3px solid #8e73e8;padding:13px 15px;color:#abb9d6;font-size:12px;line-height:1.7;margin:16px 0;border-radius:6px}pre{white-space:pre-wrap;word-break:break-word;line-height:1.9;font-family:inherit;font-size:14px;color:#c7cee3}a{color:#a897ff}.grid-form{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.section-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 15px}#toast{position:fixed;bottom:20px;right:25px;background:#33395b;color:white;border-radius:10px;padding:14px 20px;display:none;max-width:430px;z-index:9}#toast.show{display:block}.asset-thumb{width:100%;height:150px;object-fit:cover;border-radius:9px;margin-bottom:10px;background:#252f48}@media(max-width:950px){aside{width:75px;padding:20px 9px}.brand{justify-content:center;margin:0 0 28px}.brand strong,.brand small,.aside-bottom{display:none}.nav{font-size:0;text-align:center}.nav::before{font-size:21px;width:auto}main{padding:22px}.stats{grid-template-columns:repeat(2,1fr)}.two{grid-template-columns:1fr}}@media(max-width:620px){aside{width:55px;padding:12px 5px}.nav{padding:12px 3px}.brand-icon{width:35px;height:35px}.cards,.stats,.grid-form{grid-template-columns:1fr}.shot{grid-template-columns:32px 1fr}.shot .actions{grid-column:2}.pill{display:none}h1{font-size:25px}.toolbar{flex-wrap:wrap}}
/* V1.4 private login and actual production status */
[hidden]{display:none!important}button:disabled{opacity:.45;cursor:not-allowed}.login-body{display:grid;place-items:center;min-height:100vh;padding:24px;box-sizing:border-box}.login-card{width:min(440px,100%);padding:32px;background:#151c2c;border:1px solid #29344d;border-radius:20px;box-sizing:border-box}.login-card h1{font-size:26px;line-height:1.35}.login-card p{line-height:1.7}.login-card button{width:100%}#loginError,.error-text{color:#ff9d9d}.progress-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.progress-heading h2{font-size:24px}.stat .num small{font-size:20px;font-weight:400;color:#a7b4cf}.episode-progress{margin-top:20px}.steps{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.steps span{padding:8px 12px;background:#1e2840;border-radius:8px;font-size:13px}progress{width:100%;height:10px;margin:12px 0 20px;accent-color:#876aff}.progress-shot{display:grid;grid-template-columns:38px 1fr;gap:12px}.progress-shot video{width:100%;max-width:360px;max-height:480px;border-radius:12px;background:#000}.progress-shot h3{margin-top:3px}.toolbar{flex-wrap:wrap}.hint{line-height:1.65}p,pre{overflow-wrap:anywhere}@media(max-width:700px){.progress-heading{display:block}.progress-heading h2{font-size:20px}.steps{gap:6px}.steps span{font-size:12px}.login-card{padding:24px}.toolbar{gap:8px}}

/* On short/mobile landscape displays the sticky navigation must remain scrollable. */
aside{overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.nav:focus-visible{outline:2px solid #b5a4ff;outline-offset:2px}
@media(max-width:620px){aside{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}}

/* Keep long project names, prompts and task IDs inside the workspace. */
aside{flex-shrink:0}
main{overflow-wrap:anywhere}
header>*,.toolbar>*,.two>*,.cards>*,.shot>*,.progress-shot>*,.section-head>*,.panel,.stat,.item,form,label.field{min-width:0}
.two{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
.shot{grid-template-columns:42px minmax(0,1fr)}
.shot>.actions{grid-column:2}
.progress-shot{grid-template-columns:38px minmax(0,1fr)}
.toolbar label{min-width:0;max-width:100%}
.toolbar select{min-width:0;max-width:100%}
label.field input,label.field textarea,label.field select{max-width:100%}
.actions>button,.section-head>button{max-width:100%}
.section-head{gap:12px;flex-wrap:wrap}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #b5a4ff;outline-offset:3px}
#toast{max-width:min(430px,calc(100vw - 32px));overflow-wrap:anywhere;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom))}

/* Readable inputs and comfortable tap targets on phones and tablets. */
@media(max-width:950px){
 .two{grid-template-columns:minmax(0,1fr)}
 input,textarea,select{font-size:16px}
 input,select{min-height:44px}
 button.primary,button.outline,button.minor,button.danger{min-height:44px;min-width:44px}
}
@media(max-width:620px){
 main{padding:20px 14px}
 .panel,.stat{padding:16px}
 .item{padding:14px}
 .toolbar label{flex:1 1 100%;display:grid;gap:8px}
 .toolbar select{width:100%}
 .toolbar>button{flex:1 1 auto}
 .shot{grid-template-columns:32px minmax(0,1fr)}
}

/* On narrow phones, a private-session warning must stay visible while a
   long unsaved script is preserved. A transient toast is not sufficient. */
#accessStatus.access-warning{color:#ffd7a1;font-weight:700}
@media(max-width:620px){
 header{display:block}
 .pill{display:inline-flex;align-items:flex-start;max-width:100%;margin-top:12px;white-space:normal;line-height:1.5}
 .pill .dot{flex:0 0 7px;margin-top:6px}
}
