/* 新界面（Koba 风格，10-13 转正为默认）：前半段由 app.css 机械转成浅色（白字→墨绿字 rgb(var(--fg))、黑遮罩→白 rgb(var(--shade))、蓝→鼠尾草绿），后半段「Koba 层」是手写的新布局；改了 app.css 要用 对照/工具/koba/build.sh 重建 */
:root {
  --bg: #f4f1ea;
  --fg: 35 48 42;
  --shade: 255 255 255;
  --font: "PingFang SC", "SF Pro Text", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --blue: #34463a;
  --blue-hover: #45594a;
  --dot: #7f9b7d;
  --sel: #5e7a60;
  --tint: #e6ede3;
  --tint-text: #3e5a43;
  --green-bg: #e4ece0;
  --green-line: #b9cbb2;
  --green-text: #3f6444;
  --amber-text: #8a5b1e;
  --pink-text: #a3483f;
  --img-bg: #ebe6dc;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-ui: color 0.15s var(--ease), background-color 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), opacity 0.15s var(--ease), transform 0.15s var(--ease);
  --t-btn: transform 0.22s, box-shadow 0.22s, background 0.22s, color 0.22s, opacity 0.22s;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: rgb(var(--fg));
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.is-hidden { display: none !important; }

/* 原站 moto-glass-card */
.glass {
  position: relative;
  border: 1px solid rgb(var(--fg) / 0.08);
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  background-image: linear-gradient(145deg, rgb(var(--fg) / 0.106), rgb(var(--fg) / 0.035) 42%, rgb(var(--fg) / 0.02));
  box-shadow: inset 0 1px 0 rgb(var(--fg) / 0.16), inset 0 -42px 90px rgba(52, 66, 56, 0.06), 0 28px 90px rgba(52, 66, 56, 0.096);
  -webkit-backdrop-filter: blur(24px) saturate(1.42);
  backdrop-filter: blur(24px) saturate(1.42);
}

/* ---------- 按钮（原站 moto-icon-button） ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(var(--fg) / 0.1);
  transition: var(--t-btn);
}
.btn:hover:not(:disabled) { background: var(--blue-hover); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: rgb(var(--fg) / 0.1); border-color: rgb(var(--fg) / 0.12); }
.btn-ghost:hover:not(:disabled) { background: rgb(var(--fg) / 0.16); }
.btn-small { padding: 8px 14px; font-size: 14px; line-height: 20px; border-radius: 12px; }
.btn-block { width: 100%; padding-left: 16px; padding-right: 16px; }
.btn-ghost.is-on { border-color: #5e7a60; background: rgba(94, 122, 96, 0.203); color: var(--tint-text); }
.btn-ghost.is-on:hover:not(:disabled) { background: rgba(94, 122, 96, 0.28); }
.link-btn {
  padding: 0;
  border: none;
  background: none;
  color: rgb(var(--fg) / 0.42);
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  transition: var(--t-ui);
}
.link-btn:hover { color: rgb(var(--fg)); }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.muted-note { font-size: 12px; line-height: 20px; color: rgb(var(--fg) / 0.42); }

.chip-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 12px;
  background: rgb(var(--fg) / 0.06);
  color: rgb(var(--fg) / 0.55);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.as-label {
  display: block;
  color: rgb(var(--fg) / 0.34);
  font-size: 11px;
  line-height: 16.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.notice-amber, .notice-green, .notice-red {
  max-width: 820px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid;
  font-size: 14px;
  line-height: 28px;
}
.notice-amber { border-color: rgba(214, 180, 128, 0.45); border-radius: 16px; background: #faf1e2; color: var(--amber-text); }
.notice-red { max-width: none; margin: 0 0 16px; border-color: rgba(239, 68, 68, 0.45); border-radius: 16px; background: #fbe9e7; color: #9b2c2c; }
.notice-green { border-color: var(--green-line); border-radius: 22px; background: var(--green-bg); color: var(--green-text); word-break: break-all; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}
.pill-queued { background: rgb(var(--fg) / 0.06); color: rgb(var(--fg) / 0.55); }
.pill-running { background: var(--tint); color: var(--tint-text); }
.pill-running::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); animation: pulse 1.2s ease-in-out infinite; }
.pill-done { background: var(--green-bg); color: var(--green-text); }
.pill-failed { background: rgba(246, 214, 207, 0.58); color: var(--pink-text); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.section-head h2 { font-size: 16px; line-height: 24px; font-weight: 600; }
.section-head span { color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }

/* ---------- 外壳：左侧悬浮导航 ---------- */
.page { min-height: 100vh; padding: 16px 16px 20px 96px; }
.page-bare { padding: 20px; }
/* 右上角一排（原站 充值 / API / 积分 / 退出） */
.top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-height: 40px; margin-bottom: 28px; }
.top-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 999px;
  background: rgb(var(--shade) / 0.42);
  color: rgb(var(--fg) / 0.7);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 18px 58px rgba(52, 66, 56, 0.084);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  transition: var(--t-ui);
}
button.top-pill:hover, a.top-pill:hover { background: rgb(var(--fg) / 0.1); color: rgb(var(--fg)); }
.top-user { cursor: default; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.top-quota { border-color: #5e7a60; background: rgba(94, 122, 96, 0.322); color: #fff; font-weight: 600; }
a.top-quota:hover { background: #2c3a30; }
.side-nav {
  position: fixed;
  left: 16px;
  top: 50%;
  z-index: 50;
  display: grid;
  grid-template-columns: 60px;
  gap: 8px;
  padding: 8px;
  transform: translateY(-50%);
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 26px;
  background: rgb(var(--shade) / 0.58);
  box-shadow: 0 24px 90px rgba(52, 66, 56, 0.15);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
}
.nav-user {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 20px;
  background: var(--tint);
  color: var(--tint-text);
  font-size: 14px;
  font-weight: 600;
}
.nav-form { margin: 0; display: contents; }
.nav-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 60px;
  height: 64px;
  padding: 0;
  border: none;
  border-radius: 20px;
  background: transparent;
  color: rgb(var(--fg) / 0.5);
  box-shadow: inset 0 1px 0 rgb(var(--fg) / 0.1);
  cursor: pointer;
  transition: var(--t-btn);
}
.nav-btn .icon { width: 18px; height: 18px; }
.nav-btn span { font-size: 10px; line-height: 10px; font-weight: 500; letter-spacing: 0.08em; white-space: nowrap; }
.nav-btn:hover { background: rgb(var(--fg) / 0.08); color: rgb(var(--fg)); }
.nav-btn.is-active { background: rgb(var(--fg) / 0.14); color: rgb(var(--fg)); box-shadow: inset 0 1px 0 rgb(var(--fg) / 0.1), 0 18px 58px rgb(var(--fg) / 0.08); }
.nav-dot { position: absolute; top: 10px; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--fg) / 0.3); }
.nav-dot-ok { background: var(--green-text); box-shadow: 0 0 8px var(--green-text); }
.nav-dot-bad { background: var(--pink-text); }

/* ---------- 工作流选择页 ---------- */
.select-page { display: flex; flex-direction: column; gap: 20px; }
.hero { overflow: hidden; padding: 32px; border-radius: 26px; }
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 20%, rgba(94, 122, 96, 0.18), transparent 32%), linear-gradient(135deg, rgba(10, 22, 34, 0.78), rgb(var(--shade) / 0.5));
}
.hero > :not(.hero-glow) { position: relative; }
.hero h1 { margin-top: 20px; font-size: 48px; line-height: 1.12; font-weight: 600; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.hero p { max-width: 768px; margin-top: 16px; color: rgb(var(--fg) / 0.58); font-size: 16px; line-height: 28px; }

.wf-list { display: flex; flex-direction: column; gap: 16px; }
.scene-section { margin: 32px 4px 14px; font-size: 20px; font-weight: 600; color: rgb(var(--fg)); }  /* 测试版首页 /v2 的分区标题 */
a.chip-badge { text-decoration: none; }
.wf-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 42vw);
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgb(var(--fg) / 0.1);
  background: rgb(var(--shade) / 0.38);
  transition: var(--t-ui);
}
.wf-card:hover { border-color: rgb(var(--fg) / 0.24); background: rgb(var(--fg) / 0.05); }
.wf-info { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; min-width: 0; }
.wf-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wf-no { color: rgb(var(--fg) / 0.34); font-size: 12px; line-height: 16px; letter-spacing: 0.24em; text-transform: uppercase; }
.wf-ok { padding: 4px 8px; border-radius: 6px; background: var(--green-bg); color: var(--green-text); font-size: 12px; line-height: 16px; }
.wf-title { margin-top: 20px; font-size: 30px; line-height: 37.5px; font-weight: 600; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.wf-summary { max-width: 42rem; margin: 12px 0 24px; color: rgb(var(--fg) / 0.58); font-size: 14px; line-height: 28px; }
.wf-go { margin-top: auto; }
.wf-card:hover .wf-go { background: var(--blue-hover); }
.wf-cover { position: relative; display: block; width: 100%; min-height: 220px; aspect-ratio: 2538 / 1080; overflow: hidden; background: rgb(var(--shade) / 0.16); }
.wf-cover picture, .wf-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.wf-cover-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(var(--shade) / 0.18), transparent 48%, rgb(var(--shade) / 0.2)); }

