:root {
  --bg: #0a0d12;
  --bg-soft: #0f131a;
  --panel: #141a23;
  --panel-2: #1a212c;
  --border: #232c3a;
  --border-soft: #1c2431;
  --text: #e9eff7;
  --muted: #8b97a8;
  --muted-2: #66717f;
  --teal: #38d9b0;
  --teal-deep: #17a98a;
  --amber: #f3b45c;
  --red: #ff6b6b;
  --blue: #6aa9ff;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 700px at 20% -10%, #14202b 0%, transparent 60%),
              radial-gradient(900px 600px at 100% 0%, #1a1a12 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body { padding-bottom: 24px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(16, 21, 28, .95), rgba(10, 13, 18, .7));
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: linear-gradient(145deg, #2b3a48, #18212c);
  border: 1px solid #33404f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 16px rgba(0, 0, 0, .4);
}

.brand-text h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: .4px;
}

.brand-text p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .3px;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--panel);
}

.conn-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57616f;
  box-shadow: 0 0 0 3px rgba(87, 97, 111, .12);
}

.conn-pill.on { color: #b7f4e4; border-color: rgba(56, 217, 176, .35); background: rgba(56, 217, 176, .08); }
.conn-pill.on i { background: var(--teal); box-shadow: 0 0 0 3px rgba(56, 217, 176, .15); }
.conn-pill.bad { color: #ffc1c1; border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .08); }
.conn-pill.bad i { background: var(--red); }
.conn-pill b { font-weight: 550; }

/* ---------------- 布局 ---------------- */
.layout {
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr) 360px;
  gap: 16px;
  padding: 18px 24px 0;
  max-width: 1760px;
  margin: 0 auto;
  align-items: start;
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, #111721 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 620;
  letter-spacing: .4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.idx {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--teal);
  background: rgba(56, 217, 176, .1);
  border: 1px solid rgba(56, 217, 176, .22);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.hint { font-size: 11.5px; color: var(--muted-2); }

/* ---------------- 素材区 ---------------- */
.block { margin-bottom: 18px; }

.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #c9d3e0;
  margin-bottom: 9px;
}

.badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.img-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 11px;
  border: 1px dashed #2f3a49;
  background: #0f141c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .18s, transform .18s, background .18s;
}

.mouth-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mouth-grid .img-slot .plus { font-size: 13px; }
.mouth-grid .img-slot .label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0;
  background: rgba(0, 0, 0, .55); font-size: 9px; text-align: center; letter-spacing: .5px;
}
.mouth-grid .img-slot .plus { margin-bottom: 12px; }
.mouth-grid .img-slot .slot-del { opacity: .55; width: 15px; height: 15px; font-size: 10px; }

.img-slot:hover { border-color: rgba(56, 217, 176, .55); background: #111a21; transform: translateY(-1px); }
.img-slot.drag { border-color: var(--teal); background: rgba(56, 217, 176, .08); }

.img-slot .plus { font-size: 18px; color: #445266; line-height: 1; }
.img-slot .label { font-size: 10.5px; color: var(--muted-2); letter-spacing: .3px; }
.img-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.img-slot .slot-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  font-size: 9.5px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .65);
  color: #cfe9e1;
  backdrop-filter: blur(4px);
}

.img-slot .slot-del {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: none;
  background: rgba(0, 0, 0, .6);
  color: #ffb4b4;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}

.img-slot:hover .slot-del { opacity: 1; }

.img-slot.loading { pointer-events: none; opacity: .6; }
.img-slot.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%);
  animation: shimmer 1.1s infinite;
}

@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.tip { margin: 8px 0 0; font-size: 11px; color: var(--muted-2); line-height: 1.55; }

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: #0f141c;
  margin-bottom: 8px;
  transition: border-color .18s;
}

.upload-row:hover { border-color: #2b3646; }
.upload-row.ok { border-color: rgba(56, 217, 176, .3); background: rgba(56, 217, 176, .04); }

.ur-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #182029;
  font-size: 15px;
  flex: 0 0 auto;
}

