/* 页面布局与交互状态样式；资产更新提示完整展示原因和处理方式。 */
:root{font-family:Inter,"Microsoft YaHei",sans-serif;color:#e5e7eb;background:#101216;font-size:14px;color-scheme:dark}*{box-sizing:border-box}body{margin:0;display:flex}aside{width:235px;position:fixed;inset:0 auto 0 0;background:#171a20;border-right:1px solid #30343e;padding:30px 20px;display:flex;flex-direction:column;gap:24px}.brand{font-size:23px;letter-spacing:3px;font-weight:750}.brand span{display:block;font-size:12px;letter-spacing:2px;color:#909ba9;margin-top:10px}button{border:1px solid #3a414d;background:#252b35;color:#e6eaf1;border-radius:8px;padding:10px 15px;cursor:pointer;font:inherit}button:hover{border-color:#eabf80;color:#ffda9f}button:disabled{opacity:.45;cursor:wait}.primary{background:#e9bc77;color:#1b1b1b;border-color:#e9bc77;font-weight:650}.primary:hover{background:#ffd596;color:#171717}nav{display:flex;flex-direction:column;gap:8px;overflow:auto}nav button{text-align:left;overflow:hidden;text-overflow:ellipsis}nav button.selected{border-color:#e9bc77}footer{margin-top:auto;color:#96a0af;line-height:2;font-size:12px}main{margin-left:235px;padding:35px 40px;max-width:1700px;width:calc(100% - 235px)}header,.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px}header small{letter-spacing:3px;color:#e9bc77;font-size:10px}h1{font-size:27px;margin:12px 0 25px}h2{font-size:19px;margin:0 0 12px}p{color:#9ba6b6;line-height:1.7}.badge{padding:7px 12px;background:#252b32;border-radius:30px;color:#e9bc77;white-space:nowrap}#status{padding:14px 18px;border:1px solid #343c49;border-radius:8px;margin:14px 0 24px;color:#b7c4d5}.error{color:#ff9e9e!important;border-color:#7c4444!important}.tabs{display:flex;gap:10px;margin-bottom:25px}.tabs button{border:0;background:none;color:#929cab;border-bottom:2px solid transparent;border-radius:0}.tabs .selected{color:#e9bc77;border-bottom-color:#e9bc77}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:22px}article,.board{background:#191d24;border:1px solid #303743;border-radius:12px;padding:24px;margin-bottom:22px}textarea{width:100%;min-height:390px;background:#11151b;color:#d7e0ed;border:1px solid #374151;border-radius:8px;padding:16px;resize:vertical;font:14px/1.85 "Microsoft YaHei",sans-serif}textarea:focus{outline:1px solid #e9bc77}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px;margin-top:25px}.asset-grid article{padding:18px}.asset-grid img{width:100%;height:200px;object-fit:contain;background:#101319;border-radius:8px}.asset-grid p{max-height:130px;overflow:auto;font-size:12px}.upload{display:inline-block;border:1px dashed #576373;border-radius:8px;padding:10px 14px;cursor:pointer;font-size:12px}.upload input{display:none}.board .preview{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}.board img,.board video{width:100%;background:#0d1015;object-fit:contain;border-radius:7px}.placeholder{background:#11151a;min-height:180px;border:1px dashed #374151;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#778496;text-align:center;padding:20px}.panels{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.panel{padding:14px;background:#222833;border-radius:8px;font-size:12px;line-height:1.8}.panel strong{color:#f0c88c}.panel p{margin:8px 0}.panel q{color:#d6e3f7}details{margin:16px 0;color:#a9b5c5}summary{cursor:pointer;padding:10px 0}.code{font:12px/1.6 Consolas,monospace;margin:10px 0;min-height:260px}pre{white-space:pre-wrap;word-break:break-word;max-height:360px;overflow:auto}.section-head{margin-bottom:16px}#config{font-size:12px;color:#909bab}@media(max-width:1000px){aside{width:185px}main{margin-left:185px;width:calc(100% - 185px);padding:24px}.two-columns,.board .preview{grid-template-columns:1fr}.panels{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){body{display:block}aside{position:static;width:auto;padding:20px}footer{display:none}main{margin:0;width:100%;padding:18px}h1{font-size:22px}.tabs{gap:0}.tabs button{font-size:12px;padding:10px}.panels{grid-template-columns:1fr}}
dialog{background:#1b2029;color:#e5e7eb;border:1px solid #465161;border-radius:12px;padding:28px;min-width:min(340px,calc(100vw - 24px));max-width:calc(100vw - 24px)}dialog::backdrop{background:#0009}dialog input{display:block;width:100%;margin:15px 0;padding:12px;border:1px solid #465161;border-radius:7px;background:#11151b;color:#fff}

/* 左侧剧集折叠面板：标题展示剧名，展开后按集数展示项目。 */
#projects .series-panel{margin:0;border:1px solid #3a414d;border-radius:8px;background:#202630;overflow:hidden;color:#e6eaf1;flex-shrink:0;transition:border-color .2s ease,background-color .2s ease,box-shadow .2s ease;animation:series-panel-enter .24s ease both}
#projects .series-panel.current{border-color:#e9bc77}
#projects .series-panel.current summary{color:#ffda9f}
#projects .series-panel[open]{background:#232a35;box-shadow:0 7px 18px #080a0e40}
#projects .series-panel summary{display:flex;align-items:center;gap:8px;padding:12px 14px;font-weight:600;list-style:none;user-select:none;transition:color .18s ease,background-color .18s ease}
#projects .series-panel summary::-webkit-details-marker{display:none}
#projects .series-panel summary::after{content:'›';margin-left:auto;color:#909ba9;font-size:18px;line-height:1;transition:transform .24s cubic-bezier(.22,.8,.3,1),color .18s ease}
#projects .series-panel[open] summary::after{transform:rotate(90deg)}
#projects .series-panel summary:hover{color:#ffda9f;background:#2b323e}
#projects .series-panel summary:hover::after{color:#e9bc77}
#projects .series-episodes{display:grid;gap:6px;padding:8px;border-top:1px solid #343b47;background:#181c23;overflow:hidden;transform-origin:top}
#projects .series-episodes button{width:100%;padding:9px 10px;background:#252b35;white-space:nowrap;transition:transform .16s ease,background-color .22s ease,border-color .22s ease,color .22s ease,box-shadow .22s ease}
#projects .series-episodes button:hover{transform:translateX(3px);background:#2c3440}
#projects .series-episodes button.selected{box-shadow:inset 3px 0 #e9bc77;background:#2b3039}
/* 每集的删除入口独立于打开按钮，窄侧栏下仍完整显示。 */
#projects .project-row{display:flex;align-items:stretch;gap:5px;min-width:0}
#projects .project-row [data-project-id]{flex:1;min-width:0}
#projects .project-row .delete-project{flex:0 0 auto;width:auto;padding:9px 6px;color:#ffabab;font-size:12px}
#projects .project-row .delete-project:hover{transform:none;border-color:#da7474;background:#45272b}
#projects .series-name{flex:1;min-width:0;overflow-wrap:anywhere}
#projects .delete-series{flex:0 0 auto;padding:5px;color:#ffabab;font-size:11px;font-weight:400}
#projects .series-panel summary:has(.delete-series){gap:5px;padding:10px 8px}
#projects .series-panel summary:has(.delete-series)::after{margin-left:0}
.danger{background:#9e343d;border-color:#c25b62;color:#fff}
.danger:hover{background:#b53e48;border-color:#ed9097;color:#fff}
.delete-project-dialog{width:460px}
.delete-project-dialog p{overflow-wrap:anywhere}
.delete-project-dialog ul{max-height:180px;overflow:auto;line-height:1.8;overflow-wrap:anywhere}
/* 外观文字编辑器只调整自身尺寸，原稿与建议在同一屏内便于对照。 */
.asset-text-dialog{width:min(800px,calc(100vw - 24px));max-height:90vh;overflow:auto}
.asset-text-dialog label{display:block;margin-top:12px}
.asset-text-dialog textarea{min-height:120px}
@keyframes series-panel-enter{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){#projects .series-panel{animation:none;transition:none}#projects .series-panel summary,#projects .series-panel summary::after,#projects .series-episodes button{transition:none}}

#human-review { margin-bottom:24px; }
#human-review .review-question { color:#f1cc89; background:#29251e; padding:14px; border-radius:8px; line-height:1.8; }
#human-review select {max-width:100%; margin:8px 0;}
#human-review label {display:block;}
#human-review pre {max-height:360px;overflow:auto;}

/* 资产身份确认：每一项单独成块，下拉框带标签且不超出面板，没选完的项与按钮上方写明原因。 */
#asset-review .asset-question{margin:16px 0;padding:16px;border:1px solid #303743;border-radius:10px;background:#1d222b}
#asset-review .asset-question-invalid{border-color:#7c4444}
#asset-review .asset-question h3{margin:0 0 10px;font-size:16px;overflow-wrap:anywhere}
#asset-review .asset-question p{overflow-wrap:anywhere}
#asset-review .review-question{color:#f1cc89;background:#29251e;padding:12px 14px;border-radius:8px;line-height:1.8}
#asset-review .asset-question-help{margin:12px 0;padding-left:20px;color:#aebbd0;line-height:1.8}
#asset-review .asset-question-help strong{color:#e6eaf1}
#asset-review label{display:block;margin:12px 0 0;color:#c9d2df}
#asset-review select{display:block;width:100%;max-width:100%;margin-top:6px;padding:9px;border:1px solid #465161;border-radius:7px;background:#11151b;color:#e6eaf1;font:inherit;text-overflow:ellipsis}
#asset-review select:focus{outline:1px solid #e9bc77}
#asset-review select:disabled{opacity:.5;cursor:not-allowed}
#asset-review label small{display:block;margin-top:6px;color:#909bab;line-height:1.6}
#asset-review .asset-review-loss{margin:12px 0;padding:12px 16px;border:1px solid #c58b3c;border-left-width:6px;border-radius:8px;background:#2a2014;color:#ffd596;line-height:1.7}
#asset-review .asset-review-loss strong{display:block;color:#ffe3b0;margin-bottom:4px}
#asset-review .asset-question-picked{margin:10px 0 0;padding:8px 12px;border-left:3px solid #4d7fc4;background:#18202c;color:#c9d6ea;line-height:1.7}
#asset-review h2 small{font-size:14px;font-weight:400;color:#aebbd0}
[data-tab][data-pending]::after{content:" · " attr(data-pending);color:#ffd596;font-weight:600}
#asset-review .asset-question-error{margin:12px 0 0;padding:10px 14px;border:1px solid #7c4444;border-radius:8px;background:#2d1c1f;color:#ff9e9e}
#asset-review #asset-review-error{margin:0 0 14px}

/* 小说与忠实还原入口：明确显示用途和当前选择。 */
.adaptation-mode{display:grid;gap:10px;margin:16px 0;padding:12px;border:1px solid #465161;border-radius:9px}.adaptation-mode legend{padding:0 6px;color:#f0c88c;font-weight:600}.adaptation-mode label{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #3c4654;border-radius:8px;cursor:pointer;background:#1d242d}.adaptation-mode label:has(input:checked){border-color:#e9bc77;background:#2a2925}.adaptation-mode input{flex:0 0 auto;margin-top:4px}.adaptation-mode span{display:grid;gap:3px}.adaptation-mode small{color:#aebbd0;line-height:1.55}#adaptation-mode-note{color:#f0c88c;font-size:13px;line-height:1.5}

/* 原文文件导入：与影视分镜导入相互独立；按钮与说明同行居中，分镜模式下置灰。 */
.story-import{align-items:center}.story-import small{font-size:12px;color:#909bab;overflow-wrap:anywhere}.story-import .upload[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
/* 剧名行的剧集设置入口与删除项目并排，窄侧栏下不换行。 */
#projects .series-settings{flex:0 0 auto;padding:5px;color:#e9bc77;font-size:11px;font-weight:400;white-space:nowrap}
#projects .series-settings:hover{border-color:#e9bc77;background:#3a3326}
/* 剧名独占第一行（右侧箭头），「设置」「删除项目」排在第二行，窄侧栏下剧名不被挤成竖排。 */
#projects .series-panel summary:has(.series-settings){flex-wrap:wrap;row-gap:6px}
#projects .series-panel summary:has(.series-settings) .series-name{flex:1 1 calc(100% - 24px);order:0}
#projects .series-panel summary:has(.series-settings)::after{order:1}
#projects .series-panel summary:has(.series-settings) .series-settings,#projects .series-panel summary:has(.series-settings) .delete-series{order:2}
