
*{box-sizing:border-box} body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;background:#f6f7fb;color:#1d2433;height:100vh;overflow:hidden}.app-shell{height:100vh;padding:14px;display:flex;flex-direction:column;gap:12px}.topbar{height:82px;display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:14px 18px;box-shadow:0 8px 22px rgba(26,32,44,.05)}h1{font-size:20px;margin:0 0 6px}h2{font-size:15px;margin:0}.topbar p{margin:0;color:#7a8497;font-size:12px}.top-actions{display:flex;align-items:center;gap:8px}button{border:1px solid #dfe5ee;background:#fff;border-radius:12px;padding:9px 13px;cursor:pointer;color:#2a3344}button:hover{background:#f4f7fb}.primary,.send-btn{background:#222a36;color:#fff;border-color:#222a36}.primary:hover,.send-btn:hover{background:#111827}.small{font-size:12px;padding:6px 10px}.grid{flex:1;min-height:0;display:grid;grid-template-columns:1.15fr .85fr;grid-template-rows:1.08fr .92fr;gap:12px}.panel{background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:14px;min-height:0;box-shadow:0 8px 22px rgba(26,32,44,.05);position:relative}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.prompt-panel{display:flex;flex-direction:column}.editor{flex:1;min-height:140px;border:1px dashed #d9e0ea;border-radius:16px;background:#fbfcff;padding:12px;outline:none;overflow:auto;line-height:1.55;font-size:14px}.editor:empty:before{content:attr(data-placeholder);color:#a1a9b8}.hint{font-size:12px;color:#8993a5;margin-top:8px}.ref-tag{display:inline-flex;align-items:center;gap:5px;vertical-align:middle;border:1px solid #dfe7f2;background:#f1f5fb;border-radius:999px;padding:2px 6px;margin:0 2px;cursor:grab;user-select:none}.ref-tag img{width:22px;height:22px;border-radius:6px;object-fit:cover}.ref-tag b{font-size:12px;color:#ef4444;margin-left:2px;cursor:pointer}.mention-popup{position:absolute;z-index:40;width:230px;max-height:190px;overflow:auto;background:#fff;border:1px solid #e4e9f2;border-radius:14px;padding:6px;box-shadow:0 14px 32px rgba(15,23,42,.16);left:28px;bottom:46px}.mention-item{display:flex;align-items:center;gap:8px;padding:6px;border-radius:10px;cursor:pointer}.mention-item:hover{background:#f3f6fb}.mention-item img{width:36px;height:36px;border-radius:8px;object-fit:cover}.hidden{display:none!important}.image-panel{display:flex;flex-direction:column}.image-list{flex:1;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;align-content:start}.image-list.empty,.task-list.empty{display:flex;align-items:center;justify-content:center;color:#a3acba;font-size:13px;border:1px dashed #dce3ed;border-radius:14px}.image-card{position:relative;border:1px solid #e5ebf4;border-radius:14px;background:#fbfcff;padding:8px;min-height:116px}.image-card.uploading{filter:grayscale(1);opacity:.55}.image-card img{width:100%;height:68px;object-fit:cover;border-radius:10px;display:block;cursor:pointer}.image-card .name{font-size:12px;font-weight:600;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.image-card .row{display:flex;gap:6px;margin-top:6px}.image-card .row button{flex:1;font-size:11px;padding:4px 6px;border-radius:8px}.del{position:absolute!important;right:4px;top:4px;background:#ef4444!important;color:#fff!important;border:none!important;width:22px;height:22px;border-radius:999px!important;padding:0!important;line-height:22px}.option-panel{display:flex;flex-direction:column;gap:10px}.ratio-row{display:flex;gap:8px;flex-wrap:wrap}.ratio{width:58px;height:48px;border:1px solid #dce4ef;background:#fbfcff;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;gap:4px}.ratio.active{border-color:#222a36;background:#eef2f7}.rect{border:2px solid currentColor;border-radius:3px}.r916{width:14px;height:24px}.r169{width:28px;height:16px}.r43{width:24px;height:18px}.r34{width:18px;height:24px}.r11{width:21px;height:21px}.option-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.option-row label{font-size:12px;color:#6c7586;display:flex;flex-direction:column;gap:4px}.option-row input,.option-row select,.config-bottom input,.config-bottom select{height:34px;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff}.send-btn{height:42px;font-size:15px}.status-line{font-size:12px;color:#667085;min-height:18px}.task-panel{display:flex;flex-direction:column}.task-list{flex:1;overflow:auto;display:flex;flex-direction:column;gap:8px}.task-card{border:1px solid #e6ebf3;border-radius:14px;background:#fbfcff;}.fan{height:52px;position:relative}.fan img{position:absolute;width:42px;height:42px;border-radius:10px;object-fit:cover;border:2px solid #fff;box-shadow:0 3px 8px rgba(15,23,42,.18)}.fan img:nth-child(1){left:0;top:4px;transform:rotate(-10deg)}.fan img:nth-child(2){left:22px;top:5px;transform:rotate(4deg)}.fan img:nth-child(3){left:44px;top:6px;transform:rotate(12deg)}.task-main strong{font-size:13px}.task-main p{font-size:12px;color:#667085;margin:4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:480px}.task-main em{font-style:normal;font-size:11px;color:#8a94a6}.badge{display:inline-block;border-radius:999px;padding:3px 8px;font-size:11px;background:#ecfdf3;color:#027a48}.badge.fail{background:#fff1f2;color:#be123c}.task-actions{display:flex;flex-direction:column;gap:6px}.modal{position:fixed;inset:0;background:rgba(15,23,42,.35);z-index:100;display:flex;align-items:center;justify-content:center}.modal-card{position:relative;background:#fff;border-radius:18px;padding:18px;border:1px solid #e7ecf4;box-shadow:0 20px 60px rgba(15,23,42,.25)}.close{position:absolute;right:12px;top:10px;width:28px;height:28px;border-radius:50%;padding:0}.config-card{width:min(760px,92vw);height:min(620px,88vh);display:flex;flex-direction:column}.config-card p{font-size:12px;color:#667085;margin:8px 38px 10px 0}.config-card textarea{flex:1;min-height:260px;resize:none;border:1px solid #dfe5ee;border-radius:14px;padding:10px;font-family:Consolas,monospace;font-size:12px;overflow:auto}.config-bottom{display:grid;grid-template-columns:150px 130px 1fr 110px 110px;gap:10px;align-items:end;margin-top:10px}.check{font-size:12px;color:#4b5563}.modal-msg{min-height:20px;margin-top:8px;font-size:12px;color:#027a48}.logs-card{width:min(900px,94vw);height:min(650px,88vh);display:flex;flex-direction:column}.log-actions{display:flex;gap:8px;margin:8px 0}.logs-card pre{flex:1;overflow:auto;background:#0f172a;color:#dbeafe;border-radius:14px;padding:12px;font-size:12px;white-space:pre-wrap}.preview-card{max-width:88vw;max-height:88vh}.preview-card img{max-width:82vw;max-height:78vh;border-radius:14px;display:block}@media(max-width:900px){body{overflow:auto}.app-shell{height:auto}.grid{grid-template-columns:1fr;grid-template-rows:auto}.panel{min-height:250px}.topbar{height:auto;align-items:flex-start;gap:10px;flex-direction:column}.top-actions{flex-wrap:wrap}}