.ur-main { min-width: 0; flex: 1; }
.ur-title { font-size: 12.5px; color: #dde6f0; font-weight: 550; }
.ur-sub { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ur-state {
  font-size: 10.5px;
  color: var(--muted-2);
  max-width: 74px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
}

.ur-state.ok { color: var(--teal); }

.mini-btn {
  flex: 0 0 auto;
  font-size: 11px;
  color: #cdeee6;
  border: 1px solid rgba(56, 217, 176, .3);
  background: rgba(56, 217, 176, .08);
  border-radius: 8px;
  padding: 5px 9px;
  cursor: pointer;
  transition: background .15s;
}

.mini-btn:hover { background: rgba(56, 217, 176, .16); }

.folder-note {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted-2);
  border-top: 1px dashed var(--border-soft);
  padding-top: 10px;
}

/* ---------------- 中间：提示词 ---------------- */
.center { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.prompt-card { padding-bottom: 12px; }

.prompt-box {
  border-radius: 13px;
  border: 1px solid #222d3b;
  background: #0c1118;
  transition: border-color .2s, box-shadow .2s;
}

.prompt-box:focus-within {
  border-color: rgba(56, 217, 176, .45);
  box-shadow: 0 0 0 3px rgba(56, 217, 176, .08);
}

.prompt-box textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.85;
  padding: 14px 15px 6px;
  min-height: 118px;
  max-height: 280px;
}

.prompt-box textarea::placeholder { color: #4d5a6b; }

.prompt-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 14px 9px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.autosave.saved { color: rgba(56, 217, 176, .8); }
.autosave.error { color: #ffa3a3; }


/* ---------------- 画幅与时长规划条 ---------------- */
.plan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(23, 32, 44, .85), rgba(15, 20, 27, .8));
}
.plan-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.seg-title { margin-left: 6px; }
.plan-title {
  font-size: 11px;
  letter-spacing: .6px;
  color: var(--muted);
  white-space: nowrap;
}
.ratio-group { display: flex; gap: 6px; padding: 3px; border-radius: 10px; background: rgba(8, 12, 17, .7); border: 1px solid var(--border); }
.ratio-chip {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s, background .18s, border-color .18s;
}
.ratio-chip:hover:not(:disabled) { color: var(--text); }
.ratio-chip.active {
  color: #eafff8;
  border-color: rgba(56, 217, 176, .45);
  background: linear-gradient(135deg, rgba(56, 217, 176, .22), rgba(23, 169, 138, .1));
  box-shadow: 0 4px 14px rgba(23, 169, 138, .16);
}
.ratio-chip:disabled { opacity: .45; cursor: not-allowed; }
.plan-right { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.plan-hint {
  font-size: 11.5px;
  color: var(--text-dim, #c3cedd);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plan-hint.warn { color: #ffcf9b; }
.plan-cap { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }

/* ---------------- 指令按钮 ---------------- */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn.ghost { background: #131a24; color: #c3cedd; }
.btn.ghost:hover { border-color: #354354; background: #172030; }

.btn.primary {
  border-color: rgba(56, 217, 176, .45);
  background: linear-gradient(135deg, rgba(56, 217, 176, .2), rgba(23, 169, 138, .12));
  box-shadow: 0 8px 22px rgba(23, 169, 138, .18);
}
.btn.primary:hover { background: linear-gradient(135deg, rgba(56, 217, 176, .3), rgba(23, 169, 138, .18)); }

.btn.accent {
  border-color: rgba(243, 180, 92, .4);
  background: linear-gradient(135deg, rgba(243, 180, 92, .16), rgba(243, 180, 92, .06));
}
.btn.accent:hover { background: linear-gradient(135deg, rgba(243, 180, 92, .24), rgba(243, 180, 92, .12)); }

.btn.warn {
  border-color: rgba(255, 107, 107, .35);
  background: rgba(255, 107, 107, .08);
  color: #ffc9c9;
}
.btn.warn:hover { background: rgba(255, 107, 107, .16); }

.btn.small { padding: 8px 13px; font-size: 12px; border-radius: 10px; }

.action-btn { min-height: 62px; }

.action-btn { padding: 13px 14px; display: flex; align-items: center; gap: 11px; justify-content: flex-start; text-align: left; }
.action-btn .btn-ico { font-size: 17px; flex: 0 0 auto; }
.action-btn span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.action-btn b { font-size: 13.5px; font-weight: 600; letter-spacing: .3px; }
.action-btn i { font-size: 10.5px; font-style: normal; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-btn.running { box-shadow: 0 0 0 2px rgba(56, 217, 176, .25) inset; }

/* ---------------- 成片 ---------------- */
.result-card { padding-bottom: 14px; }

.video-stage {
  position: relative;
  border-radius: 13px;
  background: radial-gradient(600px 300px at 50% 0%, #10161f, #070a0e);
  border: 1px solid #1d2632;
  height: clamp(260px, 40vh, 430px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.video-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  text-align: center;
  padding: 24px;
}

.ve-ico { font-size: 30px; opacity: .7; }
.video-empty p { margin: 0; font-size: 13px; color: #9aa7b8; }
.video-empty span { font-size: 11px; color: var(--muted-2); }

#video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.video-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(7, 10, 14, .82);
  font-size: 12px;
  color: var(--muted);
}

.video-loading i {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(56, 217, 176, .4);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.video-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.save-path { font-size: 10.5px; color: var(--teal); opacity: .8; word-break: break-all; }

/* ---------------- 监控 ---------------- */
.monitor { position: sticky; top: 92px; }

.progress-block { margin-bottom: 14px; }

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: #c4cfdd;
  margin-bottom: 7px;
}

.progress-top b { font-size: 15px; color: var(--teal); font-variant-numeric: tabular-nums; }

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: #0c1117;
  border: 1px solid #1e2631;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1b8f77, var(--teal));
  box-shadow: 0 0 12px rgba(56, 217, 176, .35);
  transition: width .5s ease;
}

.stage-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.stage-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  color: var(--muted-2);
  padding: 5px 8px;
  border-radius: 8px;
  transition: background .2s, color .2s;
}

.stage-list li i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39424f;
  flex: 0 0 auto;
}

.stage-list li.active { background: rgba(56, 217, 176, .07); color: #d8f6ee; }
.stage-list li.active i { background: var(--teal); box-shadow: 0 0 0 3px rgba(56, 217, 176, .15); }
.stage-list li.done { color: #a6b7c9; }
.stage-list li.done i { background: #2f7d68; }
.stage-list li.fail { color: #ffbcbc; background: rgba(255, 107, 107, .08); }
.stage-list li.fail i { background: var(--red); }

.preview-block { margin-bottom: 12px; }

.preview-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.preview-box {
  border-radius: 11px;
  border: 1px solid #1d2632;
  background: #0a0f15;
  min-height: 124px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.preview-box img { width: 100%; display: block; }
.preview-box span { font-size: 10.5px; color: var(--muted-2); }

.log-block { border-top: 1px dashed var(--border-soft); padding-top: 10px; }

.log-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.link-btn {
  border: none;
  background: none;
  color: rgba(56, 217, 176, .85);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}

.log {
  height: 178px;
  overflow-y: auto;
  background: #080c11;
  border: 1px solid #18202b;
  border-radius: 10px;
  padding: 8px 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.65;
  color: #8fa0b3;
  scrollbar-width: thin;
}

.log p { margin: 0 0 2px; word-break: break-all; }
.log .info { color: #9db0c4; }
.log .debug { color: #5d6c7e; }
.log .warn { color: #e6bd7e; }
.log .error { color: #ff8f8f; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 11, .74);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 20px;
}

.modal-mask[hidden] { display: none; }

.modal {
  width: min(560px, 94vw);
  background: linear-gradient(180deg, #161d27, #10161e);
  border: 1px solid #2a3444;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: pop .22s ease;
}

@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #222c39;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 { margin: 0 0 4px; font-size: 16px; }
.modal-head p { margin: 0; font-size: 11.5px; color: var(--muted); }

.modal-head.error { border-bottom-color: rgba(255, 107, 107, .25); background: linear-gradient(180deg, rgba(255, 107, 107, .12), transparent); }
.modal-head.error h3 { color: #ff9b9b; }

.err-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 107, .14);
  border: 1px solid rgba(255, 107, 107, .4);
  color: #ff9b9b;
  font-weight: 700;
  font-size: 17px;
  flex: 0 0 auto;
}

.modal-body { padding: 16px 20px; max-height: 62vh; overflow-y: auto; }

.error-msg {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.8;
  color: #ffd9d9;
  background: rgba(255, 107, 107, .07);
  border: 1px solid rgba(255, 107, 107, .2);
  border-radius: 10px;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.error-hint { font-size: 12px; color: var(--muted); line-height: 1.8; }
.error-hint b { color: #cfd9e5; font-weight: 550; }
.error-hint ul { margin: 6px 0 0; padding-left: 18px; }
.error-hint li { margin-bottom: 2px; }

.modal-foot {
  padding: 14px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #222c39;
}

.small-modal { width: min(420px, 92vw); }
#confirmDesc { color: var(--muted); line-height: 1.7; }

.settings-modal { width: min(680px, 94vw); }

.close-x {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); }
.form-grid label.wide { grid-column: 1 / -1; }

.form-grid input {
  background: #0c1118;
  border: 1px solid #232d3a;
  border-radius: 9px;
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  padding: 9px 11px;
  outline: none;
  transition: border-color .15s;
}

.form-grid input:focus { border-color: rgba(56, 217, 176, .45); }

.test-result {
  margin-top: 14px;
  border-radius: 11px;
  border: 1px solid #232d3a;
  background: #0b1017;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.7;
}

.test-result .row { display: flex; gap: 8px; align-items: flex-start; }
.test-result .ok { color: var(--teal); }
.test-result .bad { color: #ff9b9b; }
.test-result .name { width: 88px; flex: 0 0 auto; color: #c6d1df; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: rgba(20, 28, 38, .96);
  border: 1px solid #2c3a4b;
  color: #dbe7f3;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: 78vw;
}

.toast.ok { border-color: rgba(56, 217, 176, .4); color: #c9f7ea; }
.toast.bad { border-color: rgba(255, 107, 107, .4); color: #ffc9c9; }

.resume-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.resume-bar select { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.form-grid .wide { grid-column: 1 / -1; }
.img-slot[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }
#resultDetails { margin-bottom: 10px; overflow-wrap: anywhere; }
.login-page { display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); }
.login-card h1 { font-size: 20px; }
.login-card form { margin-top: 20px; }
.login-card button { width: 100%; margin-top: 18px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr); }
  .monitor { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .monitor .card-head, .progress-block, .stage-list { grid-column: 1; }
  .preview-block, .log-block { grid-column: 2; }
  .monitor .card-head { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 14px; }
  .topbar { padding: 12px 14px; flex-wrap: wrap; }
  .monitor { display: block; }
  .actions { grid-template-columns: 1fr; }
  .img-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