/* ---------- 步骤页三栏 ---------- */
.wf-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* 左：步骤栏 */
.steps-aside { padding: 8px; border-radius: 20px; }
.aside-btn {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid rgb(var(--fg) / 0.12);
  border-radius: 16px;
  background: rgb(var(--fg) / 0.035);
  color: rgb(var(--fg) / 0.62);
  font-size: 16px;
  line-height: 24px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition: var(--t-ui);
}
.aside-btn:hover { border-color: rgb(var(--fg) / 0.24); background: rgb(var(--fg) / 0.07); color: rgb(var(--fg)); }
.aside-btn-danger { border-color: rgba(196, 120, 110, 0.45); background: #fbece8; color: var(--pink-text); }
.aside-btn-danger:hover { border-color: rgba(196, 120, 110, 0.45); background: rgba(246, 214, 207, 0.58); color: var(--pink-text); }
.si-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.si {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgb(var(--fg) / 0.025);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition: var(--t-ui);
}
.si:hover { border-color: rgb(var(--fg) / 0.16); background: rgb(var(--fg) / 0.055); }
.si.is-active { border-color: rgba(94, 122, 96, 0.7); background: rgba(94, 122, 96, 0.203); box-shadow: 0 20px 70px rgba(94, 122, 96, 0.14); }
.si.is-later { opacity: 0.45; }
.si.is-later:hover { opacity: 0.75; }
.si-dot { position: relative; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: rgb(var(--fg) / 0.28); }
.si.is-done .si-dot, .si.is-active .si-dot { background: var(--dot); box-shadow: 0 0 18px rgba(127, 155, 125, 0.82); }
.si.is-done .si-dot i { position: absolute; inset: -3.5px; border-radius: 50%; background: rgba(127, 155, 125, 0.6); animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
.si-text { display: flex; flex-direction: column; min-width: 0; }
.si-no { color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16.5px; letter-spacing: 0.24em; text-transform: uppercase; }
.si-text strong { margin-top: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.si-text small { margin-top: 4px; color: rgb(var(--fg) / 0.34); font-size: 12px; line-height: 16px; }

/* 中：步骤主区 */
.main-card { overflow: hidden; }
.mc-head { display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border-bottom: 1px solid rgb(var(--fg) / 0.1); }
.mc-head > .chip-badge:last-child { margin-top: 12px; }
.mc-title { margin-top: 12px; font-size: 30px; line-height: 36px; font-weight: 600; overflow-wrap: anywhere; }
.mc-sub { max-width: 820px; margin-top: 8px; color: rgb(var(--fg) / 0.6); font-size: 14px; line-height: 28px; }
.mc-head-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mc-head-main { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.mc-head-main .chip-badge { margin-top: 12px; }
.back { color: rgb(var(--fg) / 0.55); font-size: 13px; line-height: 20px; transition: var(--t-ui); }
.back:hover { color: rgb(var(--fg)); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.original-note { color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }

.mc-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 58vh;
  padding: 20px;
  background: rgb(var(--shade) / 0.18);
}
.pv-box { width: 100%; overflow: hidden; border: 1px solid rgb(var(--fg) / 0.1); background: rgb(var(--shade) / 0.28); }
.pv-media { display: block; width: 100%; padding: 0; border: none; background: var(--img-bg); cursor: zoom-in; }
.pv-media img { display: block; width: 100%; max-height: 68vh; object-fit: contain; }
.pv-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgb(var(--fg) / 0.1);
}
.pv-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.pv-sub { margin-top: 4px; color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }
.pv-link { font-size: 14px; line-height: 20px; transition: var(--t-ui); }
.pv-link:hover { color: var(--tint-text); }
.pv-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; }
.pv-empty-icon { color: rgb(var(--fg) / 0.36); }
.pv-empty-icon .icon { width: 52px; height: 52px; stroke-width: 1.3; }
.pv-empty-title { margin-top: 18px; font-size: 28px; line-height: 36px; font-weight: 600; }
.pv-empty-text { max-width: 680px; margin-top: 14px; color: rgb(var(--fg) / 0.5); font-size: 14px; line-height: 28px; }

/* 选择本步骤结果 / 同一批的结果 */
.pick-box { width: 100%; padding: 16px; border: 1px solid rgb(var(--fg) / 0.1); background: rgb(var(--shade) / 0.18); }
.pick-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.pick-sub { margin-top: 4px; color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }
.pick-batch { margin-top: 16px; }
.pick-batch-head { margin-bottom: 8px; color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16.5px; letter-spacing: 0.12em; }
.pick-box > .pick-grid { margin-top: 16px; }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pick {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgb(var(--fg) / 0.1);
  background: rgb(var(--fg) / 0.035);
  transition: var(--t-ui);
}
.pick:hover { border-color: rgb(var(--fg) / 0.24); background: rgb(var(--fg) / 0.06); }
.pick.is-selected { border-color: var(--sel); box-shadow: 0 18px 70px rgba(94, 122, 96, 0.14); }
.pick-media { position: relative; display: grid; place-items: center; height: 176px; overflow: hidden; background: var(--img-bg); }
.pick-media img { width: 100%; height: 100%; object-fit: contain; background: rgb(var(--shade) / 0.28); transition: transform 0.15s var(--ease); }
.pick:hover .pick-media img { transform: scale(1.02); }
.pick-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; }
.pick-foot b { font-size: 14px; line-height: 20px; font-weight: 600; }
.pick-tag { color: rgb(var(--fg) / 0.44); font-size: 12px; line-height: 16px; }
.pick-tag.is-ok { color: var(--green-text); }
.pick-tag.is-bad { color: var(--pink-text); }
.tile-state { display: grid; place-items: center; width: 100%; height: 100%; padding: 8px; color: rgb(var(--fg) / 0.55); font-size: 12px; line-height: 16px; text-align: center; }
.pick-queued .tile-state, .pick-running .tile-state, .tile-queued .tile-state, .tile-running .tile-state {
  background: linear-gradient(110deg, #ebe6dc 30%, #f7f4ee 50%, #ebe6dc 70%);
  background-size: 200% 100%;
  color: var(--tint-text);
  animation: shimmer 1.6s linear infinite;
}
.pick-failed .tile-state, .tile-failed .tile-state { color: var(--pink-text); }

/* 工作流助手（提交表单） */
.assistant { padding: 20px; }
.as-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgb(var(--fg) / 0.1); }
.as-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 16px; background: var(--tint); color: var(--tint-text); }
.as-icon .icon { width: 18px; height: 18px; }
.as-title { flex: 1; min-width: 160px; }
.as-title p:first-child { font-size: 14px; line-height: 20px; font-weight: 600; }
.as-title p:last-child { color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }
.assistant > .as-label { margin-top: 20px; }
.slots { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.slot {
  display: block;
  width: 166px;
  padding: 12px;
  border: 1px solid rgba(94, 122, 96, 0.18);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}
.slot .stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid rgba(94, 122, 96, 0.22);
  background: rgb(var(--fg) / 0.035);
  transition: var(--t-ui);
}
.slot:hover .stage { border-color: rgba(94, 122, 96, 0.48); background: rgba(94, 122, 96, 0.147); }
.slot.is-dragging .stage { border-color: var(--sel); background: rgba(94, 122, 96, 0.203); }
.slot .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: rgb(var(--shade) / 0.28); animation: fade 0.3s ease both; }
.stage-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 10px 48px; text-align: center; }
.slot.has-image .stage-empty { visibility: hidden; }
.plus { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(94, 122, 96, 0.48); border-radius: 50%; color: var(--tint-text); font-size: 20px; line-height: 1; }
.slot-hint { color: rgb(var(--fg) / 0.52); font-size: 11px; line-height: 16px; }
.stage-tip { color: rgb(var(--fg) / 0.3); font-size: 10px; line-height: 14px; }
.slot-lock {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 12px;
  border: 1px solid rgba(94, 122, 96, 0.3);
  border-radius: 999px;
  background: rgb(var(--shade) / 0.62);
  color: var(--tint-text);
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.slot-name {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgb(var(--shade) / 0.66);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-align: center;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.frame-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: rgb(var(--fg) / 0.4); font-size: 11px; line-height: 16px; }
.frame-foot .link-btn { font-size: 11px; color: var(--tint-text); }
.file-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ref-box { margin-top: 20px; padding: 16px; border: 1px solid rgb(var(--fg) / 0.1); background: rgb(var(--shade) / 0.14); }
.ref-box > p { font-size: 14px; line-height: 20px; font-weight: 500; }
.ref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 330px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgb(var(--fg) / 0.1);
  background: rgb(var(--fg) / 0.03);
  color: rgb(var(--fg) / 0.52);
  font-size: 12px;
  line-height: 16px;
}
.ref-ok { color: var(--green-text); white-space: nowrap; }

.as-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; margin-top: 20px; }
.as-main, .as-side { min-width: 0; }
.prompt {
  display: block;
  width: 100%;
  min-height: 168px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 12px;
  outline: none;
  background: rgb(var(--fg) / 0.05);
  color: rgb(var(--fg));
  font-size: 14px;
  line-height: 24px;
  resize: vertical;
  transition: var(--t-ui);
}
.prompt::placeholder { color: rgb(var(--fg) / 0.28); }
.prompt:focus { border-color: rgb(var(--fg) / 0.2); background: rgb(var(--fg) / 0.08); }
.prompt-readonly { min-height: 0; color: rgb(var(--fg) / 0.52); white-space: pre-line; }