/* 修复版布局：左侧 60%，右侧任务队列 40%；图片列表放在提示词框上方横向排列 */
.grid{grid-template-columns:minmax(0,3fr) minmax(340px,2fr);grid-template-rows:minmax(0,1.45fr) minmax(0,.55fr)}
.prompt-panel{grid-column:1;grid-row:1;display:flex;flex-direction:column;min-height:0}
.option-panel{grid-column:1;grid-row:2;min-height:0}
.task-panel{grid-column:2;grid-row:1 / span 2;min-height:0}
.image-shelf{height:128px;border:1px dashed #d9e0ea;border-radius:16px;background:#fbfcff;padding:8px;margin-bottom:10px;display:flex;flex-direction:column;gap:6px;transition:border-color .15s,background .15s}
.image-shelf.over{border-color:#222a36;background:#f3f6fb}
.image-shelf-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#5f6b7d;line-height:1}
.image-shelf-head span{font-weight:700;color:#2a3344}.image-shelf-head em{font-style:normal;color:#8a94a6}
.image-list{flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;display:flex;grid-template-columns:none;gap:8px;align-items:stretch;align-content:stretch;padding-bottom:2px}
.image-list.empty{display:flex;align-items:center;justify-content:center;min-height:74px;color:#a3acba;font-size:13px;border:1px dashed #dce3ed;border-radius:12px}
.image-card{flex:0 0 104px;width:104px;min-height:0;height:84px;padding:6px;border-radius:12px}
.image-card img{height:42px;border-radius:8px}.image-card .name{font-size:11px;margin-top:4px}.image-card .row{gap:4px;margin-top:4px}.image-card .row button{font-size:10px;padding:3px 4px;border-radius:7px}.del{right:2px!important;top:2px!important;width:20px;height:20px;line-height:20px!important}
.editor{min-height:120px}.hint{margin-top:6px}.task-main p{max-width:100%}
@media(max-width:900px){.grid{grid-template-columns:1fr;grid-template-rows:auto}.task-panel,.prompt-panel,.option-panel{grid-column:auto;grid-row:auto}.image-shelf{height:130px}}

/* 文档要求优化：比例预览、拖拽提示、清空按钮、任务时间布局 */
.prompt-actions{display:flex;justify-content:flex-end;margin-top:8px}
.danger{background:#ef4444!important;border-color:#ef4444!important;color:#fff!important}
.danger:hover{background:#dc2626!important;border-color:#dc2626!important}
.editor.over{border-color:#222a36;background:#f3f6fb}
.ref-tag.dragging{opacity:.45}
.mention-popup{bottom:auto}
.ratio{width:66px;height:60px;gap:3px}
.ratio-visual{width:36px;height:36px;display:flex;align-items:center;justify-content:center}
.rect{display:block;border:2px solid currentColor;border-radius:4px;background:rgba(255,255,255,.55)}
.r916{width:18px;height:32px}.r169{width:32px;height:18px}.r43{width:32px;height:24px}.r34{width:24px;height:32px}.r11{width:28px;height:28px}
.image-card{cursor:grab}.image-card:active{cursor:grabbing}
.task-card{display:grid;grid-template-columns:72px 1fr auto;grid-template-areas:"time time time" "fan main actions";padding:11px}
.task-time{grid-area:time;font-size:13px;font-weight:800;color:#111827;line-height:1.2}
.fan{grid-area:fan}.task-main{grid-area:main;min-width:0}.task-actions{grid-area:actions}.task-title{display:flex;align-items:center;gap:6px;min-width:0}.task-main strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-width:72%}.task-main em{display:block}


/* 文档新增优化：100% 缩放完整显示、全页禁止滚动、任务列表独立滚动、IP 状态点、上传独立状态、请求中任务态 */
html,body{width:100%;height:100%;min-height:100%;overflow:hidden}body{height:100vh;min-height:100vh;overflow:hidden}.app-shell{height:100vh;min-height:0;max-height:100vh;padding:10px;gap:8px;overflow:hidden}.topbar{height:72px;min-height:72px;flex-shrink:0;padding:10px 14px}.grid{min-height:0;overflow:hidden;gap:8px}.panel{overflow:hidden}.prompt-panel,.option-panel,.task-panel{min-height:0;overflow:hidden}.task-list{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding-right:2px}.option-row{grid-template-columns:repeat(4,minmax(0,1fr))}.option-row input,.option-row select,.config-bottom input,.config-bottom select{width:100%;min-width:0}.upload-state{position:absolute;left:6px;top:6px;z-index:2;border-radius:999px;padding:2px 6px;font-size:10px;font-weight:700;background:rgba(17,24,39,.72);color:#fff;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.image-card.upload-ok .upload-state{background:#16a34a}.image-card.upload-failed .upload-state{background:#dc2626}.image-card.upload-failed{opacity:.82}.image-error{font-size:10px;color:#be123c;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ref-tag img{pointer-events:none}.task-card.pending{background:#f3f4f6;border-color:#d1d5db}.badge.pending{background:#eef0f3;color:#4b5563}button:disabled{opacity:.55;cursor:not-allowed}button:disabled:hover{background:inherit}@media(max-height:760px){.app-shell{padding:8px;gap:6px}.topbar{height:64px;min-height:64px;padding:8px 12px}.grid{gap:6px}.panel{padding:9px}.image-shelf{height:104px;margin-bottom:7px}.editor{min-height:76px}.ratio{width:54px;height:46px}.ratio-visual{height:26px}.hint{font-size:11px;margin-top:5px}.option-panel{gap:6px}.send-btn{height:36px}.prompt-actions{margin-top:6px}.config-bottom{grid-template-columns:1fr 1fr}.config-bottom button{grid-column:1 / -1}}@media(max-width:900px){html,body{overflow:hidden}body{overflow:hidden}.app-shell{height:100vh;min-height:0}.topbar{height:72px;min-height:72px;flex-direction:row;align-items:center}.grid{grid-template-columns:1fr;grid-template-rows:minmax(0,1.2fr) minmax(136px,.5fr) minmax(0,1fr);overflow:hidden}.prompt-panel{grid-column:1;grid-row:1}.option-panel{grid-column:1;grid-row:2}.task-panel{grid-column:1;grid-row:3}.task-panel,.prompt-panel,.option-panel{min-height:0}}


/* 修复配置浮窗 checkbox：避免被 .config-bottom input 通用样式拉大和错位 */
.config-bottom .check{
  display:flex;
  align-items:center;
  gap:6px;
  height:34px;
  line-height:1.2;
  margin:0;
  white-space:nowrap;
}
.config-bottom .check input[type="checkbox"]{
  flex:0 0 auto;
  width:14px;
  height:14px;
  min-width:14px;
  margin:0;
  padding:0;
  vertical-align:middle;
  accent-color:#222a36;
}

/* 修复配置浮窗底部代理配置排版：放大浮窗宽度，避免复选框文案与后续字段重叠 */
.config-card{
  width:min(980px,96vw);
  height:min(640px,90vh);
  max-width:96vw;
}
.config-bottom{
  grid-template-columns:minmax(240px,1.25fr) minmax(150px,.78fr) minmax(230px,1.15fr) minmax(138px,.72fr) 148px;
  gap:12px;
  align-items:end;
}
.config-bottom label:not(.check){
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  font-size:12px;
  color:#4b5563;
}
.config-bottom .check{
  width:100%;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.config-bottom .primary{
  width:100%;
  min-width:0;
  height:44px;
}
.channel-picker{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#4b5563;margin:8px 0}.channel-picker select{height:34px;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff;max-width:360px}.meaicc-config{margin-top:14px;padding-top:12px;border-top:1px solid #e9edf5;font-size:12px;color:#4b5563}.meaicc-config-row{display:flex;gap:8px;margin-top:5px}.meaicc-config-row input{height:34px;flex:1;min-width:0;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px}.meaicc-config-row button{height:34px}.meaicc-config small{display:block;color:#8993a5;margin-top:5px}
.model-picker{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#4b5563;margin:8px 0}.model-picker-row{display:flex;gap:8px;max-width:100%;align-items:flex-end;flex-wrap:wrap}.model-picker select{height:34px;flex:1;min-width:0;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff}.model-picker button{height:34px}.model-picker select:disabled{background:#f3f4f6;color:#6b7280}.resolution-inline{display:flex;align-items:flex-end;gap:6px;flex:0 0 auto;font-size:12px;color:#4b5563;white-space:nowrap}.resolution-inline>span{padding-bottom:8px}.model-resolution-select{height:34px;width:190px;max-width:220px;margin-top:0;border:1px solid #dfe5ee;border-radius:9px;padding:0 8px;background:#fff;color:#253044}.model-resolution-select:disabled{opacity:.75}
.auth-form{display:flex;flex-direction:column;gap:10px;max-width:420px}.auth-form label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#4b5563}.auth-form input{height:38px;border:1px solid #dfe5ee;border-radius:10px;padding:0 10px;font-size:14px}.auth-form .primary{height:40px}.auth-form .small{align-self:flex-start}
.modal-msg{
  line-height:1.45;
  white-space:normal;
  word-break:break-word;
}
@media(max-width:980px), (max-height:760px){
  .config-card{
    width:min(820px,94vw);
    height:min(640px,90vh);
  }
  .config-bottom{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .config-bottom .check{
    grid-column:1 / -1;
    height:auto;
    min-height:34px;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
  .config-bottom .primary{
    grid-column:1 / -1;
  }
}

/* 配置浮窗底部在 100% 缩放下的最终列宽修正，避免 1024px 左右视口出现横向挤压 */
.config-bottom{
  grid-template-columns:minmax(235px,1.3fr) minmax(145px,.75fr) minmax(220px,1.15fr) minmax(130px,.7fr) 140px;
  gap:12px;
}
@media(max-width:980px), (max-height:760px){
  .config-bottom{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
}

/* 任务列表：函数5轮询状态 + 右侧视频预览区 */
.task-card{align-items:stretch;gap:12px}.task-left{display:grid;grid-template-columns:82px minmax(0,1fr) auto;gap:10px;align-items:center;min-width:0}.task-video-divider{width:1px;background:#e5e7eb;align-self:stretch}.task-video-box{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:8px;min-width:0}.task-video-box.empty-video{min-height:112px}.task-cover{width:88px;height:88px;object-fit:cover;border-radius:14px;border:1px solid #e5e7eb;background:#f8fafc;cursor:pointer;box-shadow:0 4px 14px rgba(15,23,42,.12)}.download-video{width:88px;text-align:center}.badge.processing{background:#eef0f3;color:#4b5563}.badge.ok{background:#ecfdf3;color:#027a48}.status-submit_failed,.status-failed,.status-retry{border-color:#fecdd3;background:#fff7f8}.status-processing{border-color:#d1d5db;background:#f9fafb}.status-succeed{border-color:#abefc6;background:#fbfffd}.task-error,.task-poll-note{font-size:11px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-error{color:#be123c}.task-poll-note{color:#6b7280}.retry-query{border-color:#fecdd3;color:#be123c}.video-card{width:min(74vh,88vw);height:min(74vh,88vw);background:rgba(255,255,255,.82);backdrop-filter:blur(6px);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px}.video-frame{width:100%;height:calc(100% - 54px);display:flex;align-items:center;justify-content:center;border-radius:16px;background:rgba(15,23,42,.08);overflow:hidden}.video-frame video{max-width:100%;max-height:100%;width:auto;height:auto;border-radius:12px;background:#000}.video-close{background:rgba(107,114,128,.55)!important;color:#fff!important;border:none!important}.video-download-btn{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);background:rgba(15,23,42,.55);color:#fff;border-color:rgba(255,255,255,.28);backdrop-filter:blur(4px)}.video-download-btn:hover{background:rgba(15,23,42,.72)}@media(max-width:900px){.task-video-divider{display:none}.task-video-box{align-items:flex-start}.task-left{grid-template-columns:82px minmax(0,1fr)}}

/* 本次修复：任务卡片三栏对齐、左侧扇形图靠最左、提示词按钮可点击、视频分割线紧贴预览区且左右留白一致 */
.task-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:none!important;
  align-items:stretch!important;
  min-height:136px;
  gap:0!important;
  overflow:hidden;
}
.task-left{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:stretch!important;
  min-width:0;
}
.task-left .fan{
  grid-area:auto!important;
  width:92px!important;
  height:100%!important;
  min-height:112px;
  align-self:stretch;
  position:relative;
  margin:0;
}
.task-left .fan img{
  width:62px!important;
  height:62px!important;
  border-radius:12px!important;
  object-fit:cover;
  border:2px solid #fff;
  box-shadow:0 4px 12px rgba(15,23,42,.18);
}
.task-left .fan img:nth-child(1){left:2px!important;top:50%!important;transform:translateY(-50%) rotate(-10deg)!important;z-index:1}
.task-left .fan img:nth-child(2){left:18px!important;top:50%!important;transform:translateY(-50%) rotate(3deg)!important;z-index:2}
.task-left .fan img:nth-child(3){left:34px!important;top:50%!important;transform:translateY(-50%) rotate(12deg)!important;z-index:3}
.task-main{
  grid-area:auto!important;
  min-width:0;
  display:flex!important;
  flex-direction:column;
  justify-content:space-between;
  align-items:stretch;
  padding:4px 0 2px;
  text-align:left;
}
.task-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  min-width:0;
  line-height:1.2;
}
.task-head strong{
  flex:0 0 auto;
  max-width:none!important;
  display:inline!important;
  font-size:14px!important;
  font-weight:900!important;
  color:#111827;
  white-space:nowrap;
}
.task-head .task-time{
  grid-area:auto!important;
  flex:0 1 auto;
  min-width:0;
  font-size:12px!important;
  font-weight:500!important;
  color:#667085!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.task-head .badge{flex:0 0 auto}
.task-prompt,.task-main p.task-prompt{
  width:100%;
  max-width:100%!important;
  flex:1 1 auto;
  margin:7px 0 6px!important;
  padding:0;
  font-size:12px;
  line-height:1.45;
  color:#667085;
  text-align:left;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.task-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.task-info{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  min-width:0;
  color:#8a94a6;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
}
.task-info span{flex:0 0 auto}
.task-actions{
  grid-area:auto!important;
  flex:0 0 auto;
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  position:relative;
  z-index:3;
}
.task-actions button{position:relative;z-index:4;white-space:nowrap}
.task-video-area{
  display:grid;
  grid-template-columns:1px 112px;
  align-items:center;
  align-self:stretch;
  min-width:113px;
  margin-left:12px;
}
.task-video-area .task-video-divider{
  display:block;
  width:1px;
  height:100%;
  background:#e5e7eb;
  align-self:stretch;
}
.task-video-area .task-video-box{
  width:112px;
  min-width:112px;
  min-height:112px;
  display:flex;
  flex-direction:column;
  align-items:center!important;
  justify-content:center;
  gap:8px;
  padding:0;
}
.task-video-area .task-cover{
  width:88px!important;
  height:88px!important;
}
.task-video-area video.task-cover{display:block;object-fit:cover;background:#000}
.task-video-area .download-video{
  width:88px!important;
  text-align:center;
}
.task-video-area .empty-video{min-height:112px}
.task-error,.task-poll-note{max-width:100%;text-align:left}
@media(max-width:900px){
  .task-card{grid-template-columns:1fr!important;gap:8px!important}
  .task-left{grid-template-columns:92px minmax(0,1fr)!important}
  .task-video-area{grid-template-columns:1px 112px;margin-left:104px;min-height:112px}
}


/* 本次优化：视频预览浮窗放大、不透明，下载按钮放到视频区域下方，避免遮挡 9:16 视频 */
.video-card{
  width:min(920px,96vw)!important;
  height:min(980px,92vh)!important;
  background:#fff!important;
  backdrop-filter:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:stretch!important;
  gap:12px!important;
  padding:18px!important;
}
.video-frame{
  position:relative!important;
  flex:1 1 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  background:#111827!important;
}
.video-frame video{
  max-width:100%!important;
  max-height:100%!important;
  width:auto!important;
  height:auto!important;
  transition:opacity .16s ease;
}
.video-frame.has-preview-error video{opacity:.16}
.video-preview-notice{position:absolute;z-index:2;left:50%;top:50%;width:min(360px,calc(100% - 32px));transform:translate(-50%,-50%);padding:10px 12px;border:1px solid rgba(255,255,255,.24);border-radius:10px;background:rgba(15,23,42,.78);color:#fff;font-size:13px;font-weight:700;line-height:1.5;text-align:center;pointer-events:none}
.video-preview-notice.hidden{display:none}
.video-preview-notice.is-network,.video-preview-notice.is-unknown{background:rgba(30,41,59,.78)}
.video-download-btn{
  position:static!important;
  left:auto!important;
  bottom:auto!important;
  transform:none!important;
  flex:0 0 auto!important;
  align-self:center!important;
  background:#111827!important;
  color:#fff!important;
  border-color:#111827!important;
  backdrop-filter:none!important;
}
.video-download-btn:hover{background:#020617!important}
.task-poll-note{display:none!important}

/* 新增：高级参数设置浮窗，替代主参数行中的帧间隔输入 */
.option-panel{overflow:visible;z-index:20}
.option-row{grid-template-columns:repeat(3,minmax(0,1fr))}
.advanced-wrap{position:relative;display:flex;justify-content:flex-end;min-height:34px;z-index:25}
.advanced-btn{height:34px;min-width:132px;font-weight:700;background:#fbfcff}
.advanced-popup{position:absolute;left:0;right:0;bottom:calc(100% + 8px);z-index:60;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px;box-shadow:0 18px 42px rgba(15,23,42,.18);max-height:min(320px,calc(100vh - 220px));overflow:auto}
.advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-items:end}
.advanced-grid label{font-size:12px;color:#5f6b7d;display:flex;flex-direction:column;gap:4px;min-width:0;font-weight:600}
.advanced-grid input,.advanced-grid select{height:34px;width:100%;min-width:0;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff;color:#1d2433;font-weight:500}
.advanced-grid input:focus,.advanced-grid select:focus{outline:none;border-color:#222a36;box-shadow:0 0 0 3px rgba(34,42,54,.08)}
@media(max-height:760px){.advanced-popup{max-height:min(270px,calc(100vh - 150px));padding:10px}.advanced-grid{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.advanced-btn{height:32px}.advanced-grid input,.advanced-grid select{height:32px}}
@media(max-width:900px){.option-row{grid-template-columns:repeat(3,minmax(0,1fr))}.advanced-popup{left:0;right:0;max-height:min(300px,60vh)}.advanced-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.option-row{grid-template-columns:1fr}.advanced-grid{grid-template-columns:1fr}.advanced-wrap{justify-content:stretch}.advanced-btn{width:100%}}

/* 本次修复：高级参数按钮与分辨率/时长/生成条数同排等宽；弹窗仍从按钮处展开 */
.option-row{grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:end}
.advanced-wrap{width:100%;min-width:0;align-self:end;justify-content:stretch!important}
.advanced-btn{width:100%!important;min-width:0!important;height:34px!important;border-radius:10px!important;padding:0 8px!important;white-space:nowrap}
.advanced-popup{left:auto!important;right:0!important;width:min(520px,calc(100vw - 32px))!important;bottom:calc(100% + 8px)!important}
@media(max-width:900px){.option-row{grid-template-columns:repeat(4,minmax(0,1fr))!important}.advanced-popup{right:0!important;left:auto!important}}
@media(max-width:560px){.option-row{grid-template-columns:1fr!important}.advanced-wrap{justify-content:stretch!important}.advanced-popup{left:0!important;right:0!important;width:auto!important}}

/* 本次调整：上传图片列表缩略图固定为 1:1，保留原有横向图片列表与操作逻辑 */
.image-shelf{height:162px}
.image-list{align-items:stretch;scrollbar-gutter:stable}
.image-card{flex:0 0 112px;width:112px;height:126px;padding:6px;display:flex;flex-direction:column;gap:4px;overflow:hidden;background:linear-gradient(180deg,#fff,#fbfcff);box-shadow:0 4px 12px rgba(15,23,42,.04)}
.image-card img{width:66px!important;height:66px!important;aspect-ratio:1/1;object-fit:cover;border-radius:12px;margin:0 auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);background:#eef2f7;flex:0 0 auto}
.image-card .name{margin-top:0;line-height:1.25;text-align:center;min-height:14px}
.image-card .row{margin-top:auto;gap:4px;flex:0 0 auto}
.image-card .row button{min-width:0;height:22px;line-height:1;padding:0 4px}
.image-error{position:absolute;left:6px;right:6px;bottom:30px;margin-top:0;padding:1px 4px;border-radius:6px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px rgba(190,18,60,.08);text-align:center}
@media(max-height:760px){.image-shelf{height:144px}.image-card{flex-basis:102px;width:102px;height:110px;padding:5px;gap:3px}.image-card img{width:54px!important;height:54px!important;border-radius:10px}.image-card .row button{height:20px;font-size:10px}.image-error{bottom:27px}}
@media(max-width:900px){.image-shelf{height:154px}.image-card{height:118px}.image-card img{width:60px!important;height:60px!important}}

/* 文档优化：任务卡片略增高度，避免内容溢出；失败任务在视频按钮区域显示重新生成 */
.task-card{min-height:152px!important;}
.task-left .fan{min-height:128px!important;}
.task-video-area .task-video-box,.task-video-area .empty-video{min-height:128px!important;}
.task-video-area .retry-generate{width:88px!important;text-align:center;}


/* 客户端卡密状态与配置窗口 */
.license-card{min-width:220px;height:50px;padding:7px 12px;border-radius:14px;background:#f7f9fd;border:1px solid #e8edf6;display:flex;flex-direction:column;justify-content:center}
.license-card span{font-size:11px;color:#8a94a6}.license-card strong{font-size:13px}.license-card em{font-size:11px;color:#667085;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}.modal-label{display:flex;flex-direction:column;gap:6px;margin:8px 0 10px;font-size:13px;color:#4b5563}.modal-label input{height:38px;border:1px solid #dfe5ee;border-radius:12px;padding:0 10px;background:#fff}.client-config-bottom{display:flex!important;justify-content:flex-end!important;grid-template-columns:none!important}.client-config-bottom .primary{width:auto!important;min-width:180px}.config-card textarea#licenseTextInput{min-height:250px}
@media(max-width:900px){.top-actions{flex-wrap:wrap;justify-content:flex-end}.license-card{min-width:180px}.topbar{height:auto;min-height:92px}.grid{grid-template-rows:minmax(0,1.05fr) minmax(136px,.5fr) minmax(0,1fr)}}

/* 本次调整：服务器连通测试按钮 + 卡密验证阶段详细错误展示 */
.client-config-bottom{gap:10px;align-items:center;flex-wrap:wrap}
.client-config-bottom button{width:auto!important;min-width:160px;height:40px}
.client-config-bottom .primary{min-width:180px!important}
.config-card .modal-msg{white-space:pre-wrap;word-break:break-word;max-height:170px;overflow:auto;border-radius:10px;padding:0;font-family:Consolas,"Microsoft YaHei",monospace}
.config-card .modal-msg:not(:empty){padding:8px 10px;background:#fff7f8;border:1px solid #fecdd3}
.config-card .modal-msg:not(:empty){color:inherit}
@media(max-width:560px){.client-config-bottom button{width:100%!important}.client-config-bottom .primary{width:100%!important}}

.config-card .modal-msg.config-msg-success:not(:empty){background:#ecfdf3!important;border-color:#86efac!important;color:#065f46!important}
.config-card .modal-msg.config-msg-error:not(:empty){background:#fff1f2!important;border-color:#fda4af!important;color:#9f1239!important}


/* Final client cleanup: fixed backend, no IP card, readable license/quota, preserved prompt line breaks. */
.top-actions{flex-wrap:wrap;justify-content:flex-end;max-width:620px}
.top-actions{flex-wrap:nowrap;align-items:center;max-width:none}
.license-card{min-width:310px!important;max-width:390px!important;height:auto!important;min-height:54px!important;padding:8px 12px!important}
.license-card strong,.license-card em{display:block;max-width:100%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}
.editor{white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.config-card{width:min(680px,94vw)!important;height:min(560px,88vh)!important}
.config-card textarea#licenseTextInput{min-height:300px!important}
.client-config-bottom{justify-content:flex-end!important;gap:10px!important}
.modal-msg{line-height:1.5!important}
@media(max-width:900px){.top-actions{justify-content:flex-start;max-width:100%}.license-card{min-width:260px!important;max-width:100%!important}.topbar{height:auto!important;min-height:92px!important}}
@media(max-width:900px){.top-actions{flex-wrap:wrap;max-width:100%}}

/* Asset library and concurrency update */
.prompt-section-title{gap:10px}
.prompt-upload-actions{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:8px}
.asset-open-btn{min-width:78px;background:#0b2a5b!important;border-color:#0b2a5b!important;color:#fff!important;font-weight:700}
.asset-open-btn:hover{background:#071f44!important;border-color:#071f44!important}
.image-generator-entry{display:inline-flex;align-items:center;justify-content:center;min-width:78px;height:30px;border:1px solid #5b4cff;border-radius:10px;background:linear-gradient(135deg,#2c77ff,#7557ff);color:#fff!important;font-weight:700;text-decoration:none;white-space:nowrap}
.image-generator-entry:hover{filter:brightness(1.1)}
.asset-modal{background:rgba(2,6,23,.58)!important}
.asset-card{width:75vw!important;height:75vh!important;max-width:none!important;max-height:none!important;background:#111827!important;color:#f8fafc!important;border:1px solid rgba(148,163,184,.35)!important;border-radius:20px!important;box-shadow:0 28px 80px rgba(0,0,0,.42)!important;display:flex!important;flex-direction:column!important;gap:12px!important;padding:18px!important;overflow:hidden!important}
.asset-close,.asset-preview-close{background:#ef4444!important;color:#fff!important;border:none!important;font-size:22px!important;line-height:1!important}
.asset-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;padding-right:38px}
.asset-head h2{font-size:18px;color:#fff;margin:0 0 6px}
.asset-head p{margin:0;color:#aab4c4;font-size:12px;line-height:1.45}
.asset-head-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.asset-head-actions .small{height:32px;min-width:88px}
.asset-grid{position:relative;flex:1 1 auto;min-height:0;overflow:auto;border:1px dashed rgba(148,163,184,.42);border-radius:16px;padding:14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:14px;align-content:start;background:rgba(15,23,42,.82);user-select:none}
.asset-grid.empty{display:flex;align-items:center;justify-content:center;text-align:center;color:#94a3b8;font-size:14px;cursor:pointer}
.asset-card.over .asset-grid,.asset-grid:hover{border-color:#93c5fd;background:rgba(15,23,42,.92)}
.asset-item{position:relative;min-width:0;border:1px solid rgba(148,163,184,.24);border-radius:16px;background:#1f2937;padding:10px;display:flex;flex-direction:column;gap:8px;overflow:hidden;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.asset-item.selected{outline:3px solid #60a5fa;border-color:#bfdbfe;background:#24344a}
.asset-item img{width:100%;aspect-ratio:1/1;height:auto;object-fit:cover;border-radius:12px;background:#0f172a;display:block;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.asset-name-row{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:24px}
.asset-name{font-size:13px;line-height:1.3;max-width:calc(100% - 24px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;color:#e5e7eb}
.asset-rename{width:18px;height:18px;min-width:18px;padding:0!important;border:none!important;background:transparent!important;color:#cbd5e1!important;border-radius:4px!important;font-size:14px!important;line-height:18px!important}
.asset-rename:hover{background:rgba(148,163,184,.18)!important;color:#fff!important}
.asset-name-input{width:100%;height:24px;border:1px solid #60a5fa;border-radius:8px;background:#0f172a;color:#fff;text-align:center;padding:0 6px;outline:none;font-size:13px}
.asset-selection-box{position:absolute;z-index:6;border:1px solid #60a5fa;background:rgba(96,165,250,.18);pointer-events:none;border-radius:6px}
.asset-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;min-height:38px}
#assetMsg{font-size:12px;color:#bbf7d0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
#assetMsg.bad{color:#fecdd3}
.asset-delete-all,.asset-delete-selected{height:36px;min-width:138px;font-weight:700;color:#fff!important;border:none!important;flex:0 0 auto}
.asset-delete-all{background:#dc2626!important}
.asset-delete-all:hover{background:#b91c1c!important}
.asset-delete-selected{background:#6b7280!important}
.asset-delete-selected:hover{background:#4b5563!important}
.asset-delete-all:disabled,.asset-delete-selected:disabled{opacity:.45;cursor:not-allowed}
.asset-preview-modal{background:rgba(2,6,23,.72)!important;cursor:zoom-out}
.asset-preview-card{width:min(920px,90vw)!important;height:min(880px,88vh)!important;background:#0b1120!important;border:1px solid rgba(148,163,184,.35)!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:18px!important;cursor:zoom-out}
.asset-preview-card img{max-width:100%;max-height:100%;object-fit:contain;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.45)}
@media(max-width:900px){.asset-card{width:92vw!important;height:82vh!important}.asset-head{align-items:flex-start;flex-direction:column}.asset-head-actions{width:100%;justify-content:flex-end}.asset-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}.prompt-upload-actions{gap:6px}.asset-open-btn{min-width:72px}}

/* Task restore/reroll additions */
.task-actions{flex-direction:column!important;align-items:flex-end!important;justify-content:center!important;gap:6px!important}
.task-actions .reroll-task,.task-actions .use{width:88px!important;text-align:center!important}
.status-restoring{border-color:#d1d5db;background:#f9fafb}


/* Project optimization: per-card task selection and short-card notices */
.hidden{display:none!important}
.task-title-actions{display:flex;align-items:center;gap:8px}
.task-title-actions .danger{background:#be123c!important;border-color:#be123c!important;color:#fff!important;font-weight:700}
.task-title-actions .danger:hover{background:#9f1239!important;border-color:#9f1239!important}
.task-card{position:relative!important}
.task-card .fan{margin-left:18px}
.config-card textarea#licenseTextInput{min-height:76px!important;height:86px!important;max-height:96px!important;line-height:1.45!important;font-size:13px!important;resize:none!important}
.config-card{height:auto!important;min-height:0!important;max-height:min(460px,88vh)!important}
.expire-notice-modal{background:rgba(15,23,42,.42)!important;z-index:80!important}
.expire-notice-card{width:min(560px,92vw)!important;min-height:310px!important;padding:30px 32px 20px!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;text-align:center!important}
.expire-notice-content{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:0}
.expire-notice-content .notice-line{margin:0;text-align:center;line-height:1.7;font-size:20px;color:#111827;font-weight:400}
.expire-notice-content .notice-line-2{margin-top:44px}
.expire-notice-content .notice-line-3{margin-top:44px;color:#dc2626!important;font-weight:800!important;font-size:24px!important}
.expire-notice-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:24px}
.notice-skip{font-size:13px;color:#4b5563;display:flex;align-items:center;gap:6px;user-select:none}
#expireNoticeCloseBtn{min-width:96px;height:38px}
@media(max-width:560px){.expire-notice-card{padding:24px 18px 18px!important}.expire-notice-content .notice-line{font-size:17px}.expire-notice-content .notice-line-3{font-size:21px!important}.expire-notice-footer{align-items:stretch;flex-direction:column}.notice-skip{justify-content:flex-start}#expireNoticeCloseBtn{width:100%}}


/* Fixed prompt content box */
.fixed-prompt-wrap{display:flex;flex-direction:column;gap:6px;margin-top:8px;flex:0 0 auto;font-size:12px;color:#6c7586}
.fixed-prompt-wrap span{font-weight:700;color:#4b5563}
.fixed-prompt-input{width:100%;min-height:66px;max-height:118px;resize:vertical;border:1px solid #dfe5ee;border-radius:14px;background:#fbfcff;padding:10px 12px;outline:none;line-height:1.45;font-size:13px;font-family:inherit;color:#1d2433}
.fixed-prompt-input:focus{border-color:#94a3b8;background:#fff}
@media(max-height:760px){.fixed-prompt-input{min-height:50px;max-height:84px}.fixed-prompt-wrap{margin-top:6px}}


/* Project optimization requested in uploaded document: image re-upload, stable task previews, and tighter task-left layout */
.image-list.over{border-color:#222a36;background:#f3f6fb}
.image-card .row .reupload{font-weight:700}
.task-card{padding:8px 12px 10px 8px!important}
.task-left{grid-template-columns:76px minmax(0,1fr)!important;gap:8px!important}
.task-left .fan{width:76px!important;min-height:128px!important;margin-left:0!important;transform:translateX(-4px)}
.task-left .fan img{width:58px!important;height:58px!important}
.task-left .fan img:nth-child(1){left:0!important}
.task-left .fan img:nth-child(2){left:12px!important}
.task-left .fan img:nth-child(3){left:24px!important}
@media(max-width:900px){.task-left{grid-template-columns:76px minmax(0,1fr)!important}.task-video-area{margin-left:88px!important}}


/* Requested update pack: upload retry, task toolbar, edit prompt dialog, desktop download, server selector, and compact desktop scale. */
.success{background:#16a34a!important;border-color:#16a34a!important;color:#fff!important;font-weight:700}.success:hover{background:#15803d!important;border-color:#15803d!important}.image-card .row.single{justify-content:center}.image-card .row.single button{flex:0 0 64px}.image-card .row.dual{justify-content:center}.image-card .row.dual button{flex:0 0 58px}.image-card .retry-upload{font-weight:700}.task-section-title{display:grid!important;grid-template-columns:auto 1fr auto;align-items:center;gap:10px}.task-section-title h2{text-align:center}.task-title-actions{justify-content:flex-end}.task-actions{flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;flex-wrap:wrap}.task-actions .reroll-task,.task-actions .use,.task-actions .modify-prompt{width:88px!important;text-align:center!important}.badge.waiting{background:#eef2ff;color:#3730a3}.status-queued{border-color:#c7d2fe;background:#f8faff}.status-submitting{border-color:#fde68a;background:#fffbeb}.edit-prompt-card{width:min(860px,94vw);height:min(720px,90vh);display:flex;flex-direction:column;gap:12px;padding:18px}.edit-prompt-head{display:flex;align-items:center;justify-content:space-between;padding-right:36px}.edit-image-shelf{height:150px;margin-bottom:0}.edit-prompt-editor{min-height:220px;flex:1}.edit-prompt-send{position:absolute;right:18px;bottom:18px;width:44px;height:44px;border-radius:50%!important;background:#111827!important;color:#fff!important;border-color:#111827!important;font-size:20px!important;line-height:1!important;padding:0!important;display:flex;align-items:center;justify-content:center}.download-card{width:min(560px,92vw)}.download-card h2{margin-bottom:14px}.download-path-row{display:flex;gap:8px;align-items:center}.download-path-row input{flex:1;height:34px;border:1px solid #dfe5ee;border-radius:10px;padding:0 10px}.download-modal-actions{display:flex;justify-content:flex-end;margin-top:16px}.confirm-delete-card{width:min(420px,90vw);text-align:center}.confirm-delete-card p{margin:14px 8px 20px;font-size:15px}.confirm-actions{display:flex;justify-content:center;gap:14px}.confirm-actions button{min-width:96px}.danger-confirm{background:#be123c!important;border-color:#be123c!important}.client-server-picker{position:relative;margin:8px 0 10px}.client-server-picker label{display:block;font-size:12px;color:#667085;margin-bottom:6px}.client-server-select{width:100%;height:38px;display:flex;align-items:center;justify-content:space-between;border:1px solid #dfe5ee;background:#fff;border-radius:12px;padding:0 12px}.client-server-drawer{position:absolute;left:0;right:0;top:64px;z-index:5;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 14px 36px rgba(15,23,42,.16);padding:6px;max-height:190px;overflow:auto}.client-server-item{height:34px;border-radius:10px;padding:0 10px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:13px}.client-server-item:hover,.client-server-item.active{background:#f3f6fb;font-weight:700}.client-config-bottom{display:flex!important;justify-content:flex-end!important}.client-config-bottom .primary{min-width:150px!important}.config-card{max-height:min(520px,88vh)!important}.modal.click-close{cursor:pointer}.modal.click-close .modal-card{cursor:auto}
@media(max-height:760px){.edit-prompt-card{height:92vh}.edit-image-shelf{height:118px}.edit-prompt-editor{min-height:160px}.task-actions .reroll-task,.task-actions .use,.task-actions .modify-prompt{width:82px!important}}
@media (max-aspect-ratio:16/9) and (max-height:820px){.app-shell{transform:scale(.9);transform-origin:top left;width:111.111vw;height:111.111vh}}


/* Requested final adjustment: hide server URLs, replace drawer chevrons, and keep task buttons right aligned. */
.client-server-select .select-caret{width:8px;height:8px;border-right:2px solid #667085;border-bottom:2px solid #667085;transform:rotate(45deg);margin-left:10px;flex:0 0 auto}
.client-server-select[aria-expanded="true"] .select-caret{transform:rotate(225deg);margin-top:4px}
.client-server-item{justify-content:flex-start!important}
.client-server-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.client-server-item em{display:none!important}
.task-actions{flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;flex-wrap:wrap}
.task-actions .reroll-task,.task-actions .modify-prompt,.task-actions .use{width:88px!important;text-align:center!important}
@media(max-height:760px){.task-actions .reroll-task,.task-actions .modify-prompt,.task-actions .use{width:82px!important}}


/* Web-only download modal modes */
.download-card{width:min(560px,92vw)!important;padding:18px!important}
.download-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:18px}
.download-mode-tab{height:36px;border-radius:12px;border:1px solid #dfe5ee;background:#f8fafc;color:#334155;font-weight:700}
.download-mode-tab.active{background:#111827;color:#fff;border-color:#111827}
.download-mode-panel{display:none;gap:14px}
.download-modal[data-mode="download"] .download-directory-panel{display:flex;flex-direction:column}
.download-modal[data-mode="package"] .download-package-panel{display:flex;flex-direction:column}
.download-main-input{width:100%;height:40px;border:1px solid #dfe5ee;border-radius:12px;padding:0 12px;font-size:14px;background:#fff;color:#111827}
.download-modal-actions{display:flex!important;justify-content:flex-end!important;gap:10px!important;margin-top:0!important}
.download-modal-actions .primary{min-width:92px}


/* Compact source controls: model and aspect ratio occupy the unused right side. */
.option-panel{gap:8px}
.source-row{display:grid;grid-template-columns:minmax(160px,.9fr) minmax(250px,1.35fr) minmax(360px,1.65fr);gap:12px;align-items:end;min-width:0}
.source-row .channel-picker,.source-row .model-picker{margin:0;min-width:0}
.source-row .channel-picker select{max-width:none;width:100%}
.source-row .model-picker-row{max-width:none}
.ratio-picker{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;color:#4b5563}
.ratio-row{display:flex;flex-wrap:nowrap;gap:6px;min-width:0}
.ratio{width:52px;height:34px;flex:1;min-width:0;flex-direction:row;gap:4px;border-radius:8px;padding:3px;font-size:11px}
.ratio-visual{width:22px;height:22px;flex:0 0 22px}
.rect{border-radius:3px}
.r916{width:10px;height:18px}.r169{width:18px;height:10px}.r43{width:16px;height:12px}.r34{width:12px;height:16px}.r11{width:14px;height:14px}
@media(max-width:1120px){.source-row{grid-template-columns:minmax(140px,.85fr) minmax(220px,1.25fr) minmax(280px,1.4fr);gap:8px}.ratio{width:46px;font-size:10px}.ratio-visual{width:18px;height:18px;flex-basis:18px}}
@media(max-width:900px){.source-row{grid-template-columns:repeat(2,minmax(0,1fr))}.ratio-picker{grid-column:1 / -1}.ratio-row{max-width:360px}.ratio{flex:0 0 58px}}
@media(max-width:560px){.source-row{grid-template-columns:1fr}.ratio-picker{grid-column:auto}.ratio-row{max-width:none}.ratio{flex:1}}


/* Requested download notices and readable license verification result. */
.config-card .modal-msg{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif!important;font-size:14px!important;font-weight:700!important;line-height:1.55!important;letter-spacing:.01em!important}
.download-notice{position:fixed;left:50%;top:18%;transform:translate(-50%,-50%);z-index:2147483647;min-width:126px;max-width:min(360px,calc(100vw - 32px));padding:7px 14px;border-radius:999px;text-align:center;font-size:13px;font-weight:800;line-height:1.35;box-shadow:0 10px 28px rgba(15,23,42,.18);pointer-events:none;animation:downloadNoticeIn .16s ease-out}
.download-notice-ok{background:#dcfce7;border:1px solid #86efac;color:#166534}
.download-notice-fail{background:#fee2e2;border:1px solid #fca5a5;color:#b91c1c}
@keyframes downloadNoticeIn{from{opacity:0;transform:translate(-50%,-62%)}to{opacity:1;transform:translate(-50%,-50%)}}

/* Unified account entry, auth modes, and optional monochrome theme. */
.account-entry{display:inline-flex;align-items:center;justify-content:center;border:1px solid #dfe5ee;border-radius:12px;padding:9px 13px;background:#fff;color:#2a3344;font-family:inherit;font-size:13px;font-weight:700;line-height:normal;text-decoration:none;white-space:nowrap;cursor:pointer}
.account-entry:hover{background:#f4f7fb}
.prompt-upload-actions button{height:30px;font-family:inherit;white-space:nowrap}
.auto-edit-top-entry{background:#111827!important;color:#fff!important;border-color:#111827!important;font-weight:800}
.theme-toggle{gap:5px;min-width:68px}
.theme-toggle span{font-size:1em;line-height:1}
.theme-toggle b{font:inherit;color:inherit}
.theme-toggle.active{background:#111827;color:#fff;border-color:#111827}
.auth-mode-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:2px 0 4px;max-width:420px}
.auth-mode-tab{height:36px;padding:5px 8px;border-radius:10px;font-size:13px;font-weight:700;background:#f8fafc;color:#4b5563}
.auth-mode-tab.active{background:#111827;color:#fff;border-color:#111827}
.auth-mode-tab[aria-selected="false"]{opacity:.82}
.auth-optional-field[hidden]{display:none!important}
.auth-current-password-field{display:none}
.auth-secondary-action{display:none!important}
@media(max-width:700px){.top-actions{gap:6px}.account-entry{font-size:11px;padding:6px 8px}.theme-toggle{min-width:58px;padding:6px 8px}.license-card{min-width:0!important;flex:1 1 160px}.credit-card{flex:0 0 auto}}

html[data-theme="mono"] body{background:#fff;color:#000}
html[data-theme="mono"] .topbar,html[data-theme="mono"] .panel,html[data-theme="mono"] .modal-card{background:#fff;border-color:#000;box-shadow:none}
html[data-theme="mono"] .topbar p,html[data-theme="mono"] .hint,html[data-theme="mono"] .status-line,html[data-theme="mono"] .license-card span,html[data-theme="mono"] .license-card em,html[data-theme="mono"] .credit-card span,html[data-theme="mono"] .credit-card em,html[data-theme="mono"] label{color:#333}
html[data-theme="mono"] button,html[data-theme="mono"] input,html[data-theme="mono"] select,html[data-theme="mono"] textarea{background:#fff;color:#000;border-color:#000}
html[data-theme="mono"] button:hover,html[data-theme="mono"] .auth-mode-tab.active,html[data-theme="mono"] .theme-toggle.active,html[data-theme="mono"] .primary,html[data-theme="mono"] .send-btn{background:#000!important;color:#fff!important;border-color:#000!important}
html[data-theme="mono"] .editor,html[data-theme="mono"] .image-shelf,html[data-theme="mono"] .image-card,html[data-theme="mono"] .task-card,html[data-theme="mono"] .credit-card,html[data-theme="mono"] .license-card{background:#fff;border-color:#000}
html[data-theme="mono"] .editor:empty:before,html[data-theme="mono"] .image-list.empty,html[data-theme="mono"] .task-list.empty{color:#555}
html[data-theme="mono"] .modal{background:rgba(0,0,0,.65)}
html[data-theme="mono"] .badge,html[data-theme="mono"] .badge.ok,html[data-theme="mono"] .badge.waiting,html[data-theme="mono"] .badge.processing,html[data-theme="mono"] .badge.fail{background:#fff;color:#000;border:1px solid #000}
html[data-theme="mono"] .danger,html[data-theme="mono"] .danger-confirm{background:#000!important;color:#fff!important;border-color:#000!important}

/* Keep the account form inside the dialog when the password reset fields are shown. */
#configModal .config-card{overflow-y:auto}

/* Account balance is compact so it remains readable beside the login status. */
.credit-card{min-width:86px;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:7px 10px;border:1px solid #e9edf5;border-radius:12px;background:#fbfcff;line-height:1.1}
.credit-card span{font-size:10px;color:#7a8497}.credit-card strong{font-size:15px;color:#222a36;font-variant-numeric:tabular-nums}.credit-card em{font-size:10px;color:#8a94a6;font-style:normal;white-space:nowrap}
.credit-card.low strong{color:#be123c}.credit-card.ok strong{color:#027a48}
@media(max-width:620px){.credit-card{min-width:78px;padding:6px 8px}.credit-card em{display:none}}

/* The monochrome switch is a full black theme with high contrast controls. */
html[data-theme="mono"]{color-scheme:dark;background:#030405}
html[data-theme="mono"] body{background:#030405;color:#f5f7fa}
html[data-theme="mono"] .topbar,
html[data-theme="mono"] .panel,
html[data-theme="mono"] .modal-card{background:#0a0d12;border-color:#27303c;box-shadow:0 12px 32px rgba(0,0,0,.48)}
html[data-theme="mono"] h1,
html[data-theme="mono"] h2,
html[data-theme="mono"] .section-title,
html[data-theme="mono"] .topbar p,
html[data-theme="mono"] .hint,
html[data-theme="mono"] .status-line,
html[data-theme="mono"] label,
html[data-theme="mono"] .ratio-picker,
html[data-theme="mono"] .model-picker,
html[data-theme="mono"] .channel-picker{color:#f5f7fa}
html[data-theme="mono"] .topbar p,
html[data-theme="mono"] .hint,
html[data-theme="mono"] .status-line,
html[data-theme="mono"] label,
html[data-theme="mono"] .ratio-picker,
html[data-theme="mono"] .model-picker{color:#aeb8c7}
html[data-theme="mono"] button,
html[data-theme="mono"] input,
html[data-theme="mono"] select,
html[data-theme="mono"] textarea,
html[data-theme="mono"] .client-server-select{background:#0f141c;color:#f5f7fa;border-color:#344052}
html[data-theme="mono"] .fixed-prompt-wrap span{color:#aeb8c7}
html[data-theme="mono"] .fixed-prompt-input{background:#0f141c;color:#f5f7fa;caret-color:#f5f7fa;border-color:#344052}
html[data-theme="mono"] .fixed-prompt-input:focus{background:#111b27;color:#f5f7fa;border-color:#7ea7d2}
html[data-theme="mono"] .fixed-prompt-input::placeholder{color:#9daabb;opacity:1}
html[data-theme="mono"] .model-picker select:disabled{background:#0f141c;color:#8f9bad;border-color:#344052}
html[data-theme="mono"] .ratio{background:#0f141c;color:#f5f7fa;border-color:#344052}
html[data-theme="mono"] .ratio.active{background:#f5f7fa;color:#050608;border-color:#f5f7fa}
html[data-theme="mono"] .ref-tag{background:#f5f7fa;border-color:#cbd5e1;color:#050608!important}
html[data-theme="mono"] .ref-tag b{color:#dc2626!important}
html[data-theme="mono"] button:hover{background:#1b2430!important;border-color:#6b7b91}
html[data-theme="mono"] .primary,
html[data-theme="mono"] .send-btn,
html[data-theme="mono"] .theme-toggle.active,
html[data-theme="mono"] .auth-mode-tab.active{background:#f5f7fa!important;color:#050608!important;border-color:#f5f7fa!important}
html[data-theme="mono"] .editor,
html[data-theme="mono"] .image-shelf,
html[data-theme="mono"] .image-list.empty,
html[data-theme="mono"] .task-list.empty,
html[data-theme="mono"] .image-card,
html[data-theme="mono"] .task-card,
html[data-theme="mono"] .credit-card,
html[data-theme="mono"] .license-card{background:#080b10;border-color:#27303c;color:#f5f7fa}
html[data-theme="mono"] .editor:empty:before,
html[data-theme="mono"] .image-list.empty,
html[data-theme="mono"] .task-list.empty,
html[data-theme="mono"] .task-main p,
html[data-theme="mono"] .task-main em,
html[data-theme="mono"] .task-info,
html[data-theme="mono"] .credit-card span,
html[data-theme="mono"] .credit-card em,
html[data-theme="mono"] .license-card span,
html[data-theme="mono"] .license-card em{color:#8f9bad}
html[data-theme="mono"] .license-card strong,
html[data-theme="mono"] .credit-card strong,
html[data-theme="mono"] .task-head strong{color:#f5f7fa}
html[data-theme="mono"] .auth-mode-tab{background:#111720;color:#d3dae4;border-color:#344052}
html[data-theme="mono"] .client-server-drawer{background:#0d1219;border-color:#344052}
html[data-theme="mono"] .client-server-item:hover,
html[data-theme="mono"] .client-server-item.active{background:#1b2430}
html[data-theme="mono"] .modal{background:rgba(0,0,0,.78)}
html[data-theme="mono"] .badge,
html[data-theme="mono"] .badge.ok,
html[data-theme="mono"] .badge.waiting,
html[data-theme="mono"] .badge.processing,
html[data-theme="mono"] .badge.fail{background:#111720;color:#f5f7fa;border-color:#526176}
html[data-theme="mono"] .status-succeed{background:#0b1712;border-color:#24543b}
html[data-theme="mono"] .status-failed,
html[data-theme="mono"] .status-submit_failed{background:#1a0d11;border-color:#6a2835}

/* Only the model is selectable now; its resolution is fixed by model metadata/config. */
.source-row{grid-template-columns:minmax(220px,.9fr) minmax(170px,.7fr) minmax(360px,1.5fr);align-items:start}
.resolution-picker{display:flex;flex-direction:column;gap:4px;min-width:0;font-size:12px;color:#4b5563}
.resolution-picker .model-resolution-select{width:100%;max-width:none}
.model-picker .model-picker-row{align-items:center}
.model-picker-row > #refreshMeaiccModelsBtn{flex:0 0 48px!important;width:48px!important;min-width:48px!important;max-width:48px!important;padding:0 6px!important;white-space:nowrap!important;word-break:keep-all!important;overflow:hidden!important;text-overflow:clip!important;text-align:center!important}
.option-row{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1120px){.source-row{grid-template-columns:minmax(190px,.9fr) minmax(150px,.7fr) minmax(280px,1.3fr);gap:8px}.option-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.source-row{grid-template-columns:repeat(2,minmax(0,1fr))}.ratio-picker{grid-column:1 / -1}.option-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.source-row{grid-template-columns:1fr}.ratio-picker{grid-column:auto}.option-row{grid-template-columns:1fr}}

/* Keep account and reminder copy readable on the dark theme. */
html[data-theme="mono"] .config-card p,
html[data-theme="mono"] .config-card .modal-msg{color:#aeb8c7!important}

.reference-media-row{display:grid;grid-template-columns:auto auto auto minmax(0,1fr);align-items:center;gap:8px;margin:8px 0 10px;padding:8px 10px;border:1px solid #dfe5ee;border-radius:12px;background:#fbfcff;min-height:44px}
.reference-media-title{font-size:12px;color:#667085;font-weight:700;white-space:nowrap}
.reference-media-btn{height:30px;white-space:nowrap}
.reference-media-list{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.reference-media-chip{display:inline-flex;align-items:center;gap:5px;max-width:220px;height:28px;padding:0 8px;border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#334155;font-size:12px}
.reference-media-chip i,.ref-tag .ref-icon{font-style:normal;font-weight:800;color:#2563eb}
.reference-media-visual{position:relative;width:22px;height:22px;flex:0 0 22px;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;overflow:hidden;background:#dbeafe}
.reference-media-visual .reference-media-thumb{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#dbeafe;opacity:0;transition:opacity .15s ease}
.reference-media-visual>i{position:relative;z-index:1;font-size:10px;text-shadow:0 1px 3px rgba(255,255,255,.85)}
.reference-media-chip.has-video .reference-media-thumb{opacity:1}
.reference-media-chip.has-video .reference-media-visual>i{color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.65)}
.reference-media-chip.thumb-load-failed .reference-media-thumb{opacity:0}
.reference-media-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reference-media-chip b{font-size:15px;line-height:1;cursor:pointer;color:#64748b}
.reference-media-chip em{font-style:normal;color:#64748b;font-size:10px}
.reference-media-chip.failed{border-color:#fda4af;color:#be123c}
.ref-tag{display:inline-flex;align-items:center;gap:5px;vertical-align:middle;margin:0 2px;padding:2px 8px 2px 4px;border:1px solid #b8c5d6;border-radius:999px;background:#eef4fb;color:#1f2937;font-size:12px;line-height:1.5;user-select:none}
.ref-tag img{width:20px;height:20px;object-fit:cover;border-radius:50%}
.ref-tag .ref-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#dbeafe}
.ref-tag>b{cursor:pointer;color:#64748b;font-size:14px;line-height:1}
.mention-item .ref-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#dbeafe;color:#2563eb;font-style:normal;font-weight:800}
.mention-item{display:flex;align-items:center;gap:8px}
.mention-item img{width:24px;height:24px;border-radius:6px;object-fit:cover}
@media(max-width:620px){.reference-media-row{grid-template-columns:auto auto auto}.reference-media-list{grid-column:1 / -1}}
html[data-theme="mono"] .reference-media-row{background:#0f141b;border-color:#27303c}
html[data-theme="mono"] .reference-media-title,html[data-theme="mono"] .reference-media-chip em{color:#aeb8c7}
html[data-theme="mono"] .reference-media-chip{background:#111720;border-color:#526176;color:#f5f7fa}
html[data-theme="mono"] .ref-tag{background:#111b27;border-color:#526176;color:#f5f7fa}
html[data-theme="mono"] .config-card .modal-msg.config-msg-success{background:#0b1712!important;border-color:#24543b!important;color:#86efac!important}
html[data-theme="mono"] .config-card .modal-msg.config-msg-error{background:#1a0d11!important;border-color:#6a2835!important;color:#fda4af!important}

/* Keep the account center focused on the signed-in user's actions. */
#configModal .config-card{width:min(480px,92vw);height:auto;min-height:0}
.auth-user-info{display:grid;gap:0;margin:4px 0 12px;border:1px solid #e5ebf4;border-radius:12px;overflow:hidden;background:#fbfcff}
.auth-user-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 12px;border-bottom:1px solid #e5ebf4;font-size:13px}
.auth-user-row:last-child{border-bottom:0}
.auth-user-row span{color:#7a8497}
.auth-user-row strong{color:#222a36;font-weight:700;text-align:right;word-break:break-all}
.auth-edit-password-action{width:100%;margin:0 0 10px}
.auth-logout-action{width:100%;margin-top:0;color:#b42318;border-color:#f2c8c4}
.auth-logout-action:hover{background:#fff5f4}
html[data-theme="mono"] .auth-user-info{background:#0f141b;border-color:#27303c}
html[data-theme="mono"] .auth-user-row{border-color:#27303c}
html[data-theme="mono"] .auth-user-row span{color:#aeb8c7}
html[data-theme="mono"] .auth-user-row strong{color:#f5f7fa}
html[data-theme="mono"] .auth-logout-action{background:transparent!important;color:#fda4af!important;border-color:#6a2835!important}
html[data-theme="mono"] .expire-notice-content .notice-line-1,
html[data-theme="mono"] .expire-notice-content .notice-line-2{color:#f5f7fa!important}
html[data-theme="mono"] .expire-notice-content .notice-line-3{color:#ff8095!important}
html[data-theme="mono"] .expire-notice-card .notice-skip{color:#aeb8c7!important}
.model-resolution{display:block;margin-top:4px;font-size:11px;color:#7f8da3}
.model-resolution strong{color:#cbd5e1;font-weight:700}
html[data-theme="mono"] .model-resolution{color:#8f9bad}
html[data-theme="mono"] .model-resolution strong{color:#f5f7fa}

/* Responsive page sizing: let shorter screens scroll instead of clipping the workspace. */
html,body{width:100%;height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable}
body{min-height:100dvh}
.app-shell{height:auto;min-height:100dvh;max-height:none;overflow:visible}
.grid{flex:1 1 auto;min-height:0;overflow:visible;grid-template-rows:minmax(360px,auto) minmax(190px,auto)}
.panel,.prompt-panel,.option-panel,.task-panel{overflow:visible}

/* Require an approved account before exposing the video workspace. */
body.auth-locked .app-shell{visibility:hidden;pointer-events:none}
body.auth-locked #configModal{display:flex!important;background:linear-gradient(180deg,#83d2ff 0%,#b8e7ff 55%,#eaf8ff 100%)!important;overflow:hidden;isolation:isolate}
body.auth-locked #configModal:before,
body.auth-locked #configModal:after{content:"";position:absolute;z-index:-1;pointer-events:none;background-repeat:no-repeat}
body.auth-locked #configModal:before{inset:0;background-image:radial-gradient(ellipse 170px 54px at 12% 22%,rgba(255,255,255,.9) 0 58%,transparent 60%),radial-gradient(ellipse 230px 72px at 28% 26%,rgba(255,255,255,.82) 0 56%,transparent 58%),radial-gradient(ellipse 180px 58px at 52% 17%,rgba(255,255,255,.78) 0 56%,transparent 58%),radial-gradient(ellipse 250px 78px at 78% 30%,rgba(255,255,255,.86) 0 56%,transparent 58%),radial-gradient(ellipse 150px 48px at 94% 23%,rgba(255,255,255,.76) 0 56%,transparent 58%);opacity:.8}
body.auth-locked #configModal:after{inset:0;background-image:radial-gradient(ellipse 210px 60px at 5% 78%,rgba(255,255,255,.72) 0 56%,transparent 58%),radial-gradient(ellipse 280px 84px at 26% 84%,rgba(255,255,255,.8) 0 56%,transparent 58%),radial-gradient(ellipse 220px 66px at 58% 74%,rgba(255,255,255,.7) 0 56%,transparent 58%),radial-gradient(ellipse 310px 92px at 88% 86%,rgba(255,255,255,.78) 0 56%,transparent 58%);opacity:.65}
body.auth-locked #configModal .config-card{z-index:1}
body.auth-locked #configModal .close{display:none!important}
body.auth-locked #configModal .config-card{width:min(460px,92vw)}
html[data-theme="mono"] body{background-color:#05070b;background-image:linear-gradient(rgba(112,132,156,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(112,132,156,.055) 1px,transparent 1px);background-size:32px 32px}
html[data-theme="mono"] .topbar,html[data-theme="mono"] .panel{background:rgba(10,14,20,.94);border-color:#1e2a38;box-shadow:0 18px 40px rgba(0,0,0,.24)}
html[data-theme="mono"] #configModal .config-card{background:#0b1118;border-color:#2b3b4e;box-shadow:0 24px 80px rgba(0,0,0,.58)}
html[data-theme="light"] body{background:#f3f6fa}
html[data-theme="mono"] .topbar,html[data-theme="mono"] .panel{backdrop-filter:blur(12px)}
html[data-theme="mono"] .topbar{border-top-color:#34485e}
html[data-theme="mono"] input:focus,html[data-theme="mono"] select:focus,html[data-theme="mono"] textarea:focus,.editor:focus{outline:2px solid rgba(126,167,210,.45);outline-offset:1px}
.task-list{min-height:180px;max-height:none}
@media(max-width:900px){
  html,body{overflow-x:hidden;overflow-y:auto}
  .app-shell{height:auto;min-height:100dvh;max-height:none;overflow:visible;padding:10px}
  .topbar{height:auto;min-height:72px;flex-wrap:wrap}
  .top-actions{max-width:100%;flex-wrap:wrap}
  .grid{grid-template-columns:1fr;grid-template-rows:auto;overflow:visible}
  .prompt-panel,.option-panel,.task-panel{grid-column:auto;grid-row:auto;min-height:0}
  .prompt-panel{min-height:420px}
  .option-panel{min-height:230px}
  .task-panel{min-height:360px}
  .task-list{min-height:240px}
}
@media(max-width:560px){
  .app-shell{padding:8px;gap:8px}
  .topbar{padding:10px 12px}
  .top-actions{width:100%;gap:6px}
  .top-actions>*{min-width:0}
  .prompt-panel{min-height:400px}
  .option-panel{min-height:250px}
  .task-panel{min-height:340px}
}
@media(max-aspect-ratio:16/9) and (max-height:820px){
  .app-shell{transform:none;width:auto;height:auto}
}

/* Account dialog: a soft rose visual panel keeps registration welcoming while the form stays compact. */
#configModal .config-card{
  width:min(780px,94vw)!important;
  height:auto!important;
  max-height:min(680px,92vh)!important;
  min-height:0!important;
  padding:0!important;
  display:grid!important;
  grid-template-columns:minmax(230px,.84fr) minmax(320px,1fr)!important;
  overflow:hidden!important;
  border:1px solid #f2bfd0!important;
  border-radius:26px!important;
  background:#fff8fb!important;
  box-shadow:0 28px 80px rgba(117,37,73,.24)!important;
}
#configModal .auth-visual{
  position:relative;
  min-height:520px;
  padding:30px 28px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  color:#572139;
  background:linear-gradient(150deg,#ffeaf1 0%,#ffd6e3 48%,#f4b6cb 100%);
}
#configModal .auth-visual:after{
  content:"";
  position:absolute;
  inset:auto -18% -22% -18%;
  height:54%;
  border-radius:50% 50% 0 0;
  background:linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,0));
  transform:rotate(-7deg);
  pointer-events:none;
}
#configModal .auth-art-canvas{position:absolute;inset:0;overflow:hidden;pointer-events:none}
#configModal .auth-art-canvas:before,
#configModal .auth-art-canvas:after{
  content:"";
  position:absolute;
  border-radius:50%;
  filter:blur(1px);
}
#configModal .auth-art-canvas:before{width:210px;height:210px;right:-80px;top:-70px;background:rgba(255,255,255,.38)}
#configModal .auth-art-canvas:after{width:150px;height:150px;left:-70px;top:110px;background:rgba(255,255,255,.28)}
#configModal .auth-art-orbit{position:absolute;border:1px solid rgba(151,48,91,.2);border-radius:50%;transform:rotate(-24deg)}
#configModal .auth-art-orbit-one{width:270px;height:120px;left:12%;top:19%;}
#configModal .auth-art-orbit-two{width:220px;height:90px;left:20%;top:28%;transform:rotate(28deg);border-color:rgba(255,255,255,.65)}
#configModal .auth-art-bloom{position:absolute;left:50%;top:40%;width:170px;height:170px;transform:translate(-50%,-50%)}
#configModal .auth-art-bloom i{position:absolute;left:50%;top:50%;width:56px;height:96px;transform-origin:50% 92%;border-radius:68% 26% 68% 26%;background:linear-gradient(145deg,#fff9fb,#e979a2);box-shadow:0 8px 18px rgba(157,44,88,.16);opacity:.88}
#configModal .auth-art-bloom i:nth-child(1){transform:translate(-50%,-92%) rotate(0deg)}
#configModal .auth-art-bloom i:nth-child(2){transform:translate(-50%,-92%) rotate(60deg)}
#configModal .auth-art-bloom i:nth-child(3){transform:translate(-50%,-92%) rotate(120deg)}
#configModal .auth-art-bloom i:nth-child(4){transform:translate(-50%,-92%) rotate(180deg)}
#configModal .auth-art-bloom i:nth-child(5){transform:translate(-50%,-92%) rotate(240deg)}
#configModal .auth-art-bloom i:nth-child(6){transform:translate(-50%,-92%) rotate(300deg)}
#configModal .auth-art-bloom b{position:absolute;left:50%;top:50%;width:34px;height:34px;transform:translate(-50%,-50%);border-radius:50%;background:#fff2a8;box-shadow:0 0 0 8px rgba(255,255,255,.25),0 4px 14px rgba(157,44,88,.18)}
#configModal .auth-art-spark{position:absolute;color:#fff;font-family:Georgia,serif;text-shadow:0 4px 14px rgba(157,44,88,.2)}
#configModal .auth-art-spark-one{left:18%;top:23%;font-size:28px}
#configModal .auth-art-spark-two{right:17%;top:36%;font-size:22px;opacity:.78}
#configModal .auth-visual-copy{position:relative;z-index:1;max-width:250px}
#configModal .auth-visual-copy>span{display:block;margin-bottom:12px;font-size:10px;letter-spacing:.22em;font-weight:800;color:#9b4566}
#configModal .auth-visual-copy strong{display:block;font-size:25px;line-height:1.3;font-weight:800;letter-spacing:0;color:#572139}
#configModal .auth-visual-copy p{margin:12px 0 0;font-size:12px;line-height:1.7;color:#86506a}
#configModal .auth-content{position:relative;min-width:0;overflow:auto;padding:32px 34px 28px;background:#fffafd}
#configModal .auth-content>.close{top:18px;right:18px;width:30px;height:30px;border:1px solid #efbfd0;background:#fff1f6;color:#a5496b;font-size:20px;line-height:1}
#configModal .auth-content>.close:hover{background:#ffdce9;border-color:#e891ae;color:#8c3155}
#configModal .auth-heading{display:flex;align-items:flex-start;gap:12px;padding-right:34px;margin-bottom:18px}
#configModal .auth-heading-mark{display:flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;border-radius:12px;background:#ffe0eb;color:#d04c7c;font-size:17px;box-shadow:inset 0 0 0 1px #f3bfd1}
#configModal .auth-heading h2{margin:0;color:#52263b;font-size:20px;line-height:1.2}
#configModal .auth-heading p{margin:6px 0 0;color:#956579;font-size:12px;line-height:1.5}
#configModal .auth-form{max-width:none;gap:12px}
#configModal .auth-mode-tabs{display:grid;grid-template-columns:repeat(2,1fr);gap:5px;max-width:none;margin:0 0 4px;padding:5px;border:1px solid #f3c5d5;border-radius:15px;background:#fff0f5}
#configModal .auth-mode-tab{height:36px;padding:5px 8px;border:0;border-radius:10px;background:transparent;color:#a05b78;font-size:13px;font-weight:800}
#configModal .auth-mode-tab.active{background:#fff;color:#d14375;border:1px solid #f2b7cc;box-shadow:0 5px 14px rgba(210,66,117,.14)}
#configModal .auth-form label{gap:6px;color:#824b65;font-size:12px;font-weight:700}
#configModal .auth-form input{height:46px;border:1px solid #efbfd0;border-radius:14px;padding:0 13px;background:#fff;color:#4a2638;box-shadow:inset 0 1px 2px rgba(129,47,79,.03);transition:border-color .15s,box-shadow .15s,background .15s}
#configModal .auth-form input::placeholder{color:#c098aa}
#configModal .auth-form input:focus{outline:none;border-color:#dd5d8b;background:#fff;box-shadow:0 0 0 4px rgba(221,93,139,.13),0 8px 18px rgba(156,45,86,.08)}
#configModal .auth-form #saveConfigBtn{height:46px;margin-top:4px;border:0!important;border-radius:14px;background:linear-gradient(135deg,#db5e8c,#b83f70)!important;color:#fff!important;box-shadow:0 10px 20px rgba(184,63,112,.23);font-weight:800}
#configModal .auth-form #saveConfigBtn:hover{background:linear-gradient(135deg,#ce4f7d,#a93667)!important;transform:translateY(-1px)}
#configModal .auth-user-info{margin:0 0 14px;border:1px solid #f2c4d3;border-radius:15px;background:#fff4f8}
#configModal .auth-user-row{padding:11px 13px;border-color:#f5d7e1}
#configModal .auth-user-row span{color:#a05d78}
#configModal .auth-user-row strong{color:#5a2d43}
#configModal .auth-edit-password-action{height:40px;margin:0 0 10px;border-color:#e9a9c0;background:#fff0f5;color:#b23e6c;font-weight:800}
#configModal .auth-edit-password-action:hover{background:#ffdce9;border-color:#dc7fa3}
#configModal .auth-logout-action{height:40px;border-color:#e9a9c0;background:#fff0f5;color:#b23e6c;font-weight:800}
#configModal .auth-logout-action:hover{background:#ffdce9;border-color:#dc7fa3}
#configModal .config-msg-success:not(:empty),#configModal .config-msg-error:not(:empty){border-radius:12px}
#configModal .config-msg-success:not(:empty){background:#fff0f5!important;border-color:#f2b7cc!important;color:#b23e6c!important}
#configModal .config-msg-error:not(:empty){background:#fff0f3!important;border-color:#e99bb5!important;color:#a62f59!important}
#configModal.auth-signed-in .config-card{grid-template-columns:1fr!important}
#configModal.auth-signed-in .auth-visual{display:none}
#configModal.auth-signed-in .auth-content{padding:28px 30px 24px}
#configModal.auth-signed-in .auth-edit-password-action{display:none!important}
#configModal.auth-signed-in .auth-form{gap:0}
#configModal.auth-signed-in .auth-form > *{display:none!important}
#configModal.auth-signed-in .auth-form > #authLogoutBtn{display:block!important;margin-top:4px}
@media(max-width:760px){
  #configModal .config-card{width:min(520px,94vw)!important;grid-template-columns:1fr!important;max-height:92vh!important}
  #configModal .auth-visual{min-height:170px;padding:22px 24px 20px;justify-content:flex-end}
  #configModal .auth-art-bloom{left:auto;right:4%;top:47%;width:142px;height:142px;transform:translateY(-50%) scale(.78)}
  #configModal .auth-art-orbit-one{left:auto;right:-2%;top:8%;transform:rotate(-24deg) scale(.8)}
  #configModal .auth-art-orbit-two{left:auto;right:4%;top:18%;transform:rotate(28deg) scale(.7)}
  #configModal .auth-visual-copy{max-width:58%}
  #configModal .auth-visual-copy>span{margin-bottom:6px;font-size:9px}
  #configModal .auth-visual-copy strong{font-size:18px}
  #configModal .auth-visual-copy p{margin-top:7px;font-size:11px;line-height:1.45}
  #configModal .auth-content{padding:24px 20px 22px}
}

/* Keep long prompts inside a stable editor so the surrounding layout never grows with text. */
.prompt-panel>.editor{
  flex:0 0 340px!important;
  height:340px!important;
  min-height:340px!important;
  max-height:340px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
}
@media(max-width:900px){
  .prompt-panel>.editor{
    flex-basis:280px!important;
    height:280px!important;
    min-height:280px!important;
    max-height:280px!important;
  }
}
@media(max-width:560px){
  .prompt-panel>.editor{
    flex-basis:240px!important;
    height:240px!important;
    min-height:240px!important;
    max-height:240px!important;
  }
}

/* Final responsive sizing: the page grows with its content on every screen. */
html,body{width:100%;height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable}
body{min-height:100dvh}
.app-shell{height:auto;min-height:100dvh;max-height:none;overflow:visible}
.grid{flex:0 0 auto;min-height:0;overflow:visible;grid-template-rows:minmax(420px,auto) minmax(210px,auto)}
.panel,.prompt-panel,.option-panel,.task-panel{min-height:0;overflow:visible}
.prompt-panel{min-height:0}
.option-panel{min-height:210px}
.task-panel{min-height:420px;overflow:hidden}
.task-list{flex:1 1 0;min-height:0;max-height:none;contain:size;overflow-y:auto;overflow-x:hidden;overscroll-behavior:auto;scrollbar-width:auto}
.task-list>.task-card{flex:0 0 auto}
.user-video-history-list>.user-video-history-item{flex:0 0 auto}
.editor{overscroll-behavior:auto}
@media(max-width:1100px){
  .app-shell{padding:10px}
  .grid{grid-template-columns:minmax(0,1fr) minmax(300px,.78fr);grid-template-rows:minmax(420px,auto) minmax(210px,auto)}
}
@media(max-width:900px){
  .topbar{height:auto;min-height:72px;flex-wrap:wrap}
  .grid{grid-template-columns:1fr;grid-template-rows:auto;overflow:visible}
  .prompt-panel,.option-panel,.task-panel{grid-column:auto;grid-row:auto;min-height:0}
  .prompt-panel{min-height:420px}
  .option-panel{min-height:230px}
  .task-panel{height:clamp(360px,85dvh,780px);min-height:360px;overflow:hidden}
  .task-list{max-height:none;min-height:0}
}
@media(max-width:560px){
  .app-shell{padding:8px;gap:8px}
  .topbar{padding:10px 12px}
  .prompt-panel{min-height:400px}
  .option-panel{min-height:250px}
  .task-panel{height:clamp(340px,85dvh,780px);min-height:340px}
  .task-list{max-height:none;min-height:0}
}

/* Queue thumbnails share the same first-frame and failure states as history. */
.task-preview-button{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;width:88px;height:88px;padding:0;border:1px solid #d2b4c4;border-radius:14px;overflow:hidden;background:linear-gradient(145deg,#eef7fc,#ffeaf1);color:#934661;cursor:pointer}
.task-video-area .task-preview-button .task-cover{position:absolute;inset:0;width:100%!important;height:100%!important;border:0;border-radius:0;box-shadow:none;opacity:0;pointer-events:none}
.task-preview-button.has-video .task-cover,.task-preview-button.has-poster .task-cover{opacity:1}
.task-preview-button .task-cover-image{object-fit:cover;background:#e8f3f7}
.task-preview-button .task-cover-image.media-load-failed{opacity:0}
.task-preview-button:after{content:"";position:absolute;inset:0;background:rgba(10,18,30,.16);pointer-events:none}
.task-preview-play,.task-thumb-fallback{position:relative;z-index:1;pointer-events:none}
.task-preview-play{display:flex;align-items:center;justify-content:center;width:30px;height:30px;padding-left:2px;border-radius:50%;background:rgba(255,255,255,.85);color:#523144;font-size:13px;box-shadow:0 2px 8px #0002}
.task-thumb-fallback{font-size:10px;line-height:1.3;font-weight:700}
.task-preview-button.has-video .task-thumb-fallback,.task-preview-button.has-poster .task-thumb-fallback{display:none}
.task-preview-button.thumb-load-failed:not(.has-poster) .task-cover{opacity:0}
.task-preview-button.thumb-load-failed .task-thumb-fallback{display:block;padding:2px 5px;border-radius:6px;background:#ffeff5;color:#823753}
.task-preview-button:hover{border-color:#d06b91;box-shadow:0 3px 12px #b545682e}
.task-preview-button:focus-visible{outline:2px solid #d06b91;outline-offset:2px}
html[data-theme="mono"] .task-preview-button{background:linear-gradient(145deg,#16232f,#24212d);border-color:#485363;color:#e8d6e0}
.video-card .video-close{z-index:3}
.task-bottom{flex-wrap:wrap;row-gap:7px}
.task-bottom .task-info{flex:1 0 auto;max-width:100%}
.task-bottom .task-actions{max-width:100%;flex-wrap:wrap;margin-left:auto}
@media(max-width:560px){
  .task-card .task-left{grid-template-columns:56px minmax(0,1fr)!important;gap:10px!important}
  .task-left .fan{width:56px!important;min-height:70px}
  .task-left .fan img{width:40px!important;height:40px!important}
  .task-left .fan img:nth-child(2){left:9px!important}
  .task-left .fan img:nth-child(3){left:18px!important}
  .task-bottom{align-items:flex-start;gap:7px}
  .task-bottom .task-actions{margin-left:0;justify-content:flex-start}
  .task-video-area{margin-left:66px!important}
  .task-head{flex-wrap:wrap;gap:5px}
}

/* Task queue title and retention reminder. */
.task-heading-copy{min-width:0;text-align:center;line-height:1.2}
.task-heading-copy h2{margin:0}
.task-retention-note{margin:3px 0 0;font-size:10px;font-weight:500;color:#8f9bad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme="mono"] .task-retention-note{color:#8f9bad}

/* Boost page wheel scrolling while keeping nested scroll areas independent. */
.task-list,.editor,html{scroll-behavior:auto}
@media(max-width:560px){.task-retention-note{font-size:9px}}

/* API access uses the same rose palette as the signed-in account details in either page theme. */
#configModal.auth-signed-in .config-card{width:min(560px,94vw)!important}
#configModal.auth-signed-in .auth-content{max-height:88vh}
#configModal.auth-signed-in .api-key-panel,
html[data-theme="mono"] #configModal.auth-signed-in .api-key-panel{
  display:block!important;
  margin:0 0 14px;
  padding:16px;
  border:1px solid #efb8cc;
  border-radius:20px;
  background:#fff5f9;
  box-shadow:0 10px 24px rgba(173,58,104,.1);
}
#configModal.auth-signed-in .api-key-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
#configModal.auth-signed-in .api-key-panel-head strong,
html[data-theme="mono"] #configModal.auth-signed-in .api-key-panel-head strong{display:block;color:#5a2d43;font-size:14px}
#configModal.auth-signed-in .api-key-panel-head small,
html[data-theme="mono"] #configModal.auth-signed-in .api-key-panel-head small{display:block;margin-top:5px;color:#956579;font-size:11px;line-height:1.5}
#configModal.auth-signed-in .api-key-panel-head a,
html[data-theme="mono"] #configModal.auth-signed-in .api-key-panel-head a{
  flex:none;
  padding:6px 10px;
  border:1px solid #efb8cc;
  border-radius:999px;
  background:#ffe7f0;
  color:#ad3d69;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  text-decoration:none;
  transition:background .15s,border-color .15s,color .15s,transform .15s;
}
#configModal.auth-signed-in .api-key-panel-head a:hover{border-color:#dc7fa3;background:#ffd7e6;color:#913052;transform:translateY(-1px)}
#configModal.auth-signed-in .api-key-status,
html[data-theme="mono"] #configModal.auth-signed-in .api-key-status{
  margin:12px 0 10px;
  padding:10px 12px;
  border:1px solid #f3cfdb;
  border-radius:14px;
  background:#ffe8f0;
  color:#824b65;
  font-size:12px;
  line-height:1.45;
  word-break:break-all;
}
#configModal.auth-signed-in .api-key-reveal{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0 0 10px}
#configModal.auth-signed-in .api-key-reveal input,
html[data-theme="mono"] #configModal.auth-signed-in .api-key-reveal input{
  min-width:0;
  width:100%;
  height:40px;
  border:1px solid #e9a9c0;
  border-radius:12px;
  padding:0 11px;
  background:#fff;
  color:#4a2638;
  font:12px Consolas,monospace;
  box-shadow:inset 0 1px 2px rgba(129,47,79,.04);
}
#configModal.auth-signed-in .api-key-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#configModal.auth-signed-in .api-key-actions button,
#configModal.auth-signed-in #copyApiKeyBtn{
  min-width:0;
  min-height:40px;
  border-radius:12px!important;
  font-weight:800;
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s;
}
#configModal.auth-signed-in #createApiKeyBtn{
  border:1px solid #c84b78!important;
  background:linear-gradient(135deg,#dc648f,#bd416f)!important;
  color:#fff!important;
  box-shadow:0 7px 16px rgba(184,63,112,.2)!important;
}
#configModal.auth-signed-in #createApiKeyBtn:hover{background:linear-gradient(135deg,#cf547f,#ab3563)!important;transform:translateY(-1px)}
#configModal.auth-signed-in #deleteApiKeyBtn{
  border:1px solid #e9a9c0!important;
  background:#fff0f5!important;
  color:#ac3b67!important;
  box-shadow:none!important;
}
#configModal.auth-signed-in #deleteApiKeyBtn:hover{border-color:#dc7fa3!important;background:#ffdce9!important;color:#8f2d52!important;transform:translateY(-1px)}
#configModal.auth-signed-in #copyApiKeyBtn{
  min-width:66px;
  border:1px solid #e3a0b9!important;
  background:#ffe5ef!important;
  color:#a23760!important;
  box-shadow:none!important;
}
#configModal.auth-signed-in #copyApiKeyBtn:hover{border-color:#d8789c!important;background:#ffd4e4!important;color:#87264d!important}
#configModal.auth-signed-in .api-key-create{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0 0 10px}
#configModal.auth-signed-in .api-key-create input{min-width:0;width:100%;height:40px;border:1px solid #e9a9c0;border-radius:8px;padding:0 11px;background:#fff;color:#4a2638;font-size:12px}
#configModal.auth-signed-in .api-key-list{display:grid;gap:8px;max-height:300px;overflow:auto;overscroll-behavior:contain}
#configModal.auth-signed-in .api-key-empty{padding:12px;border:1px dashed #e9a9c0;border-radius:8px;color:#956579;font-size:12px;text-align:center}
#configModal.auth-signed-in .api-key-item{display:grid;gap:7px;padding:11px;border:1px solid #efbfd0;border-radius:8px;background:#fff}
#configModal.auth-signed-in .api-key-item.is-disabled{opacity:.68}
#configModal.auth-signed-in .api-key-item-head{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
#configModal.auth-signed-in .api-key-item-head strong{min-width:0;overflow:hidden;color:#5a2d43;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
#configModal.auth-signed-in .api-key-state{flex:none;padding:2px 6px;border-radius:999px;background:#e7f7ee;color:#14734c;font-size:10px;font-weight:800}
#configModal.auth-signed-in .api-key-item.is-disabled .api-key-state{background:#f1f3f5;color:#697386}
#configModal.auth-signed-in .api-key-item code{overflow:hidden;color:#7d3a58;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
#configModal.auth-signed-in .api-key-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;color:#956579;font-size:10px;line-height:1.4}
#configModal.auth-signed-in .api-key-item-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#configModal.auth-signed-in .api-key-item-actions button{height:30px;padding:0 8px;border:1px solid #e9a9c0!important;border-radius:7px!important;background:#fff5f9!important;color:#94375b!important;font-size:11px;font-weight:700;box-shadow:none!important}
#configModal.auth-signed-in .api-key-item-actions button:hover{background:#ffe2ed!important}
#configModal.auth-signed-in .api-key-item-actions button.danger{color:#b42318!important}
#configModal.auth-signed-in .api-key-item-actions button:disabled{cursor:wait;opacity:.55}
.redeem-code-panel{margin:0 0 14px;padding:14px 16px;border:1px solid #b8d9ef;border-radius:18px;background:#f3faff;box-shadow:0 8px 20px rgba(55,132,180,.08)}
.redeem-code-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px;color:#244b65}
.redeem-code-head strong{font-size:14px}.redeem-code-head small{font-size:11px;color:#668ba3}
.redeem-code-form{display:grid;grid-template-columns:minmax(0,1fr) 72px;gap:8px}
.redeem-code-form input{min-width:0;width:100%;height:40px;border:1px solid #a9cfe7;border-radius:12px;padding:0 11px;background:#fff;color:#17394f;font:12px Consolas,monospace;text-transform:uppercase}
.redeem-code-form input:focus{outline:none;border-color:#4c9bc7;box-shadow:0 0 0 3px rgba(76,155,199,.15)}
.redeem-code-form button{height:40px;border:1px solid #3185b5!important;border-radius:12px!important;background:#3185b5!important;color:#fff!important;font-weight:800}
.redeem-code-form button:hover{background:#246f99!important}.redeem-code-form button:disabled{opacity:.65;cursor:wait}
.redeem-code-status{min-height:0;margin-top:0;font-size:12px;line-height:1.45;color:#39708f}.redeem-code-status:not(:empty){margin-top:9px}.redeem-code-status.is-error{color:#a33b59}.redeem-code-status.is-success{color:#14734c}
html[data-theme="mono"] #configModal.auth-signed-in .redeem-code-panel{background:#f3faff!important;border-color:#b8d9ef!important;color:#244b65!important}
@media(max-width:560px){
  #configModal.auth-signed-in .api-key-panel{padding:14px;border-radius:18px}
  #configModal.auth-signed-in .api-key-panel-head{display:block}
  #configModal.auth-signed-in .api-key-panel-head a{display:inline-block;margin-top:9px}
  #configModal.auth-signed-in .api-key-create{grid-template-columns:1fr}
  #configModal.auth-signed-in .api-key-create button{width:100%}
  #configModal.auth-signed-in .api-key-actions{grid-template-columns:1fr}
  #configModal.auth-signed-in .api-key-actions button{width:100%}
  .redeem-code-head{align-items:flex-start;flex-direction:column;gap:3px}.redeem-code-form{grid-template-columns:minmax(0,1fr) 68px}
}

/* Self-service recharge entry sits inside the unused half of the login status card. */
.license-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
.license-card-copy{display:flex;min-width:0;flex-direction:column;justify-content:center}
.license-card-copy span,.license-card-copy strong,.license-card-copy em{min-width:0}
.recharge-entry{width:110px;height:36px;padding:0 12px;border:1px solid #3185b5;border-radius:8px;background:#3185b5;color:#fff;font-size:13px;font-weight:800;white-space:nowrap}
.recharge-entry:hover{border-color:#246f99;background:#246f99;color:#fff}
.recharge-code-modal{z-index:130;padding:16px;background:rgba(15,23,42,.52);backdrop-filter:blur(2px)}
.recharge-code-card{width:min(560px,calc(100vw - 32px));padding:24px;border-radius:16px}
.recharge-code-card h2{margin:0 38px 6px 0;font-size:20px;line-height:1.3}
.recharge-code-card p{margin:0 38px 18px 0;color:#667085;font-size:13px;line-height:1.5}
.recharge-code-headline{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:14px;margin:0 38px 8px 0}
.recharge-code-headline h2{margin:0;white-space:nowrap}
.recharge-purchase-info{display:grid;grid-template-columns:minmax(0,1fr) 58px;gap:7px;min-width:0}
.recharge-purchase-info a{height:34px;display:flex;align-items:center;min-width:0;padding:0 10px;border:1px solid #8cc5e6;border-radius:8px;background:#f3faff;color:#246f99;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recharge-purchase-info a:hover{border-color:#3185b5;background:#e7f5fc}
.recharge-purchase-info button{width:58px;height:34px;padding:0 8px;border:1px solid #8cc5e6;border-radius:8px;background:#fff;color:#246f99;font-size:12px;font-weight:800}
.recharge-purchase-info button:hover{border-color:#3185b5;background:#e7f5fc}
.recharge-code-card .recharge-purchase-description{margin:0 38px 12px 0;padding:8px 10px;border-left:3px solid #8cc5e6;border-radius:0 7px 7px 0;background:#f6fbfe;color:#527184;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.recharge-code-card .recharge-code-instruction{margin:0 38px 18px 0}
html[data-theme="mono"] .recharge-entry{border-color:#f5f7fa;background:#f5f7fa;color:#050608}
html[data-theme="mono"] .recharge-entry:hover{border-color:#fff;background:#fff;color:#050608}
html[data-theme="mono"] .recharge-code-card p{color:#aeb8c7}
html[data-theme="mono"] .recharge-purchase-info a,html[data-theme="mono"] .recharge-purchase-info button{border-color:#526176;background:#111720;color:#f5f7fa}
html[data-theme="mono"] .recharge-purchase-info a:hover,html[data-theme="mono"] .recharge-purchase-info button:hover{border-color:#8fa0b5;background:#1b2430}
html[data-theme="mono"] .recharge-code-card .recharge-purchase-description{border-left-color:#526176;background:#111720;color:#c3cedb}
@media(max-width:700px){
  .license-card{grid-template-columns:minmax(0,1fr) auto!important;gap:8px}
  .recharge-entry{width:96px;height:34px;padding:0 9px;font-size:12px}
}
@media(max-width:420px){
  .recharge-entry{width:88px}
  .recharge-code-headline{grid-template-columns:1fr;margin-right:0;gap:10px}.recharge-code-headline h2{margin-right:38px}.recharge-purchase-info{margin-right:0}
  .recharge-code-card .recharge-purchase-description,.recharge-code-card .recharge-code-instruction{margin-right:0}
  .recharge-code-form{grid-template-columns:1fr}
  .recharge-code-form button{width:100%}
}

/* Personal video history: a compact rose and sky workspace that stays
   independent from the live generation queue. */












.user-video-history-modal{z-index:120;background:linear-gradient(180deg,rgba(66,153,204,.38),rgba(20,54,92,.48));backdrop-filter:blur(3px);padding:14px}
.user-video-history-card{width:min(900px,96vw);height:min(760px,92vh);max-height:92vh;display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden;border:1px solid #efb7cb;border-radius:24px;background:#fffafd;box-shadow:0 28px 90px rgba(31,73,112,.3)}
.user-video-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 26px 16px;border-bottom:1px solid #f4d7e2;background:linear-gradient(135deg,#fff8fb 0%,#effaff 100%)}
.user-video-history-head h2{margin:0;color:#54283e;font-size:21px;line-height:1.2}
.user-video-history-head p{margin:7px 0 0;color:#956579;font-size:12px;line-height:1.4}
.user-video-history-close{position:static;flex:0 0 auto;width:32px;height:32px;border:1px solid #edb2c7;background:#fff0f5;color:#a63b66;font-size:20px;line-height:1}
.user-video-history-close:hover{background:#ffdce9;border-color:#d9789b;color:#842a4f}
.user-video-history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 26px 10px;background:#fffafd}
.user-video-history-filters{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.user-video-history-filters button{height:32px;padding:5px 12px;border:1px solid #efbfd0;border-radius:999px;background:#fff;color:#9a5d76;font-size:12px;font-weight:700;white-space:nowrap}
.user-video-history-filters button:hover{background:#fff0f5;border-color:#df91ad}
.user-video-history-filters button.active{border-color:#cf4d7d;background:linear-gradient(135deg,#db648f,#bd416f);color:#fff;box-shadow:0 5px 12px rgba(190,65,111,.2)}
.user-video-history-selection{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;min-width:0}
.history-select-all{display:inline-flex;align-items:center;gap:5px;height:34px;padding:4px 8px;border:1px solid #e6bdcc;border-radius:10px;background:#fff;color:#9a5d76;font-size:11px;font-weight:800;white-space:nowrap;cursor:pointer;user-select:none}
.history-select-all:hover{border-color:#d98aa8;background:#fff4f8}
.history-select-all input,.history-select-control input{width:16px;height:16px;margin:0;accent-color:#c84978;cursor:pointer}
.history-select-all input:disabled,.history-select-control input:disabled{cursor:wait}
.user-video-delete{height:34px;flex:0 0 auto;padding:5px 11px;border:1px solid #e2a7ba;border-radius:10px;background:#fff2f7;color:#a23d66;font-size:11px;font-weight:800;white-space:nowrap}
.user-video-delete:hover{border-color:#d8789c;background:#ffdce9;color:#8d2d53}
.user-video-delete-all{border-color:#e4a0ad;background:#fff0f2;color:#ad3b51}
.user-video-delete-all:hover{border-color:#d86c7f;background:#ffe0e5;color:#8f263e}
.user-video-delete:disabled{opacity:.55;cursor:wait}
.user-video-refresh{height:34px;flex:0 0 auto;padding:5px 13px;border:1px solid #d6a8bb;border-radius:11px;background:#fff3f7;color:#a53c68;font-size:12px;font-weight:800}
.user-video-refresh:hover{background:#ffdce9;border-color:#d87b9f}
.user-video-refresh:disabled{opacity:.6;cursor:wait}
.user-video-history-notice{margin:0 26px 8px;padding:8px 11px;border:1px solid #f0cada;border-radius:11px;background:#fff4f8;color:#9a5271;font-size:12px;line-height:1.4;word-break:break-word}
.user-video-history-notice.hidden{display:none}
.user-video-history-notice.is-error{border-color:#edafbd;background:#fff0f3;color:#a32e55}
.user-video-history-list{flex:1;min-height:0;overflow:auto;padding:4px 26px 14px;display:flex;flex-direction:column;gap:9px;overscroll-behavior:contain}
.user-video-history-item{display:grid;grid-template-columns:28px 82px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:104px;padding:11px 12px;border:1px solid #f0dce4;border-radius:16px;background:#fff;box-shadow:0 4px 13px rgba(78,39,57,.05);transition:border-color .15s,box-shadow .15s,transform .15s}
.user-video-history-item:hover{border-color:#e2a6bb;box-shadow:0 8px 18px rgba(78,39,57,.1);transform:translateY(-1px)}
.history-select-control{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#fff5f8;cursor:pointer}
.history-select-control:hover{background:#ffe5ef}
.history-status-processing,.history-status-queued{background:linear-gradient(110deg,#fff,#f5fbff);border-color:#dcecf3}
.history-status-succeeded{background:linear-gradient(110deg,#fff,#fff8fb);border-color:#efd4e0}
.history-status-failed{background:#fff7f8;border-color:#f1c8d2}
.history-thumb{width:78px;height:78px;display:flex;align-items:center;justify-content:center;border-radius:14px;border:1px solid #e9d6df;background:linear-gradient(145deg,#f2fbff,#fff0f6);color:#b45a7a}
.history-thumb span{font-size:25px;font-weight:800;line-height:1}
.history-thumb-ready{position:relative;flex-direction:column;gap:4px;padding:0;border-color:#dfa6bc;background:linear-gradient(145deg,#dff7ff,#ffe1ed);color:#b33d6c;cursor:pointer;overflow:hidden}
.history-thumb-ready:before{content:"";position:absolute;inset:12px;border-radius:50%;background:rgba(255,255,255,.72);box-shadow:0 4px 14px rgba(114,56,87,.12);z-index:1;pointer-events:none}
.history-thumb-video{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;background:#e8f3f7;opacity:0;z-index:0;transition:opacity .18s ease}
.history-thumb-image.media-load-failed{opacity:0}
.history-thumb-ready.has-video .history-thumb-video,.history-thumb-ready.has-poster .history-thumb-video{opacity:1}
.history-thumb-ready.has-video:before,.history-thumb-ready.has-poster:before{inset:0;border-radius:0;background:rgba(25,31,40,.18);box-shadow:none}
.history-thumb-ready span,.history-thumb-ready small{position:relative;z-index:2}
.history-thumb-ready span,.history-thumb-play{font-size:20px;margin-left:2px}
.history-thumb-ready small,.history-thumb-fallback{font-size:10px;font-weight:800}
.history-thumb-ready.has-video .history-thumb-fallback,.history-thumb-ready.has-poster .history-thumb-fallback{display:none}
.history-thumb-ready.thumb-load-failed .history-thumb-video{opacity:0}
.history-thumb-ready.thumb-load-failed.has-poster .history-thumb-video{opacity:1}
.history-thumb-ready.thumb-format-unsupported:before{inset:0;border-radius:0;background:rgba(255,255,255,.82);box-shadow:none}
.history-thumb-ready.thumb-format-unsupported .history-thumb-play{display:none}
.history-thumb-ready.thumb-format-unsupported .history-thumb-fallback{display:block!important;max-width:64px;color:#9c315a;font-size:10px;line-height:1.25;text-align:center}
.history-thumb-ready:hover{border-color:#c84978;box-shadow:0 6px 14px rgba(189,65,111,.22)}
.history-thumb-expired{filter:grayscale(.35);opacity:.72;background:#f4f5f7;color:#7d8796}
.history-task-body{min-width:0;display:flex;flex-direction:column;gap:6px}
.history-task-heading{display:flex;align-items:center;gap:7px;min-width:0;line-height:1.2}
.history-task-heading>strong{min-width:0;max-width:48%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#4d2639;font-size:14px;font-weight:800}
.history-status-badge{flex:0 0 auto;padding:3px 8px;border-radius:999px;font-size:10px;font-weight:800}
.history-status-badge.succeeded{background:#e7f8f0;color:#11734d}.history-status-badge.processing{background:#e8f5fb;color:#28718e}.history-status-badge.queued{background:#f0edff;color:#6650a6}.history-status-badge.failed{background:#ffe8ed;color:#a32f55}
.history-expired{flex:0 0 auto;color:#8a94a5;font-size:10px}
.history-task-prompt{margin:0;color:#725365;font-size:12px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-task-meta,.history-task-submeta{display:flex;align-items:center;gap:10px;min-width:0;color:#9a8190;font-size:10px;line-height:1.35;white-space:nowrap;overflow:hidden}
.history-task-meta span,.history-task-meta time,.history-task-submeta span,.history-task-submeta code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-task-meta time{flex:0 0 auto}.history-task-submeta{gap:8px;color:#a28e98}.history-task-submeta code{max-width:180px;padding:1px 5px;border-radius:5px;background:#f8edf2;color:#a15776;font:10px Consolas,monospace}.history-task-source{color:#b14b73;font-weight:700}
.history-task-error{margin:0;color:#ae3157;font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-task-actions{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:6px;min-width:76px}
.history-action{height:30px;min-width:74px;padding:4px 8px;border:1px solid #e4a9bd;border-radius:10px;background:#fff2f7;color:#a43b67;font-size:11px;font-weight:800;white-space:nowrap}
.history-action:hover{background:#ffdce9;border-color:#d9799d}.history-action:disabled{opacity:.6;cursor:wait}
.history-action-download{border-color:#cb5a84;background:linear-gradient(135deg,#db648f,#bd416f);color:#fff}.history-action-download:hover{background:linear-gradient(135deg,#ce547f,#aa3562)}
.history-action-delete{border-color:#e4a7b1;background:#fff5f5;color:#ad4859}
.history-action-delete:hover{border-color:#d77b89;background:#ffe3e6;color:#8e2f42}
.user-video-history-state{flex:1;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px dashed #eabecf;border-radius:16px;background:linear-gradient(145deg,#fffafd,#f2fbff);color:#8d6174;text-align:center}
.user-video-history-state strong{font-size:14px;color:#77445c}.user-video-history-state small{font-size:11px;color:#a48896}.user-video-history-state.is-error{border-color:#edb1c0;background:#fff4f6}.user-video-history-state.is-error strong{color:#a32e55}
.user-video-history-state.loading{border-style:solid}.history-spinner{width:22px;height:22px;border:3px solid #f2ccda;border-top-color:#c94d7b;border-radius:50%;animation:history-spin .8s linear infinite}@keyframes history-spin{to{transform:rotate(360deg)}}
.user-video-history-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 26px 16px;border-top:1px solid #f3dce5;color:#9a8190;font-size:11px;background:#fffafd}
.user-video-load-more{height:32px;padding:4px 14px;border:1px solid #e4a9bd;border-radius:10px;background:#fff2f7;color:#a43b67;font-size:11px;font-weight:800}.user-video-load-more:hover{background:#ffdce9;border-color:#d9799d}.user-video-load-more.hidden{display:none}
html[data-theme="mono"] .user-video-history-modal{background:linear-gradient(180deg,rgba(7,28,47,.58),rgba(3,9,17,.72))}
html[data-theme="mono"] .user-video-history-card{background:#fffafd;color:#4d2639}
html[data-theme="mono"] .user-video-history-head h2{color:#54283e!important}
html[data-theme="mono"] .user-video-history-head p{color:#956579!important}
html[data-theme="mono"] .user-video-history-item{color:#4d2639}
html[data-theme="mono"] .history-task-heading>strong{color:#4d2639!important}
html[data-theme="mono"] .history-task-prompt{color:#725365!important}
html[data-theme="mono"] .history-task-meta,
html[data-theme="mono"] .history-task-submeta{color:#9a8190!important}
html[data-theme="mono"] .history-task-source{color:#b14b73!important}
html[data-theme="mono"] .history-task-submeta code{background:#f8edf2!important;color:#a15776!important}
@media(max-width:680px){
  .user-video-history-modal{padding:8px}
  .user-video-history-card{width:100%;height:min(900px,94vh);border-radius:20px}
  .user-video-history-head{padding:18px 17px 13px}.user-video-history-head h2{font-size:19px}.user-video-history-head p{font-size:11px}
  .user-video-history-toolbar{padding:11px 17px 8px;align-items:flex-end}.user-video-history-filters{gap:5px}.user-video-history-filters button{height:30px;padding:4px 9px;font-size:11px}.user-video-history-selection{gap:5px}.history-select-all,.user-video-delete{height:31px;padding:4px 8px;font-size:10px}.user-video-refresh{height:31px;padding:4px 9px;font-size:11px}
  .user-video-history-notice{margin:0 17px 7px;font-size:11px}
  .user-video-history-list{padding:4px 17px 11px;gap:8px}
  .user-video-history-item{grid-template-columns:28px 62px minmax(0,1fr);gap:8px;min-height:0;padding:9px}.history-select-control{width:28px;height:28px}.history-thumb{width:60px;height:60px;border-radius:11px}.history-thumb-ready:before{inset:9px}.history-thumb-ready span{font-size:16px}
  .history-task-heading>strong{max-width:55%;font-size:12px}.history-task-prompt{font-size:11px}.history-task-meta,.history-task-submeta{font-size:9px;gap:6px}.history-task-submeta code{max-width:115px;font-size:9px}
  .history-task-actions{grid-column:3;flex-direction:row;justify-content:flex-start;min-width:0;margin-top:1px;flex-wrap:wrap}.history-action{height:28px;min-width:68px;font-size:10px}
  .user-video-history-footer{padding:9px 17px 13px}
}
@media(max-width:390px){
  .user-video-history-toolbar{display:block}.user-video-history-filters{margin-bottom:7px}.user-video-history-selection{justify-content:flex-start}.user-video-refresh{width:100%}
  .history-task-heading>strong{max-width:48%}.history-task-submeta span:last-child{display:none}
}

.generation-cost { margin: 0; color: #7b526a; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
html[data-theme="mono"] .generation-cost { color: #e6c9db; }

.package-download-progress{position:fixed;right:16px;bottom:max(16px,env(safe-area-inset-bottom));z-index:10000;width:min(360px,calc(100vw - 32px));padding:16px 18px;border:1px solid #edbfd1;border-radius:18px;background:#fff8fc;color:#63334c;box-shadow:0 12px 36px rgba(83,38,65,.18);font-size:13px}
.package-download-progress[hidden],.package-download-progress [hidden]{display:none!important}
.package-progress-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:26px}
.package-progress-heading strong{font-size:14px;line-height:1.5}
.package-progress-heading button{width:28px;height:28px;padding:0;border-radius:50%;font-size:20px;line-height:1;background:transparent;border-color:#e8bed0;color:inherit}
.package-progress-detail{margin:6px 0 12px;line-height:1.6;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.package-download-progress progress{display:block;width:100%;height:8px;border:0;border-radius:99px;overflow:hidden;accent-color:#c35885;background:#f1dce6}
.package-download-progress progress::-webkit-progress-bar{background:#f1dce6;border-radius:99px}
.package-download-progress progress::-webkit-progress-value{background:#c35885;border-radius:99px;transition:width .12s linear}
.package-download-progress progress:indeterminate{background:linear-gradient(90deg,#f1dce6 20%,#c35885 50%,#f1dce6 80%);background-size:200% 100%;animation:package-progress-pulse 1.5s linear infinite}
.package-download-progress progress:indeterminate::-webkit-progress-bar{background:transparent}
.package-progress-percent{display:block;margin-top:6px;text-align:right;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.package-progress-percent:empty{display:none}
.package-download-progress[data-status="error"]{border-color:#eaa3b3;color:#9c2347}
html[data-theme="mono"] .package-download-progress{background:#101923;border-color:#3f536d;color:#edf2f8;box-shadow:0 12px 36px rgba(0,0,0,.4)}
html[data-theme="mono"] .package-progress-heading button{background:#182638;color:#edf2f8;border-color:#3f536d}
html[data-theme="mono"] .package-download-progress progress{accent-color:#e8a7c4;background:#293649}
html[data-theme="mono"] .package-download-progress progress::-webkit-progress-bar{background:#293649}
html[data-theme="mono"] .package-download-progress progress::-webkit-progress-value{background:#e8a7c4}
html[data-theme="mono"] .package-download-progress progress:indeterminate{background:linear-gradient(90deg,#293649 20%,#e8a7c4 50%,#293649 80%);background-size:200% 100%}
html[data-theme="mono"] .package-download-progress progress:indeterminate::-webkit-progress-bar{background:transparent}
html[data-theme="mono"] .package-download-progress[data-status="error"]{border-color:#bd5970;color:#ffbbc9}
@keyframes package-progress-pulse{to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.package-download-progress progress:indeterminate{animation:none}.package-download-progress progress::-webkit-progress-value{transition:none}}

/* 主工作台布局重构：登录页保持原样，仅调整登录后的创作工作区。 */
body:not(.auth-locked){
  height:auto;
  min-height:100vh;
  overflow:auto;
}
body:not(.auth-locked) .app-shell{
  width:min(1480px,calc(100vw - 32px));
  height:auto;
  min-height:100vh;
  margin:0 auto;
  padding:18px 0 34px;
  gap:16px;
  overflow:visible;
}
body:not(.auth-locked) .topbar{
  position:sticky;
  top:12px;
  z-index:40;
  height:auto;
  min-height:76px;
  padding:14px 18px;
  border-radius:14px;
  align-items:center;
}
body:not(.auth-locked) .topbar h1{font-size:21px}
body:not(.auth-locked) .topbar p{margin-top:6px}
body:not(.auth-locked) .top-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end}
body:not(.auth-locked) #appView.grid{
  display:grid;
  grid-template-columns:minmax(0,1.42fr) minmax(360px,.86fr);
  grid-template-rows:minmax(330px,auto) minmax(300px,1fr);
  grid-template-areas:"workspace controls" "workspace tasks";
  gap:16px;
  align-items:stretch;
  min-height:0;
  overflow:visible;
}
body:not(.auth-locked) #appView .panel{
  min-width:0;
  min-height:0;
  padding:18px;
  border-radius:14px;
  overflow:visible;
}
body:not(.auth-locked) #appView .prompt-panel{
  grid-area:workspace;
  min-height:680px;
}
body:not(.auth-locked) #appView .option-panel{
  grid-area:controls;
  align-self:start;
  min-height:330px;
}
body:not(.auth-locked) #appView .task-panel{
  grid-area:tasks;
  min-height:0;
  max-height:calc(100vh - 230px);
  overflow:hidden;
}
body:not(.auth-locked) #appView .section-title,
body:not(.auth-locked) #appView .option-panel>h2{
  min-height:34px;
  margin-bottom:14px;
  display:flex;
  align-items:center;
}
body:not(.auth-locked) #appView .section-title h2{font-size:16px}
body:not(.auth-locked) #appView .prompt-panel>.editor{
  min-height:290px;
  flex:1 1 auto;
  border-radius:12px;
}
body:not(.auth-locked) #appView .image-shelf{height:154px;margin-bottom:14px;border-radius:12px}
body:not(.auth-locked) #appView .reference-media-row{margin-top:0;margin-bottom:12px}
body:not(.auth-locked) #appView .fixed-prompt-wrap{margin-top:14px}
body:not(.auth-locked) #appView .option-panel .source-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
body:not(.auth-locked) #appView .option-panel .ratio-picker{grid-column:1 / -1}
body:not(.auth-locked) #appView .option-panel .ratio-row{max-width:none}
body:not(.auth-locked) #appView .option-panel .option-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body:not(.auth-locked) #appView .option-panel .generation-cost{margin-top:2px}
body:not(.auth-locked) #appView .option-panel .send-btn{height:46px;margin-top:4px;border-radius:10px;font-size:15px}
body:not(.auth-locked) #appView .task-panel .section-title{flex:0 0 auto}
body:not(.auth-locked) #appView .task-panel .task-list{min-height:0;overflow:auto;padding-right:3px}
body:not(.auth-locked) #appView .task-panel .task-card{border-radius:12px}
@media(max-width:1100px){
  body:not(.auth-locked) .app-shell{width:min(100% - 24px,860px);padding-top:12px}
  body:not(.auth-locked) #appView.grid{grid-template-columns:1fr;grid-template-rows:auto auto minmax(420px,auto);grid-template-areas:"workspace" "controls" "tasks"}
  body:not(.auth-locked) #appView .prompt-panel{min-height:560px}
  body:not(.auth-locked) #appView .option-panel{min-height:0}
  body:not(.auth-locked) #appView .task-panel{max-height:none;min-height:420px}
}
@media(max-width:640px){
  body:not(.auth-locked) .app-shell{width:calc(100% - 16px);padding:8px 0 24px;gap:10px}
  body:not(.auth-locked) .topbar{position:relative;top:auto;min-height:0;padding:12px;border-radius:12px;align-items:flex-start;flex-direction:column}
  body:not(.auth-locked) .top-actions{width:100%;justify-content:flex-start;gap:6px}
  body:not(.auth-locked) #appView .panel{padding:13px;border-radius:12px}
  body:not(.auth-locked) #appView .prompt-panel{min-height:500px}
  body:not(.auth-locked) #appView .prompt-panel>.editor{min-height:230px}
  body:not(.auth-locked) #appView .option-panel .source-row,
  body:not(.auth-locked) #appView .option-panel .option-row{grid-template-columns:1fr}
  body:not(.auth-locked) #appView .option-panel .ratio-picker{grid-column:auto}
}

/* 当前 Seedance 页面使用 main.grid 作为工作区容器。 */
body:not(.auth-locked) .app-shell > main.grid{
  display:grid;
  grid-template-columns:minmax(0,1.42fr) minmax(360px,.86fr);
  grid-template-rows:minmax(330px,auto) minmax(300px,1fr);
  grid-template-areas:"workspace controls" "workspace tasks";
  gap:16px;
  align-items:stretch;
  min-height:0;
  overflow:visible;
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{grid-area:workspace;min-height:680px}
body:not(.auth-locked) .app-shell > main.grid > .option-panel{grid-area:controls;align-self:start;min-height:330px}
body:not(.auth-locked) .app-shell > main.grid > .task-panel{grid-area:tasks;min-height:0;max-height:calc(100vh - 230px);overflow:hidden}
body:not(.auth-locked) .app-shell > main.grid > .panel{min-width:0;min-height:0;padding:18px;border-radius:14px;overflow:visible}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{min-height:680px}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel>.editor{min-height:290px;flex:1 1 auto;border-radius:12px}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .image-shelf{height:154px;margin-bottom:14px;border-radius:12px}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .ratio-picker{grid-column:1 / -1}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .option-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body:not(.auth-locked) .app-shell > main.grid > .task-panel .task-list{min-height:0;overflow:auto;padding-right:3px}
@media(max-width:1100px){
  body:not(.auth-locked) .app-shell > main.grid{grid-template-columns:1fr;grid-template-rows:auto auto minmax(420px,auto);grid-template-areas:"workspace" "controls" "tasks"}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{min-height:560px}
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{max-height:none;min-height:420px}
}
@media(max-width:640px){
  body:not(.auth-locked) .app-shell > main.grid{gap:10px}
  body:not(.auth-locked) .app-shell > main.grid > .panel{padding:13px;border-radius:12px}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{min-height:500px}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel>.editor{min-height:230px}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .option-row{grid-template-columns:1fr}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .ratio-picker{grid-column:auto}
}

/* 小熊猫 AI 工作台：仅作用于登录后的主界面，登录弹窗保持原有视觉。 */
body:not(.auth-locked){
  background:#fff4f7;
  color:#4b3440;
}
body:not(.auth-locked) .topbar,
body:not(.auth-locked) .panel{
  background:#fffafd;
  border-color:#efd9e2;
  box-shadow:0 10px 26px rgba(136,72,98,.08);
}
body:not(.auth-locked) h1,
body:not(.auth-locked) h2,
body:not(.auth-locked) .section-title,
body:not(.auth-locked) .topbar p,
body:not(.auth-locked) label,
body:not(.auth-locked) .ratio-picker,
body:not(.auth-locked) .model-picker{
  color:#4b3440;
}
body:not(.auth-locked) .topbar p,
body:not(.auth-locked) .hint,
body:not(.auth-locked) .status-line,
body:not(.auth-locked) .image-shelf-head,
body:not(.auth-locked) .image-shelf-head em,
body:not(.auth-locked) .license-card span,
body:not(.auth-locked) .license-card em,
body:not(.auth-locked) .credit-card span,
body:not(.auth-locked) .credit-card em,
body:not(.auth-locked) .option-row label,
body:not(.auth-locked) .model-resolution{
  color:#8c6b7a;
}
body:not(.auth-locked) a.account-entry,
body:not(.auth-locked) button,
body:not(.auth-locked) input,
body:not(.auth-locked) select,
body:not(.auth-locked) textarea{
  background:#fff;
  color:#4b3440;
  border-color:#e6c8d4;
}
body:not(.auth-locked) a.account-entry:hover,
body:not(.auth-locked) button:hover{
  background:#fff0f5;
  border-color:#d99ab4;
}
body:not(.auth-locked) .primary,
body:not(.auth-locked) .send-btn,
body:not(.auth-locked) .theme-toggle.active{
  background:#c96b8d!important;
  color:#fff!important;
  border-color:#c96b8d!important;
}
body:not(.auth-locked) .primary:hover,
body:not(.auth-locked) .send-btn:hover,
body:not(.auth-locked) .theme-toggle.active:hover{
  background:#b8587d!important;
  border-color:#b8587d!important;
}
body:not(.auth-locked) .editor,
body:not(.auth-locked) .image-shelf,
body:not(.auth-locked) .image-list.empty,
body:not(.auth-locked) .task-list.empty,
body:not(.auth-locked) .image-card,
body:not(.auth-locked) .task-card,
body:not(.auth-locked) .credit-card,
body:not(.auth-locked) .license-card{
  background:#fff8fb;
  border-color:#edd4df;
}
body:not(.auth-locked) .editor:empty:before,
body:not(.auth-locked) .image-list.empty,
body:not(.auth-locked) .task-list.empty{
  color:#b08c9a;
}
body:not(.auth-locked) .ratio{
  background:#fff8fb;
  border-color:#e6c8d4;
  color:#704b5c;
}
body:not(.auth-locked) .ratio.active{
  background:#f8dce7;
  border-color:#c96b8d;
  color:#7c3454;
}
body:not(.auth-locked) .ref-tag{
  background:#fdebf2;
  border-color:#e6bdd0;
  color:#704b5c;
}
body:not(.auth-locked) .image-shelf.over,
body:not(.auth-locked) .editor.over{
  background:#fdebf2;
  border-color:#cf789b;
}
body:not(.auth-locked) .license-card strong,
body:not(.auth-locked) .credit-card strong,
body:not(.auth-locked) .task-head strong,
body:not(.auth-locked) .model-resolution strong{
  color:#63364c;
}
body:not(.auth-locked) .status-line{color:#8c6b7a}

/* 黑色 / 蓝色工作台主题：输入文字保持高对比，登录页不参与这些覆盖。 */
body:not(.auth-locked){
  background:#05070d;
  color:#eef4ff;
}
body:not(.auth-locked) .topbar,
body:not(.auth-locked) .panel{
  background:#0a0f18;
  border-color:#202d40;
  box-shadow:0 16px 40px rgba(0,0,0,.28);
}
body:not(.auth-locked) h1,
body:not(.auth-locked) h2,
body:not(.auth-locked) .section-title,
body:not(.auth-locked) label,
body:not(.auth-locked) .ratio-picker,
body:not(.auth-locked) .model-picker,
body:not(.auth-locked) .channel-picker{
  color:#eef4ff;
}
body:not(.auth-locked) .topbar p,
body:not(.auth-locked) .hint,
body:not(.auth-locked) .status-line,
body:not(.auth-locked) .image-shelf-head,
body:not(.auth-locked) .image-shelf-head em,
body:not(.auth-locked) .license-card span,
body:not(.auth-locked) .license-card em,
body:not(.auth-locked) .credit-card span,
body:not(.auth-locked) .credit-card em,
body:not(.auth-locked) .option-row label,
body:not(.auth-locked) .model-resolution{
  color:#9aabc1;
}
body:not(.auth-locked) a.account-entry,
body:not(.auth-locked) button,
body:not(.auth-locked) input,
body:not(.auth-locked) select,
body:not(.auth-locked) textarea,
body:not(.auth-locked) .client-server-select{
  background:#0e1623;
  color:#f8fbff;
  border-color:#304158;
}
body:not(.auth-locked) input::placeholder,
body:not(.auth-locked) textarea::placeholder,
body:not(.auth-locked) .editor:empty:before{
  color:#7f92ad;
  opacity:1;
}
body:not(.auth-locked) .editor{
  background:#0b121d;
  color:#f8fbff;
  caret-color:#ffffff;
  border-color:#31425a;
}
body:not(.auth-locked) a.account-entry:hover,
body:not(.auth-locked) button:hover{
  background:#162236;
  border-color:#4b6688;
}
body:not(.auth-locked) .primary,
body:not(.auth-locked) .send-btn,
body:not(.auth-locked) .theme-toggle.active{
  background:#050608!important;
  color:#ffffff!important;
  border-color:#4c5c73!important;
}
body:not(.auth-locked) .primary:hover,
body:not(.auth-locked) .send-btn:hover,
body:not(.auth-locked) .theme-toggle.active:hover{
  background:#111722!important;
  border-color:#7892b5!important;
}
body:not(.auth-locked) .image-shelf,
body:not(.auth-locked) .image-list.empty,
body:not(.auth-locked) .task-list.empty,
body:not(.auth-locked) .image-card,
body:not(.auth-locked) .task-card,
body:not(.auth-locked) .credit-card,
body:not(.auth-locked) .license-card,
body:not(.auth-locked) .reference-media-row{
  background:#0b121d;
  border-color:#26364c;
}
body:not(.auth-locked) .ratio{
  background:#0d1725;
  border-color:#304158;
  color:#d8e6f7;
}
body:not(.auth-locked) .ratio.active{
  background:#182d46;
  border-color:#6c9dcc;
  color:#ffffff;
}
body:not(.auth-locked) .ref-tag{
  background:#142238;
  border-color:#385575;
  color:#e8f1fb;
}
body:not(.auth-locked) .image-shelf.over,
body:not(.auth-locked) .editor.over{
  background:#10243b;
  border-color:#5f9bd0;
}
body:not(.auth-locked) .license-card strong,
body:not(.auth-locked) .credit-card strong,
body:not(.auth-locked) .task-head strong,
body:not(.auth-locked) .model-resolution strong{
  color:#f8fbff;
}
body:not(.auth-locked) .task-main p,
body:not(.auth-locked) .task-main em,
body:not(.auth-locked) .task-info,
body:not(.auth-locked) .reference-media-title,
body:not(.auth-locked) .reference-media-chip em{
  color:#9aabc1;
}
body:not(.auth-locked) .reference-media-chip{
  background:#111d2d;
  border-color:#385575;
  color:#e8f1fb;
}
body:not(.auth-locked) .reference-media-visual,
body:not(.auth-locked) .ref-tag .ref-icon,
body:not(.auth-locked) .mention-item .ref-icon{
  background:#173a5e;
  color:#9bd0ff;
}

/* 蓝色模式保留黑色底层结构，只提升边框和交互色。 */
html[data-theme="blue"] body:not(.auth-locked){background:#061525}
html[data-theme="blue"] body:not(.auth-locked) .topbar,
html[data-theme="blue"] body:not(.auth-locked) .panel{
  background:#0a1a2c;
  border-color:#1d4e75;
  box-shadow:0 16px 40px rgba(0,20,45,.34);
}
html[data-theme="blue"] body:not(.auth-locked) a.account-entry,
html[data-theme="blue"] body:not(.auth-locked) button,
html[data-theme="blue"] body:not(.auth-locked) input,
html[data-theme="blue"] body:not(.auth-locked) select,
html[data-theme="blue"] body:not(.auth-locked) textarea,
html[data-theme="blue"] body:not(.auth-locked) .client-server-select{border-color:#2e6088;background:#0d2035}
html[data-theme="blue"] body:not(.auth-locked) a.account-entry:hover,
html[data-theme="blue"] body:not(.auth-locked) button:hover{background:#123253;border-color:#4d8fbd}
html[data-theme="blue"] body:not(.auth-locked) .primary,
html[data-theme="blue"] body:not(.auth-locked) .send-btn,
html[data-theme="blue"] body:not(.auth-locked) .theme-toggle.active{
  background:#176b9d!important;
  border-color:#3a9bd0!important;
}
html[data-theme="blue"] body:not(.auth-locked) .primary:hover,
html[data-theme="blue"] body:not(.auth-locked) .send-btn:hover,
html[data-theme="blue"] body:not(.auth-locked) .theme-toggle.active:hover{background:#2186bf!important;border-color:#73c5ee!important}
html[data-theme="blue"] body:not(.auth-locked) .editor,
html[data-theme="blue"] body:not(.auth-locked) .image-shelf,
html[data-theme="blue"] body:not(.auth-locked) .image-card,
html[data-theme="blue"] body:not(.auth-locked) .task-card,
html[data-theme="blue"] body:not(.auth-locked) .credit-card,
html[data-theme="blue"] body:not(.auth-locked) .license-card,
html[data-theme="blue"] body:not(.auth-locked) .reference-media-row{background:#0b1c30;border-color:#1e4e76}
html[data-theme="blue"] body:not(.auth-locked) .ratio.active{background:#124a70;border-color:#6dc5ee}

/* 玄猫耳朵装饰：附着在工作台卡片和登录后的弹窗卡片上。 */
body:not(.auth-locked) .topbar::before,
body:not(.auth-locked) .topbar::after,
body:not(.auth-locked) .panel::before,
body:not(.auth-locked) .panel::after,
body:not(.auth-locked) .modal-card::before,
body:not(.auth-locked) .modal-card::after{
  content:"";
  position:absolute;
  top:-15px;
  width:28px;
  height:23px;
  z-index:3;
  pointer-events:none;
  background:#111824;
  clip-path:polygon(50% 0,100% 68%,86% 100%,14% 100%,0 68%);
  border-radius:45% 45% 32% 32%;
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.3));
}
body:not(.auth-locked) .topbar::before,
body:not(.auth-locked) .panel::before,
body:not(.auth-locked) .modal-card::before{left:18px;transform:rotate(-10deg)}
body:not(.auth-locked) .topbar::after,
body:not(.auth-locked) .panel::after,
body:not(.auth-locked) .modal-card::after{right:18px;transform:rotate(10deg)}
html[data-theme="blue"] body:not(.auth-locked) .topbar::before,
html[data-theme="blue"] body:not(.auth-locked) .topbar::after,
html[data-theme="blue"] body:not(.auth-locked) .panel::before,
html[data-theme="blue"] body:not(.auth-locked) .panel::after,
html[data-theme="blue"] body:not(.auth-locked) .modal-card::before,
html[data-theme="blue"] body:not(.auth-locked) .modal-card::after{background:#174568}

/* 弹窗入场动效；隐藏状态不参与动画。 */
body:not(.auth-locked) .modal:not(.hidden){animation:shadow-modal-in .22s ease-out both}
body:not(.auth-locked) .modal:not(.hidden) .modal-card{animation:cat-modal-in .34s cubic-bezier(.2,.8,.2,1) both}
body:not(.auth-locked) .recharge-code-card,
body:not(.auth-locked) .user-video-history-card{
  position:relative;
}
body:not(.auth-locked) .recharge-code-card .recharge-code-headline::after,
body:not(.auth-locked) .user-video-history-card .user-video-history-head::after{
  content:"🐼";
  position:absolute;
  top:-23px;
  right:42px;
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #7aa8d0;
  border-radius:50%;
  background:#101b2a;
  color:#fff;
  font-size:22px;
  line-height:1;
  filter:drop-shadow(0 3px 4px rgba(0,0,0,.3));
  clip-path:none;
  transform:none;
  transform:none;
  animation:panda-bob 2.8s ease-in-out infinite;
}
@keyframes shadow-modal-in{from{opacity:0}to{opacity:1}}
@keyframes cat-modal-in{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes cat-spark{0%,100%{opacity:.35;transform:scale(.85) rotate(-8deg)}50%{opacity:1;transform:scale(1.12) rotate(8deg)}}
@keyframes panda-bob{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-3px) rotate(4deg)}}
@media(prefers-reduced-motion:reduce){body:not(.auth-locked) .modal:not(.hidden),body:not(.auth-locked) .modal:not(.hidden) .modal-card,body:not(.auth-locked) .recharge-code-card .recharge-code-headline::after,body:not(.auth-locked) .user-video-history-card .user-video-history-head::after{animation:none}}

/* 账号中心与其它弹窗跟随当前工作台主题，不再固定为粉色。 */
body:not(.auth-locked) #configModal.auth-signed-in .config-card,
body:not(.auth-locked) #configModal.auth-signed-in .auth-content,
body:not(.auth-locked) .recharge-code-card,
body:not(.auth-locked) .user-video-history-card{
  background:#0a0f18!important;
  color:#eef4ff!important;
  border-color:#26364c!important;
  box-shadow:0 24px 70px rgba(0,0,0,.48)!important;
}
body:not(.auth-locked) #configModal.auth-signed-in .auth-heading h2,
body:not(.auth-locked) #configModal.auth-signed-in .auth-heading p,
body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row span,
body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row strong,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel-head strong,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel-head small,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-status,
body:not(.auth-locked) #configModal.auth-signed-in .auth-edit-password-action,
body:not(.auth-locked) #configModal.auth-signed-in .auth-logout-action,
body:not(.auth-locked) .recharge-code-card h2,
body:not(.auth-locked) .recharge-code-card p,
body:not(.auth-locked) .user-video-history-card h2,
body:not(.auth-locked) .user-video-history-card p{
  color:#eef4ff!important;
}
body:not(.auth-locked) #configModal.auth-signed-in .auth-user-info,
body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-status,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-item,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-empty,
body:not(.auth-locked) #configModal.auth-signed-in .redeem-code-panel,
body:not(.auth-locked) .recharge-code-card .recharge-purchase-description,
body:not(.auth-locked) .user-video-history-head,
body:not(.auth-locked) .user-video-history-toolbar,
body:not(.auth-locked) .user-video-history-footer{
  background:#0e1623!important;
  border-color:#2b3d55!important;
  color:#dce8f5!important;
}
body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel-head a,
body:not(.auth-locked) #configModal.auth-signed-in #copyApiKeyBtn,
body:not(.auth-locked) #configModal.auth-signed-in #deleteApiKeyBtn,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-item-actions button{
  background:#111d2d!important;
  border-color:#385575!important;
  color:#e8f1fb!important;
}
body:not(.auth-locked) #configModal.auth-signed-in #createApiKeyBtn,
body:not(.auth-locked) #configModal.auth-signed-in .auth-mode-tab.active,
body:not(.auth-locked) .recharge-code-form button,
body:not(.auth-locked) .user-video-history-filters button.active{
  background:#176b9d!important;
  border-color:#3a9bd0!important;
  color:#fff!important;
}
body:not(.auth-locked) #configModal.auth-signed-in .api-key-reveal input,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-create input,
body:not(.auth-locked) .recharge-code-form input{
  background:#0b1725!important;
  border-color:#385575!important;
  color:#f8fbff!important;
}
body:not(.auth-locked) #configModal.auth-signed-in .api-key-item-head strong,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-item code{color:#eef4ff!important}
body:not(.auth-locked) #configModal.auth-signed-in .api-key-meta,
body:not(.auth-locked) #configModal.auth-signed-in .api-key-empty{color:#aebed0!important}
body:not(.auth-locked) .recharge-code-card .recharge-purchase-info a,
body:not(.auth-locked) .recharge-code-card .recharge-purchase-info button,
body:not(.auth-locked) .user-video-history-close,
body:not(.auth-locked) .user-video-history-filters button,
body:not(.auth-locked) .history-select-all,
body:not(.auth-locked) .user-video-delete,
body:not(.auth-locked) .user-video-refresh{
  background:#111d2d!important;
  border-color:#385575!important;
  color:#e8f1fb!important;
}
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .config-card,
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .auth-content,
html[data-theme="blue"] body:not(.auth-locked) .recharge-code-card,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card{
  background:#0a1a2c!important;
  border-color:#1e4e76!important;
}
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-info,
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row,
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel,
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-status,
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .redeem-code-panel,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-head,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-toolbar,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-footer{background:#0d2035!important;border-color:#2e6088!important}
html[data-theme="blue"] body:not(.auth-locked) .recharge-code-card .recharge-purchase-info a,
html[data-theme="blue"] body:not(.auth-locked) .recharge-code-card .recharge-purchase-info button,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-close,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-filters button,
html[data-theme="blue"] body:not(.auth-locked) .history-select-all,
html[data-theme="blue"] body:not(.auth-locked) .user-video-delete,
html[data-theme="blue"] body:not(.auth-locked) .user-video-refresh{background:#102b46!important;border-color:#3c79a3!important}
html[data-theme="blue"] body:not(.auth-locked) .recharge-code-card .recharge-code-headline::after,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-head::after{background:#102b46;border-color:#62acd5}

/* 个人信息与视频历史的完整主题覆盖。登录页仍由 auth-locked 保持原有粉色视觉。 */
body:not(.auth-locked) #configModal.auth-signed-in .auth-heading-mark,
body:not(.auth-locked) #configModal.auth-signed-in .auth-content>.close,
body:not(.auth-locked) #configModal.auth-signed-in .auth-logout-action{
  background:#111d2d!important;
  border-color:#385575!important;
  color:#dbeafe!important;
  box-shadow:none!important;
}
body:not(.auth-locked) #configModal.auth-signed-in .auth-heading-mark{color:#e8f5ff!important}
body:not(.auth-locked) #configModal.auth-signed-in .auth-content>.close{background:#111d2d!important;color:#dbeafe!important}

body:not(.auth-locked) #configModal.auth-signed-in .auth-content>.close:hover,
body:not(.auth-locked) #configModal.auth-signed-in .auth-logout-action:hover{background:#173a5e!important;border-color:#62acd5!important;color:#fff!important}


body:not(.auth-locked) .user-video-history-card,
body:not(.auth-locked) .user-video-history-card .user-video-history-head,
body:not(.auth-locked) .user-video-history-card .user-video-history-toolbar,
body:not(.auth-locked) .user-video-history-card .user-video-history-footer,
body:not(.auth-locked) .user-video-history-card .user-video-history-notice,
body:not(.auth-locked) .user-video-history-card .user-video-history-state,
body:not(.auth-locked) .user-video-history-card .user-video-history-item,
body:not(.auth-locked) .user-video-history-card .history-select-control,
body:not(.auth-locked) .user-video-history-card .history-thumb,
body:not(.auth-locked) .user-video-history-card .history-thumb-ready,
body:not(.auth-locked) .user-video-history-card .history-task-submeta code{
  background:#0e1623!important;
  border-color:#2b3d55!important;
  color:#dce8f5!important;
  box-shadow:none!important;
}
body:not(.auth-locked) .user-video-history-card .user-video-history-head h2,
body:not(.auth-locked) .user-video-history-card .user-video-history-head p,
body:not(.auth-locked) .user-video-history-card .history-task-heading>strong,
body:not(.auth-locked) .user-video-history-card .history-task-prompt,
body:not(.auth-locked) .user-video-history-card .history-task-meta,
body:not(.auth-locked) .user-video-history-card .history-task-submeta,
body:not(.auth-locked) .user-video-history-card .user-video-history-footer,
body:not(.auth-locked) .user-video-history-card .user-video-history-notice,
body:not(.auth-locked) .user-video-history-card .user-video-history-state strong,
body:not(.auth-locked) .user-video-history-card .user-video-history-state small{
  color:#dce8f5!important;
}
body:not(.auth-locked) .user-video-history-card .user-video-history-notice.is-error{background:#281621!important;border-color:#754055!important;color:#ffc8d8!important}
body:not(.auth-locked) .user-video-history-card .user-video-history-filters button,
body:not(.auth-locked) .user-video-history-card .history-select-all,
body:not(.auth-locked) .user-video-history-card .user-video-delete,
body:not(.auth-locked) .user-video-history-card .user-video-refresh,
body:not(.auth-locked) .user-video-history-card .user-video-history-close,
body:not(.auth-locked) .user-video-history-card .user-video-load-more,
body:not(.auth-locked) .user-video-history-card .history-action,
body:not(.auth-locked) .user-video-history-card .history-action-delete{
  background:#111d2d!important;
  border-color:#385575!important;
  color:#dbeafe!important;
}
body:not(.auth-locked) .user-video-history-card .user-video-history-filters button.active,
body:not(.auth-locked) .user-video-history-card .history-action-download{
  background:#176b9d!important;
  border-color:#3a9bd0!important;
  color:#fff!important;
}
body:not(.auth-locked) .user-video-history-card .user-video-history-filters button:hover,
body:not(.auth-locked) .user-video-history-card .history-select-all:hover,
body:not(.auth-locked) .user-video-history-card .user-video-delete:hover,
body:not(.auth-locked) .user-video-history-card .user-video-refresh:hover,
body:not(.auth-locked) .user-video-history-card .user-video-history-close:hover,
body:not(.auth-locked) .user-video-history-card .history-action:hover{background:#173a5e!important;border-color:#62acd5!important;color:#fff!important}
body:not(.auth-locked) .user-video-history-card .history-status-badge.succeeded{background:#123d32!important;color:#8de0bb!important}
body:not(.auth-locked) .user-video-history-card .history-status-badge.processing{background:#12384c!important;color:#9ddcff!important}
body:not(.auth-locked) .user-video-history-card .history-status-badge.queued{background:#263456!important;color:#c6d2ff!important}
body:not(.auth-locked) .user-video-history-card .history-status-badge.failed{background:#4a2130!important;color:#ffc0d0!important}
body:not(.auth-locked) .user-video-history-card .history-task-submeta code{color:#b8d4ef!important}

html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .auth-heading-mark,
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .auth-content>.close,
html[data-theme="blue"] body:not(.auth-locked) #configModal.auth-signed-in .auth-logout-action,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-head,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-toolbar,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-footer,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-notice,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-state,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-item,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-select-control,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-thumb,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-thumb-ready,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-task-submeta code{background:#0d2035!important;border-color:#2e6088!important}
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-head h2,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-head p,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-task-heading>strong,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-task-prompt,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-task-meta,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-task-submeta,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-footer,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-notice,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-state strong,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-state small{color:#e3f2ff!important}
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-filters button,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-select-all,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-delete,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-refresh,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-history-close,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .user-video-load-more,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-action,
html[data-theme="blue"] body:not(.auth-locked) .user-video-history-card .history-action-delete{background:#102b46!important;border-color:#3c79a3!important;color:#e3f2ff!important}

/* 历史卡片本身会裁剪溢出内容，熊猫徽章放进标题栏空白处以完整显示。 */
body:not(.auth-locked) .user-video-history-card .user-video-history-head::after{
  top:6px;
  right:58px;
}

/* 最终黑白版工作台：保留功能，只恢复第一版的规整布局和黑/白主题。 */
body:not(.auth-locked) .topbar::before,
body:not(.auth-locked) .topbar::after,
body:not(.auth-locked) .panel::before,
body:not(.auth-locked) .panel::after,
body:not(.auth-locked) .modal-card::before,
body:not(.auth-locked) .modal-card::after,
body:not(.auth-locked) .recharge-code-card .recharge-code-headline::after,
body:not(.auth-locked) .user-video-history-card .user-video-history-head::after{
  content:none!important;
  display:none!important;
}

@media (min-width:1101px){
  body:not(.auth-locked) .app-shell > main.grid{
    grid-template-columns:minmax(0,3fr) minmax(340px,2fr)!important;
    grid-template-rows:minmax(0,1.45fr) minmax(0,.55fr)!important;
    grid-template-areas:"workspace controls" "workspace tasks"!important;
    gap:12px!important;
    overflow:hidden!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{
    grid-area:workspace!important;
    min-height:0!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel{
    grid-area:controls!important;
    min-height:0!important;
    align-self:stretch!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{
    grid-area:tasks!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .panel{
    padding:14px!important;
    border-radius:12px!important;
    overflow:hidden!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel>.editor{min-height:120px!important}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .image-shelf{height:128px!important;margin-bottom:10px!important}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:10px!important}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .ratio-picker{grid-column:1 / -1!important}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .option-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body:not(.auth-locked) .app-shell > main.grid > .task-panel .task-list{min-height:0!important;overflow:auto!important}
}

/* 全屏自适应工作台：登录页保持原样，工作台占满可用视口并按尺寸降级。 */
body:not(.auth-locked){
  min-height:100dvh;
  height:100dvh;
  overflow:hidden;
}
body:not(.auth-locked) .app-shell{
  width:100%;
  height:100dvh;
  min-height:0;
  margin:0;
  padding:clamp(8px,1vw,16px);
  gap:clamp(8px,1vw,14px);
  overflow:hidden;
}
body:not(.auth-locked) .topbar{
  flex:0 0 auto;
  min-height:clamp(62px,7dvh,82px);
  height:auto;
  padding:clamp(10px,1.2vw,16px) clamp(12px,1.5vw,20px);
  position:relative;
  top:auto;
}
body:not(.auth-locked) .app-shell > main.grid{
  flex:1 1 auto;
  width:100%;
  height:auto;
  min-height:0;
  overflow:hidden;
  gap:clamp(8px,1vw,14px);
}
body:not(.auth-locked) .app-shell > main.grid > .panel{
  min-width:0;
  min-height:0;
  overflow:hidden;
  padding:clamp(12px,1.25vw,18px);
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{
  min-height:0;
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{
  min-height:clamp(110px,18dvh,300px);
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .image-shelf{
  height:clamp(96px,15dvh,154px);
}
body:not(.auth-locked) .fixed-prompt-wrap{margin-top:clamp(8px,1dvh,14px)}
body:not(.auth-locked) .fixed-prompt-input{min-height:clamp(52px,7dvh,88px);max-height:clamp(78px,12dvh,126px)}
body:not(.auth-locked) .app-shell > main.grid > .task-panel .task-list{min-height:0;overflow:auto}

@media (min-width:1101px){
  body:not(.auth-locked) .app-shell > main.grid{
    grid-template-columns:minmax(0,3fr) minmax(340px,2fr)!important;
    grid-template-rows:minmax(0,1fr) minmax(190px,auto)!important;
    grid-template-areas:"workspace tasks" "controls tasks"!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{grid-area:workspace!important}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel{grid-area:controls!important}
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{grid-area:tasks!important}
}
@media (min-width:769px) and (max-width:1100px){
  body:not(.auth-locked) .app-shell{overflow:auto;height:auto;min-height:100dvh}
  body:not(.auth-locked) .app-shell > main.grid{overflow:visible;grid-template-columns:minmax(0,1fr) minmax(300px,.72fr);grid-template-rows:minmax(500px,1fr) auto;grid-template-areas:"workspace tasks" "controls tasks"}
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{max-height:none}
}
@media (max-width:768px){
  body:not(.auth-locked){height:auto;min-height:100dvh;overflow:auto}
  body:not(.auth-locked) .app-shell{height:auto;min-height:100dvh;overflow:visible;padding:8px;gap:8px}
  body:not(.auth-locked) .topbar{align-items:flex-start;flex-direction:column;min-height:0}
  body:not(.auth-locked) .top-actions{width:100%;flex-wrap:wrap;justify-content:flex-start}
  body:not(.auth-locked) .app-shell > main.grid{overflow:visible;grid-template-columns:1fr;grid-template-rows:auto auto minmax(360px,70dvh);grid-template-areas:"workspace" "controls" "tasks"}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{min-height:clamp(440px,64dvh,680px)}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel{min-height:0}
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{min-height:360px;max-height:none}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{min-height:clamp(170px,28dvh,300px)}
}

@media (max-width:1100px){
  body:not(.auth-locked) .app-shell > main.grid{overflow:auto!important}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{min-height:0!important}
  body:not(.auth-locked) .app-shell > main.grid > .option-panel{min-height:0!important}
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{min-height:320px!important;max-height:none!important}
}

/* 炫酷黑：深色底、高对比输入，便于直接编辑提示词。 */
html[data-theme="mono"] body:not(.auth-locked){
  background:#030405!important;
  color:#f5f7fa!important;
}
html[data-theme="mono"] body:not(.auth-locked) .topbar,
html[data-theme="mono"] body:not(.auth-locked) .panel{
  background:#0a0d12!important;
  border-color:#27303c!important;
  box-shadow:0 12px 32px rgba(0,0,0,.48)!important;
}
html[data-theme="mono"] body:not(.auth-locked) h1,
html[data-theme="mono"] body:not(.auth-locked) h2,
html[data-theme="mono"] body:not(.auth-locked) .section-title,
html[data-theme="mono"] body:not(.auth-locked) label,
html[data-theme="mono"] body:not(.auth-locked) .ratio-picker,
html[data-theme="mono"] body:not(.auth-locked) .model-picker,
html[data-theme="mono"] body:not(.auth-locked) .channel-picker{
  color:#f5f7fa!important;
}
html[data-theme="mono"] body:not(.auth-locked) .topbar p,
html[data-theme="mono"] body:not(.auth-locked) .hint,
html[data-theme="mono"] body:not(.auth-locked) .status-line,
html[data-theme="mono"] body:not(.auth-locked) .image-shelf-head,
html[data-theme="mono"] body:not(.auth-locked) .image-shelf-head em,
html[data-theme="mono"] body:not(.auth-locked) .license-card span,
html[data-theme="mono"] body:not(.auth-locked) .license-card em,
html[data-theme="mono"] body:not(.auth-locked) .credit-card span,
html[data-theme="mono"] body:not(.auth-locked) .credit-card em,
html[data-theme="mono"] body:not(.auth-locked) .option-row label,
html[data-theme="mono"] body:not(.auth-locked) .model-resolution,
html[data-theme="mono"] body:not(.auth-locked) .task-main p,
html[data-theme="mono"] body:not(.auth-locked) .task-main em,
html[data-theme="mono"] body:not(.auth-locked) .task-info{
  color:#9daabb!important;
}
html[data-theme="mono"] body:not(.auth-locked) a.account-entry,
html[data-theme="mono"] body:not(.auth-locked) button,
html[data-theme="mono"] body:not(.auth-locked) input,
html[data-theme="mono"] body:not(.auth-locked) select,
html[data-theme="mono"] body:not(.auth-locked) textarea,
html[data-theme="mono"] body:not(.auth-locked) .client-server-select{
  background:#0f141c!important;
  color:#f5f7fa!important;
  border-color:#344052!important;
}
html[data-theme="mono"] body:not(.auth-locked) input::placeholder,
html[data-theme="mono"] body:not(.auth-locked) textarea::placeholder,
html[data-theme="mono"] body:not(.auth-locked) .editor:empty:before{color:#9daabb!important;opacity:1}
html[data-theme="mono"] body:not(.auth-locked) a.account-entry:hover,
html[data-theme="mono"] body:not(.auth-locked) button:hover{background:#1b2430!important;border-color:#6b7b91!important}
html[data-theme="mono"] body:not(.auth-locked) .primary,
html[data-theme="mono"] body:not(.auth-locked) .send-btn,
html[data-theme="mono"] body:not(.auth-locked) .theme-toggle.active{
  background:#f5f7fa!important;
  color:#050608!important;
  border-color:#f5f7fa!important;
}
html[data-theme="mono"] body:not(.auth-locked) .primary:hover,
html[data-theme="mono"] body:not(.auth-locked) .send-btn:hover,
html[data-theme="mono"] body:not(.auth-locked) .theme-toggle.active:hover{background:#dce3ec!important;border-color:#fff!important}
html[data-theme="mono"] body:not(.auth-locked) .editor,
html[data-theme="mono"] body:not(.auth-locked) .image-shelf,
html[data-theme="mono"] body:not(.auth-locked) .image-list.empty,
html[data-theme="mono"] body:not(.auth-locked) .task-list.empty,
html[data-theme="mono"] body:not(.auth-locked) .image-card,
html[data-theme="mono"] body:not(.auth-locked) .task-card,
html[data-theme="mono"] body:not(.auth-locked) .credit-card,
html[data-theme="mono"] body:not(.auth-locked) .license-card,
html[data-theme="mono"] body:not(.auth-locked) .reference-media-row{
  background:#080b10!important;
  border-color:#27303c!important;
  color:#f5f7fa!important;
}
html[data-theme="mono"] body:not(.auth-locked) .editor{caret-color:#fff!important}
html[data-theme="mono"] body:not(.auth-locked) .ratio{background:#0f141c!important;border-color:#344052!important;color:#f5f7fa!important}
html[data-theme="mono"] body:not(.auth-locked) .ratio.active{background:#f5f7fa!important;border-color:#f5f7fa!important;color:#050608!important}
html[data-theme="mono"] body:not(.auth-locked) .ref-tag{background:#111b27!important;border-color:#526176!important;color:#f5f7fa!important}
html[data-theme="mono"] body:not(.auth-locked) .image-shelf.over,
html[data-theme="mono"] body:not(.auth-locked) .editor.over{background:#111b27!important;border-color:#7ea7d2!important}
html[data-theme="mono"] body:not(.auth-locked) .license-card strong,
html[data-theme="mono"] body:not(.auth-locked) .credit-card strong,
html[data-theme="mono"] body:not(.auth-locked) .task-head strong,
html[data-theme="mono"] body:not(.auth-locked) .model-resolution strong{color:#f5f7fa!important}
html[data-theme="mono"] body:not(.auth-locked) .reference-media-chip{background:#111720!important;border-color:#526176!important;color:#f5f7fa!important}
html[data-theme="mono"] body:not(.auth-locked) .modal{background:rgba(0,0,0,.78)!important}

/* 白色主题：黑字白底，仍保持同一套规整布局。 */
html[data-theme="light"] body:not(.auth-locked){
  background:#f6f7fb!important;
  color:#1d2433!important;
}
html[data-theme="light"] body:not(.auth-locked) .topbar,
html[data-theme="light"] body:not(.auth-locked) .panel,
html[data-theme="light"] body:not(.auth-locked) .modal-card{
  background:#fff!important;
  border-color:#e5e7eb!important;
  box-shadow:0 8px 22px rgba(26,32,44,.08)!important;
}
html[data-theme="light"] body:not(.auth-locked) h1,
html[data-theme="light"] body:not(.auth-locked) h2,
html[data-theme="light"] body:not(.auth-locked) .section-title,
html[data-theme="light"] body:not(.auth-locked) label,
html[data-theme="light"] body:not(.auth-locked) .ratio-picker,
html[data-theme="light"] body:not(.auth-locked) .model-picker,
html[data-theme="light"] body:not(.auth-locked) .channel-picker{color:#1d2433!important}
html[data-theme="light"] body:not(.auth-locked) .topbar p,
html[data-theme="light"] body:not(.auth-locked) .hint,
html[data-theme="light"] body:not(.auth-locked) .status-line,
html[data-theme="light"] body:not(.auth-locked) .image-shelf-head,
html[data-theme="light"] body:not(.auth-locked) .image-shelf-head em,
html[data-theme="light"] body:not(.auth-locked) .license-card span,
html[data-theme="light"] body:not(.auth-locked) .license-card em,
html[data-theme="light"] body:not(.auth-locked) .credit-card span,
html[data-theme="light"] body:not(.auth-locked) .credit-card em,
html[data-theme="light"] body:not(.auth-locked) .option-row label,
html[data-theme="light"] body:not(.auth-locked) .model-resolution,
html[data-theme="light"] body:not(.auth-locked) .task-main p,
html[data-theme="light"] body:not(.auth-locked) .task-main em,
html[data-theme="light"] body:not(.auth-locked) .task-info{color:#667085!important}
html[data-theme="light"] body:not(.auth-locked) a.account-entry,
html[data-theme="light"] body:not(.auth-locked) button,
html[data-theme="light"] body:not(.auth-locked) input,
html[data-theme="light"] body:not(.auth-locked) select,
html[data-theme="light"] body:not(.auth-locked) textarea,
html[data-theme="light"] body:not(.auth-locked) .client-server-select{background:#fff!important;color:#1d2433!important;border-color:#dfe5ee!important}
html[data-theme="light"] body:not(.auth-locked) input::placeholder,
html[data-theme="light"] body:not(.auth-locked) textarea::placeholder,
html[data-theme="light"] body:not(.auth-locked) .editor:empty:before{color:#9aa3b2!important;opacity:1}
html[data-theme="light"] body:not(.auth-locked) a.account-entry:hover,
html[data-theme="light"] body:not(.auth-locked) button:hover{background:#f4f7fb!important;border-color:#bfc8d6!important}
html[data-theme="light"] body:not(.auth-locked) .primary,
html[data-theme="light"] body:not(.auth-locked) .send-btn,
html[data-theme="light"] body:not(.auth-locked) .theme-toggle.active{background:#111827!important;color:#fff!important;border-color:#111827!important}
html[data-theme="light"] body:not(.auth-locked) .primary:hover,
html[data-theme="light"] body:not(.auth-locked) .send-btn:hover,
html[data-theme="light"] body:not(.auth-locked) .theme-toggle.active:hover{background:#000!important;border-color:#000!important}
html[data-theme="light"] body:not(.auth-locked) .editor,
html[data-theme="light"] body:not(.auth-locked) .image-shelf,
html[data-theme="light"] body:not(.auth-locked) .image-list.empty,
html[data-theme="light"] body:not(.auth-locked) .task-list.empty,
html[data-theme="light"] body:not(.auth-locked) .image-card,
html[data-theme="light"] body:not(.auth-locked) .task-card,
html[data-theme="light"] body:not(.auth-locked) .credit-card,
html[data-theme="light"] body:not(.auth-locked) .license-card,
html[data-theme="light"] body:not(.auth-locked) .reference-media-row{background:#fbfcff!important;border-color:#e1e6ee!important;color:#1d2433!important}
html[data-theme="light"] body:not(.auth-locked) .ratio{background:#fbfcff!important;border-color:#dfe5ee!important;color:#2a3344!important}
html[data-theme="light"] body:not(.auth-locked) .ratio.active{background:#eef2f7!important;border-color:#111827!important;color:#111827!important}
html[data-theme="light"] body:not(.auth-locked) .ref-tag{background:#f1f5fb!important;border-color:#dfe7f2!important;color:#2a3344!important}
html[data-theme="light"] body:not(.auth-locked) .image-shelf.over,
html[data-theme="light"] body:not(.auth-locked) .editor.over{background:#f3f6fb!important;border-color:#667085!important}
html[data-theme="light"] body:not(.auth-locked) .license-card strong,
html[data-theme="light"] body:not(.auth-locked) .credit-card strong,
html[data-theme="light"] body:not(.auth-locked) .task-head strong,
html[data-theme="light"] body:not(.auth-locked) .model-resolution strong{color:#1d2433!important}
html[data-theme="light"] body:not(.auth-locked) .reference-media-chip{background:#f1f5fb!important;border-color:#dfe7f2!important;color:#2a3344!important}
html[data-theme="light"] body:not(.auth-locked) .modal{background:rgba(15,23,42,.35)!important}

/* 账号、充值、历史弹窗复用当前黑白色板，登录态页面仍保留原登录视觉。 */
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .config-card,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-content,
html[data-theme="mono"] body:not(.auth-locked) .recharge-code-card,
html[data-theme="mono"] body:not(.auth-locked) .user-video-history-card{background:#0a0d12!important;border-color:#27303c!important;color:#f5f7fa!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .config-card,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-content,
html[data-theme="light"] body:not(.auth-locked) .recharge-code-card,
html[data-theme="light"] body:not(.auth-locked) .user-video-history-card{background:#fff!important;border-color:#e5e7eb!important;color:#1d2433!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-heading h2,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-heading p,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row span,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row strong,
html[data-theme="light"] body:not(.auth-locked) .recharge-code-card h2,
html[data-theme="light"] body:not(.auth-locked) .recharge-code-card p,
html[data-theme="light"] body:not(.auth-locked) .user-video-history-card h2,
html[data-theme="light"] body:not(.auth-locked) .user-video-history-card p{color:#1d2433!important}
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-heading h2,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-heading p,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row span,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row strong,
html[data-theme="mono"] body:not(.auth-locked) .recharge-code-card h2,
html[data-theme="mono"] body:not(.auth-locked) .recharge-code-card p,
html[data-theme="mono"] body:not(.auth-locked) .user-video-history-card h2,
html[data-theme="mono"] body:not(.auth-locked) .user-video-history-card p{color:#f5f7fa!important}

/* 截图版桌面布局：任务队列贯穿右侧，左侧提示词与参数上下排列。 */
@media (min-width:1101px){
  body:not(.auth-locked) .app-shell > main.grid{
    grid-template-columns:minmax(0,3fr) minmax(340px,2fr)!important;
    grid-template-rows:minmax(0,1fr) minmax(210px,auto)!important;
    grid-template-areas:"workspace tasks" "controls tasks"!important;
    min-height:calc(100dvh - 128px)!important;
    gap:10px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{
    grid-area:workspace!important;
    min-height:0!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel{
    grid-area:controls!important;
    min-height:0!important;
    align-self:stretch!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{
    grid-area:tasks!important;
    min-height:0!important;
    max-height:none!important;
    align-self:stretch!important;
  }
}
/* 自动运行：保持与现有工具面板一致的紧凑布局 */
.automation-card{width:min(980px,94vw);height:min(760px,90vh);display:flex;flex-direction:column;gap:12px;padding:22px;overflow:hidden}
.auto-edit-card{width:min(900px,94vw);max-height:min(760px,90vh);display:flex;flex-direction:column;gap:14px;padding:22px;overflow:auto}
.auto-edit-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.auto-edit-toolbar label{display:flex;align-items:center;gap:6px;font-size:13px}.auto-edit-toolbar input[type=number]{width:68px}.auto-edit-list{display:flex;flex-direction:column;gap:8px;min-height:80px;max-height:300px;overflow:auto}.auto-edit-list.empty{display:grid;place-items:center;padding:30px;color:#8f9bad;border:1px dashed #405064;border-radius:6px}.auto-edit-item{display:grid;grid-template-columns:28px minmax(0,1fr) auto auto auto auto;align-items:center;gap:8px;padding:9px;border:1px solid #2b3b4e;border-radius:6px;background:#101821}.auto-edit-index{color:#9fb0c4;font-variant-numeric:tabular-nums}.auto-edit-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.auto-edit-size{color:#94a3b8;font-size:12px}.auto-edit-preview{width:100%;max-height:320px;background:#05070b;border-radius:6px}.auto-edit-download{width:max-content;text-decoration:none}.auto-edit-item button{padding:4px 7px;font-size:12px}
.automation-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-right:28px}.automation-head h2{margin:0;font-size:21px}.automation-head p{margin:6px 0 0;color:#667085;font-size:12px}.automation-state-badge{flex:0 0 auto;border-radius:999px;background:#eef0f3;color:#4b5563;padding:5px 10px;font-size:11px;font-weight:700}.automation-state-badge.running{background:#ede9fe;color:#6d28d9}.automation-state-badge.paused{background:#fff7ed;color:#c2410c}.automation-state-badge.done{background:#ecfdf3;color:#027a48}.automation-state-badge.error{background:#fff1f2;color:#be123c}
.automation-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.automation-toolbar button{height:34px}.automation-settings{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;align-items:end}.automation-settings label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#4b5563;min-width:0}.automation-settings select,.automation-settings input[type="text"]{height:34px;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff;min-width:0}.automation-check{height:34px;justify-content:center;flex-direction:row!important;align-items:center;white-space:nowrap;grid-column:1 / -1}.automation-check input{width:14px;height:14px;margin:0;accent-color:#6d28d9}.automation-file-name{font-size:12px;color:#475467;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:8px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.automation-summary{font-size:12px;color:#667085;line-height:1.5}.automation-asset-report{display:flex;flex-wrap:wrap;gap:6px;min-height:24px}.automation-asset-report:empty{display:none}.automation-asset-chip{border-radius:999px;padding:4px 8px;font-size:11px;background:#ecfdf3;color:#027a48}.automation-asset-chip.missing{background:#fff7ed;color:#c2410c}.automation-segments{flex:1;min-height:120px;overflow:auto;border:1px solid #e5e7eb;border-radius:12px;background:#fbfcff;padding:8px;display:flex;flex-direction:column;gap:7px}.automation-segments.empty{align-items:center;justify-content:center;color:#98a2b3;border-style:dashed;font-size:12px}.automation-segment{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:9px;align-items:start;padding:9px;border:1px solid #e4e7ec;border-radius:10px;background:#fff}.automation-segment-index{width:24px;height:24px;border-radius:8px;background:#f1f5f9;color:#475467;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}.automation-segment-copy{min-width:0}.automation-segment-text{font-size:12px;line-height:1.5;color:#344054;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap}.automation-segment-assets{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}.automation-segment-assets span{font-size:10px;color:#027a48;background:#f0fdf4;border-radius:999px;padding:2px 6px}.automation-segment-assets span.missing{color:#b54708;background:#fffaeb}.automation-segment-status{font-size:11px;color:#667085;white-space:nowrap}.automation-segment-status.running{color:#6d28d9}.automation-segment-status.done{color:#027a48}.automation-segment-status.failed{color:#b42318}.automation-message{font-size:12px;line-height:1.45;min-height:18px;color:#667085}.automation-message.error{color:#b42318}.automation-message.success{color:#027a48}
@media(max-width:1100px){.automation-settings{grid-template-columns:repeat(3,minmax(120px,1fr))}}
@media(max-width:900px){.automation-card{height:min(760px,94vh);padding:16px}.automation-settings{grid-template-columns:1fr 1fr}.automation-check{justify-content:flex-start}.automation-segment{grid-template-columns:30px minmax(0,1fr)}.automation-segment-status{grid-column:2}}

/* 桌面工作区：给视频提示词更大的连续编辑面，并把视频参数压缩为一行控件。 */
@media (min-width:1101px){
  body:not(.auth-locked) .app-shell > main.grid{
    grid-template-rows:minmax(0,1fr) minmax(215px,clamp(215px,26dvh,250px))!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{
    min-height:0!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-auto-rows:min-content!important;
    align-content:start!important;
    padding:10px!important;
    gap:5px!important;
    overflow:hidden!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel > h2{
    grid-column:1 / -1!important;
    min-height:20px!important;
    margin-bottom:0!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row{
    grid-column:1 / -1!important;
    grid-template-columns:minmax(0,1.2fr) minmax(0,.9fr) minmax(0,1.4fr)!important;
    gap:6px!important;
    align-items:end!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .ratio-picker{
    grid-column:auto!important;
    gap:2px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .ratio-row{
    gap:4px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .ratio{
    width:auto!important;
    min-width:48px!important;
    height:30px!important;
    border-radius:9px!important;
    gap:2px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .option-row{
    grid-column:1!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .option-row input,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .option-row select,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row select{
    height:28px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .model-resolution{
    margin-top:2px!important;
    line-height:1.2!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .generation-cost{
    grid-column:2!important;
    align-self:end!important;
    margin:0!important;
    min-height:16px!important;
    line-height:1.25!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .send-btn{
    grid-column:1 / -1!important;
    height:34px!important;
    margin-top:0!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .status-line{
    grid-column:1 / -1!important;
    min-height:16px!important;
  }
}

/* 笔记本兼容：提示词编辑器不能被固定网格行和面板裁剪隐藏。 */
@media (min-width:769px) and (max-width:1100px){
  body:not(.auth-locked){
    height:auto!important;
    min-height:100dvh!important;
    overflow:auto!important;
  }
  body:not(.auth-locked) .app-shell{
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  body:not(.auth-locked) .app-shell > main.grid{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto minmax(420px,auto)!important;
    grid-template-areas:"workspace" "controls" "tasks"!important;
    align-content:start!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .panel{
    overflow:visible!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{
    min-height:clamp(620px,72dvh,780px)!important;
    overflow:visible!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{
    min-height:clamp(240px,32dvh,400px)!important;
    flex:1 1 auto!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel{
    min-height:0!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{
    min-height:420px!important;
    max-height:none!important;
    overflow:hidden!important;
  }
}

/* 矮屏笔记本：保留左右任务布局，但让工作区按内容展开并允许页面滚动。 */
@media (min-width:1101px) and (max-height:820px){
  body:not(.auth-locked){
    height:auto!important;
    min-height:100dvh!important;
    overflow:auto!important;
  }
  body:not(.auth-locked) .app-shell{
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  body:not(.auth-locked) .app-shell > main.grid{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    grid-template-rows:auto auto!important;
    align-content:start!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .panel{
    overflow:visible!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{
    min-height:650px!important;
    overflow:visible!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{
    min-height:300px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{
    max-height:none!important;
    overflow:hidden!important;
  }
}

/* 提示词区：标题操作与参考素材保持同一行，编辑器底部使用可见虚线收口。 */
body:not(.auth-locked) .app-shell .prompt-upload-actions{
  flex:1 1 auto;
  min-width:0;
  justify-content:flex-end;
  gap:8px;
}

body:not(.auth-locked) .app-shell .prompt-upload-actions .reference-media-btn{
  flex:0 0 auto;
}

body:not(.auth-locked) .app-shell .prompt-panel > .editor{
  border-style:dashed!important;
  border-width:1px!important;
  border-color:#526176!important;
  box-shadow:inset 0 -1px 0 rgba(126,167,210,.24);
  margin-bottom:10px;
}

html[data-theme="mono"] body:not(.auth-locked) .app-shell .prompt-panel > .editor{
  border-color:#526176!important;
  border-bottom-color:#7ea7d2!important;
}

@media (max-width:620px){
  body:not(.auth-locked) .app-shell .prompt-upload-actions{
    width:100%;
    flex-wrap:wrap;
    justify-content:flex-start;
  }
}

/* 参数行统一从同一基线开始；模型项的规格提示不再把选择框向上挤。 */
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row{
  align-items:start!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row > label,
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row > .ratio-picker{
  align-self:start!important;
}

/* 视频参数三列使用相同的标签、控件和辅助文字节奏，避免模型提示把整行基线拉开。 */
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row > label,
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row > .ratio-picker{
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  margin:0!important;
  line-height:16px!important;
  min-width:0!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row select,
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-picker-row,
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-picker-row button{
  height:34px!important;
  min-height:34px!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-picker-row{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:8px!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-picker-row select{
  flex:1 1 auto!important;
  min-width:0!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-resolution{
  display:block!important;
  min-height:14px!important;
  margin-top:0!important;
  line-height:14px!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .ratio-row{
  height:34px!important;
  align-items:stretch!important;
  gap:6px!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .ratio{
  height:34px!important;
  min-height:34px!important;
  padding:3px!important;
}

/* 桌面端视频参数行：三列共享同一顶部和控件基线；规格提示固定在控件下方，
   不再把模型列或比例列单独撑高。移动端继续使用上方断点布局。 */
@media (min-width:1101px){
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row{
    align-items:start!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row > label,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row > .ratio-picker{
    min-height:72px!important;
    align-items:stretch!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-picker-row,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row select,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-picker-row button,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .ratio-row,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .ratio{
    height:34px!important;
    min-height:34px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-picker-row{
    align-items:center!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .model-resolution{
    height:14px!important;
    min-height:14px!important;
    line-height:14px!important;
    margin-top:2px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .option-panel .source-row .ratio-row{
    align-items:stretch!important;
  }
}
.automation-settings input[type="number"]{height:34px;border:1px solid #dfe5ee;border-radius:10px;padding:0 8px;background:#fff;min-width:0}.automation-settings small{font-size:10px;color:#98a2b3;margin-top:-2px}

/* Canonical workspace layout (keep below legacy overrides).
   The editor and fixed-content field stay in normal document flow so short
   or zoomed windows can scroll instead of clipping controls. */
body:not(.auth-locked){
  width:100%;
  min-height:100dvh;
  height:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body:not(.auth-locked) .app-shell{
  width:calc(100% - 24px)!important;
  max-width:none!important;
  min-height:100dvh;
  height:auto!important;
  margin:0 auto!important;
  padding:12px 0 36px!important;
  overflow:visible!important;
}
body:not(.auth-locked) .app-shell > main.grid{
  display:grid!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  align-content:start!important;
  grid-template-columns:minmax(0,1fr) minmax(420px,1fr)!important;
  grid-template-rows:auto auto!important;
  grid-template-areas:"workspace tasks" "controls tasks"!important;
  gap:12px!important;
}
body:not(.auth-locked) .app-shell > main.grid > .panel{
  min-width:0!important;
  overflow:visible!important;
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{
  grid-area:workspace!important;
  min-height:620px!important;
  height:auto!important;
  align-self:start!important;
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{
  flex:0 0 280px!important;
  height:280px!important;
  min-height:200px!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .fixed-prompt-wrap{
  display:flex!important;
  visibility:visible!important;
  flex:0 0 auto!important;
  min-height:122px!important;
  margin-top:14px!important;
}
body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .fixed-prompt-input{
  display:block!important;
  width:100%!important;
  min-height:92px!important;
  height:92px!important;
  max-height:220px!important;
  resize:vertical!important;
}
body:not(.auth-locked) .app-shell > main.grid > .option-panel{
  grid-area:controls!important;
  min-height:0!important;
  height:auto!important;
  align-self:start!important;
}
body:not(.auth-locked) .app-shell > main.grid > .task-panel{
  grid-area:tasks!important;
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  height:auto!important;
  max-height:calc(100dvh - 36px)!important;
  position:sticky!important;
  top:18px!important;
  align-self:start!important;
}
body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-list{
  flex:1 1 auto!important;
  min-height:180px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}

@media (max-width:1100px){
  body:not(.auth-locked) .app-shell{
    width:min(860px,calc(100% - 24px))!important;
    padding-top:10px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid{
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel,
  body:not(.auth-locked) .app-shell > main.grid > .option-panel,
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{
    width:100%!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    position:static!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{min-height:560px!important}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{
    flex-basis:260px!important;
    height:260px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-list{min-height:320px!important}
}
@media (max-width:640px){
  body:not(.auth-locked) .app-shell{
    width:calc(100% - 12px)!important;
    padding:8px 0 28px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid{gap:10px!important}
  body:not(.auth-locked) .app-shell > main.grid > .panel{padding:12px!important}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel{min-height:500px!important}
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel > .editor{
    flex-basis:220px!important;
    height:220px!important;
    min-height:180px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .image-shelf{
    height:112px!important;
    flex-basis:112px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .fixed-prompt-wrap{
    min-height:106px!important;
    margin-top:10px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .prompt-panel .fixed-prompt-input{
    min-height:78px!important;
    height:78px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-list{min-height:280px!important}
}

/* Keep the automation dialog's inner surfaces in the active theme.  The
   generic modal theme only styles the outer card, while these controls have
   their own light backgrounds defined above. */
html[data-theme="mono"] .automation-card .automation-head p,
html[data-theme="mono"] .automation-card .automation-settings label,
html[data-theme="mono"] .automation-card .automation-summary,
html[data-theme="mono"] .automation-card .automation-message,
html[data-theme="mono"] .automation-card .automation-segment-status,
html[data-theme="mono"] .automation-card .automation-file-name,
html[data-theme="mono"] .automation-card .automation-settings small{color:#aeb8c7}
html[data-theme="mono"] .automation-card .automation-settings select,
html[data-theme="mono"] .automation-card .automation-settings input[type="text"],
html[data-theme="mono"] .automation-card .automation-settings input[type="number"]{
  background:#0f141c;
  color:#f5f7fa;
  border-color:#344052;
}
html[data-theme="mono"] .automation-card .automation-file-name,
html[data-theme="mono"] .automation-card .automation-segments{
  background:#0f141c;
  border-color:#344052;
}
html[data-theme="mono"] .automation-card .automation-segment{
  background:#111720;
  border-color:#344052;
}
html[data-theme="mono"] .automation-card .automation-segment-text{color:#e5e7eb}
html[data-theme="mono"] .automation-card .automation-segment-index{background:#1b2430;color:#d3dae4}
html[data-theme="mono"] .automation-card .automation-segments.empty{color:#8f9bad}
html[data-theme="mono"] .automation-card .automation-asset-chip{background:#123323;color:#86efac}
html[data-theme="mono"] .automation-card .automation-asset-chip.missing{background:#332415;color:#fdba74}

.automation-segment-text{width:100%;border:0;background:transparent;text-align:left;padding:0;cursor:pointer;font:inherit}.automation-segment-text:hover{color:#6d28d9}.automation-segment-editor{width:100%;min-height:110px;resize:vertical;border:1px solid #c7d2fe;border-radius:8px;padding:8px;font:inherit;line-height:1.5;color:#344054;background:#fff}.automation-edit-actions{display:flex;gap:6px;margin-top:6px}.automation-edit-actions button{height:28px;padding:0 10px;font-size:11px}.automation-license-card{width:min(520px,calc(100vw - 32px));padding:24px}.automation-license-card h2{margin:0 38px 10px 0}.automation-license-card p{color:#667085;font-size:13px;line-height:1.5}.automation-license-contact{padding:10px;border-left:3px solid #7c3aed;background:#faf5ff;color:#5b21b6!important}.automation-license-card form{display:grid;gap:10px}.automation-license-card label{display:grid;gap:5px;font-size:12px;color:#475467}.automation-license-card input{height:38px;border:1px solid #d0d5dd;border-radius:8px;padding:0 10px;font:inherit}.automation-license-card button.primary{height:38px}
html[data-theme="mono"] .automation-card .automation-segment-assets span{background:#123323;color:#86efac}
html[data-theme="mono"] .automation-card .automation-segment-assets span.missing{background:#332415;color:#fdba74}
html[data-theme="mono"] .automation-state-badge{background:#1b2430;color:#d3dae4;border:1px solid #344052}
html[data-theme="mono"] .automation-state-badge.running{background:#21153b;color:#d8b4fe;border-color:#6d28d9}
html[data-theme="mono"] .automation-state-badge.paused{background:#332415;color:#fdba74;border-color:#9a5b19}
html[data-theme="mono"] .automation-state-badge.done{background:#123323;color:#86efac;border-color:#256b45}
html[data-theme="mono"] .automation-state-badge.error{background:#33161d;color:#fda4af;border-color:#8f3045}
html[data-theme="mono"] .automation-asset-report:empty{display:none}

/* Keep large automatic-run parses readable without changing segment data. */
.automation-asset-report{align-content:flex-start;max-height:92px;overflow:auto;padding:6px 8px;border:1px solid #e5e7eb;border-radius:10px;background:#fbfcff}
.automation-asset-chip{white-space:nowrap;line-height:1.2}
.automation-segment{grid-template-columns:34px minmax(0,1fr) 58px}
.automation-segment-text{-webkit-line-clamp:2;line-height:1.45}
.automation-segment-assets{align-content:flex-start;max-height:38px;overflow:auto;padding-right:2px}
.automation-segment-assets span{white-space:nowrap;line-height:1.2}
.automation-segment-status{text-align:right;padding-top:4px}

/* Native ratio selector and theme-aware account/recharge surfaces. */
.ratio-select{width:100%;min-width:130px;height:34px;border:1px solid #dfe5ee;border-radius:10px;padding:0 10px;background:#fff;color:#1d2433;font-size:12px}
.ratio-picker{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#4b5563;min-width:0}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-info,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-status,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-item,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-empty,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .redeem-code-panel,
html[data-theme="light"] body:not(.auth-locked) .recharge-code-card .recharge-purchase-description{background:#f8fafc!important;border-color:#e5e7eb!important;color:#1d2433!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-item-head strong,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-item code{color:#1d2433!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-meta,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-empty{color:#667085!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-item-actions button{background:#fff!important;border-color:#d1d5db!important;color:#344054!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-item-actions button.danger{color:#b42318!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in input,
html[data-theme="light"] body:not(.auth-locked) .recharge-code-card input,
html[data-theme="light"] body:not(.auth-locked) .ratio-select{background:#fff!important;color:#1d2433!important;border-color:#d1d5db!important}

/* 图一 surfaces follow the active black/white theme instead of retaining a
   bright light editor inside the dark workspace. */
html[data-theme="mono"] body:not(.auth-locked) .prompt-panel > .editor,
html[data-theme="mono"] body:not(.auth-locked) .prompt-panel .image-shelf,
html[data-theme="mono"] body:not(.auth-locked) .prompt-panel .image-list,
html[data-theme="mono"] body:not(.auth-locked) .prompt-panel .image-card,
html[data-theme="mono"] body:not(.auth-locked) .edit-prompt-editor,
html[data-theme="mono"] body:not(.auth-locked) .edit-image-shelf{background:#080b10!important;color:#f5f7fa!important;border-color:#344052!important}
html[data-theme="mono"] body:not(.auth-locked) .prompt-panel > .editor:empty:before,
html[data-theme="mono"] body:not(.auth-locked) .prompt-panel .image-shelf-head,
html[data-theme="mono"] body:not(.auth-locked) .prompt-panel .image-shelf-head em,
html[data-theme="mono"] body:not(.auth-locked) .edit-prompt-editor:empty:before{color:#8f9bad!important}
html[data-theme="light"] body:not(.auth-locked) .prompt-panel > .editor,
html[data-theme="light"] body:not(.auth-locked) .prompt-panel .image-shelf,
html[data-theme="light"] body:not(.auth-locked) .prompt-panel .image-list,
html[data-theme="light"] body:not(.auth-locked) .prompt-panel .image-card,
html[data-theme="light"] body:not(.auth-locked) .edit-prompt-editor,
html[data-theme="light"] body:not(.auth-locked) .edit-image-shelf{background:#fbfcff!important;color:#1d2433!important;border-color:#d9e0ea!important}

.automation-credit-card{width:min(430px,calc(100vw - 32px));padding:28px;text-align:center}
.automation-credit-card h2{font-size:22px;margin:0 34px 14px 0;color:#be123c}
.automation-credit-card p{font-size:17px;font-weight:700;line-height:1.6;margin:0 0 22px;color:#344054}
.automation-credit-card #automationCreditRechargeBtn{width:100%;height:44px;font-size:15px;font-weight:700}
html[data-theme="mono"] .automation-credit-card h2{color:#f87171}
html[data-theme="mono"] .automation-credit-card p{color:#f5f7fa}

/* Full-size automation prompt editor, matching the asset library workspace. */
.automation-edit-card{width:75vw!important;height:75vh!important;max-width:none!important;max-height:none!important;background:#fff!important;color:#1d2433!important;border:1px solid #e5e7eb!important;border-radius:20px!important;box-shadow:0 28px 80px rgba(0,0,0,.42)!important;display:flex!important;flex-direction:column!important;gap:14px!important;padding:22px!important;overflow:hidden!important}
.automation-edit-head{display:flex;align-items:center;justify-content:space-between;padding-right:38px}.automation-edit-head h2{font-size:20px}.automation-edit-head span{font-size:12px;color:#667085}
.automation-edit-card textarea{flex:1;min-height:0;width:100%;resize:none;border:1px solid #d9e0ea;border-radius:14px;padding:16px;background:#fbfcff;color:#1d2433;font:14px/1.7 inherit;outline:none;white-space:pre-wrap;overscroll-behavior:contain}
.automation-edit-actions-large{display:flex;justify-content:flex-end;gap:10px}.automation-edit-actions-large button{min-width:96px;height:38px}
html[data-theme="mono"] .automation-edit-card{background:#0a0d12!important;color:#f5f7fa!important;border-color:#27303c!important}
html[data-theme="mono"] .automation-edit-head span{color:#aeb8c7}.automation-edit-card textarea{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif}
html[data-theme="mono"] .automation-edit-card textarea{background:#080b10;color:#f5f7fa;border-color:#344052}
@media(max-width:900px){.automation-edit-card{width:92vw!important;height:82vh!important;padding:16px!important}}

/* The contact note is plain interface copy, without the former white/purple
   callout strip. */
.automation-license-contact,
html[data-theme="mono"] .automation-license-contact{padding:0!important;border:0!important;background:transparent!important;color:inherit!important}
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row span,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel-head small,
html[data-theme="light"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-status,
html[data-theme="light"] body:not(.auth-locked) .recharge-code-card p{color:#667085!important}
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-info,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-status,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .redeem-code-panel,
html[data-theme="mono"] body:not(.auth-locked) .recharge-code-card .recharge-purchase-description{background:#111720!important;border-color:#344052!important;color:#e5e7eb!important}
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in input,
html[data-theme="mono"] body:not(.auth-locked) .recharge-code-card input,
html[data-theme="mono"] body:not(.auth-locked) .ratio-select{background:#0f141c!important;color:#f5f7fa!important;border-color:#344052!important}
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .auth-user-row span,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-panel-head small,
html[data-theme="mono"] body:not(.auth-locked) #configModal.auth-signed-in .api-key-status,
html[data-theme="mono"] body:not(.auth-locked) .recharge-code-card p{color:#aeb8c7!important}

/* Final task-queue layout contract. Keep this block last so the queue remains
   usable after the older responsive/theme overrides above. */
body:not(.auth-locked) .app-shell > main.grid > .task-panel{
  grid-area:tasks!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:hidden!important;
  position:sticky!important;
  top:18px!important;
  align-self:stretch!important;
}
body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-section-title{
  flex:0 0 auto!important;
  min-height:32px!important;
}
body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-list{
  flex:1 1 auto!important;
  min-height:180px!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  align-content:start!important;
}
body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-list > .task-card{
  flex:0 0 auto!important;
  min-width:0!important;
}
body:not(.auth-locked) .app-shell > main.grid > .task-panel .task-actions{
  flex:0 0 auto!important;
  min-width:max-content!important;
}
@media (max-width:1100px){
  body:not(.auth-locked) .app-shell > main.grid > .task-panel{
    position:static!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-list{
    min-height:320px!important;
    max-height:none!important;
  }
}
@media (max-width:640px){
  body:not(.auth-locked) .app-shell > main.grid > .task-panel > .task-list{
    min-height:280px!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel .task-card{
    grid-template-columns:64px minmax(0,1fr)!important;
  }
  body:not(.auth-locked) .app-shell > main.grid > .task-panel .task-actions{
    grid-column:1 / -1!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    min-width:0!important;
  }
}


/* Keep the marked controls visually consistent with their neighboring buttons. */
.asset-open-btn{
  min-width:72px!important;
  height:30px!important;
  padding:6px 10px!important;
  border:1px solid #dfe5ee!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#2a3344!important;
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:400!important;
  box-shadow:none!important;
}
.asset-open-btn:hover{background:#f4f7fb!important;border-color:#bfc8d6!important}
body:not(.auth-locked) .theme-toggle.active{background:#fff!important;color:#2a3344!important;border-color:#dfe5ee!important}
html[data-theme="mono"] body:not(.auth-locked) .asset-open-btn,
html[data-theme="mono"] body:not(.auth-locked) .theme-toggle.active{background:#0f141c!important;color:#f5f7fa!important;border-color:#344052!important}
html[data-theme="mono"] body:not(.auth-locked) .asset-open-btn:hover,
html[data-theme="mono"] body:not(.auth-locked) .theme-toggle.active:hover{background:#1b2430!important;border-color:#6b7b91!important}
html[data-theme="blue"] body:not(.auth-locked) .asset-open-btn,
html[data-theme="blue"] body:not(.auth-locked) .theme-toggle.active{background:#0d2035!important;color:#f8fbff!important;border-color:#2e6088!important}
html[data-theme="blue"] body:not(.auth-locked) .asset-open-btn:hover,
html[data-theme="blue"] body:not(.auth-locked) .theme-toggle.active:hover{background:#123253!important;border-color:#4d8fbd!important}


/* The light-theme toggle is an ordinary topbar control, not a dark active pill. */
html[data-theme="light"] body:not(.auth-locked) .theme-toggle.active{
  background:#fff!important;
  color:#1d2433!important;
  border-color:#dfe5ee!important;
  box-shadow:none!important;
}
html[data-theme="light"] body:not(.auth-locked) .theme-toggle.active:hover{
  background:#f4f7fb!important;
  border-color:#bfc8d6!important;
}

/* Signed-in account controls follow the homepage palette. Keep login artwork unchanged. */
html[data-theme="mono"] #configModal{
  --account-inset:#080b10;--account-control:#0f141c;
  --account-text:#f5f7fa;--account-muted:#9daabb;--account-line:#344052;
  --account-hover:#1b2430;--account-hover-line:#6b7b91;
  --account-primary:#f5f7fa;--account-primary-text:#050608;
  --account-primary-hover:#dce3ec;--account-primary-hover-line:#fff;
  --account-danger:#fda4af;--account-ok:#86efac;
}
html[data-theme="light"] #configModal{
  --account-inset:#fbfcff;--account-control:#fff;
  --account-text:#1d2433;--account-muted:#667085;--account-line:#dfe5ee;
  --account-hover:#f4f7fb;--account-hover-line:#bfc8d6;
  --account-primary:#111827;--account-primary-text:#fff;
  --account-primary-hover:#000;--account-primary-hover-line:#000;
  --account-danger:#b42318;--account-ok:#027a48;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.auth-heading-mark,.auth-content>.close,.api-key-panel-head a,.api-key-item-actions button,#copyApiKeyBtn,#deleteApiKeyBtn,#authLogoutBtn,#authEditPasswordBtn){
  background:var(--account-control)!important;color:var(--account-text)!important;
  border-color:var(--account-line)!important;box-shadow:none!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.auth-content>.close,.api-key-panel-head a,.api-key-item-actions button,#copyApiKeyBtn,#deleteApiKeyBtn,#authLogoutBtn,#authEditPasswordBtn):hover{
  background:var(--account-hover)!important;color:var(--account-text)!important;
  border-color:var(--account-hover-line)!important;box-shadow:none!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(#createApiKeyBtn,#saveConfigBtn){
  background:var(--account-primary)!important;color:var(--account-primary-text)!important;
  border-color:var(--account-primary)!important;box-shadow:none!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(#createApiKeyBtn,#saveConfigBtn):hover{
  background:var(--account-primary-hover)!important;border-color:var(--account-primary-hover-line)!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.auth-user-info,.auth-user-row,.api-key-panel,.api-key-status,.api-key-item,.api-key-empty){
  background:var(--account-inset)!important;color:var(--account-text)!important;
  border-color:var(--account-line)!important;box-shadow:none!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.auth-heading h2,.auth-user-row strong,.api-key-panel-head strong,.api-key-item-head strong,.api-key-item code){
  color:var(--account-text)!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.auth-heading p,.auth-user-row span,.api-key-panel-head small,.api-key-status,.api-key-meta,.api-key-empty){
  color:var(--account-muted)!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in input{
  background:var(--account-control)!important;color:var(--account-text)!important;
  border-color:var(--account-line)!important;box-shadow:none!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(button,a,input):focus-visible{
  outline:2px solid var(--account-hover-line)!important;outline-offset:3px;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.api-key-state,.config-msg-success:not(:empty)){
  background:var(--account-control)!important;border-color:var(--account-line)!important;color:var(--account-ok)!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in .api-key-item.is-disabled .api-key-state{
  color:var(--account-muted)!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.api-key-item-actions button.danger,#deleteApiKeyBtn),
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in :is(.api-key-item-actions button.danger,#deleteApiKeyBtn):hover{
  color:var(--account-danger)!important;
}
html:is([data-theme="mono"],[data-theme="light"]) body:not(.auth-locked) #configModal.auth-signed-in .config-msg-error:not(:empty){
  background:var(--account-control)!important;border-color:var(--account-danger)!important;color:var(--account-danger)!important;
}

/* Automatic editing follows both homepage themes and stays usable on phones. */
#autoEditModal .automation-head{padding-right:28px;align-items:flex-start}
#autoEditModal .automation-head p{font-size:13px;line-height:1.65;max-width:580px}
#autoEditModal .auto-edit-list{flex-shrink:0}
#autoEditModal [hidden]{display:none!important}
#autoEditModal .auto-edit-toolbar input[type="number"]{height:32px;padding:4px 8px;border:1px solid #405064;border-radius:6px}
#autoEditModal button:disabled{opacity:.45;cursor:not-allowed}
#autoEditModal .auto-edit-download{display:inline-flex;align-items:center;justify-content:center;padding:9px 14px;border-radius:8px}
html[data-theme="light"] #autoEditModal .auto-edit-item{background:#fbfcff;border-color:#dfe5ee;color:#1d2433}
html[data-theme="light"] #autoEditModal .auto-edit-list.empty{color:#667085;border-color:#dfe5ee}
html[data-theme="light"] #autoEditModal :is(.auto-edit-size,.auto-edit-index){color:#667085}
html[data-theme="light"] #autoEditModal .auto-edit-toolbar input[type="number"]{border-color:#dfe5ee}
@media(max-width:600px){
  #autoEditModal .auto-edit-card{padding:16px;max-height:92vh}
  #autoEditModal .auto-edit-item{grid-template-columns:24px minmax(0,1fr) auto}
  #autoEditModal .auto-edit-item button{width:100%;min-height:32px}
  #autoEditModal .auto-edit-name{font-size:13px}
}
