
*{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;padding:10px;background:#fbfcff;display:grid;grid-template-columns:82px 1fr auto;gap:10px;align-items:center}.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-card{grid-template-columns:72px 1fr auto}.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";align-items:center;gap:8px 10px;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;
}
.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{grid-template-columns:minmax(0,2fr) 1px minmax(120px,1fr)!important;align-items:stretch;min-height:136px;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-card{grid-template-columns:1fr!important}.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;
  padding:10px 12px!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 .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{
  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;
}
.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}
.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}}

/* 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}
.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-select{position:absolute;left:10px;top:10px;width:22px;height:22px;z-index:3;display:flex;align-items:center;justify-content:center;cursor:pointer}
.task-select input{position:absolute;opacity:0;pointer-events:none}
.task-select span{width:19px;height:19px;border-radius:50%;border:2px solid #cbd5e1;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.10);display:block}
.task-select input:checked + span{background:#111827;border-color:#111827;box-shadow:inset 0 0 0 4px #fff,0 2px 8px rgba(15,23,42,.16)}
.task-card.task-selected{outline:2px solid #11182722;background:#fbfcff}
.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}
.task-select{left:4px!important;top:4px!important;width:20px!important;height:20px!important}
.task-select span{width:17px!important;height:17px!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}


/* 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%)}}

/* Product brand lockup: inline vector stays crisp in packaged/offline builds. */
.brand-lockup{min-width:0;display:flex;align-items:center;gap:11px}
.brand-mark{width:46px;height:46px;flex:0 0 46px;display:flex;align-items:center;justify-content:center;border-radius:14px;color:#fff;background:linear-gradient(145deg,#111827 0%,#3730a3 58%,#7c3aed 100%);box-shadow:0 7px 16px rgba(79,70,229,.24),inset 0 1px 0 rgba(255,255,255,.2)}
.brand-mark svg{width:36px;height:36px;display:block}
.brand-copy{min-width:0;display:grid;gap:3px}
.brand-title-row{display:flex;align-items:center;gap:8px;min-width:0}
.brand-title-row h1{margin:0;font-size:21px;line-height:1.05;letter-spacing:.02em;color:#111827;white-space:nowrap}
.brand-title-row h1 span{color:#4f46e5;font-size:.8em;letter-spacing:.04em}
.brand-title-row em{font-style:normal;font-size:8px;line-height:1;letter-spacing:.1em;font-weight:800;color:#4338ca;background:#eef2ff;border:1px solid #c7d2fe;border-radius:999px;padding:4px 6px;white-space:nowrap}
.brand-copy p{margin:0!important;color:#475569!important;font-size:11px!important;line-height:1.25;white-space:nowrap;letter-spacing:.02em}
@media(max-height:760px){.brand-lockup{gap:9px}.brand-mark{width:40px;height:40px;flex-basis:40px;border-radius:12px}.brand-mark svg{width:31px;height:31px}.brand-title-row h1{font-size:19px}.brand-copy p{font-size:10px!important}}
@media(max-width:700px){.brand-title-row em{display:none}.brand-copy p{white-space:normal}.brand-mark{width:40px;height:40px;flex-basis:40px}.brand-title-row h1{font-size:18px}}

/* Batch storyboard runner: keeps current generation settings and only automates the existing flow. */
.task-panel{gap:10px;padding:10px;background:#f1f4f8;border-color:#dfe6ef}
.task-workspace-card{border:1px solid #dce4ee;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.batch-panel{border-color:#cfd9ee;background:#f8faff;padding:10px;display:flex;flex-direction:column;gap:8px;min-height:0;margin:0;flex:0 0 clamp(300px,74%,calc(100% - 170px))}
.queue-panel{flex:1;min-height:0;padding:10px;display:flex;flex-direction:column;gap:8px;background:#fff}
.batch-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.task-subpanel-title{min-width:0;display:flex;align-items:center;gap:8px}
.task-subpanel-title>div{min-width:0}
.task-subpanel-accent{width:4px;height:34px;flex:0 0 4px;border-radius:999px;background:#4f46e5}
.task-subpanel-title h2,.task-subpanel-title h3{margin:0;color:#111827;font-size:14px;line-height:1.25}
.queue-subpanel-title h2{text-align:left}
.task-subpanel-title p{margin:2px 0 0;color:#64748b;font-size:10px;line-height:1.25;white-space:nowrap}
.queue-subpanel-title .task-subpanel-accent{background:#0f766e}
.batch-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.batch-import-rule{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 8px;border:1px solid #dbe4f3;border-radius:10px;background:#eef3ff;color:#475569}
.batch-import-rule>div{min-width:0;display:flex;align-items:flex-start;gap:7px}
.batch-import-rule strong{flex:0 0 auto;color:#3730a3;font-size:11px}
.batch-import-rule span{min-width:0;font-size:10px;line-height:1.35;white-space:normal}
.batch-import-rule button{flex:0 0 auto;padding:4px 8px;font-size:10px;border-color:#cbd5e1;background:#fff}
.batch-list{flex:1;min-height:70px;max-height:none;overflow:auto;border:1px dashed #dce3ed;border-radius:12px;background:#fff;padding:6px;display:flex;flex-direction:column;gap:6px}
.batch-list.empty{min-height:44px;align-items:center;justify-content:center;color:#a3acba;font-size:12px}
.batch-item{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:6px;align-items:start;border:1px solid #edf1f7;border-radius:10px;background:#fff;padding:6px}
.batch-item.active{border-color:#111827;background:#f8fafc}
.batch-item.done{border-color:#abefc6;background:#fbfffd}
.batch-item.failed{border-color:#fecdd3;background:#fff7f8}
.batch-item.running{border-color:#c7d2fe;background:#f8faff}
.batch-item.asset-invalid{border-color:#fbbf24;background:#fffbeb}
.batch-no{font-size:12px;font-weight:800;color:#4b5563;line-height:30px;text-align:center}
.batch-prompt-wrap{min-width:0;display:grid;gap:3px}
.batch-prompt{min-height:30px;max-height:74px;resize:vertical;border:1px solid #e5e7eb;border-radius:8px;padding:6px 8px;font-size:12px;line-height:1.4;color:#1f2937;background:#fff}
.batch-item.done .batch-prompt,.batch-item.running .batch-prompt{background:#f8fafc}
.batch-asset-summary{font-size:11px;line-height:1.35;color:#027a48;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px}
.batch-asset-summary.bad{color:#b45309}
.batch-asset-previews{display:flex;gap:6px;min-height:48px;overflow-x:auto;overflow-y:hidden;padding:1px 2px 3px;scrollbar-width:thin}
.batch-asset-chip{flex:0 0 126px;height:48px;display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:6px;padding:3px!important;border-radius:9px!important;border:1px solid #dbe5f0!important;background:#f8fbff!important;text-align:left;overflow:hidden;transition:border-color .2s ease,background-color .2s ease}
.batch-asset-chip:hover{border-color:#94a3b8!important;background:#f1f5f9!important}
.batch-asset-chip:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.batch-asset-chip img,.batch-asset-placeholder{width:40px;height:40px;border-radius:7px;display:block}
.batch-asset-chip img{object-fit:cover;background:#e5e7eb}
.batch-asset-chip>span{min-width:0;display:grid;gap:1px}
.batch-asset-chip b,.batch-asset-chip em{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.batch-asset-chip b{font-size:10px;line-height:1.2;color:#475569}
.batch-asset-chip em{font-size:11px;line-height:1.3;font-style:normal;font-weight:700;color:#0f172a}
.batch-asset-chip.missing{opacity:1!important;cursor:not-allowed;border-style:dashed!important;border-color:#f59e0b!important;background:#fffbeb!important}
.batch-asset-placeholder{display:flex;align-items:center;justify-content:center;background:#fef3c7;color:#92400e;font-size:12px;font-weight:800}
.batch-asset-chip.missing em{color:#92400e}
.batch-row-actions{display:flex;gap:4px;align-items:center}
.batch-row-actions button{width:28px;height:28px;border-radius:8px!important;padding:0!important;font-size:12px;line-height:1}
.batch-status{font-size:12px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:16px}
.batch-status.bad{color:#be123c}
.batch-status.ok{color:#027a48}
.queue-head{margin:0!important;min-height:38px;display:flex!important;align-items:center;justify-content:space-between;gap:12px}
.auto-download-controls{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-left:auto;min-width:0}
.auto-download-toggle{height:32px;display:inline-flex;align-items:center;gap:6px;padding:0 9px;border:1px solid #dfe5ee;border-radius:10px;background:#fff;color:#475569;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}
.auto-download-toggle input{width:15px;height:15px;margin:0;accent-color:#111827;cursor:pointer}
.auto-download-controls select{height:32px;max-width:126px;border:1px solid #dfe5ee;border-radius:10px;background:#fff;color:#334155;padding:0 24px 0 8px;font-size:12px;cursor:pointer;outline:none}
.auto-download-controls select:focus,.auto-download-toggle:focus-within{border-color:#64748b;box-shadow:0 0 0 3px rgba(100,116,139,.12)}
.auto-download-controls .small{height:32px;white-space:nowrap}
.queue-head .task-title-actions{margin-left:auto;flex-wrap:wrap}
.queue-panel .task-list{min-height:0;border:1px solid #e3e8ef;border-radius:12px;background:#fbfcfe;padding:6px}
.queue-panel .task-list.empty{border-style:dashed;background:#fff}
@media(max-height:760px){.task-panel{gap:7px;padding:8px}.batch-panel{flex-basis:clamp(280px,70%,calc(100% - 150px))}.batch-panel,.queue-panel{padding:8px;gap:6px}.batch-actions{gap:4px}.batch-row-actions button{width:26px;height:26px}.task-subpanel-accent{height:30px}}
@media(max-width:900px){.queue-head{flex-wrap:wrap}.auto-download-controls{order:3;width:100%;justify-content:flex-end}.queue-head .task-title-actions{margin-left:0}}
@media(max-width:560px){.batch-head{align-items:flex-start;flex-wrap:wrap}.batch-actions{width:100%;justify-content:flex-end}.batch-import-rule{align-items:flex-start}.batch-import-rule>div{display:grid;gap:2px}.batch-import-rule span{white-space:normal}.queue-head{align-items:flex-start;flex-wrap:wrap}.auto-download-controls{justify-content:flex-start;flex-wrap:wrap}.queue-head .task-title-actions{width:100%;justify-content:flex-end}.task-subpanel-title p{white-space:normal}}

/* The current video endpoint has one verified output tier; show it without implying a selectable upgrade. */
.option-row select:disabled{color:#475569;background:#f1f5f9;border-color:#d7dee8;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#475569}

/* Video service credential configuration */
.api-key-label{display:block;margin:10px 0 6px;font-size:12px;font-weight:700;color:#4b5563}
.api-key-row{display:grid;grid-template-columns:minmax(0,1fr) 72px;gap:8px;align-items:center}
.api-key-row input{width:100%;height:42px;border:1px solid #dfe5ee;border-radius:12px;padding:0 12px;background:#fff;color:#111827;font:13px Consolas,"SFMono-Regular",monospace;outline:none}
.api-key-row input:focus{border-color:#64748b;box-shadow:0 0 0 3px rgba(100,116,139,.12)}
.api-key-row button{height:42px;min-width:72px}
.api-endpoint-note{margin:10px 0 2px!important;color:#667085!important}
.client-config-bottom{margin-top:14px!important}
.client-config-bottom .danger{margin-right:auto}
.preview-video{width:88px;min-height:42px}
@media(max-width:560px){.api-key-row{grid-template-columns:1fr}.api-key-row button{width:100%}.client-config-bottom{align-items:stretch!important}.client-config-bottom .danger{margin-right:0}}

/* Page overflow fix: allow the complete workspace to remain reachable on shorter viewports. */
html{
  height:auto!important;
  min-height:100%;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable;
}
body{
  height:auto!important;
  min-height:100vh!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
.app-shell{
  height:auto!important;
  min-height:100vh!important;
  max-height:none!important;
  overflow:visible!important;
}
.grid{
  flex:0 0 auto!important;
  min-height:calc(100vh - 100px)!important;
  grid-template-rows:auto auto!important;
  overflow:visible!important;
}
@media(max-width:900px){
  html,body{overflow-x:hidden!important;overflow-y:auto!important}
  .app-shell{height:auto!important;min-height:100vh!important;max-height:none!important;overflow:visible!important}
  .grid{grid-template-rows:auto auto auto!important;min-height:0!important;overflow:visible!important}
}

/* Desktop production workspace: preparation, storyboard batch, and task queue each own a column. */
@media(min-width:1200px){
  html,body{height:100%!important;min-height:100%!important;overflow:hidden!important}
  body{height:100vh!important}
  .app-shell{height:100vh!important;min-height:0!important;max-height:100vh!important;overflow:hidden!important}
  .grid{
    flex:1 1 auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:minmax(340px,.82fr) minmax(460px,1.12fr) minmax(400px,1fr)!important;
    grid-template-rows:minmax(0,1fr) auto!important;
    gap:10px!important;
    overflow:hidden!important;
  }
  .prompt-panel{grid-column:1;grid-row:1;min-height:0!important;overflow:hidden!important}
  .option-panel{grid-column:1;grid-row:2;min-height:0!important}
  .task-panel{
    grid-column:2 / 4;
    grid-row:1 / 3;
    min-height:0!important;
    height:100%;
    display:grid!important;
    grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
    grid-template-rows:minmax(0,1fr);
    gap:10px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  .batch-panel,.queue-panel{
    min-height:0!important;
    height:100%;
    margin:0!important;
    flex:none!important;
    overflow:hidden!important;
  }
  .batch-panel{grid-column:1;grid-row:1}
  .queue-panel{grid-column:2;grid-row:1}
  .batch-list,.queue-panel .task-list{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain}
  .queue-head{align-items:flex-start!important;flex-wrap:wrap!important}
  .queue-head .auto-download-controls{order:3;width:100%;margin-left:0;justify-content:flex-start}
  .queue-head .task-title-actions{margin-left:auto}
}

/* Mode-based workspace: shared configuration | single/batch creation | persistent queue. */
.creator-workspace{align-items:stretch}
.config-sidebar,.creation-panel,.creator-workspace>.queue-panel{min-width:0;min-height:0}
.config-sidebar{display:flex;flex-direction:column;gap:12px;padding:14px;z-index:30;overflow:visible!important}
.config-sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid #e7ebf2}
.config-sidebar-head h2,.mode-panel-head h2{margin:0;font-size:18px;color:#111827}
.config-sidebar-head p,.mode-panel-head p{margin:3px 0 0;color:#7a8497;font-size:12px}
.config-block{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid #e4e9f1;border-radius:14px;background:#fbfcff}
.config-block h3{margin:0;font-size:14px;color:#1f2937}
.asset-library-config{flex-direction:row;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px}
.config-library-copy{min-width:0}
.config-library-copy h3{margin:0}
.config-library-copy p{margin:3px 0 0;color:#7a8497;font-size:11px;line-height:1.4}
.config-asset-btn{flex:0 0 auto;min-height:38px;padding:0 14px;border-radius:10px;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease}
.config-asset-btn:focus-visible{outline:3px solid rgba(37,99,235,.22);outline-offset:2px}
.config-sidebar .fixed-prompt-wrap{margin:0;display:flex;flex-direction:column;gap:7px}
.config-sidebar .fixed-prompt-wrap span{font-size:13px;font-weight:800;color:#374151}
.config-sidebar .fixed-prompt-input{min-height:150px;max-height:240px;resize:vertical;background:#fff}
.config-sidebar .ratio-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.config-sidebar .ratio{width:100%;min-width:0;height:66px}
.config-sidebar .option-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
.config-sidebar .advanced-popup{width:min(520px,calc(100vw - 32px))!important}

.creation-panel{display:flex;flex-direction:column;padding:10px;overflow:hidden!important}
.creation-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;border:1px solid #dfe5ee;border-radius:13px;background:#f1f4f8;flex:0 0 auto}
.creation-tab{height:40px;border:0;border-radius:9px;background:transparent;color:#64748b;font-size:14px;font-weight:800;transition:background-color .18s ease,color .18s ease,box-shadow .18s ease}
.creation-tab:hover{background:#e9edf4}
.creation-tab.active{background:#fff;color:#111827;box-shadow:0 2px 8px rgba(15,23,42,.09)}
.creation-tab:focus-visible{outline:3px solid rgba(79,70,229,.22);outline-offset:2px}
.creation-mode-panel{flex:1;min-height:0;margin-top:10px}
.single-mode-panel{position:relative;display:flex;flex-direction:column;gap:10px;overflow:hidden}
.mode-panel-head{display:flex;align-items:center;justify-content:space-between;min-height:42px;flex:0 0 auto}
.single-mode-panel .image-shelf{height:170px;flex:0 0 170px;margin:0}
.single-mode-panel .image-shelf-head{min-height:36px;gap:10px}
.single-mode-panel .image-shelf-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}
.single-mode-panel .shelf-asset-btn{height:34px;min-width:76px;padding:0 14px;border-radius:10px;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease}
.single-mode-panel .shelf-asset-btn:focus-visible{outline:3px solid rgba(37,99,235,.22);outline-offset:2px}
.single-mode-panel .editor{flex:1;min-height:150px}
.single-mode-footer{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex:0 0 auto}
.single-mode-footer .hint{margin:0;line-height:1.5}
.single-mode-footer .danger{flex:0 0 auto}
.single-mode-panel .send-btn{flex:0 0 44px}
.single-mode-panel .status-line{flex:0 0 auto}
.batch-mode-panel{display:flex;min-height:0;overflow:hidden}
.batch-mode-panel .batch-panel{height:100%;width:100%;flex:1 1 auto!important;margin:0!important;min-height:0!important}
.batch-mode-panel .batch-list{min-height:0!important;overflow-y:auto!important}

.creator-workspace>.queue-panel{display:flex;flex-direction:column;height:100%;padding:10px;overflow:hidden!important}
.creator-workspace>.queue-panel .queue-head{display:flex!important;align-items:flex-start!important;flex-wrap:wrap!important;gap:8px;margin:0!important}
.creator-workspace>.queue-panel .queue-head .auto-download-controls{order:3;width:100%;margin-left:0;justify-content:flex-start}
.creator-workspace>.queue-panel .queue-head .task-title-actions{margin-left:auto}
.creator-workspace>.queue-panel .task-list{flex:1;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}

@media(min-width:1200px){
  .creator-workspace{
    grid-template-columns:minmax(320px,.72fr) minmax(520px,1.18fr) minmax(420px,1fr)!important;
    grid-template-rows:minmax(0,1fr)!important;
  }
  .config-sidebar{grid-column:1;grid-row:1}
  .creation-panel{grid-column:2;grid-row:1}
  .creator-workspace>.queue-panel{grid-column:3;grid-row:1}
}

@media(min-width:901px) and (max-width:1199px){
  .creator-workspace{grid-template-columns:minmax(300px,.72fr) minmax(480px,1.28fr)!important;grid-template-rows:minmax(620px,calc(100vh - 100px)) minmax(480px,65vh)!important;overflow:visible!important}
  .config-sidebar{grid-column:1;grid-row:1}
  .creation-panel{grid-column:2;grid-row:1}
  .creator-workspace>.queue-panel{grid-column:1 / 3;grid-row:2;min-height:480px}
}

@media(max-width:900px){
  .creator-workspace{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto!important;overflow:visible!important}
  .config-sidebar,.creation-panel,.creator-workspace>.queue-panel{grid-column:1!important;grid-row:auto!important;height:auto!important;min-height:520px}
  .config-sidebar{min-height:0;overflow:visible!important}
  .creation-panel{min-height:680px}
  .creator-workspace>.queue-panel{min-height:560px}
}

@media(max-width:560px){
  .config-sidebar .ratio-row{grid-template-columns:repeat(3,minmax(0,1fr))}
  .config-sidebar .option-row{grid-template-columns:1fr!important}
  .creation-tabs{position:sticky;top:0;z-index:15}
  .single-mode-footer{align-items:stretch;flex-direction:column}
  .single-mode-footer .danger{align-self:flex-end}
}

/* Managed accounts: login gate and personal center. The creator workspace remains unchanged. */
.auth-gate{
  z-index:500;
  isolation:isolate;
  overflow:hidden;
  background:
    radial-gradient(circle at 18% 18%,rgba(124,58,237,.34),transparent 30%),
    radial-gradient(circle at 82% 16%,rgba(14,165,233,.22),transparent 28%),
    radial-gradient(circle at 50% 92%,rgba(236,72,153,.2),transparent 30%),
    linear-gradient(135deg,#070b18 0%,#111827 45%,#1e1b4b 100%);
  backdrop-filter:none;
}
.auth-gate::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
  background-size:64px 64px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.82),transparent 88%);
  opacity:.34;
}
.auth-gate::after{
  content:"帧语 AI";
  position:absolute;
  right:clamp(20px,7vw,110px);
  bottom:clamp(18px,6vh,72px);
  z-index:-1;
  color:rgba(255,255,255,.055);
  font-size:clamp(54px,12vw,180px);
  font-weight:900;
  letter-spacing:-.08em;
  line-height:1;
  pointer-events:none;
  white-space:nowrap;
}
.auth-card{
  width:min(438px,calc(100vw - 36px));
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:34px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.76);
  border-radius:30px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  box-shadow:0 34px 90px rgba(0,0,0,.42),0 0 0 1px rgba(15,23,42,.04);
}
.auth-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:6px;
  border-radius:30px 30px 0 0;
  background:linear-gradient(90deg,#7c3aed,#2563eb,#06b6d4);
}
.auth-brand-mark{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  border-radius:20px;
  background:linear-gradient(145deg,#111827 0%,#3730a3 50%,#7c3aed 100%);
  color:#fff;
  box-shadow:0 18px 38px rgba(79,70,229,.34),inset 0 1px 0 rgba(255,255,255,.24);
}
.auth-brand-mark svg{width:38px;height:38px}
.auth-copy{margin:6px 0 12px}
.auth-copy h2{margin:0 0 7px;font-size:28px;letter-spacing:-.04em;color:#0f172a}
.auth-copy p{margin:0;color:#64748b;font-size:14px;line-height:1.65}
.auth-card>label{font-size:13px;font-weight:900;color:#1f2937;letter-spacing:.02em}
.auth-card>input{
  width:100%;
  height:52px;
  border:1px solid #d6deea;
  border-radius:16px;
  padding:0 15px;
  font-size:16px;
  color:#0f172a;
  background:#fff;
  outline:none;
  transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease;
}
.auth-card>input:hover{border-color:#b9c5d6;background:#fcfdff}
.auth-card>input:focus{border-color:#4f46e5;box-shadow:0 0 0 4px rgba(79,70,229,.14)}
.auth-submit{
  height:52px;
  margin-top:10px;
  font-size:16px;
  font-weight:900;
  border-radius:16px!important;
  background:linear-gradient(135deg,#111827,#312e81 52%,#6d28d9)!important;
  border:0!important;
  box-shadow:0 16px 34px rgba(49,46,129,.28);
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
.auth-submit:hover{filter:brightness(1.06);transform:translateY(-1px);box-shadow:0 20px 40px rgba(49,46,129,.34)}
.auth-submit:active{transform:translateY(0);box-shadow:0 12px 24px rgba(49,46,129,.25)}
.auth-msg{min-height:20px;color:#047857;font-size:13px;font-weight:800;line-height:1.5;text-align:center}
.auth-msg.bad{color:#be123c}
.auth-locked .app-shell{pointer-events:none;user-select:none}

.profile-card{width:min(620px,calc(100vw - 32px))!important;height:auto!important;max-height:88vh!important;overflow-y:auto!important;display:flex!important;flex-direction:column!important;gap:14px!important;padding:22px!important}
.profile-head{padding-right:38px}
.profile-head h2{margin:0;font-size:20px;color:#111827}
.profile-head p{margin:4px 0 0!important;color:#64748b!important;font-size:12px!important}
.profile-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.profile-summary>div{min-width:0;padding:12px;border:1px solid #e4e9f1;border-radius:13px;background:#f8fafc}
.profile-summary span,.profile-summary strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-summary span{font-size:11px;color:#64748b;margin-bottom:5px}
.profile-summary strong{font-size:14px;color:#111827}
.profile-key-section{padding:14px;border:1px solid #dfe5ee;border-radius:15px;background:#fbfcff}
.profile-section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.profile-section-title h3{margin:0 0 4px;font-size:14px;color:#111827}
.profile-section-title p{margin:0!important;color:#64748b!important;font-size:12px!important;line-height:1.5}
.key-mask{flex:0 0 auto;padding:5px 9px;border-radius:999px;background:#eef2ff;color:#3730a3;font:700 11px ui-monospace,SFMono-Regular,Menlo,monospace}
.profile-key-section .api-key-row{grid-template-columns:minmax(0,1fr) 72px}
.profile-key-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}
.profile-key-actions button{min-height:40px}
.profile-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding-top:2px}
.button-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 14px;border:1px solid #dfe5ee;border-radius:12px;background:#fff;color:#1f2937;text-decoration:none;font-size:13px;font-weight:800;transition:background-color .2s ease,border-color .2s ease}
.button-link:hover{background:#f3f6fb;border-color:#cbd5e1}
.button-link:focus-visible{outline:3px solid rgba(79,70,229,.2);outline-offset:2px}
@media(max-width:560px){
  .auth-card{padding:28px 22px;border-radius:24px}
  .auth-copy h2{font-size:24px}
  .auth-gate::after{display:none}
  .profile-summary{grid-template-columns:1fr}
  .profile-key-section .api-key-row{grid-template-columns:1fr}
  .profile-key-actions,.profile-footer{align-items:stretch;flex-direction:column}
  .profile-key-actions button,.profile-footer>*{width:100%}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