.opt-box { margin-top: 12px; padding: 12px; border: 1px solid rgba(94, 122, 96, 0.18); border-radius: 16px; background: rgba(255, 255, 255, 0.7); }
.opt-title { color: rgb(var(--fg) / 0.56); font-size: 11px; line-height: 16.5px; font-weight: 600; letter-spacing: 0.08em; }
.opt-note { margin-top: 4px; color: rgb(var(--fg) / 0.36); font-size: 10px; line-height: 20px; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgb(var(--fg) / 0.08);
  border-radius: 12px;
  background: rgb(var(--fg) / 0.025);
  color: rgb(var(--fg) / 0.52);
  font-size: 11px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
  transition: var(--t-ui);
}
.opt:hover { background: rgb(var(--fg) / 0.06); }
.opt-radio { flex: none; width: 13px; height: 13px; margin-top: 4px; border: 1px solid #9aa59b; border-radius: 50%; background: #fff; transition: var(--t-ui); }
.opt-text { min-width: 0; color: rgb(var(--fg) / 0.4); }
.opt-text b { margin-right: 6px; color: rgb(var(--fg) / 0.78); font-weight: 600; }
.opt.is-active, .opt:has(input:checked) { border-color: rgba(94, 122, 96, 0.7); background: rgba(94, 122, 96, 0.203); }
.opt.is-active .opt-radio, .opt input:checked + .opt-radio { border: 4px solid var(--blue); background: #fff; }
.opt input:focus-visible + .opt-radio { outline: 2px solid var(--dot); outline-offset: 2px; }

/* 右侧运行控制 */
.consents {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 190, 140, 0.18);
  border-radius: 18px;
  background: #fbf6ec;
  color: rgb(var(--fg) / 0.7);
  font-size: 12px;
  line-height: 20px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.consents-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consents-head span { color: rgb(var(--fg) / 0.86); font-weight: 600; }
.consent-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgb(var(--fg) / 0.08); }
.consent { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.consent input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.side-field { display: block; margin-bottom: 12px; }
.side-field .as-label { margin-bottom: 8px; }
.side-aspect .opt-box, .side-resolution .opt-box { margin-top: 0; }
.side-aspect .opt-grid { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); }  /* 画幅照原站排成一排小按钮 */
.side-resolution .opt-grid { grid-template-columns: minmax(0, 1fr); }  /* 侧栏窄，清晰度三档竖排 */
.select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 12px;
  outline: none;
  background: rgb(var(--fg) / 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323302a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
  color: rgb(var(--fg));
  font-size: 16px;
  line-height: 24px;
  appearance: none;
  cursor: pointer;
  transition: var(--t-ui);
}
.select:focus { border-color: rgb(var(--fg) / 0.2); background-color: rgb(var(--fg) / 0.08); }
.select option { background: #ffffff; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 100%; }
.channel-card .muted-note { padding: 0 14px 6px; }
.channel-card .admin-filter { align-items: center; }
.seg label { position: relative; cursor: pointer; }
.seg span {
  display: block;
  padding: 10px 6px;
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 12px;
  background: rgb(var(--fg) / 0.05);
  color: rgb(var(--fg) / 0.62);
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  transition: var(--t-ui);
}
.seg label:hover span { background: rgb(var(--fg) / 0.08); color: rgb(var(--fg)); }
.seg input:checked + span { border-color: #5e7a60; background: rgba(94, 122, 96, 0.203); color: var(--tint-text); }
.seg input:focus-visible + span { outline: 2px solid var(--dot); outline-offset: 2px; }
.submit-col { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.submit-hint { color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; text-align: center; }
.progress { height: 3px; overflow: hidden; border-radius: 3px; background: rgb(var(--fg) / 0.08); visibility: hidden; }
.progress.is-active { visibility: visible; }
.progress-bar { width: var(--pct, 0%); height: 100%; background: var(--dot); transition: width 0.2s; }
.form-error { min-height: 16px; color: var(--pink-text); font-size: 12px; line-height: 16px; text-align: center; }

/* 全部最近任务（我们自己的补充区，沿用同一套卡片语言） */
.recent { padding: 20px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgb(var(--fg) / 0.1); background: rgb(var(--fg) / 0.035); transition: var(--t-ui); }
.card:hover { border-color: rgb(var(--fg) / 0.24); background: rgb(var(--fg) / 0.06); }
.card-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: var(--img-bg); color: rgb(var(--fg) / 0.55); font-size: 12px; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.card:hover .card-media img { transform: scale(1.035); }
.card-media.is-pending { background: linear-gradient(110deg, #ebe6dc 30%, #f7f4ee 50%, #ebe6dc 70%); background-size: 200% 100%; color: var(--tint-text); animation: shimmer 1.6s linear infinite; }
.card-media.is-failed { color: var(--pink-text); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.card-inputs { display: flex; flex: none; gap: 4px; }
.card-inputs img { width: 32px; height: 32px; object-fit: cover; background: var(--img-bg); }
.card-labels { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tag { min-width: 0; overflow: hidden; color: rgb(var(--fg) / 0.52); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.card-progress { overflow: hidden; color: rgb(var(--fg) / 0.6); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.card-time { color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty-note { grid-column: 1 / -1; padding: 32px; border: 1px dashed rgb(var(--fg) / 0.1); color: rgb(var(--fg) / 0.42); font-size: 13px; text-align: center; }

/* 右：工作流文件夹 / 任务信息 */
.folder { display: flex; padding: 20px; }
.folder-inner { display: flex; flex-direction: column; width: 100%; min-height: 0; overflow: hidden; padding: 16px; border-left: 1px solid rgb(var(--fg) / 0.08); background: rgb(var(--shade) / 0.12); }
.folder-label { color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16.5px; letter-spacing: 0.24em; text-transform: uppercase; }
.folder-title { margin-top: 8px; font-size: 16px; line-height: 24px; font-weight: 600; }
.folder-count { margin-top: 4px; color: rgb(var(--fg) / 0.46); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.folder-empty { margin-top: 16px; color: rgb(var(--fg) / 0.34); font-size: 12px; line-height: 20px; }
.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  min-height: 0;
  margin-top: 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--fg) / 0.15) transparent;
}
.tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: rgb(var(--shade) / 0.22); transition: var(--t-ui); }
.tile:hover { background: rgb(var(--fg) / 0.045); }
.tile-media { position: absolute; inset: 0; display: block; background: var(--img-bg); }
.tile-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.3s var(--ease); }
.tile:hover .tile-media img { transform: scale(1.035); }
.tile-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; pointer-events: none; background: linear-gradient(to top, rgb(var(--shade) / 0.82), rgb(var(--shade) / 0.24) 50%, transparent); }
.tile-cap { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-direction: column; }
.tile-cap strong, .tile-cap small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-cap strong { font-size: 12px; line-height: 16px; font-weight: 600; }
.tile-cap small { margin-top: 4px; color: rgb(var(--fg) / 0.54); font-size: 10px; line-height: 15px; }
.ping { position: absolute; top: 7px; right: 7px; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; }
.ping::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(127, 155, 125, 0.7); animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
.ping i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 18px rgba(127, 155, 125, 0.82); }

.info-block { margin-top: 20px; }
.info-block .folder-label { margin-bottom: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.thumb { display: flex; flex-direction: column; gap: 6px; padding: 0; border: none; background: none; color: rgb(var(--fg) / 0.54); font-size: 11px; line-height: 15px; text-align: left; cursor: zoom-in; }
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--img-bg); transition: var(--t-ui); }
.thumb:hover img { opacity: 0.85; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12px; line-height: 20px; }
.facts dt { color: rgb(var(--fg) / 0.42); white-space: nowrap; }
.facts dd { color: rgb(var(--fg) / 0.86); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* 进度条（.step 类名由 app.js 使用） */
.steps { display: flex; flex-direction: column; }
.step { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: center; padding-bottom: 14px; color: rgb(var(--fg) / 0.34); font-size: 13px; line-height: 18px; }
.step::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: rgb(var(--fg) / 0.08); }
.step:last-child::before { display: none; }
.step-dot { z-index: 1; width: 18px; height: 18px; border: 2px solid rgb(var(--fg) / 0.18); border-radius: 50%; background: #ffffff; }
.step.is-done { color: rgb(var(--fg) / 0.6); }
.step.is-done .step-dot { border-color: var(--dot); background: var(--dot); }
.step.is-current { color: rgb(var(--fg)); font-weight: 600; }
.step.is-current .step-dot { border-color: var(--dot); box-shadow: 0 0 0 4px rgba(127, 155, 125, 0.18); animation: pulse 1.2s ease-in-out infinite; }

/* 结果页：对比查看 */
.viewer { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.tabs { display: inline-flex; align-self: flex-start; gap: 4px; max-width: 100%; padding: 4px; overflow-x: auto; border: 1px solid rgb(var(--fg) / 0.1); border-radius: 12px; background: rgb(var(--fg) / 0.05); }
.tab { padding: 6px 14px; border: none; border-radius: 9px; background: transparent; color: rgb(var(--fg) / 0.62); font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: var(--t-ui); }
.tab:hover { color: rgb(var(--fg)); }
.tab.is-active { background: var(--blue); color: #fff; }
.stack { display: flex; flex-direction: column; }
.stack-item { position: relative; background: var(--img-bg); cursor: zoom-in; }
.stack-item + .stack-item { border-top: 1px solid rgb(var(--fg) / 0.1); }
.stack-item img { display: block; width: 100%; max-height: 68vh; object-fit: contain; }
.stack-item figcaption, .compare-label {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 12px;
  border: 1px solid rgba(94, 122, 96, 0.3);
  border-radius: 999px;
  background: rgb(var(--shade) / 0.62);
  color: var(--tint-text);
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 600;
}
.stack-item figcaption, .compare-label.left { left: 12px; }
.compare-label.right { right: 12px; }
.compare { --pos: 50%; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--img-bg); user-select: none; touch-action: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3; width: 2px; margin-left: -1px; background: var(--dot); cursor: ew-resize; }
.compare-handle::after {
  content: "⟷";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 8px 24px rgba(52, 66, 56, 0.15);
}
.single { aspect-ratio: 16 / 10; overflow: hidden; background: var(--img-bg); cursor: zoom-in; }
.single img { width: 100%; height: 100%; object-fit: contain; }
.result-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.waiting { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; text-align: center; }
.waiting-ring { width: 52px; height: 52px; margin-bottom: 12px; border: 3px solid rgba(127, 155, 125, 0.15); border-top-color: var(--dot); border-radius: 50%; animation: spin 1s linear infinite; }
.waiting-label { color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16.5px; letter-spacing: 0.28em; }
.waiting strong { font-size: 48px; line-height: 1.12; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.waiting-progress { color: var(--tint-text); font-size: 14px; line-height: 20px; }
.waiting-tip { margin-top: 8px; color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }
.error-box { padding: 12px 16px; border: 1px solid rgba(196, 120, 110, 0.45); border-radius: 16px; background: #fbece8; color: var(--pink-text); font-size: 14px; line-height: 28px; }
.tech-details { color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 20px; }
.tech-details summary { cursor: pointer; }
.tech-details p { margin: 8px 0; color: rgb(var(--fg) / 0.6); word-break: break-all; }

/* 结果页：框选裁剪 */
.crop-card { padding: 20px; }
.crop-wrap { margin-top: 16px; padding: 12px; border: 1px solid rgb(var(--fg) / 0.1); background: rgb(var(--shade) / 0.28); text-align: center; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; overflow: hidden; vertical-align: top; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-stage img { display: block; max-width: 100%; max-height: 80vh; pointer-events: none; }
.crop-box { position: absolute; border: 2px solid var(--dot); box-shadow: 0 0 0 9999px rgba(52, 66, 56, 0.165); cursor: move; }
.crop-handle { position: absolute; width: 14px; height: 14px; border: 2px solid var(--blue); border-radius: 4px; background: #fff; }
.crop-handle::after { content: ""; position: absolute; inset: -10px; }
.crop-nw { top: -8px; left: -8px; cursor: nwse-resize; }
.crop-ne { top: -8px; right: -8px; cursor: nesw-resize; }
.crop-sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
.crop-se { bottom: -8px; right: -8px; cursor: nwse-resize; }
.crop-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.crop-hint { color: rgb(var(--fg) / 0.6); font-size: 13px; line-height: 20px; }

/* ---------- 大图灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  padding: 24px;
  background: rgb(var(--shade) / 0.88);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.lightbox.is-open { display: flex; }
.lightbox-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lightbox-title { min-width: 0; }
.lightbox-title p:first-child { font-size: 14px; line-height: 20px; font-weight: 600; }
.lightbox-title p:last-child { margin-top: 4px; color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }
.lightbox-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.lightbox-bar .btn { padding: 12px 16px; }
.lightbox-stage { position: relative; display: grid; flex: 1; place-items: center; min-height: 0; overflow: hidden; padding: 16px; border: 1px solid rgb(var(--fg) / 0.1); background: rgb(var(--shade) / 0.42); cursor: zoom-out; }
.lightbox-frame { display: inline-block; max-width: 100%; overflow: hidden; border-radius: 24px; vertical-align: middle; }
.lightbox-frame img { display: block; max-width: 100%; max-height: calc(100dvh - 10rem); object-fit: contain; cursor: zoom-in; }
.lightbox.is-zoomed .lightbox-stage { place-items: start; overflow: auto; }
.lightbox.is-zoomed .lightbox-frame { max-width: none; border-radius: 0; }
.lightbox.is-zoomed .lightbox-frame img { max-width: none; max-height: none; cursor: zoom-out; }

/* ---------- 登录 / 出图账号 / 账号管理 ---------- */
.login-wrap { display: grid; place-items: center; min-height: calc(100vh - 40px); }
.login-panel { display: flex; flex-direction: column; gap: 10px; width: min(440px, 100%); overflow: hidden; padding: 32px; border-radius: 26px; }
.login-panel > :not(.hero-glow) { position: relative; }
.login-panel h1 { margin-top: 12px; font-size: 40px; line-height: 1.12; font-weight: 600; letter-spacing: -0.04em; }
.login-sub { margin-bottom: 8px; color: rgb(var(--fg) / 0.58); font-size: 14px; line-height: 28px; }
.login-panel .as-label { margin-top: 6px; }
.login-panel .btn { margin-top: 10px; }
.login-panel .form-error { text-align: left; }
.text-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 12px;
  outline: none;
  background: rgb(var(--fg) / 0.05);
  color: rgb(var(--fg));
  font-size: 16px;
  line-height: 24px;
  letter-spacing: normal;
  text-transform: none;
  transition: var(--t-ui);
}
.text-input::placeholder { color: rgb(var(--fg) / 0.28); }
.text-input:focus { border-color: rgb(var(--fg) / 0.2); background: rgb(var(--fg) / 0.08); }
.text-input.small { width: 96px; }
.login-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 560px; margin: 40px auto 0; padding: 32px; border-radius: 26px; }
.login-card h1 { font-size: 30px; line-height: 36px; font-weight: 600; }
.login-card p { color: rgb(var(--fg) / 0.6); font-size: 14px; line-height: 28px; }
.qr { width: min(320px, 100%); padding: 8px; border-radius: 16px; background: #fff; }

.admin-create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin: 0; padding: 20px; }
.admin-create .as-label { display: flex; flex: 1 1 200px; flex-direction: column; gap: 8px; }
.admin-create .as-label:has(.small) { flex: 0 0 auto; }
.table-card { padding: 8px; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; min-width: 720px; border-collapse: collapse; color: rgb(var(--fg) / 0.86); font-size: 14px; line-height: 20px; }
.admin-table th { padding: 12px 14px; border-bottom: 1px solid rgb(var(--fg) / 0.1); color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16.5px; font-weight: 400; letter-spacing: 0.24em; text-align: left; }
.admin-table td { padding: 14px; border-bottom: 1px solid rgb(var(--fg) / 0.08); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgb(var(--fg) / 0.02); }
.admin-table .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-actions .inline-form { margin: 4px 8px 4px 0; }
.admin-actions .text-input.small { padding: 7px 10px; font-size: 14px; line-height: 20px; }

/* ---------- 真实感强化：左右对比层 + 强度面板 ---------- */
[data-rc-host] { position: relative; }
.pv-stage { position: relative; }
.rc-layer { --rc-pos: 50%; position: absolute; inset: 0; z-index: 3; display: block; overflow: hidden; }
.rc-after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; clip-path: inset(0 0 0 var(--rc-pos)); pointer-events: none; }
.rc-line { position: absolute; top: 0; bottom: 0; left: var(--rc-pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 14px rgba(52, 66, 56, 0.165); pointer-events: none; }
.rc-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgb(var(--shade) / 0.55);
  box-shadow: 0 8px 24px rgba(52, 66, 56, 0.15);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.rc-knob::before { content: "‹ ›"; color: #fff; font-size: 18px; line-height: 1; letter-spacing: 2px; }
.rc-tag {
  position: absolute;
  bottom: 12px;
  z-index: 1;
  padding: 6px 12px;
  border: 1px solid rgba(94, 122, 96, 0.3);
  border-radius: 999px;
  background: rgb(var(--shade) / 0.62);
  color: var(--tint-text);
  font-size: 11px;
  line-height: 16.5px;
  font-weight: 600;
  pointer-events: none;
}
.rc-tag-left { left: 12px; }
.rc-tag-right { right: 12px; }
/* 照原站：透明 range 盖满整张图，按住任意位置左右拖即可 */
.rc-range { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; background: transparent; }
.rc-range::-webkit-slider-runnable-track { height: 100%; }
.rc-range::-webkit-slider-thumb { width: 44px; height: 100%; -webkit-appearance: none; appearance: none; }
.rc-range::-moz-range-track { height: 100%; background: transparent; }
.rc-range::-moz-range-thumb { width: 44px; height: 100%; border: none; background: transparent; }


/* ---------- 资产库（原站 assets 页实测规格） ---------- */
.assets-page { display: flex; flex-direction: column; gap: 24px; }
.asset-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px; border-radius: 28px; }
.asset-search { flex: 1 1 320px; min-width: 0; margin: 0; }
.search-box { position: relative; display: block; }
.search-box .icon { position: absolute; left: 16px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: rgb(var(--fg) / 0.4); pointer-events: none; }
.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid rgb(var(--fg) / 0.1);
  border-radius: 16px;
  outline: none;
  background: rgb(var(--fg) / 0.05);
  color: rgb(var(--fg));
  font-size: 14px;
  line-height: 24px;
  transition: var(--t-ui);
}
.search-box input::placeholder { color: rgb(var(--fg) / 0.28); }
.search-box input:focus { border-color: rgb(var(--fg) / 0.2); background: rgb(var(--fg) / 0.08); }
.asset-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.asset-filter { border-radius: 16px; padding: 12px 16px; }
.asset-filter.is-active { border-color: #5e7a60; background: rgba(94, 122, 96, 0.322); color: var(--tint-text); }
.asset-group { margin: 0; }
.asset-group .select { width: auto; min-width: 150px; border-radius: 16px; font-size: 14px; }
.asset-count { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1px solid rgb(var(--fg) / 0.1); border-radius: 16px; background: rgb(var(--fg) / 0.05); color: rgb(var(--fg) / 0.55); font-size: 14px; line-height: 24px; white-space: nowrap; }
.asset-back { border-radius: 16px; padding: 12px 16px; }
.asset-notice { padding: 12px 20px; border-radius: 28px; color: var(--amber-text); font-size: 14px; line-height: 28px; }
.asset-notice.is-admin { color: var(--tint-text); }
.asset-notice a { color: rgb(var(--fg)); text-decoration: underline; text-underline-offset: 3px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-items: stretch; }
.asset-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; transition: transform 0.18s, box-shadow 0.18s, background 0.18s; }
.asset-card:hover { transform: translateY(-2px); }
.asset-media { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: none; background: var(--img-bg); cursor: zoom-in; }
.asset-media img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s var(--ease); }
.asset-card:hover .asset-media img { transform: scale(1.035); }
.asset-expand { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgb(var(--shade) / 0.55); color: rgb(var(--fg) / 0.82); opacity: 0; -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); transition: var(--t-btn); }
.asset-expand .icon { width: 13px; height: 13px; }
.asset-card:hover .asset-expand, .asset-media:focus-visible .asset-expand { opacity: 1; }
.asset-flag { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(246, 214, 207, 0.85); color: var(--pink-text); font-size: 11px; line-height: 16px; }
.asset-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 32px 10px 8px; background: linear-gradient(to top, rgb(var(--shade) / 0.82), transparent); text-align: left; }
.asset-title, .asset-size { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-title { color: rgb(var(--fg) / 0.88); font-size: 12px; line-height: 16px; font-weight: 500; }
.asset-size { margin-top: 2px; color: rgb(var(--fg) / 0.48); font-size: 10px; line-height: 15px; }
.asset-tools { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px; border-top: 1px solid rgb(var(--fg) / 0.08); }
.asset-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 6px; border: none; border-radius: 50%; background: rgba(52, 66, 56, 0.105); color: rgb(var(--fg) / 0.68); cursor: pointer; box-shadow: inset 0 1px 0 rgb(var(--fg) / 0.1); transition: var(--t-btn); }
.asset-icon .icon { width: 14px; height: 14px; }
.asset-icon:hover { color: rgb(var(--fg)); transform: translateY(-1px); }
.asset-icon:active { transform: scale(0.94); }
.asset-icon.is-on { color: #b7812c; }
.asset-icon.is-on .icon { fill: currentColor; }
.asset-icon.is-danger:hover { color: #b54a3e; }
.asset-links { margin-top: auto; padding: 0 10px 9px; overflow: hidden; color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.asset-links a { color: rgb(var(--fg) / 0.6); transition: var(--t-ui); }
.asset-links a:hover { color: var(--tint-text); }
.asset-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 16px; color: rgb(var(--fg) / 0.5); font-size: 14px; line-height: 24px; text-align: center; }
.asset-empty .icon { width: 44px; height: 44px; stroke-width: 1.3; color: rgb(var(--fg) / 0.34); }
.asset-more { display: flex; justify-content: center; }

/* ---------- 管理员后台 ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.nav-dot-inline { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--fg) / 0.3); }
.nav-dot-inline.nav-dot-ok { background: var(--green-text); box-shadow: 0 0 8px var(--green-text); }
.nav-dot-inline.nav-dot-bad { background: var(--pink-text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { padding: 20px; }
.stat-label { color: rgb(var(--fg) / 0.34); font-size: 11px; line-height: 16.5px; letter-spacing: 0.24em; }
.stat-value { margin-top: 8px; font-size: 30px; line-height: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-note { margin-top: 6px; color: rgb(var(--fg) / 0.42); font-size: 12px; line-height: 16px; }
.table-head { padding: 12px 14px 8px; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 12px; }
.admin-filter .select { width: auto; min-width: 140px; padding-top: 9px; padding-bottom: 9px; font-size: 14px; }
.admin-filter .btn { padding: 9px 18px; font-size: 14px; }
.admin-thumb { display: block; width: 44px; height: 44px; overflow: hidden; background: var(--img-bg); }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-thumb .tile-state { font-size: 10px; padding: 2px; }
.admin-link { color: var(--tint-text); font-variant-numeric: tabular-nums; }
.admin-link:hover { color: rgb(var(--fg)); }
.admin-jobs td { padding-top: 8px; padding-bottom: 8px; }

@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.4; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- 1024～1279：文件夹 / 信息栏挪到主区下方（原站 xl 断点） ---------- */
@media (max-width: 1279px) {
  .wf-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .folder { grid-column: 2; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(127px, 1fr)); }
}
@media (min-width: 1280px) {
  .folder { position: sticky; top: 16px; height: calc(100vh - 32px); }
}

/* ---------- 手机 / 窄屏（原站 lg 断点以下）：上下堆叠 + 底部导航 ---------- */
@media (max-width: 1023px) {
  .page { padding: 16px 12px 105px; }
  .page-bare { padding: 20px 12px; }
  .top-actions { margin-bottom: 24px; }
  .top-pill { height: 36px; padding: 0 12px; font-size: 13px; }
  .side-nav {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    grid-template-columns: none;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 8px;
    padding: 12px;
    transform: none;
    border: none;
    border-top: 1px solid rgb(var(--fg) / 0.1);
    border-radius: 0;
    background: rgb(var(--shade) / 0.85);
    box-shadow: none;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .nav-user { display: none; }
  .nav-btn { flex: 1; flex-direction: column; gap: 4px; width: auto; height: 56px; padding: 6px 4px; border-radius: 14px; color: rgb(var(--fg) / 0.6); box-shadow: none; }
  .nav-btn span { font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }  /* 10-10 手机上横排被挤成一字一行 ⇒ 图标在上、字在下、不换行 */
  .nav-btn.is-active { background: rgb(var(--fg) / 0.12); box-shadow: none; }
  .nav-dot { top: 12px; right: 10px; }

  .hero { padding: 24px; }
  .hero h1 { font-size: 30px; line-height: 33.6px; }
  .hero p { font-size: 14px; }
  .wf-card { grid-template-columns: minmax(0, 1fr); }
  .wf-info { padding: 20px; }
  .wf-title { font-size: 28px; line-height: 35px; }
  .wf-cover { min-height: 138px; }

  .wf-layout { grid-template-columns: minmax(0, 1fr); }
  .folder { grid-column: auto; }
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; overflow: visible; }
  .as-grid { grid-template-columns: minmax(0, 1fr); }
  .slot { width: 100%; }
  .slot .stage { min-height: 180px; }
  .opt-grid { grid-template-columns: minmax(0, 1fr); }
  .mc-head-row { align-items: flex-start; }
  .actions { width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .pv-cap .result-tools { width: 100%; }
  .result-tools .btn, .result-tools .inline-form { flex: 1 1 auto; }
  .result-tools .inline-form .btn { width: 100%; }
  .pick-media { height: 150px; }
  .waiting strong { font-size: 40px; }
  .crop-handle { width: 20px; height: 20px; }
  .crop-nw, .crop-ne { top: -11px; }
  .crop-sw, .crop-se { bottom: -11px; }
  .crop-nw, .crop-sw { left: -11px; }
  .crop-ne, .crop-se { right: -11px; }
  .crop-bar .btn { width: 100%; }
  .rc-knob { width: 36px; height: 36px; }

  .lightbox { padding: 16px; }
  .lightbox-bar .btn { padding: 10px 12px; font-size: 14px; line-height: 20px; }
  .lightbox-stage { padding: 12px; }
  .lightbox-frame { border-radius: 16px; }
  .lightbox-frame img { max-height: calc(100dvh - 11rem); }
  .login-panel, .login-card { padding: 24px; }
  .asset-bar { flex-direction: column; align-items: stretch; padding: 16px; }
  .asset-search { flex: none; }
  .asset-filters { flex-direction: column; align-items: stretch; }
  .asset-filters .btn, .asset-group .select { width: 100%; }
  .asset-count { justify-content: flex-start; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:last-child { grid-column: 1 / -1; }
  .stat-value { font-size: 26px; line-height: 32px; }
  .asset-expand { opacity: 1; }
  .asset-notice { border-radius: 24px; }
  .admin-create { padding: 16px; }
}

/* 选择页第二块「生图模板」的标题卡：和头图同款但矮一些 */
.hero-sub { margin-top: 28px; padding-top: 22px; padding-bottom: 22px; }
.hero-sub h2 { margin: 10px 0 6px; font-size: 28px; font-weight: 700; color: rgb(var(--fg)); }

/* 恢复期拼图的天数叠层：虚线分格 + 左下角小标签；位置由 JS 贴合图片实际显示区域 */
.stack-item { position: relative; }
.day-grid { position: absolute; display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr); pointer-events: none; z-index: 3; }
.day-grid i { position: relative; border: 1px dashed rgb(var(--fg) / 0.42); }
.day-grid i::after { content: attr(data-label); position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: 6px; font-size: 12px; line-height: 1; font-style: normal; color: #fff; background: rgb(var(--shade) / 0.58); }
.day-grid.is-hidden { display: none; }
.day-toggle { position: absolute; top: 8px; right: 8px; z-index: 4; padding: 4px 9px; border-radius: 999px; border: 1px solid rgb(var(--fg) / 0.22); background: rgb(var(--shade) / 0.58); color: #fff; font-size: 12px; cursor: pointer; }

/* ---------- AI 看脸标记：结果页手动调整区 ---------- */
.marks-tool { margin-top: 16px; padding: 20px; }
.mt-tip { margin: 6px 0 14px; font-size: 14px; line-height: 1.7; color: rgb(var(--fg) / 0.7); }
.mt-tip b { color: #1e6fe0; font-weight: 600; }
.mt-stage { position: relative; user-select: none; -webkit-user-select: none; border-radius: 12px; overflow: hidden; }
.mt-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.mt-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mt-lines line { stroke: #1e6fe0; stroke-width: 2.5; }
.mt-lines .mt-grip { stroke: transparent; stroke-width: 22; pointer-events: stroke; cursor: grab; touch-action: none; }
.mt-dot, .mt-chip { position: absolute; transform: translate(-50%, -50%); touch-action: none; cursor: grab; }
.mt-dot { width: 18px; height: 18px; border-radius: 50%; background: #1e6fe0; border: 2px solid #fff; box-shadow: 0 0 0 6px rgba(30, 111, 224, 0.25); }
.mt-chip { padding: 3px 8px; border: 1.5px solid #1e6fe0; border-radius: 4px; background: #fff; color: #1e6fe0; font-size: 13px; line-height: 18px; white-space: nowrap; }
.mt-chip { z-index: 1; }
.mt-dot { z-index: 2; }  /* 圆点永远在标签上面，被标签挡住也能按到 */
.mt-dot.is-dragging, .mt-chip.is-dragging { cursor: grabbing; z-index: 3; }
.mt-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mt-list li { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 10px; }
.mt-list .link-btn { font-size: 20px; padding: 0 8px; }
.mt-add, .mt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.mt-add .text-input { flex: 1; min-width: 12em; }
.mt-add .select { width: auto; }
.mt-status { font-size: 13px; color: rgb(var(--fg) / 0.7); }
.mt-swipe { display: none; margin: 0 0 8px; font-size: 13px; color: rgb(var(--fg) / 0.55); }
@media (max-width: 1023px) {
  .marks-tool.is-wide .mt-swipe { display: block; }
  .marks-tool.is-wide .mt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
  .marks-tool.is-wide .mt-stage { width: 230%; }  /* 三格各约一屏宽，标签不挤、圆点好按 */
  .mt-dot { width: 22px; height: 22px; }  /* 手机上手指好按 */
  .mt-chip { font-size: 12px; }
}
.mt-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 6px; }

/* ---------- AI 看脸标注（测试版）：部位面板 + 画布 ---------- */
.atlas-tool { margin-bottom: 16px; padding: 4px 0 8px; }
.glass.atlas-tool { padding: 20px; }
.at-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }  /* 画布占满一行，面板在下面 */
.at-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.at-shape, .at-grip, .at-dot, .at-label { cursor: grab; touch-action: none; }
.at-shape { pointer-events: visiblePainted; }
.at-grip { pointer-events: stroke; }
.at-label { user-select: none; -webkit-user-select: none; }
.at-panels { margin-top: 8px; font-size: 13px; color: #9a6418; }
.at-side { display: grid; gap: 10px; }
.at-row { display: flex; flex-wrap: wrap; gap: 8px; }
.at-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: rgb(var(--fg) / 0.8); }
.at-hint { font-size: 13px; color: #9a6418; }
.at-hint:empty { display: none; }
.at-list { max-height: 56vh; overflow-y: auto; padding-right: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 18px; align-items: start; }
.at-list details { break-inside: avoid; }
.at-list details { margin-bottom: 8px; }
.at-list summary { cursor: pointer; padding: 6px 0; font-size: 14px; font-weight: 600; color: rgb(var(--fg)); }
.at-item { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 5px 2px; font-size: 13px; cursor: pointer; }
.at-item span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.at-item b { font-weight: 600; }
.at-item i { font-style: normal; font-size: 11px; padding: 0 5px; border: 1px solid rgb(var(--fg) / 0.25); border-radius: 4px; color: rgb(var(--fg) / 0.6); }
.at-item small { flex-basis: 100%; color: rgb(var(--fg) / 0.55); }
.at-item input:disabled + span { opacity: 0.45; }
.at-analysis { display: grid; gap: 10px; padding: 14px; border: 1px solid rgba(255, 212, 0, 0.35); border-radius: 12px; background: rgba(255, 212, 0, 0.05); }
.at-analysis-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; color: rgb(var(--fg)); }
.at-summary { resize: vertical; min-height: 4.5em; line-height: 1.6; }
.at-notes { display: grid; gap: 8px; }
.at-note { display: grid; grid-template-columns: auto 7em 6.8em minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.at-note b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-note .select, .at-add .select { width: auto; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.at-note .text-input { padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.at-add .text-input { flex: 1; min-width: 10em; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.at-empty { margin: 0; font-size: 13px; color: rgb(var(--fg) / 0.55); }
.at-sub { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: rgb(var(--fg) / 0.85); }
@media (max-width: 640px) {
  .at-note { grid-template-columns: auto minmax(0, 1fr) auto auto; padding-bottom: 8px; border-bottom: 1px solid rgb(var(--fg) / 0.08); }
  .at-note .text-input { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 1023px) {
  .at-body { grid-template-columns: minmax(0, 1fr); }
  .atlas-tool.is-wide .mt-swipe { display: block; }
  .atlas-tool.is-wide .mt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
  .atlas-tool.is-wide .mt-stage { width: 230%; }
  .at-list { max-height: none; }
}

/* ---------- 本次流程（10-12）：锁定的上传位、候选「选这张」、页面底部进入下一步、资产库选图弹窗 ---------- */
.aside-form { margin: 0; }
.si small { display: block; margin-top: 2px; font-size: 12px; color: rgb(var(--fg) / 0.5); }
.slot-locked .stage { cursor: default; }
.slot-locked:hover .stage { border-color: rgb(var(--fg) / 0.12); background: transparent; }
.slot-missing .stage-empty { visibility: visible; }
.flow-choices { margin-top: 8px; }
.flow-choices p { margin: 0 0 6px; font-size: 12px; color: rgb(var(--fg) / 0.55); }
.flow-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-choice { position: relative; display: flex; flex-direction: column; gap: 4px; width: 92px; padding: 4px; border: 1px solid rgb(var(--fg) / 0.14); border-radius: 10px; font-size: 11px; color: rgb(var(--fg) / 0.65); cursor: pointer; }
.flow-choice img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.flow-choice input { position: absolute; opacity: 0; pointer-events: none; }
.flow-choice:has(input:checked), .flow-choice.is-on { border-color: var(--sel); background: rgba(94, 122, 96, 0.203); color: rgb(var(--fg)); }
.pick-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pick-choose { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border: 1px solid rgb(var(--fg) / 0.16); border-radius: 12px; font-size: 14px; cursor: pointer; color: rgb(var(--fg) / 0.8); }
.pick-choose:has(input:checked) { border-color: var(--sel); background: rgba(94, 122, 96, 0.217); color: rgb(var(--fg)); }
.flow-bar { padding: 18px 20px; }
.flow-bar form { display: grid; gap: 10px; }
.flow-bar-hint, .flow-bar.is-waiting p { margin: 0; font-size: 13px; color: rgb(var(--fg) / 0.6); }
.flow-bar-btn { min-height: 52px; font-size: 16px; }
.flow-note { font-size: 13px; color: rgb(var(--fg) / 0.55); align-self: center; }
.asset-pick { width: min(920px, 94vw); max-height: 86vh; padding: 18px; border: 1px solid rgb(var(--fg) / 0.14); border-radius: 18px; background: #fbfaf6; color: rgb(var(--fg)); }
.asset-pick::backdrop { background: rgb(var(--shade) / 0.6); }
.asset-pick-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.asset-pick-tabs { display: flex; gap: 6px; }
.asset-pick-tabs button { padding: 6px 12px; border: 1px solid rgb(var(--fg) / 0.16); border-radius: 999px; background: transparent; color: rgb(var(--fg) / 0.7); cursor: pointer; }
.asset-pick-tabs button.is-active { border-color: var(--sel); color: rgb(var(--fg)); background: rgba(94, 122, 96, 0.217); }
.asset-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 64vh; overflow-y: auto; }
.asset-pick-item { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid rgb(var(--fg) / 0.1); border-radius: 10px; background: rgb(var(--fg) / 0.03); color: rgb(var(--fg) / 0.7); font-size: 11px; text-align: left; cursor: pointer; }
.asset-pick-item:hover { border-color: var(--sel); }
.asset-pick-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.asset-pick [data-more] { margin-top: 12px; }
.frame-foot { flex-wrap: wrap; }
.slot-locked:has(.flow-choices) { display: grid; grid-template-columns: 142px minmax(0, 1fr); column-gap: 16px; width: min(100%, 560px); align-items: start; }
.slot-locked:has(.flow-choices) .flow-choices { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
.slot-locked .flow-choice { width: 120px; }
@media (max-width: 640px) {
  .slot-locked:has(.flow-choices) { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .slot-locked:has(.flow-choices) .stage { max-width: 220px; }
  .slot-locked:has(.flow-choices) .flow-choices { grid-column: 1; grid-row: auto; margin-top: 10px; }
}
.locked-preview { display: grid; gap: 14px; }
.locked-needs { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.locked-needs li { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid rgb(var(--fg) / 0.1); border-radius: 12px; background: rgb(var(--fg) / 0.03); }
.locked-needs b { font-size: 15px; }
.locked-needs span { font-size: 13px; color: rgb(var(--fg) / 0.6); }
.mc-stage-locked { justify-content: flex-start; min-height: 0; }

/* 账号管理「密码」一栏：默认收起，点「查看」才显示 */
.pw-cell summary { cursor: pointer; color: var(--sel); font-size: 13px; }
.pw-cell code { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: rgb(var(--fg) / 0.08); font-size: 14px; user-select: all; }

/* ---------- 单部位模拟：部位标签 + 多选胶囊 + 已选区（10-14） ---------- */
.pp { margin-bottom: 14px; }
.pp-tabs { display: flex; gap: 6px; margin: 10px 0 8px; overflow-x: auto; scrollbar-width: none; }
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tabs button { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid rgb(var(--fg) / 0.12); border-radius: 999px; background: transparent; color: rgb(var(--fg) / 0.7); font-size: 14px; cursor: pointer; }
.pp-tabs button.is-on { border-color: var(--sel); background: rgba(94, 122, 96, 0.217); color: rgb(var(--fg)); }
.pp-tabs button.has-pick::after { content: "•"; margin-left: 4px; color: var(--dot); }
.pp-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; font-size: 13px; color: rgb(var(--fg) / 0.7); }
.pp-picked-list { display: contents; }
.pp-picked-chip { min-height: 34px; padding: 0 10px; border: 1px solid var(--sel); border-radius: 999px; background: rgba(94, 122, 96, 0.217); color: rgb(var(--fg)); font-size: 13px; cursor: pointer; }
.pp-picked-chip::after { content: " ×"; opacity: 0.7; }
.pp-note { margin: 4px 0; font-size: 13px; color: var(--amber-text); }
.pp-group summary { cursor: pointer; padding: 8px 0; font-size: 14px; font-weight: 600; }
.pp-group summary small { margin-left: 6px; font-weight: 400; color: rgb(var(--fg) / 0.5); }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 10px; }
.pp-chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid rgb(var(--fg) / 0.12); border-radius: 12px; background: rgb(var(--fg) / 0.05); font-size: 14px; color: rgb(var(--fg) / 0.82); cursor: pointer; }
.pp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pp-chip:has(input:checked), .pp-chip.is-on { border-color: var(--sel); background: rgba(94, 122, 96, 0.217); color: rgb(var(--fg)); }
.pp-chip:has(input:focus-visible) { outline: 2px solid var(--dot); outline-offset: 2px; }
.pp.is-tabbed .pp-group summary { display: none; }
.pp-strength { margin-top: 8px; }

/* ---------- 结果页「P 图过程视频」 ---------- */
.video-box { display: grid; gap: 10px; margin-top: 16px; padding: 16px; border: 1px solid rgb(var(--fg) / 0.1); border-radius: 16px; background: rgb(var(--fg) / 0.03); }
.video-player { width: min(100%, 360px); aspect-ratio: 9 / 16; border-radius: 12px; background: #000; }
.video-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.video-progress { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; }
.video-progress .kb-generating-ring { width: 22px; height: 22px; border: 3px solid rgb(var(--fg) / 0.2); border-top-color: var(--dot); border-radius: 50%; animation: spin 1s linear infinite; }
.video-error { margin: 0; color: var(--pink-text); font-size: 14px; }

/* ---------- AI 推荐操作项（10-14 第 2 批）：看脸标注 → 单部位模拟 ---------- */
.pp-ai { margin: 8px 0 10px; padding: 12px 14px; border: 1px solid rgba(255, 212, 0, 0.35); border-radius: 12px; background: rgba(255, 212, 0, 0.06); font-size: 13px; line-height: 1.6; }
.pp-ai-title { font-weight: 600; }
.pp-ai-summary { margin-top: 4px; color: rgb(var(--fg) / 0.82); }
.pp-ai-note { margin-top: 4px; font-size: 12px; color: rgb(var(--fg) / 0.5); }
.pp-ai-missing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pp-chip.is-ai { flex-direction: column; align-items: flex-start; justify-content: center; padding-top: 6px; padding-bottom: 6px; }
.pp-reason { display: block; max-width: 16em; font-size: 11px; line-height: 1.4; color: rgb(var(--fg) / 0.55); white-space: normal; }
.pp-picked-chip.is-ai::before { content: "AI · "; opacity: 0.7; }
.parts-bridge { margin-top: 16px; padding: 18px 20px; }
.parts-bridge-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.pp-redo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: rgb(var(--fg) / 0.7); cursor: pointer; }

/* ---------- AI 美学设计（10-14 第 3 批）：方案卡片 + 方案图；单部位模拟页的方案 / 保底推荐说明；选填上传位 ---------- */
.aesthetic-plan { display: grid; gap: 16px; }
.ae-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ae-complaint { margin-top: 4px; font-size: 13px; color: rgb(var(--fg) / 0.6); }
.ae-summary { padding: 12px 16px; border: 1px solid var(--green-line); border-radius: 14px; background: var(--green-bg); color: var(--green-text); font-size: 14px; line-height: 1.7; }
.ae-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ae-card { padding: 14px 16px; border: 1px solid rgb(var(--fg) / 0.1); border-radius: 14px; background: rgb(var(--fg) / 0.03); font-size: 14px; line-height: 1.7; }
.ae-card.ae-wide { grid-column: 1 / -1; }
.ae-label { margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: rgb(var(--fg) / 0.55); }
.ae-muted { margin-top: 4px; font-size: 13px; color: rgb(var(--fg) / 0.55); }
.ae-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ae-table th, .ae-table td { padding: 6px 8px; border-bottom: 1px solid rgb(var(--fg) / 0.08); text-align: left; vertical-align: top; }
.ae-table th { font-weight: 500; color: rgb(var(--fg) / 0.5); }
.ae-list { display: grid; gap: 8px; margin: 0; padding-left: 0; list-style: none; }
.ae-list li { display: grid; gap: 2px; }
.ae-list span { font-size: 13px; color: rgb(var(--fg) / 0.7); }
.ae-image { margin: 0; max-width: 520px; cursor: zoom-in; }
.ae-image img { display: block; width: 100%; border-radius: 14px; }
.slot-optional .slot-name::after { content: "（选填）"; font-weight: 400; opacity: 0.7; }
.pp-ai-notice { margin-bottom: 6px; color: var(--amber-text); font-size: 13px; }
.pp-ai-fallback .pp-ai-title { color: var(--amber-text); }
@media (max-width: 640px) {
  .ae-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   Koba 层（10-13 用户选 F 方案，参考 Awwwards Koba：深鼠尾草绿导航 + 奶油底 + 腮红粉 + 细衬线标题 + 胶囊按钮）
   ===================================================================== */
:root {
  --paper: #fbfaf6;
  --ink: #23302a;
  --muted: #6f7a70;
  --line: #e2ddd1;
  --forest: #3b4a3f;
  --sage: #5e7a60;
  --sage-soft: #e6ede3;
  --blush: #f6e1dc;
  --blush-ink: #8c4b45;
  --serif: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(52, 66, 56, 0.05), 0 12px 32px rgba(52, 66, 56, 0.07);
}
body { background: var(--bg); color: var(--ink); }
::selection { background: var(--blush); color: var(--ink); }

/* 压在图上的组件：局部还原深色语义（文字白、遮罩黑） */
.lightbox, .tile, .asset-media, .rc-layer, .day-grid, .day-toggle, .crop-box, .stack-item figcaption, .compare-label, .rc-tag, .pv-media, .kb-recent-item span {
  --fg: 255 255 255;
  --shade: 0 0 0;
  color: rgb(var(--fg));
}
.lightbox { background: rgba(28, 36, 31, 0.92); }
.lightbox .btn-ghost { color: #fff; }
.tile-state { color: var(--muted); }

/* ---------- 通用部件 ---------- */
.glass {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.btn { border-radius: 999px; background: var(--forest); color: #fff; box-shadow: none; letter-spacing: 0.02em; }
.btn:hover:not(:disabled) { background: var(--sage); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--sage-soft); border-color: #c9d4c4; }
.btn-ghost.is-on { background: var(--sage-soft); border-color: var(--sage); color: var(--forest); }
.btn-small { border-radius: 999px; }
.link-btn { color: var(--sage); }
.link-btn:hover { color: var(--forest); }
.chip-badge { border-color: var(--line); background: #fff; color: var(--muted); border-radius: 999px; letter-spacing: 0.12em; }
.as-label { color: var(--muted); letter-spacing: 0.16em; }
.notice-amber { border-color: #ecdcbf; background: #fbf4e6; color: #7a5420; border-radius: 16px; }
.notice-green { border-color: #c9d8c2; background: var(--sage-soft); color: #3f5f43; border-radius: 16px; }
.notice-red { border-color: #efc6bf; background: #fbecea; color: #9b2c2c; }
.notice-amber a, .notice-green a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pill-queued { background: #efece5; color: var(--muted); }
.pill-failed { background: #fbe4df; color: var(--blush-ink); }
.text-input, .select, .prompt, .search-box input { background-color: #fff; border-color: var(--line); color: var(--ink); }
.text-input:focus, .select:focus, .prompt:focus, .search-box input:focus { border-color: var(--sage); background-color: #fff; box-shadow: 0 0 0 3px rgba(94, 122, 96, 0.14); }
.select option { background: #fff; color: var(--ink); }
.hero, .mc-title, .pv-empty-title, .login-panel h1, .login-card h1, .stat-value, .waiting strong { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
.hero { background: linear-gradient(120deg, var(--paper) 45%, var(--blush)); }
.hero h1 { font-weight: 500; letter-spacing: 0; }
.hero-glow { display: none; }
.hero p { color: var(--muted); }

/* ---------- 外壳：顶部提示条 + 深绿导航条 ---------- */
.kb-band { padding: 7px 16px; background: var(--sage); color: #f7efd9; font-size: 13px; line-height: 20px; text-align: center; letter-spacing: 0.04em; }
.kb-band a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.kb-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
  padding: 10px 28px;
  background: var(--forest);
  color: #f4f1ea;
}
.kb-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; letter-spacing: 0.08em; color: #fff; white-space: nowrap; }
.kb-logo-mark { width: 22px; height: 22px; border: 1.5px solid #f6e1dc; border-radius: 50%; box-shadow: inset 0 0 0 4px var(--forest), inset 0 0 0 11px #f6e1dc; }
.kb-top .side-nav {
  position: static;
  display: flex;
  gap: 4px;
  padding: 0;
  transform: none;
  border: none;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.kb-top .nav-btn { flex-direction: row; gap: 8px; width: auto; height: 40px; padding: 0 16px; border-radius: 999px; color: rgba(244, 241, 234, 0.72); box-shadow: none; }
.kb-top .nav-btn span { font-size: 15px; line-height: 20px; letter-spacing: 0.04em; font-weight: 400; }
.kb-top .nav-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.kb-top .nav-btn.is-active { background: var(--blush); color: var(--forest); box-shadow: none; }
.kb-top .nav-dot { top: 8px; right: 6px; }
.kb-top .top-actions { margin: 0 0 0 auto; min-height: 0; }
.kb-top .top-pill { height: 38px; border-color: rgba(244, 241, 234, 0.22); background: transparent; color: #f4f1ea; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.kb-top button.top-pill:hover, .kb-top a.top-pill:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.kb-top .top-quota { border-color: #fff; background: #fff; color: var(--forest); }
.kb-top a.top-quota:hover { background: var(--blush); color: var(--forest); }
.page { padding: 28px 32px 48px; max-width: 1480px; margin: 0 auto; }
.page-bare { padding: 20px; }

/* ---------- 工作台 ---------- */
.kb-home { display: flex; flex-direction: column; gap: 36px; }
.kb-eyebrow { display: inline-block; color: var(--sage); font-size: 12px; line-height: 16px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600; }
.kb-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 300px;
  padding: 40px 48px;
  overflow: hidden;
  border-radius: 28px;
  background: radial-gradient(circle at 85% 20%, rgba(246, 225, 220, 0.9), transparent 45%), linear-gradient(135deg, #e9eee4 0%, #f4f1ea 55%, #f6e5df 100%);
}
.kb-hero h1 { margin-top: 14px; font-family: var(--serif); font-size: 52px; line-height: 1.18; font-weight: 400; color: var(--forest); letter-spacing: 0.02em; }
.kb-hero p { max-width: 520px; margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 26px; }
.kb-search { position: relative; display: block; max-width: 520px; margin-top: 24px; }
.kb-search .icon { position: absolute; left: 20px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); }
.kb-search input {
  width: 100%;
  height: 54px;
  padding: 0 20px 0 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(52, 66, 56, 0.08);
  transition: var(--t-ui);
}
.kb-search input:focus { border-color: var(--sage); box-shadow: 0 0 0 4px rgba(94, 122, 96, 0.14); }
.kb-hero-art { position: relative; height: 240px; }
.kb-hero-art img { position: absolute; top: 50%; width: 46%; aspect-ratio: 4 / 5; object-fit: cover; border: 6px solid #fff; border-radius: 18px; box-shadow: 0 24px 50px rgba(52, 66, 56, 0.2); }
.kb-hero-art img:nth-child(1) { left: 2%; transform: translateY(-46%) rotate(-7deg); }
.kb-hero-art img:nth-child(2) { left: 27%; z-index: 2; transform: translateY(-54%) rotate(2deg); }
.kb-hero-art img:nth-child(3) { left: 52%; transform: translateY(-44%) rotate(8deg); }
.kb-section { display: flex; flex-direction: column; gap: 18px; }
.kb-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.kb-section-head h2 { font-family: var(--serif); font-size: 28px; line-height: 36px; font-weight: 500; color: var(--forest); }
.kb-section-head span, .kb-section-head a { color: var(--muted); font-size: 13px; }
.kb-section-head a:hover { color: var(--forest); }
.kb-resume-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.kb-resume { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); transition: var(--t-ui); }
.kb-resume:hover { border-color: #c9d4c4; transform: translateY(-2px); }
.kb-resume-media { display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--img-bg); color: var(--muted); }
.kb-resume-media img { width: 100%; height: 100%; object-fit: cover; }
.kb-resume-media .icon { width: 28px; height: 28px; }
.kb-resume-body { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.kb-progress + .kb-resume-go, .kb-resume-body small + .kb-resume-go { margin-top: 10px; }
.kb-resume-body b { font-size: 16px; line-height: 24px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-resume-body small { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-progress { height: 5px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #e7e3d9; }
.kb-progress i { display: block; height: 100%; border-radius: inherit; background: var(--sage); }
.kb-resume-go { align-self: flex-start; margin-top: auto; padding: 6px 16px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 13px; line-height: 20px; }
.kb-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.kb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-chip { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; line-height: 20px; cursor: pointer; transition: var(--t-ui); }
.kb-chip:hover { border-color: #c9d4c4; background: var(--sage-soft); }
.kb-chip.is-on { border-color: var(--forest); background: var(--forest); color: #fff; }
.kb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.kb-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s; }
.kb-card:hover { transform: translateY(-4px); border-color: #cfd8ca; box-shadow: 0 2px 4px rgba(52, 66, 56, 0.05), 0 22px 44px rgba(52, 66, 56, 0.12); }
.kb-card.is-hidden { display: none; }
.kb-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--img-bg); }
.kb-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.kb-card:hover .kb-card-media img { transform: scale(1.04); }
.kb-card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.kb-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-tag { padding: 2px 10px; border-radius: 999px; background: #efece5; color: var(--muted); font-size: 12px; line-height: 20px; }
.kb-tag.is-on { background: var(--blush); color: var(--blush-ink); }
.kb-card-title { margin-top: 10px; font-family: var(--serif); font-size: 21px; line-height: 30px; font-weight: 500; color: var(--forest); }
.kb-card-sum { display: -webkit-box; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 21px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kb-card-go { margin-top: auto; padding-top: 14px; color: var(--forest); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
.kb-card:hover .kb-card-go { color: var(--sage); }
.kb-empty { padding: 36px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.kb-recent { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.kb-recent-item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--img-bg); }
.kb-recent-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.kb-recent-item:hover img { transform: scale(1.05); }
.kb-recent-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent); font-size: 11px; line-height: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 步骤条（步骤页 / 结果页 / 待解锁页共用） ---------- */
.kb-stepbar { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.kb-bar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.kb-back { color: var(--muted); font-size: 14px; white-space: nowrap; }
.kb-back:hover { color: var(--forest); }
.kb-crumb { display: flex; flex: 1; align-items: baseline; gap: 10px; min-width: 0; }
.kb-crumb b { font-family: var(--serif); font-size: 20px; line-height: 28px; font-weight: 500; color: var(--forest); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-crumb small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.kb-restart { padding: 7px 16px; border: 1px solid #ecc9c2; border-radius: 999px; background: #fbefec; color: var(--blush-ink); font-size: 13px; line-height: 20px; cursor: pointer; white-space: nowrap; transition: var(--t-ui); }
.kb-restart:hover { background: var(--blush); }
.kb-steps { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.kb-steps::-webkit-scrollbar { display: none; }
.kb-st { position: relative; display: flex; flex: 1 0 150px; align-items: center; gap: 10px; padding: 6px 14px 6px 0; color: var(--muted); }
.kb-st:not(:last-child)::after { content: ""; flex: 1; min-width: 14px; height: 1px; margin-left: 4px; background: var(--line); }
.kb-st.is-done:not(:last-child)::after { background: var(--sage); }
.kb-st-dot { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 13px; font-weight: 600; color: var(--muted); transition: var(--t-ui); }
.kb-st-text { display: flex; flex-direction: column; min-width: 0; }
.kb-st-text small { font-size: 10px; line-height: 14px; letter-spacing: 0.18em; }
.kb-st-text b { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.kb-st-text em { font-size: 11px; line-height: 15px; font-style: normal; color: var(--muted); white-space: nowrap; }
.kb-st:hover .kb-st-dot { border-color: var(--sage); }
.kb-st.is-done .kb-st-dot { border-color: var(--sage); background: var(--sage); color: #fff; animation: kb-pop 0.5s var(--ease) both; }
.kb-st.is-active .kb-st-dot { border-color: var(--forest); background: var(--forest); color: #fff; box-shadow: 0 0 0 5px rgba(94, 122, 96, 0.18); }
.kb-st.is-active .kb-st-text b { font-weight: 700; color: var(--forest); }
.kb-st.is-later { opacity: 0.6; }
.kb-st.is-later .kb-st-dot { font-size: 12px; background: #f3f0e9; }
.kb-st.is-later:hover { opacity: 0.9; }
@keyframes kb-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- 步骤页：左看图挑图 / 右本步操作 ---------- */
.kb-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  grid-template-areas: "bar bar" "head panel" "look panel" "files panel" "rest panel";
  grid-template-rows: auto auto auto auto 1fr;
  gap: 20px 24px;
  align-items: start;
}
.kb-step > .kb-stepbar { grid-area: bar; }
.kb-head { grid-area: head; display: flex; flex-direction: column; align-items: flex-start; padding: 4px 4px 0; }
.kb-head .mc-title { margin-top: 8px; font-size: 38px; line-height: 48px; color: var(--forest); }
.kb-head .mc-sub { max-width: 760px; color: var(--muted); }
.kb-look { grid-area: look; overflow: hidden; }
.kb-files { grid-area: files; padding: 0; }
.kb-panel { grid-area: panel; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 104px); overflow-y: auto; padding: 2px 4px 4px 2px; scrollbar-width: thin; scrollbar-color: #d6d1c4 transparent; }
.kb-step .mc-stage { min-height: 0; padding: 18px; background: transparent; }
.kb-step .pv-empty { padding: 56px 20px; border: 1px dashed #d8d2c4; border-radius: 18px; background: repeating-linear-gradient(135deg, #f7f4ee 0 12px, #f3efe7 12px 24px); }
.kb-step .pv-empty-icon { color: #b5ad9d; }
.kb-step .pv-empty-title { font-size: 26px; color: var(--forest); }
.kb-step .pv-empty-text { color: var(--muted); }
.pv-box { border-color: var(--line); border-radius: 18px; background: #fff; }
.pv-cap { border-color: var(--line); }
.pv-link { color: var(--sage); }
.pick-box { border: none; padding: 4px 0 0; background: transparent; }
.pick-title { font-family: var(--serif); font-size: 18px; line-height: 26px; font-weight: 500; color: var(--forest); }
.pick-sub, .pick-batch-head { color: var(--muted); }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pick { border-color: var(--line); border-radius: 16px; background: #fff; }
.pick:hover { border-color: #c9d4c4; background: #fff; }
.pick.is-selected { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(94, 122, 96, 0.2); }
.pick-media { height: 190px; background: #f1ede5; }
.pick-media img { background: #f1ede5; }
.pick-tag { color: var(--muted); }
.pick-choose { border-color: var(--line); border-radius: 999px; background: #fff; color: var(--ink); }
.pick-choose:has(input:checked) { border-color: var(--forest); background: var(--forest); color: #fff; }
.pick-choose input { accent-color: var(--blush); }
.pick-queued .tile-state, .pick-running .tile-state, .tile-queued .tile-state, .tile-running .tile-state, .card-media.is-pending { background: linear-gradient(110deg, #ece7dd 30%, #f8f5ef 50%, #ece7dd 70%); background-size: 200% 100%; color: var(--sage); }
.kb-files summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.kb-files summary::-webkit-details-marker { display: none; }
.kb-files summary span { font-family: var(--serif); font-size: 17px; color: var(--forest); }
.kb-files summary span::before { content: "＋"; display: inline-block; width: 22px; color: var(--sage); }
.kb-files[open] summary span::before { content: "－"; }
.kb-files summary small { color: var(--muted); font-size: 12px; }
.kb-files .folder-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-height: none; margin: 0; padding: 0 20px 20px; overflow: visible; }
.kb-files .folder-empty { margin: 0; padding: 0 20px 20px; color: var(--muted); }
.tile { border-radius: 14px; }

/* 右侧面板 */
.kb-panel .assistant { padding: 20px; }
.kb-panel .as-head { padding-bottom: 14px; border-color: var(--line); }
.kb-panel .as-title p:first-child { font-family: var(--serif); font-size: 20px; line-height: 28px; font-weight: 500; color: var(--forest); }
.kb-panel .as-title p:last-child { color: var(--muted); }
.kb-sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.kb-sec-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.kb-sec-title i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blush); color: var(--blush-ink); font-size: 12px; font-style: normal; }
.kb-sec-prompt > .as-label { display: none; }
.kb-sec .slots { margin-top: 0; }
.kb-panel .slot { width: calc(50% - 6px); padding: 8px; border-color: var(--line); border-radius: 16px; background: #fff; }
.kb-panel .slot .stage { min-height: 150px; border: 1px dashed #cdd6c8; border-radius: 12px; background: #f7f5ef; }
.kb-panel .slot:hover .stage, .kb-panel .slot.is-dragging .stage { border-color: var(--sage); background: var(--sage-soft); }
.kb-panel .slot-locked { width: 100%; }
.slot .stage img { background: #f1ede5; }
.plus { border-color: var(--sage); color: var(--sage); }
.slot-hint { color: var(--muted); }
.stage-tip { color: #a39c8e; }
.slot-name { background: rgba(251, 250, 246, 0.94); color: var(--ink); border: 1px solid var(--line); }
.slot-lock { border-color: #c9d4c4; background: rgba(251, 250, 246, 0.94); color: var(--forest); }
.frame-foot { color: var(--muted); }
.frame-foot .link-btn { color: var(--sage); font-weight: 600; }
.flow-choice { border-color: var(--line); background: #fff; color: var(--muted); }
.flow-choice:has(input:checked), .flow-choice.is-on { border-color: var(--forest); background: var(--sage-soft); color: var(--forest); }
.kb-panel .slot-locked:has(.flow-choices) { grid-template-columns: 120px minmax(0, 1fr); width: 100%; column-gap: 12px; }
.kb-panel .slot-locked .flow-choice { width: 84px; }
.kb-panel .prompt { min-height: 110px; margin-top: 0; border-radius: 16px; }
.opt-box { margin-top: 10px; padding: 0; border: none; background: transparent; }
.opt-title { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.opt-note { color: #9a9385; font-size: 11px; line-height: 18px; }
.kb-panel .opt-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-panel .opt { width: auto; max-width: 100%; align-items: center; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; line-height: 18px; }
.kb-panel .opt-radio { display: none; }
.kb-panel .opt-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.kb-panel .opt-text b { margin-right: 4px; color: var(--ink); }
.kb-panel .opt:hover { border-color: #c9d4c4; background: var(--sage-soft); }
.kb-panel .opt.is-active, .kb-panel .opt:has(input:checked) { border-color: var(--forest); background: var(--forest); }
.kb-panel .opt.is-active .opt-text, .kb-panel .opt:has(input:checked) .opt-text, .kb-panel .opt.is-active .opt-text b, .kb-panel .opt:has(input:checked) .opt-text b { color: #fff; }
.kb-panel .opt-grid.is-folded .opt:nth-child(n+5) { display: none; }
.kb-more { padding: 6px 14px; border: 1px dashed #c9d4c4; border-radius: 999px; background: transparent; color: var(--sage); font-size: 12px; line-height: 18px; cursor: pointer; }
.kb-sec-settings .side-field { margin-bottom: 10px; }
.kb-sec-settings .opt-note { display: none; }
.seg span { border-color: var(--line); border-radius: 999px; background: #fff; color: var(--ink); }
.seg label:hover span { background: var(--sage-soft); color: var(--ink); }
.seg input:checked + span { border-color: var(--forest); background: var(--forest); color: #fff; }
.kb-consents { margin: 14px 0 12px; padding: 0; border: 1px solid #ecdcbf; border-radius: 16px; background: #fbf6ec; color: var(--ink); }
.kb-consents summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; }
.kb-consents summary::-webkit-details-marker { display: none; }
.kb-consent-more { color: var(--sage); font-size: 12px; font-weight: 400; white-space: nowrap; }
.kb-consents[open] .kb-consent-more { visibility: hidden; }
.kb-consents .consents-head { padding: 0 14px; }
.kb-consents .consents-head span { color: var(--muted); font-weight: 400; font-size: 12px; }
.kb-consents .consent-list { margin: 8px 14px 0; padding: 10px 0 14px; border-color: #ecdcbf; }
.kb-consents.is-complete { border-color: #c9d8c2; background: var(--sage-soft); }
.kb-consents.is-complete .kb-consent-state { color: var(--forest); }
.consent { color: var(--ink); font-size: 12px; }
.consent input { accent-color: var(--forest); }
.kb-panel .submit-col .btn { min-height: 52px; font-size: 16px; }
/* 面板内容比屏幕高时，运行按钮贴在面板底部，不用往下翻找 */
.kb-panel .submit-col { position: sticky; bottom: 0; z-index: 3; margin: 0 -20px -20px; padding: 12px 20px 16px; border-radius: 0 0 var(--radius) var(--radius); background: linear-gradient(to top, var(--paper) 78%, rgba(251, 250, 246, 0)); }
.kb-panel .submit-col + .btn { margin-top: 28px; }
.submit-hint { color: var(--muted); }
.progress { background: #e7e3d9; }
.progress-bar { background: var(--sage); }
.kb-panel .flow-bar { padding: 16px 18px; border-color: #ecc9c2; background: linear-gradient(135deg, #fdf3f0, var(--blush)); }
.kb-panel .flow-bar.is-waiting { border-color: var(--line); background: var(--paper); }
.flow-bar-hint, .flow-bar.is-waiting p { color: var(--muted); }
.flow-bar-btn { white-space: normal; text-align: left; line-height: 22px; }
.kb-dock { display: none; }

/* ---------- 结果页 / 待解锁页（沿用 wf-layout，步骤条横在顶上） ---------- */
.wf-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px 24px; }
.wf-layout > .kb-stepbar { grid-column: 1 / -1; }
.wf-layout > .col-main:last-child { grid-column: 1 / -1; }
.wf-layout > .folder { position: sticky; top: 88px; height: auto; max-height: calc(100vh - 104px); }
.mc-head { border-color: var(--line); }
.mc-stage { background: transparent; }
.folder-inner { border-left: none; background: transparent; padding: 4px; }
.folder-label { color: var(--sage); }
.folder-title { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--forest); }
.folder-count, .facts dt, .thumb { color: var(--muted); }
.facts dd { color: var(--ink); }
.tabs { border-color: var(--line); border-radius: 999px; background: #fff; }
.tab { border-radius: 999px; color: var(--muted); }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--forest); color: #fff; }
.stack-item + .stack-item { border-color: var(--line); }
.stack-item figcaption, .compare-label, .rc-tag { border-color: rgba(255, 255, 255, 0.3); background: rgba(35, 48, 42, 0.72); color: #fff; }
.compare-handle { background: #fff; }
.compare-handle::after { background: var(--forest); }
.step::before { background: var(--line); }
.step-dot { border-color: #d8d2c4; background: #fff; }
.waiting-ring { border-color: rgba(94, 122, 96, 0.18); border-top-color: var(--sage); }
.waiting strong { color: var(--forest); }
.error-box { border-color: #efc6bf; background: #fbecea; color: #9b2c2c; }
.crop-wrap { border-color: var(--line); background: #f1ede5; border-radius: 16px; }
.crop-box { border-color: #fff; }
.crop-handle { border-color: var(--forest); }
.locked-needs li { border-color: var(--line); background: #fff; }
.locked-needs span { color: var(--muted); }

/* ---------- 资产库 / 后台 / 登录 ---------- */
.asset-bar { border-radius: var(--radius); }
.asset-filter.is-active { border-color: var(--forest); background: var(--forest); color: #fff; }
.asset-count { border-color: var(--line); background: #fff; color: var(--muted); }
.asset-notice { color: #7a5420; }
.asset-notice.is-admin { color: var(--forest); }
.asset-notice a { color: var(--forest); }
.asset-card { border-radius: 18px; }
.asset-tools { border-color: var(--line); }
.asset-icon { background: #f1ede5; color: var(--muted); box-shadow: none; }
.asset-icon:hover { color: var(--forest); }
.asset-icon.is-danger:hover { color: var(--blush-ink); }
.asset-links { color: #a39c8e; }
.asset-links a { color: var(--muted); }
.asset-flag { background: rgba(246, 214, 207, 0.95); color: var(--blush-ink); }
.asset-pick { border-color: var(--line); background: var(--paper); color: var(--ink); }
.asset-pick::backdrop { background: rgba(35, 48, 42, 0.45); }
.asset-pick-tabs button { border-color: var(--line); color: var(--muted); }
.asset-pick-tabs button.is-active { border-color: var(--forest); background: var(--forest); color: #fff; }
.asset-pick-item { border-color: var(--line); background: #fff; color: var(--muted); }
.admin-table { color: var(--ink); }
.admin-table th { color: var(--muted); }
.stat-label { color: var(--sage); }
.login-wrap { min-height: calc(100vh - 80px); }
.login-panel { background: radial-gradient(circle at 100% 0%, rgba(246, 225, 220, 0.9), transparent 50%), var(--paper); }
.login-panel h1 { color: var(--forest); }
.at-analysis { border-color: #ecdcbf; background: #fbf6ec; }
.at-analysis-head, .at-list summary { color: var(--ink); }
.at-check, .at-sub { color: var(--ink); }
.at-item i { border-color: var(--line); color: var(--muted); }
.at-item small, .at-empty, .mt-status, .mt-swipe, .mt-tip { color: var(--muted); }

/* ---------- 网页内确认框 / 提示条（替代浏览器原生弹窗） ---------- */
.kb-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: none; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(35, 48, 42, 0.3); }
.kb-dialog::backdrop { background: rgba(35, 48, 42, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.kb-dialog-body { padding: 28px 26px 22px; }
.kb-dialog-body .kb-eyebrow { color: var(--blush-ink); }
.kb-dialog-body p { margin-top: 10px; font-size: 16px; line-height: 27px; }
.kb-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 26px 24px; }
.kb-dialog[open] { animation: kb-rise 0.22s var(--ease) both; }
.kb-toast { position: fixed; left: 50%; bottom: 32px; z-index: 120; max-width: min(520px, calc(100vw - 32px)); padding: 12px 22px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 14px; line-height: 22px; box-shadow: 0 18px 40px rgba(35, 48, 42, 0.3); transform: translateX(-50%); animation: kb-rise 0.22s var(--ease) both; }
@keyframes kb-rise { from { opacity: 0; transform: translate(var(--kb-x, 0), 10px); } to { opacity: 1; transform: translate(var(--kb-x, 0), 0); } }
.kb-toast { --kb-x: -50%; }

/* ---------- 1024～1279 ---------- */
@media (max-width: 1279px) {
  .kb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kb-recent { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wf-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .wf-layout > .folder { grid-column: auto; }
}

/* ---------- 手机 / 窄屏 ---------- */
@media (max-width: 1023px) {
  .kb-band { font-size: 12px; padding: 6px 12px; }
  .kb-top { position: relative; gap: 10px; min-height: 56px; padding: 8px 14px; }
  .kb-logo { font-size: 18px; }
  .kb-top .top-actions { gap: 6px; }
  .kb-top .top-user { display: none; }
  .kb-top .top-pill { height: 32px; padding: 0 12px; font-size: 12px; }
  .kb-top .side-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(251, 250, 246, 0.97);
    box-shadow: 0 -8px 24px rgba(52, 66, 56, 0.08);
  }
  .kb-top .nav-btn { flex-direction: column; gap: 3px; height: 52px; padding: 4px; border-radius: 16px; color: var(--muted); }
  .kb-top .nav-btn span { font-size: 12px; line-height: 16px; }
  .kb-top .nav-btn:hover { background: var(--sage-soft); color: var(--forest); }
  .kb-top .nav-btn.is-active { background: var(--forest); color: #fff; }
  .page { padding: 16px 12px 100px; }

  .kb-home { gap: 26px; }
  .kb-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 26px 20px 24px; border-radius: 24px; }
  .kb-hero h1 { font-size: 32px; line-height: 1.25; }
  .kb-hero p { font-size: 14px; line-height: 23px; }
  .kb-search { margin-top: 18px; }
  .kb-search input { height: 48px; font-size: 14px; }
  .kb-hero-art { display: none; }
  .kb-section-head h2 { font-size: 22px; line-height: 30px; }
  .kb-resume-row { grid-template-columns: minmax(0, 1fr); }
  .kb-resume { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .kb-filter { flex-direction: column; align-items: stretch; }
  .kb-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .kb-chips::-webkit-scrollbar { display: none; }
  .kb-chip { flex: none; padding: 7px 15px; font-size: 13px; }
  .kb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kb-card { border-radius: 18px; }
  .kb-card-media { aspect-ratio: 1; }
  .kb-card-body { padding: 12px 12px 14px; }
  .kb-card-title { margin-top: 8px; font-size: 16px; line-height: 23px; }
  .kb-card-sum { font-size: 12px; line-height: 18px; }
  .kb-card-go { padding-top: 10px; font-size: 13px; }
  .kb-tag { font-size: 11px; padding: 1px 8px; }
  .kb-recent { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

  /* 步骤页：顶部横滑步骤，素材 / 设置一张卡，结果在下面，底部固定操作条（不显示底部导航） */
  body:has(.kb-step) .kb-top .side-nav { display: none; }
  .kb-step { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "head" "panel" "look" "files"; grid-template-rows: none; gap: 14px; padding-bottom: 96px; }
  .kb-stepbar { padding: 12px 14px; gap: 10px; border-radius: 18px; }
  .kb-crumb b { font-size: 17px; }
  .kb-crumb small { display: none; }
  .kb-st { flex: 0 0 auto; padding-right: 8px; }
  .kb-st:not(:last-child)::after { min-width: 10px; width: 14px; flex: none; }
  .kb-st-text small, .kb-st-text em { display: none; }
  .kb-st:not(.is-active) .kb-st-text b { max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .kb-st-dot { width: 26px; height: 26px; font-size: 12px; }
  .kb-head .mc-title { font-size: 28px; line-height: 36px; }
  .kb-head .mc-sub { font-size: 13px; line-height: 23px; }
  .kb-head .notice-amber, .kb-head .notice-green { font-size: 13px; line-height: 22px; }
  .kb-panel { position: static; max-height: none; overflow: visible; padding: 0; }
  .kb-panel .assistant { padding: 16px; }
  .kb-panel .submit-col { display: none; }
  .kb-panel .slot { width: calc(50% - 6px); }
  .kb-panel .slot-locked { width: 100%; }
  .kb-panel .flow-bar { display: none; }
  .kb-step .mc-stage { padding: 12px; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pick-media { height: 150px; }
  .kb-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: block;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(251, 250, 246, 0.97);
    box-shadow: 0 -10px 30px rgba(52, 66, 56, 0.1);
  }
  .kb-dock-note { margin-bottom: 6px; color: var(--muted); font-size: 12px; line-height: 18px; text-align: center; }
  .kb-dock-note:empty { display: none; }
  .kb-dock-note.is-alert { color: var(--blush-ink); }
  .kb-dock-row { display: flex; gap: 8px; }
  .kb-dock-row .btn { flex: 1 1 0; min-height: 48px; padding: 10px 12px; font-size: 15px; }
  .kb-dock-row .btn span { overflow: hidden; text-overflow: ellipsis; }
  .kb-dock-next { flex-grow: 1.6 !important; }

  .wf-layout { grid-template-columns: minmax(0, 1fr); }
  .wf-layout > .folder { position: static; grid-column: auto; max-height: none; }
  .kb-dialog-actions .btn { flex: 1; }
}

/* =====================================================================
   新手友好（第 63 版）：短提示 + 「这一步怎么用」、上传位示意图、卡片「放什么 → 出什么」、新手引导、大图里直接选、等待计时
   ===================================================================== */
.kb-head .mc-sub { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kb-tip { display: block; max-width: 760px; margin-top: 12px; padding: 10px 16px; border: 1px solid #d9e2d4; border-radius: 14px; background: var(--sage-soft); color: #3f5f43; font-size: 14px; line-height: 22px; }
.kb-tip a { margin: 0 2px; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.kb-tip.is-warn { border-color: #ecdcbf; background: #fbf4e6; color: #7a5420; }
.kb-tip.is-busy { border-color: #ecc9c2; background: #fdf3f0; color: var(--blush-ink); }
.kb-tip.is-ok { border-color: #c9d8c2; }
.kb-tip-dot { display: inline-block; width: 8px; height: 8px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--blush-ink); animation: pulse 1.2s ease-in-out infinite; }
.kb-howto { margin-top: 8px; }
.kb-howto summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--sage); font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.kb-howto summary::-webkit-details-marker { display: none; }
.kb-howto summary::before { content: "?"; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; line-height: 1; }
.kb-howto[open] summary { color: var(--forest); }
.kb-howto-body { max-width: 760px; }
.kb-howto-body .notice-amber, .kb-howto-body .notice-green { margin-top: 8px; font-size: 13px; line-height: 22px; }

/* 上传位：示意图 + 这样拍 */
.kb-panel .slot .stage { min-height: 200px; }
.kb-empty { gap: 4px; padding: 10px 8px 58px; }
.kb-sketch { position: relative; display: block; width: 52px; height: 52px; color: var(--sage); }
.kb-sketch-svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kb-sketch .plus { position: absolute; right: -8px; bottom: -4px; width: 20px; height: 20px; border-color: var(--sage); background: #fff; font-size: 14px; }
.kb-shoot { margin-top: 2px; color: var(--forest); font-size: 11.5px; line-height: 16px; font-weight: 600; }
.kb-empty .slot-hint { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 10.5px; line-height: 15px; }
.kb-slot-auto { position: absolute; top: 44px; left: 12px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 11px; line-height: 16px; }
.slot:not(.slot-locked) .kb-slot-auto { top: 44px; }

/* 工作台卡片：放什么 → 出什么 */
.kb-card-need { margin-top: 6px; overflow: hidden; color: var(--forest); font-size: 13px; line-height: 20px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

/* 新手引导：聚光框 + 说明卡；右上角「?」随时再看 */
.kb-help { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(244, 241, 234, 0.32); border-radius: 50%; background: transparent; color: #f4f1ea; font-size: 16px; font-weight: 700; cursor: pointer; }
.kb-help:hover { background: rgba(255, 255, 255, 0.12); }
.kb-tour { position: fixed; inset: 0; z-index: 140; }
.kb-tour-hole { position: fixed; z-index: 141; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(35, 48, 42, 0.55), 0 0 0 3px var(--blush); pointer-events: none; transition: top 0.25s var(--ease), left 0.25s var(--ease), width 0.25s var(--ease), height 0.25s var(--ease); }
.kb-tour-pop { position: fixed; z-index: 142; width: min(340px, calc(100vw - 24px)); padding: 18px 18px 14px; border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(35, 48, 42, 0.35); animation: kb-rise 0.22s var(--ease) both; }
.kb-tour-pop .kb-eyebrow { color: var(--blush-ink); }
.kb-tour-pop h3 { margin-top: 6px; font-family: var(--serif); font-size: 20px; line-height: 28px; font-weight: 500; color: var(--forest); }
.kb-tour-pop p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 23px; }
.kb-tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.kb-tour-actions .kb-tour-skip { margin-right: auto; padding: 6px 2px; border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.kb-tour-actions .btn { padding: 8px 16px; font-size: 14px; }
.kb-tour-actions .btn[hidden] { display: none; }

/* 大图里直接选 */
.kb-viewer { width: min(920px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; border: none; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(35, 48, 42, 0.35); }
.kb-viewer::backdrop { background: rgba(35, 48, 42, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.kb-viewer[open] { display: flex; flex-direction: column; animation: kb-rise 0.22s var(--ease) both; }
.kb-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.kb-viewer-head b { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--forest); }
.kb-viewer-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 18px; cursor: pointer; }
.kb-viewer-stage { display: grid; flex: 1; place-items: center; min-height: 0; padding: 12px; background: #1f2a24; }
.kb-viewer-stage img { display: block; width: 100%; height: min(calc(100dvh - 220px), 72vh); border-radius: 12px; object-fit: contain; }
.kb-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.kb-viewer-bar .kb-viewer-note { flex: 1 1 100%; margin-bottom: 2px; color: var(--muted); font-size: 12px; line-height: 18px; }
.kb-viewer-bar .btn { min-height: 44px; }
.kb-viewer-bar .kb-viewer-next { flex: 1 1 auto; }
.kb-step .pick-done { cursor: zoom-in; }
.kb-generating { border-style: solid; background: linear-gradient(110deg, #f3efe7 30%, #fbf9f4 50%, #f3efe7 70%); background-size: 200% 100%; animation: shimmer 1.8s linear infinite; }
.kb-generating-ring { width: 46px; height: 46px; border: 3px solid #e2ddd1; border-top-color: var(--sage); border-radius: 50%; animation: spin 1s linear infinite; }

/* 等待：生成中的候选卡片显示已等待多久 */
.kb-wait { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kb-wait b { font-size: 20px; line-height: 26px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--forest); }
.kb-wait small { font-size: 11px; line-height: 15px; color: var(--muted); }

@media (max-width: 1023px) {
  .kb-help { width: 32px; height: 32px; font-size: 14px; }
  .kb-tip { font-size: 13px; line-height: 21px; padding: 9px 12px; }
  .kb-panel .slot .stage { min-height: 206px; }
  .kb-viewer { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .kb-viewer-stage img { height: calc(100dvh - 280px); }
  .kb-viewer-bar .btn { flex: 1 1 40%; }
  .kb-viewer-bar .kb-viewer-next { flex: 1 1 100%; order: -1; }
  .kb-card-need { font-size: 11.5px; line-height: 17px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .kb-tour-pop { left: 12px !important; right: 12px; width: auto; }
}

/* =====================================================================
   第 64 版：走查卡点修复（完成卡片、结果页并排选图、框选高亮、手机资产库、44px 点击区）
   ===================================================================== */
.kb-shoot { font-size: 12.5px; line-height: 17px; }
.kb-assets-link { display: none; }
.kb-done-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; width: 100%; max-width: 900px; margin-bottom: 18px; padding: 18px 20px; border: 1px solid #c9d8c2; border-radius: 20px; background: linear-gradient(120deg, var(--sage-soft), #f7faf4); box-shadow: var(--shadow); animation: kb-rise 0.3s var(--ease) both; }
.kb-done-check { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sage); color: #fff; font-size: 22px; font-weight: 700; }
.kb-done-text { flex: 1 1 260px; min-width: 0; }
.kb-done-text b { font-family: var(--serif); font-size: 22px; line-height: 30px; font-weight: 500; color: var(--forest); }
.kb-done-text p { margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 22px; }
.kb-done-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-done-actions .btn { min-height: 44px; }

/* 结果页：同一批并排 + 选这张 */
.kb-batch { width: 100%; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.kb-batch-title { color: var(--forest); font-size: 14px; line-height: 20px; font-weight: 600; }
.kb-batch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 190px)); gap: 12px; margin-top: 10px; }
.kb-batch-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kb-batch-item .pick-media { height: 170px; }
.kb-batch-item .inline-form, .kb-batch-item .inline-form .btn, .kb-batch-item > .btn { width: 100%; }
.kb-batch-item .btn { min-height: 40px; white-space: normal; line-height: 18px; }
.btn.is-disabled { opacity: 0.5; pointer-events: none; }
.asset-icon:has(.kb-tool-label) { width: auto; min-width: 30px; height: 32px; padding: 0 10px; border-radius: 999px; gap: 4px; }
.kb-tool-label { font-size: 12px; line-height: 16px; white-space: nowrap; }

/* 框选卡：放在结果页最前，点「框选一块」时高亮 */
.crop-card.is-flash { animation: kb-flash 1.6s var(--ease) 1; }
@keyframes kb-flash { 0%, 100% { box-shadow: var(--shadow); } 25%, 60% { box-shadow: 0 0 0 4px var(--blush), var(--shadow); } }
[data-kb-crop] .section-head span { color: var(--forest); font-size: 14px; font-weight: 600; }

@media (max-width: 1023px) {
  .kb-assets-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--forest); font-size: 13px; font-weight: 600; white-space: nowrap; }
  .kb-bar-head { flex-wrap: wrap; row-gap: 6px; }
  .kb-bar-head .kb-crumb { order: 9; flex: 1 1 100%; }
  .kb-bar-head .kb-assets-link { margin-left: auto; }
  .kb-step.has-results { grid-template-areas: "bar" "head" "look" "panel" "files"; }
  .kb-done-card { padding: 16px; }
  .kb-done-actions { width: 100%; }
  .kb-done-actions .btn { flex: 1 1 0; }
  .kb-batch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-batch-item .pick-media { height: 150px; }
  .kb-batch-item .btn { min-height: 44px; }

  /* 手机资产库：筛选收成一行横滑，第一屏就能看到图；卡片按钮带字、≥44px */
  .asset-bar { flex-direction: row; flex-wrap: wrap; gap: 10px; padding: 12px; }
  .asset-search { flex: 1 1 100%; }
  .asset-filters { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .asset-filters::-webkit-scrollbar { display: none; }
  .asset-filters .btn, .asset-filter { flex: none; width: auto; min-height: 44px; padding: 8px 14px; white-space: nowrap; }
  .asset-group { flex: none; }
  .asset-group .select { width: auto; min-width: 128px; min-height: 44px; }
  .asset-count { padding: 0 4px; border: none; background: none; font-size: 12px; }
  .asset-back { display: none; }
  .assets-page > .asset-notice:not(.is-admin) { display: none; }
  .asset-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; padding: 6px; }
  .asset-tools .inline-form { display: contents; }
  .asset-icon, .asset-icon:has(.kb-tool-label) { width: 100%; height: 44px; padding: 0 4px; border-radius: 12px; gap: 3px; flex-direction: column; font-size: 11px; }
  .asset-icon .icon { width: 16px; height: 16px; }
  .kb-tool-label { font-size: 11px; line-height: 13px; }

  /* 44px 点击区 */
  .kb-chip, .kb-more, .kb-restart, .kb-back, .seg span, .pick-choose { min-height: 44px; }
  .kb-chip, .kb-more { display: inline-flex; align-items: center; }
  .kb-back, .kb-restart { display: inline-flex; align-items: center; }
  .kb-panel .opt { min-height: 44px; }
  .kb-howto summary { min-height: 44px; }
  .consent { grid-template-columns: 20px 1fr; min-height: 44px; align-items: center; padding: 6px 0; }
  .consent input { width: 20px; height: 20px; margin: 0; }
  .frame-foot .link-btn { min-height: 44px; padding: 0 6px; }
  .kb-st { min-height: 44px; }
  .kb-help { width: 44px; height: 44px; }
  .kb-top .top-pill { height: 44px; }
  .kb-viewer-close { width: 44px; height: 44px; }
  .kb-tour-actions .btn, .kb-tour-actions .kb-tour-skip { min-height: 44px; }
  .kb-logo, .pv-link, .kb-section-head a, .asset-links a, .consents-head .link-btn, .kb-step .btn-small, .job-wrap .btn-small, .job-wrap .back, .tab { display: inline-flex; align-items: center; min-height: 44px; }
  .asset-links { padding-bottom: 2px; }
}
