/* 医美效果图 · 内部版 —— 一比一照 motoidea 实测规格（对照/原站界面/规格/*.json 里的计算样式与 Tailwind 值） */
:root {
  --bg: #020303;
  --font: "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --blue: #4682b4;
  --blue-hover: #5a9bd2;
  --dot: #5db8ff;
  --sel: #6db6e9;
  --tint: #102436;
  --tint-text: #b7dcf8;
  --green-bg: #122219;
  --green-line: #30593e;
  --green-text: #8de3ac;
  --amber-text: #ffd39a;
  --pink-text: #ffb7c1;
  --img-bg: #050b12;
  --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: dark; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: #fff;
  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 rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background-color: rgba(16, 16, 16, 0.68);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.106), rgba(255, 255, 255, 0.035) 42%, rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -42px 90px rgba(0, 0, 0, 0.2), 0 28px 90px rgba(0, 0, 0, 0.32);
  -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 rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 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: #2f5f86; background: rgba(16, 36, 54, 0.58); color: var(--tint-text); }
.btn-ghost.is-on:hover:not(:disabled) { background: rgba(16, 36, 54, 0.8); }
.link-btn {
  padding: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  transition: var(--t-ui);
}
.link-btn:hover { color: #fff; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.muted-note { font-size: 12px; line-height: 20px; color: rgba(255, 255, 255, 0.42); }

.chip-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.as-label {
  display: block;
  color: rgba(255, 255, 255, 0.34);
  font-size: 11px;
  line-height: 16.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.notice-amber, .notice-green {
  max-width: 820px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid;
  font-size: 14px;
  line-height: 28px;
}
.notice-amber { border-color: rgba(106, 81, 48, 0.45); border-radius: 16px; background: rgba(43, 31, 16, 0.36); color: var(--amber-text); }
.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: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 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(58, 23, 29, 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: rgba(255, 255, 255, 0.42); font-size: 12px; line-height: 16px; }

/* ---------- 外壳：左侧悬浮导航 ---------- */
.page { min-height: 100vh; padding: 20px 20px 20px 96px; }
.page-bare { padding: 20px; }
.m-top { display: none; }
.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 rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
  -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: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-btn.is-active { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 58px rgba(255, 255, 255, 0.08); }
.nav-dot { position: absolute; top: 10px; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 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(70, 130, 180, 0.18), transparent 32%), linear-gradient(135deg, rgba(10, 22, 34, 0.78), rgba(0, 0, 0, 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: rgba(255, 255, 255, 0.58); font-size: 16px; line-height: 28px; }

.wf-list { display: flex; flex-direction: column; gap: 16px; }
.wf-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 42vw);
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.38);
  transition: var(--t-ui);
}
.wf-card:hover { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 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: rgba(255, 255, 255, 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: rgba(255, 255, 255, 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: rgba(0, 0, 0, 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, rgba(0, 0, 0, 0.18), transparent 48%, rgba(0, 0, 0, 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 rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.07); color: #fff; }
.aside-btn-danger { border-color: rgba(106, 54, 58, 0.45); background: rgba(37, 20, 22, 0.38); color: var(--pink-text); }
.aside-btn-danger:hover { border-color: rgba(255, 183, 193, 0.45); background: rgba(58, 23, 29, 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: rgba(255, 255, 255, 0.025);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition: var(--t-ui);
}
.si:hover { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.055); }
.si.is-active { border-color: rgba(109, 182, 233, 0.7); background: rgba(16, 36, 54, 0.58); box-shadow: 0 20px 70px rgba(70, 130, 180, 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: rgba(255, 255, 255, 0.28); }
.si.is-done .si-dot, .si.is-active .si-dot { background: var(--dot); box-shadow: 0 0 18px rgba(93, 184, 255, 0.82); }
.si.is-done .si-dot i { position: absolute; inset: -3.5px; border-radius: 50%; background: rgba(93, 184, 255, 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: rgba(255, 255, 255, 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: rgba(255, 255, 255, 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 rgba(255, 255, 255, 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: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.55); font-size: 13px; line-height: 20px; transition: var(--t-ui); }
.back:hover { color: #fff; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 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: rgba(0, 0, 0, 0.18);
}
.pv-box { width: 100%; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 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 rgba(255, 255, 255, 0.1);
}
.pv-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.pv-sub { margin-top: 4px; color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.5); font-size: 14px; line-height: 28px; }

/* 选择本步骤结果 / 同一批的结果 */
.pick-box { width: 100%; padding: 16px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.18); }
.pick-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.pick-sub { margin-top: 4px; color: rgba(255, 255, 255, 0.42); font-size: 12px; line-height: 16px; }
.pick-batch { margin-top: 16px; }
.pick-batch-head { margin-bottom: 8px; color: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  transition: var(--t-ui);
}
.pick:hover { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.06); }
.pick.is-selected { border-color: var(--sel); box-shadow: 0 18px 70px rgba(109, 182, 233, 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: rgba(0, 0, 0, 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: rgba(255, 255, 255, 0.44); font-size: 12px; line-height: 16px; }
.pick-tag.is-ok { color: var(--green-text); }
.tile-state { display: grid; place-items: center; width: 100%; height: 100%; padding: 8px; color: rgba(255, 255, 255, 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, #050b12 30%, #10202e 50%, #050b12 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 rgba(255, 255, 255, 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: rgba(255, 255, 255, 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(109, 182, 233, 0.18);
  background: rgba(7, 17, 26, 0.44);
  cursor: pointer;
}
.slot .stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid rgba(109, 182, 233, 0.22);
  background: rgba(255, 255, 255, 0.035);
  transition: var(--t-ui);
}
.slot:hover .stage { border-color: rgba(109, 182, 233, 0.48); background: rgba(16, 36, 54, 0.42); }
.slot.is-dragging .stage { border-color: var(--sel); background: rgba(16, 36, 54, 0.58); }
.slot .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: rgba(0, 0, 0, 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(109, 182, 233, 0.48); border-radius: 50%; color: var(--tint-text); font-size: 20px; line-height: 1; }
.slot-hint { color: rgba(255, 255, 255, 0.52); font-size: 11px; line-height: 16px; }
.stage-tip { color: rgba(255, 255, 255, 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(109, 182, 233, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 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: rgba(0, 0, 0, 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: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 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 rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  line-height: 24px;
  resize: vertical;
  transition: var(--t-ui);
}
.prompt::placeholder { color: rgba(255, 255, 255, 0.28); }
.prompt:focus { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); }
.prompt-readonly { min-height: 0; color: rgba(255, 255, 255, 0.52); white-space: pre-line; }

.opt-box { margin-top: 12px; padding: 12px; border: 1px solid rgba(90, 156, 219, 0.18); border-radius: 16px; background: rgba(11, 27, 42, 0.22); }
.opt-title { color: rgba(255, 255, 255, 0.56); font-size: 11px; line-height: 16.5px; font-weight: 600; letter-spacing: 0.08em; }
.opt-note { margin-top: 4px; color: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
  transition: var(--t-ui);
}
.opt:hover { background: rgba(255, 255, 255, 0.06); }
.opt-radio { flex: none; width: 13px; height: 13px; margin-top: 4px; border: 1px solid #767676; border-radius: 50%; background: #fff; transition: var(--t-ui); }
.opt-text { min-width: 0; color: rgba(255, 255, 255, 0.4); }
.opt-text b { margin-right: 6px; color: rgba(255, 255, 255, 0.78); font-weight: 600; }
.opt.is-active, .opt:has(input:checked) { border-color: rgba(109, 182, 233, 0.7); background: rgba(16, 36, 54, 0.58); }
.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(253, 230, 138, 0.18);
  border-radius: 18px;
  background: rgba(33, 27, 16, 0.92);
  color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.86); font-weight: 600; }
.consent-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 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; }
.select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  appearance: none;
  cursor: pointer;
  transition: var(--t-ui);
}
.select:focus { border-color: rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.08); }
.select option { background: #101010; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg span {
  display: block;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  transition: var(--t-ui);
}
.seg label:hover span { background: rgba(255, 255, 255, 0.08); color: #fff; }
.seg input:checked + span { border-color: #2f5f86; background: rgba(16, 36, 54, 0.58); 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: rgba(255, 255, 255, 0.42); font-size: 12px; line-height: 16px; text-align: center; }
.progress { height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.035); transition: var(--t-ui); }
.card:hover { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.06); }
.card-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: var(--img-bg); color: rgba(255, 255, 255, 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, #050b12 30%, #10202e 50%, #050b12 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: rgba(255, 255, 255, 0.52); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.card-progress { overflow: hidden; color: rgba(255, 255, 255, 0.6); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.card-time { color: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.08); background: rgba(0, 0, 0, 0.12); }
.folder-label { color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.46); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.folder-empty { margin-top: 16px; color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.15) transparent;
}
.tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: rgba(0, 0, 0, 0.22); transition: var(--t-ui); }
.tile:hover { background: rgba(255, 255, 255, 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, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 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: rgba(255, 255, 255, 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(93, 184, 255, 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(93, 184, 255, 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: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.42); white-space: nowrap; }
.facts dd { color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.34); font-size: 13px; line-height: 18px; }
.step::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.08); }
.step:last-child::before { display: none; }
.step-dot { z-index: 1; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.18); border-radius: 50%; background: #101010; }
.step.is-done { color: rgba(255, 255, 255, 0.6); }
.step.is-done .step-dot { border-color: var(--dot); background: var(--dot); }
.step.is-current { color: #fff; font-weight: 600; }
.step.is-current .step-dot { border-color: var(--dot); box-shadow: 0 0 0 4px rgba(93, 184, 255, 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 rgba(255, 255, 255, 0.1); border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.tab { padding: 6px 14px; border: none; border-radius: 9px; background: transparent; color: rgba(255, 255, 255, 0.62); font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: var(--t-ui); }
.tab:hover { color: #fff; }
.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 rgba(255, 255, 255, 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(109, 182, 233, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 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(0, 0, 0, 0.5);
}
.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(93, 184, 255, 0.15); border-top-color: var(--dot); border-radius: 50%; animation: spin 1s linear infinite; }
.waiting-label { color: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.42); font-size: 12px; line-height: 16px; }
.error-box { padding: 12px 16px; border: 1px solid rgba(106, 54, 58, 0.45); border-radius: 16px; background: rgba(37, 20, 22, 0.38); color: var(--pink-text); font-size: 14px; line-height: 28px; }
.tech-details { color: rgba(255, 255, 255, 0.42); font-size: 12px; line-height: 20px; }
.tech-details summary { cursor: pointer; }
.tech-details p { margin: 8px 0; color: rgba(255, 255, 255, 0.6); word-break: break-all; }

/* 结果页：框选裁剪 */
.crop-card { padding: 20px; }
.crop-wrap { margin-top: 16px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 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(0, 0, 0, 0.55); 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: rgba(255, 255, 255, 0.6); font-size: 13px; line-height: 20px; }

/* ---------- 大图灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  padding: 24px;
  background: rgba(0, 0, 0, 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: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 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: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: normal;
  text-transform: none;
  transition: var(--t-ui);
}
.text-input::placeholder { color: rgba(255, 255, 255, 0.28); }
.text-input:focus { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 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: rgba(255, 255, 255, 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: rgba(255, 255, 255, 0.86); font-size: 14px; line-height: 20px; }
.admin-table th { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 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 rgba(255, 255, 255, 0.08); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 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; }

@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: 64px 12px 105px; }
  .page-bare { padding: 20px 12px; }
  .m-top { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 0 20px; }
  .m-brand { font-size: 16px; line-height: 24px; font-weight: 600; }
  .m-user { overflow: hidden; color: rgba(255, 255, 255, 0.55); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .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 rgba(255, 255, 255, 0.1);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.85);
    box-shadow: none;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .nav-user { display: none; }
  .nav-btn { flex-direction: row; gap: 8px; width: auto; height: 64px; padding: 12px; border-radius: 16px; color: rgba(255, 255, 255, 0.6); box-shadow: none; }
  .nav-btn span { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; white-space: normal; }
  .nav-btn.is-active { background: rgba(255, 255, 255, 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%; }

  .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; }
  .admin-create { padding: 16px; }
}
