:root{font-family:system-ui,-apple-system,"Noto Sans TC",sans-serif;color:#253441;background:#f1f4f6;font-size:15px;--blue:#176a7b;--line:#dce4e8}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:8px;padding:9px 14px;background:white;color:inherit}button:hover{border-color:var(--blue);color:var(--blue)}button.primary{background:var(--blue);color:white;border-color:var(--blue)}button.danger{color:#a53333}button:disabled{opacity:.45;cursor:default}a{color:var(--blue)}.top{display:flex;align-items:center;justify-content:space-between;padding:18px 28px;background:#112e37;color:white;gap:20px}.brand{font-size:24px;text-decoration:none;color:white;font-weight:700}.brand span{color:#8cdbd7}.brand small{display:block;font-size:12px;font-weight:400;color:#bfd2d8}.layout{display:grid;grid-template-columns:255px minmax(0,1fr);min-height:calc(100vh - 90px)}aside{padding:22px 16px;background:#e7edf0;border-right:1px solid var(--line)}aside button{display:block;width:100%;margin-bottom:9px;text-align:left}.project-button small{display:block;color:#627a88;margin-top:4px}.selected{border-color:var(--blue);background:#dceff0}main{padding:28px;max-width:1500px;width:100%;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}h1{font-size:26px;margin:0 0 5px}h2{font-size:21px}h3{font-size:17px;margin-top:0}.muted,small{color:#657984}.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:24px 0;border-bottom:1px solid var(--line);padding-bottom:12px}.tabs .active{background:var(--blue);border-color:var(--blue);color:white}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:16px}.card,.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:16px}.card .actions{margin-top:14px}.actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.stack{display:grid;gap:14px}label{display:block;margin-bottom:14px;font-weight:550}label small{display:block;font-weight:400;margin-top:4px}input:not([type=checkbox]),textarea,select{display:block;width:100%;padding:10px;border:1px solid #c5d2d8;border-radius:7px;margin-top:6px;background:white;color:inherit}textarea{min-height:105px;resize:vertical}input[type=checkbox]{margin-right:7px}.row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.row.three{grid-template-columns:repeat(3,minmax(0,1fr))}.badge{display:inline-block;padding:4px 9px;border-radius:6px;background:#e6edef;font-size:12px;margin:3px}.badge.ready,.badge.succeeded{background:#daf1e5;color:#206445}.badge.error,.badge.failed,.badge.stale{background:#ffe4dc;color:#923721}.notice{padding:13px 16px;background:#fff4d6;border-radius:8px;margin:12px 0;line-height:1.7}.empty{text-align:center;padding:55px 20px;color:#657984}.prose{white-space:pre-wrap;line-height:1.9}.mono{white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,monospace;font-size:13px;background:#f4f7f8;padding:15px;border-radius:8px}.thumb{width:100%;height:170px;object-fit:contain;background:#ecf2f3;border-radius:8px}.reference{display:grid;grid-template-columns:65px minmax(0,1fr);gap:12px;border:1px solid var(--line);padding:12px;border-radius:9px;margin:10px 0}.reference .thumb{height:65px}.reference small{display:block}.reference .actions{margin-top:6px}.timeline{border-left:3px solid #a8cbd0;padding-left:20px}.timeline .card{position:relative}.timeline .card:before{content:"";width:11px;height:11px;border-radius:50%;background:var(--blue);position:absolute;left:-27px;top:26px}dialog{width:min(1060px,95vw);max-height:92vh;border:0;border-radius:14px;padding:24px;color:inherit;box-shadow:0 20px 100px #00182166}dialog::backdrop{background:#10232dcc}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.dialog-head h2{margin:0}.dialog-head button{border:0;font-size:19px}.modal-footer{border-top:1px solid var(--line);padding-top:16px}.dialogue,.event{border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:12px}.inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.inline label{margin:0}.list-row{padding:14px 0;border-bottom:1px solid var(--line)}.list-row:last-child{border:0}video{width:100%;max-height:60vh;background:#122329}audio{width:100%}details{margin:12px 0}summary{cursor:pointer;font-weight:600}#toast{position:fixed;bottom:22px;right:22px;z-index:1000;padding:13px 20px;background:#133640;color:white;border-radius:9px;max-width:85vw;display:none}.login{max-width:410px;margin:75px auto}.checklist label{font-weight:400}.split{display:grid;grid-template-columns:1fr 1fr;gap:18px}.login-error{color:#a53333}.progress{height:8px;border-radius:5px;background:#e4ecee;margin:12px 0}.progress i{display:block;height:100%;background:var(--blue);border-radius:5px}.nowrap{white-space:nowrap}@media(max-width:950px){.layout{grid-template-columns:1fr}aside{display:flex;flex-wrap:wrap;gap:8px;padding:14px}aside button{width:auto;margin:0}.project-button{max-width:220px}main{padding:18px}.split,.row.three{grid-template-columns:1fr}}@media(max-width:550px){.row,.cards{grid-template-columns:1fr}.top{padding:14px}.brand{font-size:20px}.tabs button{padding:8px 10px}dialog{padding:16px}.reference{grid-template-columns:1fr}}

.rich-editor{min-height:150px;white-space:pre-wrap;line-height:2;padding:12px;border:1px solid #c5d2d8;border-radius:7px;margin-top:6px;font-weight:400;outline-color:var(--blue)}.ref-chip{display:inline-block;border-radius:6px;background:#dceff0;color:#176a7b;padding:1px 7px;margin:0 3px;font-size:13px;white-space:normal}

.top button{color:#253441}.top button:hover{color:var(--blue)}

.video-stage{display:flex;align-items:center;justify-content:center;width:100%;height:min(48vh,460px);min-height:150px;background:#122329;border-radius:8px;overflow:hidden}.video-stage video{display:block;width:100%;height:100%;max-height:none;object-fit:contain}dialog video{object-fit:contain}video:fullscreen{object-fit:contain;background:#000}

.editor-section{border:1px solid #d5e1e5;border-left:4px solid #73a7b1;border-radius:10px;background:#f8fbfc;padding:20px;margin:0 0 22px}.editor-section>h3,.editor-section>.page-head>h3{color:#23515e;margin:0 0 18px}.editor-section label{line-height:1.6}.editor-section .reference{background:white;padding:16px}.editor-section .dialogue,.editor-section .event{background:white;padding:20px}.editor-section .actions{margin-top:14px}.code-input{min-height:180px;font-family:ui-monospace,monospace;font-size:13px}#modal-content{padding:4px 2px 16px}#modal-actions{position:sticky;bottom:-24px;background:white;padding:16px 0 8px;z-index:2}#modal .tabs{margin:4px 0 22px}.checkbox{font-weight:400}#asset-filters{gap:8px}#asset-filters button{font-size:14px}.badge.queued,.badge.running,.badge.submitted{background:#dceaf9;color:#214e7c}#workflow-catalog details{background:#f8fbfc;padding:14px;border:1px solid var(--line);border-radius:8px}#workflow-catalog label{overflow-wrap:anywhere}#service-probe-result pre{max-height:460px;overflow:auto}[hidden]{display:none!important}@media(max-width:550px){.editor-section{padding:14px}.editor-section .reference,.editor-section .dialogue,.editor-section .event{padding:12px}#modal-actions{bottom:-16px}#workflow-catalog .row{grid-template-columns:1fr}}

.asset-preview{display:block;width:100%;height:auto;max-height:70vh;object-fit:contain;background:#122329;border-radius:8px}

/* StormAIDirector v0.1.4: cinema workspace. */
:root{color-scheme:dark;color:#e3eaf8;background:#0b1120;--blue:#60d8ca;--line:#29354b;--muted:#96a5bd;--surface:#141e30;--surface-2:#1a263a;font-size:14px}
body{background:radial-gradient(ellipse at 90% 0,#162444 0,transparent 40%),#0b1120;min-height:100vh}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#1a273c;border-color:#35445c;color:#dbe5f5;padding:10px 14px;transition:background .15s,border-color .15s}button:hover{background:#243850;border-color:#60d8ca;color:#c5fff5}button.primary{background:#62ded0;border-color:#62ded0;color:#08292b;font-weight:700;box-shadow:0 3px 14px #46cbbb15}button.primary:hover{background:#92efe4}button.secondary{border-color:#6665a3;background:#272340;color:#d8d3ff}button.danger{color:#ffacb5;border-color:#71384b;background:#311c2b}button:disabled{opacity:.5}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #89eade;outline-offset:3px}.icon{width:18px;height:18px;flex-shrink:0;vertical-align:middle}button>span{min-width:0}.top{padding:17px 28px;background:#0d1526ee;border-bottom:1px solid #2b3c57;position:sticky;top:0;z-index:5;min-height:76px}.brand{display:flex;align-items:center;gap:11px;font-size:23px;letter-spacing:-.7px}.brand span{color:#f1f5ff}.brand b{color:#7de5d9;font-weight:700}.brand img{display:block}#identity{display:flex;align-items:center;gap:12px}.user-name{display:flex;align-items:center;gap:8px;color:#aebed4}.top button{color:#dce5f4;background:#172337;border-color:#33415c}.top button:hover{color:#8de8df}.settings-gear{border-color:#647692!important}
.layout{grid-template-columns:235px minmax(0,1fr);min-height:calc(100vh - 156px)}aside{background:#0e1728;border-right:1px solid #253550;padding:24px 15px}aside button{display:flex;justify-content:flex-start;align-items:flex-start;gap:9px;border-color:transparent;margin-bottom:8px}aside>.primary{justify-content:center;margin-bottom:22px}.sidebar-heading{font-size:10px;letter-spacing:2px;color:#6d809e;margin:0 10px 18px}.sidebar-heading span{display:block;font-size:17px;color:#c2d1e7;letter-spacing:1px;margin-top:6px}.project-button{background:transparent}.project-button>span{text-align:left;overflow-wrap:anywhere}.project-button .icon{margin-top:2px;color:#7e98bd}.project-button small{font-size:11px;color:#8498b6}.project-button.selected{background:#1c3043;border-color:#3c646d;border-left:3px solid #70e1d4}.project-button.selected .icon{color:#78ded6}main{padding:30px 34px;margin:0;max-width:1700px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2.5px;color:#69cbbf;margin-bottom:9px}h1{font-size:29px;letter-spacing:-.7px}h2{font-size:20px}h3{font-size:16px}.muted,small{color:#97a8c1}.tabs{gap:8px;border-bottom-color:#2a3b57;padding-bottom:12px;margin:25px 0}.tabs button{background:transparent;border-color:transparent;color:#9dafc9;min-height:42px}.tabs .active{background:#263e50;border-color:#396e72;color:#94f6e8;box-shadow:inset 0 -2px #70e1d4}.tabs button:hover{background:#1a2d43}
.panel,.card{background:linear-gradient(130deg,#162237,#121c2e);border-color:#2b3b56;box-shadow:0 7px 24px #00000012;border-radius:14px;padding:23px}.card h3{color:#eff4ff}.card .actions{padding-top:15px;border-top:1px solid #2a3b52}.cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:18px}.prose{line-height:1.9;color:#c5d0e2}.timeline{border-left-color:#35516d;padding-left:24px}.timeline .card:before{background:#74dcce;box-shadow:0 0 10px #45b5ad50;left:-31px}.badge{background:#28364b;color:#b6c8df;border:1px solid #3d506a;padding:4px 9px}.badge.ready,.badge.succeeded{background:#163a36;color:#88dfbf;border-color:#326154}.badge.error,.badge.failed,.badge.stale{background:#402a2c;color:#ffbfaa;border-color:#755248}.badge.queued,.badge.running,.badge.submitted{background:#203752;color:#b0d3ff;border-color:#406188}.notice{background:#302d26;color:#e5d4ae;border:1px solid #5e5443}.review-inbox{background:linear-gradient(115deg,#193b40,#192c48);border:1px solid #3b7176;border-radius:14px;padding:22px;margin:0 0 22px}.review-inbox h3{margin-bottom:4px}.review-inbox .list-row{border-color:#34596b}.processing{display:inline-flex;gap:8px;color:#aad5fd;padding:10px;border:1px solid #3e6380;border-radius:8px}.shot-video-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#0d1b2e;border:1px solid #324965;border-radius:10px;padding:12px;margin:14px 0}.shot-video-summary strong{color:#9cbdf2}.video-card-cover{background:#081122;border-radius:10px;overflow:hidden;min-height:80px;margin-bottom:17px;display:grid;place-items:center}.video-card-cover>.icon{height:60px;width:60px;margin:25px;color:#7294c2}.video-card-cover .thumb{background:#081122;height:160px}
input:not([type=checkbox]),textarea,select{background:#0e192b;border-color:#3a4c68;color:#e0e9f7;line-height:1.6}input[type=checkbox]{accent-color:#67ddce;width:16px;height:16px;vertical-align:middle}input::placeholder,textarea::placeholder{color:#6b809f}label{color:#c7d6eb;font-weight:500}textarea{min-height:120px}.mono,.rich-editor{background:#0a1426;border-color:#354765;color:#bdccdf}.ref-chip{background:#214b50;color:#9be7dc}.thumb{background:#0b1628}.reference{border-color:#3c5573}.ref-binding{padding:11px;background:#152d41;color:#8ecdd1;font-size:12px;border-radius:6px;line-height:1.7}.list-row{border-color:#2c3c55}.empty{color:#97abc8}.welcome{padding:100px 30px;text-align:left;max-width:850px}.welcome h1{font-size:40px;margin:15px 0 22px}.welcome p{font-size:17px;margin-bottom:32px}.login{margin:70px auto}.login-error{color:#ffb0b5}.progress{background:#253852}
dialog{background:#101b2e;color:#e2eaf7;border:1px solid #415775;border-radius:18px;box-shadow:0 24px 100px #000a;max-height:90vh}dialog::backdrop{background:#030917ce;backdrop-filter:blur(4px)}.dialog-head{border-bottom:1px solid #304361;padding-bottom:17px}.dialog-head h2{font-size:20px}.dialog-head button{color:#b8c9e2;background:#203149}.editor-section{background:#132239;border:1px solid #334a67;border-left:3px solid #529aaf;margin-bottom:22px}.editor-section>h3,.editor-section>.page-head>h3{color:#b3d4ee}.editor-section .reference,.editor-section .dialogue,.editor-section .event{background:#0d1b2e;border-color:#314863}.editor-section .actions{margin-top:15px}.suggest-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px dashed #3b4f6b;padding-top:15px;margin-top:16px}.suggest-row label{margin-bottom:0;font-size:13px}.suggest-row button{font-size:12px}.code-input{min-height:240px;tab-size:2}#workflow-json{min-height:50vh;font-family:ui-monospace,monospace;font-size:12px}#modal-actions{background:#101b2e;border-top:1px solid #354961;padding-top:17px}.video-stage{background:#03070d}#workflow-catalog details{background:#15243a;border-color:#344d6c}.workflow-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.workflow-tile{padding:23px;border-radius:10px;background:#0f1a2c;border:1px solid #334964}.workflow-tile>.icon{width:28px;height:28px;color:#8adfd7;margin-bottom:13px}.settings-tabs{margin-top:24px}.copyright{color:#7186a4;font-size:11px;line-height:1.8;text-align:center;padding:20px;border-top:1px solid #263650;background:#0c1424;letter-spacing:.2px}#toast{background:#203b50;border:1px solid #5f9f9d;color:#d6fff4;box-shadow:0 10px 35px #0005}.asset-preview{background:#061020}.settings-gear .icon{width:20px;height:20px}
@media(max-width:1050px){main{padding:24px}.layout{grid-template-columns:200px minmax(0,1fr)}.user-name{font-size:12px}.top{padding:16px 20px}.brand{font-size:21px}.brand img{width:36px;height:36px}}
@media(max-width:950px){.layout{grid-template-columns:1fr}aside{padding:16px;display:flex;align-items:center;overflow-x:auto;flex-wrap:nowrap;gap:8px;border-right:0;border-bottom:1px solid #314462}.sidebar-heading{display:none}aside>.primary{margin:0;flex-shrink:0}aside button{margin:0;min-width:160px}.project-button{flex-shrink:0;max-width:250px}.workflow-grid{grid-template-columns:1fr}.top{position:static}}
@media(max-width:550px){.top{padding:12px;gap:8px;flex-wrap:wrap}.brand{font-size:20px}#identity{gap:8px}.user-name{max-width:120px}.top button{font-size:12px;padding:8px}.row,.cards{grid-template-columns:1fr}main{padding:18px 12px}h1{font-size:24px}.tabs{gap:3px}.tabs button{padding:9px 8px;font-size:12px}.tabs button .icon{width:15px;height:15px}.panel,.card{padding:17px}.suggest-row{align-items:flex-start;flex-direction:column}.reference{grid-template-columns:1fr}.reference .thumb{height:100px}.welcome{padding:55px 8px}.welcome h1{font-size:30px}dialog{padding:16px;width:96vw}.copyright{padding:16px 10px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.modal-toast{position:sticky;top:0;z-index:10;margin:0 0 16px;padding:14px 16px;border:1px solid #72c7b4;border-radius:10px;background:#16352f;color:#edfff8;box-shadow:0 8px 24px #0006;white-space:pre-wrap;overflow-wrap:anywhere}.modal-toast[hidden]{display:none}progress{display:block;width:100%;height:12px;margin:14px 0;accent-color:var(--accent,#66d4b2)}#archive-jobs .list-row{margin:0}#archive-file{margin:10px 0}

.section-shots[hidden]{display:none}.section-excerpt{max-height:5em;overflow:auto}.section-group h2{font-size:1.15rem}.frame-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.frame-slot{padding:16px;border:1px solid var(--border,#34435b);border-radius:12px;background:#172235}.frame-slot .thumb{width:100%;height:160px;object-fit:contain}.frame-slot h4{margin:0 0 14px}@media(max-width:650px){.frame-grid{grid-template-columns:1fr}.section-group .page-head{align-items:flex-start}.section-group h2{overflow-wrap:anywhere}}

/* v0.2.2 image reference selection */
.image-ref-row{display:grid;grid-template-columns:140px minmax(0,1fr);gap:18px}.image-ref-row>div{grid-column:2}.image-ref-thumb{width:140px;height:140px;object-fit:contain;border:1px solid var(--line);border-radius:10px}.image-ref-row:not(:has(img))>div{grid-column:1 / -1}@media(max-width:700px){.image-ref-row{grid-template-columns:1fr}.image-ref-row>div{grid-column:1}.image-ref-thumb{width:120px;height:120px}}
