:root{font-family:Inter,ui-sans-serif,system-ui,"Microsoft JhengHei",sans-serif;color:#f5f3ff;background:#0c0e16}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 70% 0,#262140,transparent 38%),#0c0e16}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.shell{max-width:1140px;padding:20px 22px;margin:auto}header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0 26px}.brand{display:flex;align-items:center;gap:14px}.logo{display:grid;place-items:center;width:52px;height:52px;border-radius:18px;color:white;font-size:30px;background:linear-gradient(135deg,#b68aff,#746bff)}h1,h2,h3,p{margin-top:0}h1{font-size:22px;margin-bottom:0}h2{font-size:32px;letter-spacing:-1px;margin:8px 0}h3{font-size:17px}small{font-size:11px;letter-spacing:1.6px;color:#b4a9d1;font-weight:750}.status,.chip{padding:8px 13px;border-radius:99px;background:#27283a;color:#e8defa;font-size:12px}.status.ready{color:#95e6c9;background:#113d37}nav{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:32px;border-bottom:1px solid #29283a;padding-bottom:14px}nav button{border:0;border-radius:13px;color:#aaa6c0;background:transparent;padding:12px 21px;font-weight:700}nav button.active{color:white;background:#39314f}.panel{display:none}.panel.active{display:block}.heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.heading p,.muted{color:#9c9aaf;font-size:13px;line-height:1.7}.columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.card{border:1px solid #302d43;background:#171824;border-radius:20px;padding:23px;margin-bottom:20px;box-shadow:0 14px 40px #0001}label{display:block;font-weight:700;color:#e5dff5;margin-bottom:10px;margin-top:16px;font-size:13px}label:first-child{margin-top:0}textarea,select,input[type=file]{width:100%;border:1px solid #3b374e;background:#1c1b2b;border-radius:12px;padding:13px;color:#eee;outline:0}textarea{resize:vertical;min-height:130px}input[type=file]{font-size:12px}select{max-width:245px}.row{display:flex;gap:10px;align-items:center}.spread{justify-content:space-between}.field{width:100%}.primary,.secondary{border:0;border-radius:12px;padding:13px 18px;font-weight:750;white-space:nowrap}.primary{margin-top:21px;background:linear-gradient(110deg,#af80fa,#747bff);color:white;width:100%}.secondary{background:#29273b;color:#e4d8ff}.empty{min-height:310px;border:1px dashed #423b57;border-radius:15px;display:grid;place-items:center;color:#77748a;text-align:center;padding:14px}.preview-card img,.preview-card video,.media img,.media video,.result img,.result video{width:100%;max-height:440px;object-fit:contain;border-radius:13px;background:#0e0e16}.shot{border:1px solid #39324c;border-radius:16px;padding:19px;margin:16px 0;background:#1c1a2b}.shot-head{display:flex;justify-content:space-between;align-items:center}.shot-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.shot textarea{min-height:80px}.shot input[type=number]{width:85px;border:1px solid #3b374e;border-radius:9px;background:#131321;padding:9px;color:white}.shot .remove{background:transparent;border:0;color:#ffadba;font-size:21px}.shot .check{display:flex;gap:9px;align-items:center;font-weight:500}.shot .check input{accent-color:#ab87ef}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:15px}.media{background:#191725;border:1px solid #38334c;border-radius:17px;padding:11px;overflow:hidden}.media img,.media video{height:175px;object-fit:cover}.media a{display:block;color:#cdb7ff;font-size:12px;overflow-wrap:anywhere;margin-top:9px}.media button{width:100%;margin-top:9px;border:0;background:#332b4a;color:#eee;border-radius:10px;padding:10px}.result{margin-top:14px}.result a{display:inline-block;color:#cbb5ff;margin:11px 0}.job-box{position:sticky;bottom:15px;margin:18px auto;background:#242039;border:1px solid #7e64b0;border-radius:16px;padding:15px 20px;box-shadow:0 8px 35px #0009;max-width:650px;z-index:20}.progress{height:10px;background:#423852;border-radius:100px;overflow:hidden;margin:12px 0}.progress div{height:100%;width:0;background:linear-gradient(90deg,#b58aff,#8fe4d3);transition:width .35s}footer{padding:28px 0;text-align:center;font-size:12px;color:#66617a}@media(max-width:750px){.shell{padding:14px}header{padding:8px 0 20px}.status{font-size:10px}h2{font-size:25px}.columns,.shot-grid{grid-template-columns:1fr}nav button{flex:1;padding:12px 10px}.card{padding:16px}.row.spread{flex-wrap:wrap}.empty{min-height:220px}}
/* New studio controls */
.accent{background:linear-gradient(110deg,#f4b6fb,#91b9ff);-webkit-background-clip:text;background-clip:text;color:transparent}
.brand h1{letter-spacing:-.7px}.brand h1 .accent{font-size:12px;vertical-align:middle;letter-spacing:2px}
.setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.setting-grid select{max-width:none}
.batch-prompts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:10px}
.batch-prompt{background:#171526;border:1px solid #302e4e;border-radius:14px;padding:13px}
.batch-prompt label{margin:0 0 9px;color:#c7b5e4}
.batch-prompt textarea{min-height:75px}
.action-row{margin-top:22px}.action-row .primary{margin-top:0}.action{white-space:normal;min-width:150px}
.options{gap:26px;flex-wrap:wrap;padding-top:9px}.options .check{display:flex;align-items:center;gap:8px}
.primary:hover,.secondary:hover{filter:brightness(1.13);transform:translateY(-1px)}
.primary,.secondary{transition:filter .2s,transform .2s}
textarea:focus,select:focus,input[type=file]:focus{border-color:#aa87ff;box-shadow:0 0 0 3px #aa87ff18}
@media(max-width:750px){.setting-grid,.batch-prompts{grid-template-columns:1fr}.action-row{flex-direction:column}.action-row button{width:100%}.brand small{font-size:9px}}
.shell{touch-action:pan-x pan-y}
[hidden]{display:none!important}
.auth-overlay{position:fixed;inset:0;z-index:100;background:#080913e8;backdrop-filter:blur(14px);display:grid;place-items:center;padding:20px}
.auth-card{width:min(100%,440px);padding:32px;border:1px solid #65528d;border-radius:24px;background:linear-gradient(145deg,#29243d,#151624);box-shadow:0 24px 90px #000a}
.auth-card .logo{margin-bottom:20px}.auth-card h2{margin-top:20px}
.auth-card input{width:100%;padding:14px;border-radius:12px;background:#161527;border:1px solid #5b4d7d;color:white}
.auth-error{color:#ffb2b9;font-size:13px}
.storyboard-actions{flex-wrap:wrap;align-items:stretch;margin:18px 0 20px}
.storyboard-actions button{flex:1;min-width:155px;margin-top:0}
.storyboard-actions .primary{width:auto}
.shot{background:linear-gradient(145deg,#211c32,#171925);box-shadow:0 14px 40px #0002}
.shot-head{gap:10px;flex-wrap:wrap}
.shot-head h3{margin-bottom:0;margin-right:auto}
.shot-render{font-size:12px;padding:9px 12px;white-space:normal}
.frame-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.frame-actions button{font-size:12px;padding:9px 10px;border-radius:9px}
.frame-actions .secondary{background:#332947}
.subtle-button{background:#252438;color:#c6c1d8;border:1px solid #3a3549}
.frame-preview{margin-top:12px;border-radius:12px;min-height:92px;border:1px dashed #51436b;
  display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;
  padding:9px;background:#151525;color:#88869c;font-size:12px}
.frame-preview img{display:block;max-width:100%;width:auto;max-height:275px;object-fit:contain;
  border-radius:9px}
.frame-preview a{color:#d2c0ff;text-decoration:none;overflow-wrap:anywhere}
.frame-selection-hint{background:#25203c;border:1px solid #a184eb;border-radius:12px;
  color:#f1eaff;padding:14px;margin:14px 0 18px}
.use-frame{background:linear-gradient(110deg,#af80fa,#747bff)!important;color:white!important}
.gallery-grid .media{transition:transform .18s,box-shadow .18s}
.gallery-grid .media:hover{transform:translateY(-2px);box-shadow:0 12px 30px #0004}
@media(max-width:750px){.storyboard-actions{flex-direction:column}
  .storyboard-actions button{min-width:0;width:100%}
  .shot-head .shot-render{order:3;width:100%}
  .frame-actions button{flex:1;min-width:90px}}
.batch-details{border:1px solid #38334c;background:#1a1928;border-radius:14px;margin-top:18px;padding:14px}
.batch-details summary{cursor:pointer;font-weight:700;color:#d7c0ff;padding:4px}
.batch-details .batch-prompts{margin-top:16px}
.batch-details textarea{min-height:75px;resize:vertical}
.storyboard-actions{flex-wrap:wrap;margin-bottom:16px}
.storyboard-actions .primary{width:auto;margin-top:0}
.frame-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:14px}
.frame-preview{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.frame-preview .result{min-width:0}.frame-preview img{width:100%;max-height:190px;object-fit:contain}
.frame-preview a{color:#d7c0ff;font-size:12px;overflow-wrap:anywhere}
.shot select.seconds{max-width:105px}
@media(max-width:750px){.storyboard-actions{display:grid;grid-template-columns:1fr 1fr}.storyboard-actions button{white-space:normal;min-width:0}.storyboard-actions .primary{width:100%}}
