@font-face{font-family:"DM Sans";src:url("/assets/dm-sans.woff2") format("woff2");font-style:normal;font-weight:100 1000;font-display:swap}
:root {
  color-scheme: dark;
  --bg:#111214; --side:#17181a; --surface:#1b1c1f; --line:#303135;
  --text:#f3f2ef; --muted:#a1a1a7; --quiet:#84858c; --accent:#ffac70; --accent-ink:#261b13;
  --sidebar:218px;
  font-family:"DM Sans","PingFang SC","Microsoft YaHei UI","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  font-size:14px; line-height:1.55; color:var(--text); background:var(--bg);
}
*{box-sizing:border-box}
body{margin:0;min-width:300px}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation}
button{border:0;color:inherit;background:none;cursor:pointer}
button:disabled{cursor:wait;opacity:.55}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
input:focus,textarea:focus,select:focus{outline:1px solid var(--accent);border-color:var(--accent)}
img{display:block;max-width:100%}
h1,h2,h3,p{margin:0}
.icon{display:inline-block;flex:0 0 auto;width:18px;height:18px;vertical-align:middle}
.skip{position:fixed;left:16px;top:-80px;padding:12px 18px;background:var(--accent);color:var(--accent-ink);z-index:12;border-radius:6px}
.skip:focus{top:12px}
.shade{display:none}
#sidebar{width:var(--sidebar);position:fixed;inset:0 auto 0 0;background:var(--side);border-right:1px solid #2b2c2f;z-index:5;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:12px;padding:29px 25px 32px}
.brand img{width:39px;height:39px}
.brand span{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.brand strong{font-size:22px;line-height:1;font-weight:720;letter-spacing:3px}
.brand small{font-size:9px;letter-spacing:2.1px;line-height:1;font-weight:650;color:#b4b3b2}
#navigation{padding:9px 14px}
.nav-group+.nav-group{margin-top:32px}
.nav-label{color:var(--quiet);font-size:11px;font-weight:500;letter-spacing:.08em;margin:0 13px 10px}
.nav-item,.side-guide{display:flex;align-items:center;gap:13px;width:100%;height:42px;border-radius:7px;padding:0 14px;text-align:left;color:#b7b7bd;font-size:14px;white-space:nowrap}
.nav-item+.nav-item{margin-top:4px}
.nav-item .icon{width:18px;height:18px}
.nav-item.active{background:#382b23;color:#ffb57f;font-weight:600}
.nav-item:hover:not(.active),.side-guide:hover,.account:hover{background:#222326;color:var(--text)}
.live-dot{width:6px;height:6px;border-radius:50%;background:var(--accent);margin-left:auto}
.side-foot{margin-top:auto;padding:24px 14px 15px}
.side-guide{font-size:13px}
.side-guide .icon{width:17px}
.account{width:100%;display:flex;align-items:center;gap:11px;padding:19px 7px 5px;border-top:1px solid var(--line);margin-top:13px;text-align:left}
.avatar{background:#2e2c2b;color:#d8c2ae;border:1px solid #49413a;border-radius:50%;width:33px;height:33px;display:grid;place-items:center}
.avatar .icon{width:15px;height:15px}
.account-name{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.account-name strong{font-size:12px;font-weight:600}
.account-name small{font-size:10px;color:var(--quiet)}
.account>.icon{width:14px;height:14px;color:var(--quiet)}
.shell{margin-left:var(--sidebar);min-height:100vh}
.topbar{height:61px;border-bottom:1px solid #2b2c2e;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(24px,3.1vw,56px);background:#141517;gap:15px}
.crumb,.top-actions,.top-key,.service{display:flex;align-items:center}
.crumb{gap:14px;font-size:12px;color:#8d8e94}
.crumb strong{font-weight:530;color:#d8d8db}
.crumb-slash{font-size:13px;color:#55565b}
#menu{display:none}
.top-actions{gap:17px}
.register-key{display:inline-flex;align-items:center;min-height:36px;color:var(--accent);font-size:12px;white-space:nowrap}
.register-key:hover,.guide-list a:hover{text-decoration:underline}
.service{gap:8px;color:#a4a6a7;font-size:11px}
.service i{width:6px;height:6px;background:#98999b;border-radius:50%}
.service.online i{background:#86cba7;box-shadow:0 0 0 3px #86cba70d}
.top-divider{width:1px;height:16px;background:#323337}
.top-key{gap:7px;font-size:12px;border:1px solid #3b3c40;border-radius:6px;padding:6px 11px;background:#1d1e21;color:#e0dfdf}
.top-key:hover{border-color:#696360}
.top-key .icon{width:14px;height:14px}
#content{max-width:1510px;margin:0 auto;padding:32px clamp(24px,3.1vw,56px) 52px;outline:none}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 25px}
h1{font-size:clamp(27px,2.35vw,38px);font-weight:680;line-height:1.35;letter-spacing:-.045em;overflow-wrap:anywhere}
.page-head p{margin-top:7px;font-size:13px;color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1.2;font-weight:570;font-size:13px;padding:11px 16px;border:1px solid transparent;border-radius:7px;white-space:nowrap;transition:background .16s,border-color .16s,transform .16s}
.btn .icon{width:16px;height:16px}
.btn:active:not(:disabled){transform:translateY(1px)}
.primary{background:var(--accent);border-color:#ffb47e;color:var(--accent-ink)}
.primary:hover{background:#ffbd8c}
.secondary,.subtle{background:#242529;border-color:#3c3d41;color:#e7e7e7}
.secondary:hover,.subtle:hover{background:#2e2f32;border-color:#55565a}
.subtle{background:transparent;font-size:12px;padding:9px 13px}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;color:var(--muted)}
.icon-btn:hover{background:#ffffff0d;color:var(--text)}
.hero{position:relative;isolation:isolate;overflow:hidden;min-height:278px;height:clamp(285px,23.4vw,365px);border-radius:13px;background:#172030;border:1px solid #ffffff16}
.hero-photo,.hero-veil{position:absolute;inset:0;width:100%;height:100%;z-index:-1}
.hero-photo{object-fit:cover;object-position:55% 59%;filter:brightness(1.25) saturate(.97)}
.hero-veil{background:linear-gradient(90deg,rgba(11,12,21,.91) 0%,rgba(11,12,21,.73) 24%,rgba(11,12,21,.11) 69%),linear-gradient(0deg,rgba(9,11,18,.62),transparent 36%)}
.hero::after{content:"";position:absolute;top:19px;right:20px;width:20px;height:20px;border-top:1px solid #ffffff63;border-right:1px solid #ffffff63;pointer-events:none}
.hero-content{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;height:100%;padding:24px clamp(26px,3.1vw,50px);max-width:77%}
.featured,.genre,.frame-ratio,.hero-meta,.text-link,.card-line,.section-head,.actions,.dialog-top,.dialog-footer,.back-link,.form-line,.below-input,.detail-meta{display:flex;align-items:center}
.featured{gap:7px;font-size:11px;color:#ffcca2;letter-spacing:.075em;font-weight:550;border:1px solid #bd89554d;background:#3c2b20ab;border-radius:5px;padding:4px 9px}
.featured .icon{width:14px;height:14px}
.hero h2{font-family:"STSong","Songti SC","SimSun","Noto Serif CJK SC",serif;font-weight:700;font-size:clamp(46px,4.45vw,74px);line-height:1.12;letter-spacing:.065em;margin:17px 0 10px;color:#fff9f0;text-shadow:0 2px 16px #0004}
.hero-meta{gap:9px;font-size:12px;color:#ece7e6;letter-spacing:.025em}
.hero-meta b{font-weight:400;font-size:11px;color:#a7a0a5}
.hero-meta span{font-variant-numeric:tabular-nums}
.hero-content p{font-size:13px;color:#c6c3c7;margin:10px 0 22px;line-height:1.65}
.hero-btn{background:#f2eeea;color:#28252b;padding:10px 15px;border-color:#f5f0e9}
.hero-btn:hover{background:white}
.hero-controls{position:absolute;bottom:21px;right:22px;display:flex;align-items:center;gap:18px}
.hero-dots,.hero-arrows{display:flex;align-items:center}
.hero-dots button{min-width:15px;height:26px;padding:0 3px;display:grid;place-items:center}
.hero-dots i{display:block;width:5px;height:5px;border-radius:3px;background:#d2d1d181}
.hero-dots [aria-pressed=true] i{width:18px;background:var(--accent)}
.hero-arrows{gap:7px}
.hero-arrows .icon-btn{width:28px;height:28px;border:1px solid #ffffff4a;border-radius:50%;background:#12151c75;color:#fff}
.hero-arrows .icon-btn:hover{background:#312e36}
.hero-arrows .icon{width:13px;height:13px}
.shelf{margin-top:31px}
.section-head{justify-content:space-between;gap:16px;margin-bottom:15px}
h2{font-weight:640;font-size:21px;line-height:1.45;letter-spacing:-.025em}
.text-link,.back-link{gap:5px;font-size:12px;color:#b7b7bd}
.text-link:hover,.back-link:hover,.file-link:hover{color:var(--accent)}
.text-link .icon,.back-link .icon{width:14px;height:14px}
.story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}
.story-card{display:block;padding:0;overflow:hidden;border:1px solid #38383c;border-radius:10px;background:var(--surface);text-align:left;min-width:0;transition:border-color .18s,transform .18s}
.story-card:hover{border-color:#686059;transform:translateY(-2px)}
.card-picture{position:relative;display:block;aspect-ratio:2.27;overflow:hidden;background:#202327}
.card-picture img,.story-modal-photo img{width:100%;height:100%;object-fit:cover}
.card-picture img{transition:transform .35s}
.story-card:hover .card-picture img{transform:scale(1.035)}
.card-picture::after{content:"";position:absolute;inset:50% 0 0;background:linear-gradient(transparent,#080a0d69)}
.genre,.frame-ratio{position:absolute;z-index:1}
.genre{left:12px;top:12px;color:#fff;font-size:10px;letter-spacing:.06em;border:1px solid #ffffff29;border-radius:4px;padding:3px 7px;background:#15181ac9}
.frame-ratio{right:10px;bottom:8px;gap:5px;color:#fff;font-size:11px;font-weight:520;text-shadow:0 1px 5px #000a}
.frame-ratio .icon{width:13px;height:13px}
.card-body{display:block;padding:15px 17px 17px}
.card-line{justify-content:space-between;gap:10px}
.card-line strong{font-weight:620;font-size:17px;letter-spacing:.012em}
.card-line .icon{width:15px;height:15px;color:#929297}
.card-note{display:block;margin-top:5px;font-size:12px;line-height:1.65;color:#a8a8ad}
.empty{border:1px dashed #3c3d40;background:#18191b;border-radius:9px;min-height:94px;display:flex;align-items:center;padding:21px 23px;gap:16px}
.empty-icon,.file-icon,.dialog-icon,.project-image{display:grid;place-items:center;flex-shrink:0}
.empty-icon{width:41px;height:41px;border:1px solid #3a3a3e;border-radius:10px;color:#c1b3a6;background:#222326}
.empty>div{flex:1}.empty strong{font-size:14px;font-weight:580}
.empty p{margin-top:4px;color:var(--muted);font-size:12px}
.filters,.list-toolbar,.search{display:flex;align-items:center}
.filters{gap:4px;flex-wrap:wrap;margin-bottom:21px}
.filters button,.tabs button{font-size:13px;color:var(--muted);border:1px solid transparent}
.filters button{padding:6px 13px;border-radius:6px}
.filters button:hover,.tabs button:hover{color:var(--text)}
.filters [aria-pressed=true]{background:#332920;color:#ffc391;border-color:#684a36}
.list-toolbar{gap:15px;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap}
.list-toolbar .filters{margin:0}
.search{background:#191a1d;border:1px solid var(--line);border-radius:6px;padding:0 10px;color:var(--quiet)}
.search .icon{width:15px;height:15px}
.search input{width:143px;background:none;border:0;padding:8px 7px;font-size:12px}
.project-list,.surface,.output-list{border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.project-list,.output-list{overflow:hidden}
.project-item{display:flex;align-items:center}
.project-item>.icon-btn{flex:none;margin-right:10px}
.project-row{display:flex;flex:1;min-width:0;gap:16px;align-items:center;padding:13px 17px}
.project-item+.project-item,.output-row+.output-row{border-top:1px solid var(--line)}
[data-action="delete-project"]:hover,[data-action="delete-project"]:focus-visible{color:#ffaba1;background:#402a2a}
.btn.danger{background:#d7655c;border-color:#e07a71;color:#200c0b}
.btn.danger:hover{background:#ed8279}
.project-row:hover,.output-open:hover{background:#ffffff04}
.project-image{width:65px;height:43px;overflow:hidden;background:#352c26;border-radius:5px;color:var(--accent)}
.project-image img{width:100%;height:100%;object-fit:cover}
.project-name{flex:1;min-width:0}
.project-name strong,.output-open strong,.reference strong{display:block;font-size:14px;font-weight:560;overflow-wrap:anywhere}
.project-name small,.output-open small,.reference small{display:block;font-size:11px;color:var(--quiet);margin-top:3px}
.project-name i,.detail-meta i{font-style:normal;margin:0 2px;color:#73747a}
.project-row time{width:105px;text-align:right;color:var(--quiet);font-size:11px}
.project-row>.icon{width:15px;color:var(--quiet)}
.status{display:inline-flex;align-items:center;gap:6px;padding:3px 8px;background:#2c2d30;color:#c5c5c8;border-radius:5px;white-space:nowrap;font-size:11px}
.status i{width:5px;height:5px;border-radius:50%;background:currentColor}
.s-running,.s-queued{color:#f3bb83;background:#463529}
.s-paused,.s-pausing{color:#e2cada;background:#3e313d}
.s-completed{color:#9cd8b7;background:#27392f}
.s-failed,.s-interrupted{color:#edaa9f;background:#412e2c}
.editor{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(264px,.87fr);align-items:start;gap:20px}
.form-panel,.detail-panel{padding:22px 24px}
.form-panel h2,.detail-panel h2{font-size:17px}
.form-panel h2{display:flex;align-items:center;gap:9px;margin:0 0 21px}
.form-panel h2 .icon{width:17px;color:var(--accent)}
form label,fieldset legend,.form-line>label:first-child{display:block;font-size:12px;font-weight:550;color:#d4d4d8}
form label small{font-weight:400;color:var(--quiet);margin-left:5px}
input:not([type=radio]),textarea,select{border:1px solid #3a3b40;background:#151619;color:var(--text);border-radius:6px;line-height:1.5;min-width:0}
form input:not([type=radio]),textarea,select{width:100%;padding:10px 11px;font-size:13px;margin-top:7px}
::placeholder{color:#87878e;opacity:1}
textarea{resize:vertical;display:block;line-height:1.8}
.form-panel>label,.form-panel fieldset,.form-line{margin-top:18px}
.form-panel h2+label,.form-panel h2+fieldset{margin-top:0}
.form-line,.below-input,.dialog-top,.dialog-footer,.card-line,.list-toolbar{justify-content:space-between}
.file-link{display:inline-flex;align-items:center;position:relative;gap:5px;font-size:11px;color:var(--accent);cursor:pointer}
.file-link .icon{width:13px;height:13px}
.file-link input{position:absolute;opacity:0;inset:0;width:100%;cursor:pointer}
.file-link:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.novel-input{min-height:292px}
.below-input{color:var(--quiet);font-size:11px;margin-top:7px}
fieldset{border:0;padding:0;margin:0;min-width:0}fieldset legend{padding:0}
.ratio-options{display:flex;gap:8px;margin-top:7px}
.ratio-options label{position:relative;flex:1}
.ratio-options input{opacity:0;position:absolute}
.ratio-options span{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;border:1px solid #393a3f;background:#17181b;border-radius:6px;padding:10px 4px;cursor:pointer}
.ratio-options .icon{width:15px;height:15px}
.ratio-options input:checked+span{background:#352a22;border-color:#a97550;color:#ffbb89}
.ratio-options input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.reference-entry{display:flex;align-items:center;gap:12px;width:100%;margin-top:18px;padding:10px 12px;border:1px solid #3c3d41;border-radius:7px;background:#242529;text-align:left}
.reference-entry:hover{background:#2e2f32;border-color:#55565a}
.reference-entry>.icon:first-child{color:var(--accent)}
.reference-entry span{flex:1}.reference-entry strong,.reference-entry small{display:block}
.reference-entry strong{font-size:13px;font-weight:570}.reference-entry small{color:var(--muted);font-size:11px;margin-top:2px}
.reference-entry+.reference-entry{margin-top:8px}
.reference-entry>.icon:last-child{width:14px;color:var(--muted)}
details{border-top:1px solid var(--line);padding-top:14px}
summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:12px;color:#c2c2c7;list-style:none}
summary::-webkit-details-marker{display:none}
summary .icon{width:13px;height:13px}details[open] summary .icon{transform:rotate(180deg)}
.form-footer{margin-top:15px}
.form-footer>div,.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.form-footer>div{justify-content:flex-end}
.form-footer p,.note,.muted{color:var(--muted);font-size:12px;line-height:1.8}
.form-footer p{margin:0 0 12px}
.error,.form-footer .error{color:#ffb0a1;font-size:12px;line-height:1.6}
.error:not(:empty){margin-top:12px}
.back-link{width:fit-content;margin-bottom:12px}
.detail-meta{gap:6px;flex-wrap:wrap}
.tabs{display:flex;gap:19px;margin:6px 0 22px;border-bottom:1px solid var(--line)}
.tabs button{border:0;border-bottom:2px solid transparent;padding:8px 3px 11px}
.tabs [aria-pressed=true]{color:var(--accent);border-bottom-color:var(--accent)}
.detail-panel+.detail-panel{margin-top:17px}
.detail-panel>h2{margin-bottom:14px}.detail-panel h3{font-size:14px;margin:21px 0 7px}
.detail-panel .section-head{margin-bottom:18px}
.steps{display:grid;grid-template-columns:repeat(4,1fr);padding:0;list-style:none;gap:0;margin:20px 0 5px}
.steps li{position:relative;display:flex;align-items:flex-start;flex-direction:column}
.steps li:not(:last-child)::after{content:"";position:absolute;height:1px;background:#414145;left:24px;top:9px;right:5px}
.step-dot{position:relative;display:grid;place-items:center;width:19px;height:19px;border:1px solid #5a5b60;border-radius:50%;margin-bottom:8px}
.step-dot::before{content:"";width:5px;height:5px;background:#626268;border-radius:50%}
.step-partial .step-dot{border-color:#ad7b57}.step-partial .step-dot::before{background:var(--accent)}
.step-done .step-dot{background:#714c34;border-color:#b1815e;color:#ffe0c5}
.step-done .step-dot::before{display:none}.step-dot .icon{width:12px;height:12px}
.steps strong{font-size:13px;font-weight:550}.steps small{color:var(--quiet);font-size:11px;margin-top:3px}
.run-message{background:#242326;border-left:2px solid #a17a5a;border-radius:3px;padding:10px 12px;margin-top:17px;color:#dbd1c9;font-size:12px;overflow-wrap:anywhere;white-space:pre-wrap}
.note{margin-top:12px}
.source-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.95;color:#d7d6d8;font-size:14px}
.output-row,.output-open,.reference{display:flex;align-items:center}
.output-row{justify-content:space-between;padding:0 15px 0 4px}
.output-open{text-align:left;gap:13px;flex:1;min-width:0;padding:10px}
.file-icon{width:40px;height:37px;background:#27282c;color:#ccb6a7;border-radius:4px;overflow:hidden}
.file-icon img{width:100%;height:100%;object-fit:cover}
.ref-form{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin:10px 0}
.ref-form label{flex:1;min-width:110px}.ref-form input[type=file]{font-size:11px;padding:9px}
.ref-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-top:15px}
.reference{gap:10px;padding:8px;background:#232427;border:1px solid var(--line);border-radius:6px}
.reference img{width:45px;height:42px;object-fit:cover;border-radius:4px}.reference div{flex:1}
.voice-reference{display:grid;grid-template-columns:minmax(0,1fr) auto}
.voice-reference strong{overflow-wrap:anywhere}.voice-reference audio{grid-column:1/-1;width:100%;min-width:0}
.detail-panel video,dialog video,.asset-preview{display:block;width:100%;max-height:65vh;object-fit:contain;background:#101113;border-radius:6px}
dialog{width:min(440px,calc(100vw - 26px));max-height:88vh;max-height:88dvh;padding:0;background:#1b1c1f;border:1px solid #47474d;color:var(--text);border-radius:13px;box-shadow:0 30px 95px #0009}
dialog::backdrop{background:#060709b8;backdrop-filter:blur(4px)}
body:has(dialog[open]){overflow:hidden}
.wide-dialog{width:min(680px,calc(100vw - 26px))}
.dialog-body{padding:25px 27px}
.dialog-top{gap:10px;margin-bottom:16px;align-items:flex-start}
.dialog-icon{width:39px;height:39px;border-radius:10px;background:#3f3025;color:var(--accent);border:1px solid #584230}
.dialog-top>.icon-btn{margin:-6px -7px 0 0}
.dialog-body>h2,.dialog-top h2{font-size:22px;overflow-wrap:anywhere}
.dialog-lead{font-size:13px;color:var(--muted);line-height:1.8;margin:8px 0 20px}
.key-field-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0 12px}
.key-field-heading .register-key{text-decoration:underline;text-underline-offset:3px}
.password{display:block;position:relative}.password input{padding-right:40px!important}
.password .icon-btn{position:absolute;top:11px;right:4px}
.dialog-footer{justify-content:flex-end;gap:9px;margin-top:23px}
.story-modal-photo{position:relative;height:156px}
.story-modal-photo>.icon-btn{position:absolute;right:12px;top:12px;border-radius:50%;background:#14151cbd;color:white}
.dialog-eyebrow{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--accent);margin-bottom:6px}
.dialog-eyebrow .icon{width:14px;height:14px}.dialog-tags{display:flex;gap:7px;margin:10px 0 17px}
.dialog-tags span{font-size:11px;color:#bfbfc4;border:1px solid #3e3f44;border-radius:4px;padding:2px 7px}
.guide-list{margin:17px 0 0}.guide-list dt{color:#e5ded7;font-size:14px;font-weight:580;margin-top:14px}
.guide-list dd{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.8}
.guide-list a{color:var(--accent)}
.guide-list ol{margin:0;padding-left:1.5em}
@media(max-width:460px){.topbar .top-actions{gap:10px}.topbar .service #service-text{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}.topbar .top-key{white-space:nowrap}}
pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.8 Consolas,monospace;background:#111215;border:1px solid var(--line);border-radius:6px;padding:14px;max-height:52vh;overflow:auto}
.toast{position:fixed;bottom:23px;left:calc(50% + var(--sidebar)/2);transform:translateX(-50%);max-width:min(420px,86vw);z-index:10;background:#323130;color:#f6ede6;border:1px solid #534c46;border-radius:8px;box-shadow:0 7px 30px #0005;padding:10px 16px;font-size:13px;text-align:center}
.loading{color:var(--muted);padding:30px 0}
@media(min-width:1650px){:root{--sidebar:240px}.story-grid{gap:22px}.card-picture{aspect-ratio:2.4}.shelf{margin-top:36px}}
@media(max-width:1120px){:root{--sidebar:185px}.brand{padding-left:20px}.nav-item{padding:0 11px}.hero-content{padding-left:30px}.story-grid{gap:12px}.card-body{padding:12px 13px 14px}.card-note{font-size:11px}.card-picture{aspect-ratio:2}.form-panel,.detail-panel{padding:19px}.editor{gap:14px}}
@media(max-width:850px){:root{--sidebar:0px}#sidebar{width:218px;transform:translateX(-100%);transition:transform .18s}.menu-open #sidebar{transform:none}.menu-open .shade{display:block;position:fixed;inset:0;background:#07090ca6;z-index:4}.menu-open{overflow:hidden}#menu{display:inline-flex;margin-left:-5px}.crumb{gap:10px}.topbar{height:55px}#content{padding-top:24px}.hero{height:288px}.editor{grid-template-columns:minmax(0,1.28fr) minmax(235px,.85fr)}}
@media(max-width:620px){
  .topbar{height:53px;padding:0 15px}.crumb-root,.crumb-slash,.top-divider{display:none}.top-actions{gap:13px}
  #content{padding:22px 15px 36px}.page-head{gap:10px;align-items:flex-start;margin-bottom:18px}.page-head p{font-size:12px;margin-top:5px}.page-head>.btn{padding:9px 11px;font-size:12px;margin-top:2px}
  h1{font-size:27px}.hero{height:290px;min-height:0}.hero-content{padding:22px;max-width:100%;justify-content:flex-start}
  .hero-veil{background:linear-gradient(90deg,#0e0d18df 0%,#11101ba6 45%,#0c0e1a25),linear-gradient(0deg,#0b0c1799,transparent 50%)}
  .hero h2{font-size:47px;margin:16px 0 10px}.hero-content p{margin:10px 0 16px;font-size:12px;max-width:92%}.hero-meta{font-size:11px}
  .hero-controls{right:15px;bottom:13px;gap:10px}.hero-arrows .icon-btn{width:25px;height:25px}.hero::after{top:15px;right:15px;width:16px;height:16px}
  .shelf{margin-top:23px}.section-head{margin-bottom:12px}h2{font-size:19px}.story-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.card-picture{aspect-ratio:1.85}
  .card-note{line-height:1.6}.genre{top:7px;left:7px;font-size:9px;padding:2px 5px}.card-line strong{font-size:15px}.card-line .icon{width:13px}
  .empty{flex-wrap:wrap;padding:16px;gap:10px}.empty>div{min-width:190px}.empty .btn{margin-left:50px}
  .project-row{gap:9px;padding:10px}.project-row time{display:none}.project-image{width:44px;height:35px}
  .project-row>.icon{width:12px}.editor{grid-template-columns:1fr}.novel-input{min-height:220px}.form-panel,.detail-panel{padding:16px}
  .dialog-body{padding:19px}.story-modal-photo{height:120px}.list-toolbar{gap:10px}.search{width:100%}.search input{width:100%}
  .steps strong{font-size:11px}.steps small{font-size:10px}.actions .btn{padding:8px;font-size:11px}.actions{justify-content:flex-end}
  .tabs{gap:14px}.ref-form label{flex:auto;min-width:100px}.ref-form label:nth-child(3){width:100%}
  .toast{left:50%;min-width:150px}.form-footer>div{justify-content:stretch}.form-footer .btn{flex:1}
}
@media(max-width:460px){.shelf .story-grid{display:flex;overflow-x:auto;gap:12px;scroll-snap-type:x mandatory;scrollbar-width:thin;scrollbar-color:#38383c transparent;padding-bottom:5px}.shelf .story-card{flex:0 0 77%;scroll-snap-align:start}.shelf .card-picture{aspect-ratio:2.1}.shelf .card-note{font-size:12px}.steps{grid-template-columns:repeat(2,1fr);row-gap:15px}.steps li:nth-child(2)::after{display:none}.service{font-size:10px}.top-key{font-size:11px}}
@media(max-width:850px){#sidebar{visibility:hidden}.menu-open #sidebar{visibility:visible}}
@media(max-width:460px){
  .tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.project-title,.overview-head,.reader-toolbar,.asset-shelf>header,.asset-id,.prompt-head,.shot-meta,.clip-card>header,.clip-tools,.master-video figcaption,.series-archive{display:flex;align-items:center;gap:10px}
.project-title{flex-wrap:wrap;gap:12px}.project-title h1{min-width:0}
.production-status{margin:0 0 14px;color:#dfbda2;font-size:13px;overflow-wrap:anywhere}
#production-overview{--sheet:#1a1b1e;--rule:#343539;--gutter:clamp(16px,2vw,28px);display:grid;grid-template-columns:clamp(170px,16vw,210px) minmax(0,1fr);gap:clamp(14px,2vw,28px);align-items:start}
.step-sidebar{position:sticky;top:12px;min-width:0;padding:4px 0}
.step-nav-head{display:flex;gap:6px;align-items:center;justify-content:space-between;padding:0 6px 11px}
.step-nav-head h2{font-size:13px;font-weight:600;color:#cac8c4;margin:0}
.follow-step{display:inline-flex;align-items:center;gap:4px;padding:4px 6px;border-radius:4px;font-size:11px;color:var(--muted)}
.follow-step .icon{width:11px;height:11px}
.follow-step[aria-pressed=true]{color:#f2b587;background:#33291f}
.step-tabs{display:grid;gap:2px;max-height:calc(100vh - 62px);overflow:auto;scrollbar-width:thin}
.step-tab{display:grid;grid-template-columns:29px 1fr 14px;gap:6px;align-items:center;text-align:left;padding:8px 10px;min-height:34px;border-radius:6px;font-size:13px;color:#a6a7ad}
.step-tab:hover,.scene-switch button:hover{background:#29292d;color:var(--text)}
.step-tab[aria-selected=true]{background:#3b2e24;color:#ffc299;box-shadow:inset 2px 0 #ffac70}
.step-index{color:var(--quiet);font:11px/1.3 ui-monospace,monospace;letter-spacing:.02em}
.step-index .icon,.step-mark .icon{width:13px;height:13px}.step-mark{display:grid;place-items:center;color:#88ae99}
.step-mark i,.output-dot,.media-activity i{display:block;width:6px;height:6px;border-radius:50%;background:#5b5b63}
.step-active .step-mark i,.output-dot.on,.media-activity i{background:var(--accent);box-shadow:0 0 0 3px #ffac7018}
.step-stopped .step-mark i{background:#bba4b8}.step-error .step-mark i{background:#e8968a}
.step-skip .step-mark i{height:1px;background:#85858b}
.step-tab[aria-selected=true] .step-index{color:#e7ac83}
#step-panel{min-width:0}#step-panel:focus-visible{outline:1px solid var(--accent);outline-offset:3px}
.live-output{margin:14px var(--gutter);padding:0;border:1px solid #463d34;border-radius:7px;background:#201e1c;overflow:hidden}
.live-output>summary{gap:8px;justify-content:flex-start;padding:11px 12px;flex-wrap:wrap}
.live-output>summary strong{color:#efceaf;font-size:13px}.live-output>summary small{margin-left:auto;font-size:11px}
.live-output pre{margin:0;padding:12px 14px;max-height:min(52vh,440px);overflow:auto;border-top:1px solid #393431;background:#161719;color:#d8dbd5;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.7 ui-monospace,monospace;tab-size:2}
.live-output pre:empty::before{content:attr(data-placeholder);color:var(--muted)}
.media-activity{display:flex;align-items:center;gap:8px;margin:10px var(--gutter);font-size:13px}
.media-activity span{margin-left:auto;font-size:12px;color:var(--muted)}
.overview-section{margin:0 0 24px;border:1px solid var(--rule);border-radius:11px;background:var(--sheet);min-width:0;scroll-margin-top:64px;overflow-wrap:anywhere}
.overview-section:focus{outline:none}.overview-section:focus-visible{outline:1px solid #9e7457;outline-offset:2px}
.overview-head{min-height:63px;gap:12px;padding:14px var(--gutter);border-bottom:1px solid var(--line);flex-wrap:wrap}
.overview-head h2{margin:0;font-size:20px;font-weight:630;letter-spacing:-.02em;line-height:1.4}
.overview-head>span,.asset-shelf>header small,.series-archive>span,.clip-card>header small{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.overview-files{position:relative;margin-left:auto;padding:0;border:0}
.single-source{display:inline-flex;align-items:center;gap:6px;margin-left:auto;padding:5px;color:var(--muted);font-size:12px}
.single-source:hover{color:var(--accent)}.single-source>.icon{width:13px;height:13px}
.overview-files>summary{gap:6px;padding:5px 0 5px 5px;color:var(--muted);white-space:nowrap}
.overview-files>div{position:absolute;right:0;top:100%;width:max-content;max-width:min(320px,74vw);max-height:40vh;overflow:auto;padding:5px;background:#28292d;border:1px solid #424349;border-radius:7px;z-index:2;box-shadow:0 8px 20px #05050766}
.overview-files button{display:flex;gap:8px;align-items:center;width:100%;padding:7px 10px;color:#dedee0;text-align:left;font-size:12px;border-radius:4px}
.overview-files button:hover{background:#36373b}.overview-files button>.icon{width:14px;height:14px;color:var(--muted)}
.result-note,.reference-notes{margin:16px var(--gutter);color:var(--muted);font-size:13px}
.story-layout{display:grid;min-width:0}.story-layout.split{grid-template-columns:minmax(210px,.78fr) minmax(0,1.65fr)}
.style-notes,.script-reader{min-width:0;padding:var(--gutter)}
.style-notes{background:#201e1c;border-radius:0 0 0 10px}
.split .style-notes{border-right:1px solid var(--line)}
.style-notes>div+div,.style-notes figure+div{margin-top:16px}
.style-notes h3{margin:0 0 4px;font-size:12px;font-weight:550;color:#c0aa98}
.style-notes strong{display:block;margin-bottom:5px;font-size:20px;line-height:1.4;color:#f2e2d4}
.style-notes p,.asset-copy>p,.asset-copy dd,.prompt-excerpt,.prompt-full,.shot-list p,.script-beat p,.script-beat blockquote,.shot-list blockquote{font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.style-notes p{color:#c4bfba}.style-notes figure{position:relative;margin:0;overflow:hidden;border-radius:6px}
.style-notes figcaption{position:absolute;inset:auto 0 0;padding:16px 10px 6px;color:white;background:linear-gradient(transparent,#111c);font-size:11px;pointer-events:none}
.reader-toolbar{justify-content:space-between;flex-wrap:wrap;gap:8px}
.reader-toolbar h3,.asset-shelf>header h3{font-size:15px;font-weight:610;line-height:1.5}
.scene-switch{display:inline-flex;flex-wrap:wrap;gap:2px;padding:2px;border:1px solid var(--rule);border-radius:6px;background:#161719}
.scene-switch button{border-radius:3px;padding:4px 9px;color:#a9a9af;font-size:12px;font-variant-numeric:tabular-nums}
.scene-switch button[aria-pressed=true]{background:#473528;color:#ffc198}
.scene-select{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:12px;color:var(--muted)}
.scene-select select{width:auto;max-width:15em;margin:0;padding:5px}
.script-reader article{margin-top:18px}.script-reader article h4{margin:0;font-size:16px;font-weight:610}
.script-reader article>small,.asset-copy>small{display:block;color:var(--muted);margin:2px 0 6px;font-size:12px}
.script-beat{padding:10px 0;border:0;border-top:1px solid var(--line);margin:10px 0 0}
.script-beat p,.shot-list p{color:#dedde0}
.script-beat blockquote,.shot-list blockquote{border-left:2px solid #906849;margin:6px 0 0;padding-left:10px;color:#d7c2b1}
.script-beat b{color:#eac5a8;font-weight:600;margin-right:8px}
.overview-more{padding:0;border:0;margin-top:8px}
.overview-more>summary{display:inline-flex;justify-content:flex-start;gap:5px;padding:3px 0;color:#e0ac86;font-size:12px}
.overview-more>summary:hover,.overview-files>summary:hover,.clip-tools>button:hover{color:var(--accent)}
.overview-more:not([open])>summary>.when-open,.overview-more[open]>summary>.when-closed{display:none}
.overview-more:not([open])>summary .icon,.overview-files:not([open])>summary .icon{transform:none}
.asset-shelf{padding:18px var(--gutter)}
.asset-shelf+.asset-shelf{border-top:1px solid var(--line)}
.asset-shelf>header{margin-bottom:11px}
.asset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}
.asset-shelf>.overview-more>summary{min-height:34px}.asset-shelf>.overview-more>.asset-grid{margin-top:8px}
.asset-card{min-width:0;overflow:hidden;border:1px solid var(--rule);border-radius:8px;background:#202124}
.asset-picture{display:block;width:100%;aspect-ratio:16/9;padding:0;background:#101113;cursor:zoom-in}
.asset-picture img{width:100%;height:100%;object-fit:contain}
.asset-copy{padding:10px 14px 14px}
.asset-id{min-height:24px;gap:7px;font-size:11px;color:#aaa9ae;letter-spacing:.03em}
.asset-id b{font-size:11px;font-weight:500;letter-spacing:normal;color:#dcaf8e}
.asset-id .icon-btn,.prompt-head .icon-btn,.clip-tools .icon-btn,.master-video .icon-btn{margin-left:auto}
.asset-copy .icon-btn{width:25px;height:25px}.asset-copy .icon,.clip-tools .icon,.prompt-head .icon{width:15px;height:15px}
.asset-copy h4,.clip-card h4{margin:2px 0 5px;font-size:15px;font-weight:600}
.asset-copy>p,.asset-copy dd{color:#cdccd0}
.asset-copy dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:5px 10px;margin:5px 0}
.asset-copy dt{color:var(--quiet);font-size:12px;padding-top:2px}.asset-copy dd{margin:0}
.inline-prompt{margin-top:12px;padding-top:9px;border-top:1px solid var(--rule)}
.prompt-head strong{color:#d2cec9;font-size:12px;font-weight:560}
.prompt-head .icon-btn{width:25px;height:25px}
.prompt-excerpt,.prompt-full{margin:2px 0;color:#b6b5ba}
.prompt-excerpt{white-space:normal}.inline-prompt:has(>.overview-more[open])>.prompt-excerpt{display:none}
.prompt-excerpt.complete{white-space:pre-wrap}
.inline-prompt>.overview-more{margin-top:3px}
.prompt-full{background:#17181b;border-radius:5px;padding:10px;margin-top:5px;color:#ddd9d6}
.overview-section>.reader-toolbar{padding:16px var(--gutter) 2px}
.clip-card{margin:14px var(--gutter) 20px;padding-top:14px;border-top:1px solid var(--rule)}
.clip-card>header{margin-bottom:10px}.clip-card h4{margin:0;color:#f2d5bf;font-variant-numeric:tabular-nums}
.clip-layout{display:grid;align-items:start;gap:18px}
.clip-reader,.clip-media{min-width:0}
.clip-media{background:#151619;border-radius:6px;overflow:hidden}
.clip-media video,.master-video video{display:block;width:100%;height:auto;aspect-ratio:auto 16/9;object-fit:contain;background:var(--sheet)}
.clip-media[data-ratio="9:16"] video,.master-video[data-ratio="9:16"] video{aspect-ratio:auto 9/16}
.clip-tools{padding:3px 8px;color:var(--muted)}
.clip-tools>button{display:inline-flex;align-items:center;gap:5px;padding:4px 0;font-size:12px;color:var(--muted)}
.shot-list{list-style:none;margin:0;padding:0}
.shot-list li+li{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.shot-meta{font-size:11px;color:var(--muted);margin-bottom:3px;font-variant-numeric:tabular-nums}
.shot-meta strong{font-size:12px;color:#e5d8cc}.shot-meta time{color:#e4b796}
.clip-reader>.inline-prompt:first-child{margin:0;padding:0;border:0}
.clip-grid{--card-min:290px;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--card-min)),1fr));gap:18px 14px;margin:14px var(--gutter) 20px}
.clip-grid[data-ratio="9:16"]{--card-min:168px}
.clip-grid .clip-card{min-width:0;margin:0;padding:0;border:0}
.clip-grid .clip-media{width:100%}
@media(max-width:700px){.clip-grid{gap:14px 10px;margin:12px}.clip-grid[data-ratio="9:16"]{--card-min:145px}.clip-grid .clip-tools{padding:2px 5px}.clip-grid .clip-tools button{min-height:36px}}
.master-video{margin:var(--gutter);overflow:hidden;border:1px solid var(--line);border-radius:8px;background:#151619}
.master-video video{max-height:72vh}
.master-video[data-ratio="9:16"]{max-width:min(100%,clamp(225px,40vh,360px))}
.master-video figcaption{padding:6px 12px;font-size:12px;color:var(--muted);flex-wrap:wrap}
.master-video figcaption strong{color:var(--text);font-size:14px}
.result-actions,.match-edit,.output-tools{display:flex;gap:8px;align-items:center}
.edit-result{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:4px 8px;border:1px solid var(--line);border-radius:5px;color:var(--text);font-size:12px;line-height:1.45;white-space:nowrap}
.edit-result:hover,.edit-result:focus-visible{color:#f2d5bf;border-color:#986c50}
.edit-result svg{width:14px;height:14px}
.asset-copy>.edit-result{margin-top:8px}
.clip-tools{flex-wrap:wrap;gap:4px}
.clip-tools>.edit-result{padding:3px 5px}
.clip-tools>[data-action="delete-clip"]:hover{color:#ffaba1}
.clip-missing{color:var(--muted);padding:15px 10px;font-size:13px}
.output-tools,.match-edit{justify-content:flex-end;padding:7px var(--gutter)}
.match-edit span{margin-right:auto}
.edit-pending{margin:10px var(--gutter);font-size:12px;color:#edc19b}
.result-dialog form{display:grid;gap:12px;min-width:0}
.result-dialog form>label{display:grid;gap:6px}
.result-dialog textarea{width:100%;max-height:55vh;resize:vertical;line-height:1.6}
.result-dialog .json-editor{font-family:ui-monospace,Consolas,monospace;font-size:13px;tab-size:2}
.result-dialog .dialog-footer{margin-top:0}
.replacement-media{display:grid;place-items:center;background:var(--sheet);border-radius:6px;overflow:hidden}
.replacement-media :is(img,video){display:block;max-width:100%;max-height:38vh;object-fit:contain}
@media(max-width:700px){.edit-result{min-height:34px}.result-dialog textarea{font-size:16px}.clip-tools .edit-result{min-height:32px}}
.series-archive{position:relative;padding:12px var(--gutter);flex-wrap:wrap;background:var(--sheet);border:1px solid var(--rule);border-radius:8px}
.series-archive strong{font-size:13px}
@media(min-width:1150px){.asset-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1000px){
  .asset-grid{gap:9px}.asset-copy{padding:8px 10px 12px}.story-layout.split{grid-template-columns:minmax(180px,.85fr) minmax(0,1.6fr)}
}
@media(max-width:700px){
  #production-overview{grid-template-columns:minmax(0,1fr);gap:10px}
  .step-sidebar{position:static;padding:0}.step-tabs{display:flex;gap:4px;max-height:none;overflow-x:auto;padding:3px 1px 7px}
  .step-tab{display:flex;flex:none;padding:8px;gap:6px;min-height:36px;border:1px solid var(--rule)}
  .step-tab[aria-selected=true]{box-shadow:none;border-color:#825a3c}
  .step-nav-head{padding:0 1px 6px}.step-mark{min-width:7px}.step-index{font-size:10px}
  .overview-section{margin-bottom:16px;scroll-margin-top:57px}.overview-head{gap:4px 9px;min-height:52px}
  .overview-head h2{font-size:17px}.overview-head>span{font-size:11px}
  .story-layout.split{grid-template-columns:1fr}.split .style-notes{border-right:0;border-bottom:1px solid var(--line)}
  .style-notes{border-radius:0}.style-notes:has(figure){display:flow-root}.style-notes figure{width:40%;float:right;margin:0 0 5px 10px}
  .style-notes figure+div{margin-top:0}.style-notes>div+div{margin-top:9px}
  .style-notes figcaption{font-size:10px;padding:14px 5px 3px}
  .script-reader article{margin-top:12px}.asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:500px){
  .project-head{flex-wrap:wrap;gap:8px}.project-title{gap:7px}
  .asset-grid{grid-template-columns:minmax(0,1fr)}.asset-copy{padding:9px 13px 12px}
  .project-item>.icon-btn{margin-right:4px}
  .scene-switch button{min-height:30px;padding:4px 7px}
  .master-video{margin:10px}
}
