/* ========== 设计变量 ========== */
:root {
  --bg: #fafaf9; --surface: #ffffff; --surface-2: #f7f7f5; --sunk: #f1f1ef;
  --border: #ececea; --border-strong: #dcdcd8;
  --text: #111111; --text-2: #55554f; --text-3: #6f6f69;
  --brand: #3d5afe; --brand-hover: #2f48e0; --brand-soft: #eef1ff; --brand-ink: #ffffff;
  --ink: #111111; --ink-hover: #2b2b2b;
  --side: #ffffff; --side-2: #f1f1ef; --side-text: #6f6f69; --side-active: #111111;
  --green: #067647; --green-bg: #ecfdf3; --green-dot: #17b26a;
  --amber: #b54708; --amber-bg: #fffaeb; --amber-dot: #f79009;
  --red: #b42318; --red-bg: #fef3f2; --red-dot: #f04438;
  --blue: #175cd3; --blue-bg: #eff8ff; --blue-dot: #2e90fa;
  --violet: #5925dc; --violet-bg: #f4f3ff; --violet-dot: #7a5af8;
  --gray: #475467; --gray-bg: #f2f4f7; --gray-dot: #98a2b3;
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --shadow-sm: none;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .04);
  --shadow-lg: 0 16px 40px -12px rgba(17, 17, 17, .18);
  --focus: 0 0 0 4px rgba(61, 90, 254, .16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d11; --surface: #15171d; --surface-2: #1a1d24; --sunk: #1f222a;
    --border: #262a33; --border-strong: #353a45;
    --text: #f2f4f7; --text-2: #b4bccb; --text-3: #7d8697;
    --brand: #7c8cff; --brand-hover: #9aa6ff; --brand-soft: #1f2447; --brand-ink: #0c0d11;
    --ink: #f2f4f7; --ink-hover: #ffffff;
    --side: #15171d; --side-2: #1f222a; --side-text: #9aa3b2; --side-active: #ffffff;
    --green: #75e0a7; --green-bg: #0f2a1e; --amber: #fec84b; --amber-bg: #2e2210;
    --red: #fda29b; --red-bg: #33140f; --blue: #84caff; --blue-bg: #0e2238;
    --violet: #bdb4fe; --violet-bg: #221b44; --gray: #b4bccb; --gray-bg: #22252d;
    --shadow-sm: none; --shadow: 0 0 0 1px rgba(255, 255, 255, .02); --shadow-lg: 0 16px 32px rgba(0, 0, 0, .5);
  }
}

/* ========== 基础 ========== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 650; line-height: 1.3; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px; background: var(--sunk); padding: 1px 6px; border-radius: 4px; }
.i { width: 18px; height: 18px; flex: none; }
.muted { color: var(--text-3); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px; }

/* ========== 外框 ========== */
#app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
#app.bare { grid-template-columns: 1fr; }
#app.bare #nav { display: none; }
main { padding: 32px 40px 64px; width: 100%; max-width: 1360px; margin: 0 auto; }
#app.bare main { max-width: none; padding: 0; }

/* 侧栏：图标 + 文字一行，窄屏收成图标栏 */
#nav {
  background: var(--side); color: var(--side-text); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 16px 12px; gap: 2px; overflow-y: auto; overflow-x: hidden;
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: var(--surface);
  background: var(--ink); flex: none;
}
#nav .brand { padding: 4px 8px 20px; gap: 10px; }
.brand b { display: block; color: var(--text); font-size: 17px; }
.brand span { display: block; font-size: 14px; color: var(--side-text); }
#nav .brand b { font-size: 16px; line-height: 1.3; }
#nav .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 8px; flex: none; }
#nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; flex: none;
  border-radius: 10px; color: var(--side-text); font-size: 16px; font-weight: 500; transition: background .15s, color .15s;
}
#nav a .i { width: 19px; height: 19px; }
#nav a:hover { background: var(--side-2); color: var(--side-active); }
#nav a.active { background: var(--side-2); color: var(--side-active); font-weight: 600; }
#nav a .badge {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; font-style: normal;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center;
}
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--border); flex: none; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 16px;
}
.who { min-width: 0; flex: 1; line-height: 1.3; }
.who b { display: block; color: var(--text); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: 14px; }
@media (max-width: 1100px) and (min-width: 821px) {
  #app { grid-template-columns: 68px minmax(0, 1fr); }
  #nav { padding: 16px 10px; align-items: center; }
  #nav .brand { padding: 0 0 16px; }
  #nav .brand > div:last-child, #nav a span, .who { display: none; }
  #nav a { width: 46px; justify-content: center; padding: 0; }
  #nav a .badge { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 14px; }
  .nav-sep { width: 28px; }
  .me { flex-direction: column; padding: 12px 0 0; }
}
.icon-btn {
  background: none; border: 0; color: var(--side-text); padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--side-2); color: var(--side-active); }

/* ========== 页面头 ========== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 16px; margin-bottom: 10px; }
.crumb:hover { color: var(--brand); }
.crumb .i { width: 15px; height: 15px; }

/* ========== 卡片 ========== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head p { color: var(--text-3); font-size: 16px; margin-top: 2px; }
.card-body { padding: 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.cols.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
.cols .card + .card { margin-top: 0; }
.stack-20 > * + * { margin-top: 20px; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 16px;
  padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--ink); background: var(--ink); color: var(--surface);
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn .i { width: 16px; height: 16px; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--surface); color: var(--red); border-color: var(--border-strong); }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn.sm { padding: 6px 11px; font-size: 16px; }
.btn.lg { padding: 12px 22px; font-size: 17px; }
.btn.ai { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ai:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.link-btn { background: none; border: 0; padding: 4px 6px; border-radius: 6px; font: inherit; font-size: 16px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.link-btn:hover { background: var(--sunk); color: var(--text); }
.link-btn.red:hover { background: var(--red-bg); color: var(--red); }
.link-btn .i { width: 15px; height: 15px; }

/* ========== 表单 ========== */
.form { display: grid; gap: 16px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 16px; font-weight: 500; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.field .hint { font-size: 14px; color: var(--text-3); font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); padding: 9px 12px; width: 100%; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input:disabled, textarea:disabled, select:disabled { background: var(--sunk); color: var(--text-2); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--border-strong); position: relative; padding: 0; border: 0; box-shadow: none; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }

/* ========== 标签 ========== */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.gray { background: var(--gray-bg); color: var(--gray); } .pill.gray i { background: var(--gray-dot); }
.pill.blue { background: var(--blue-bg); color: var(--blue); } .pill.blue i { background: var(--blue-dot); }
.pill.violet { background: var(--violet-bg); color: var(--violet); } .pill.violet i { background: var(--violet-dot); }
.pill.amber { background: var(--amber-bg); color: var(--amber); } .pill.amber i { background: var(--amber-dot); }
.pill.green { background: var(--green-bg); color: var(--green); } .pill.green i { background: var(--green-dot); }
.pill.red { background: var(--red-bg); color: var(--red); } .pill.red i { background: var(--red-dot); }
.tag { white-space: nowrap; display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; font-size: 14px; font-weight: 500; background: var(--sunk); color: var(--text-2); border: 1px solid var(--border); }
.tag.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

/* ========== 提示条 ========== */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-sm); font-size: 16px; border: 1px solid; }
.banner .i { width: 18px; height: 18px; margin-top: 1px; }
.banner b { display: block; font-size: 16px; }
.banner.amber { background: var(--amber-bg); color: var(--amber); border-color: color-mix(in srgb, var(--amber-dot) 30%, transparent); }
.banner.blue { background: var(--blue-bg); color: var(--blue); border-color: color-mix(in srgb, var(--blue-dot) 30%, transparent); }
.banner.red { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red-dot) 30%, transparent); }
.banner.green { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green-dot) 30%, transparent); }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 14px; font-weight: 600; color: var(--text-3); padding: 10px 22px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 22px; }
@media (max-width: 1280px) { th, td { padding-left: 14px; padding-right: 14px; } }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }
.kv { width: 100%; }
.kv td { padding: 12px 0; border-bottom: 1px solid var(--border); }
.kv tr:hover td { background: none; }
.kv td:first-child { color: var(--text-2); width: 120px; }

/* ========== 空状态、加载 ========== */
.empty { text-align: center; padding: 56px 24px; display: grid; justify-items: center; gap: 8px; }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; }
.empty-icon .i { width: 24px; height: 24px; }
.empty p { color: var(--text-2); max-width: 420px; }
.empty .btn { margin-top: 12px; }
.loading { display: flex; gap: 6px; justify-content: center; padding: 120px 0; }
.loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: bounce 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

/* ========== 看板 ========== */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat .ic .i { width: 22px; height: 22px; }
.stat .n { font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat .l { color: var(--text-2); font-size: 16px; }
.ic.gray { background: var(--gray-bg); color: var(--gray); } .ic.violet { background: var(--violet-bg); color: var(--violet); }
.ic.amber { background: var(--amber-bg); color: var(--amber); } .ic.green { background: var(--green-bg); color: var(--green); }
.ic.blue { background: var(--blue-bg); color: var(--blue); } .ic.brand { background: var(--brand-soft); color: var(--brand); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar select { width: auto; min-width: 160px; }
.seg { display: inline-flex; background: var(--sunk); border-radius: var(--r-sm); padding: 3px; }
.seg button { border: 0; background: none; font: inherit; font-size: 16px; padding: 5px 12px; border-radius: 6px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.lane { background: var(--sunk); border-radius: var(--r); padding: 12px; min-height: 320px; }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; font-weight: 600; font-size: 16px; }
.lane-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.lane-head .count { margin-left: auto; background: var(--surface); color: var(--text-2); font-size: 14px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border); }
.lane-empty { border: 1.5px dashed var(--border-strong); border-radius: var(--r-sm); padding: 20px 8px; text-align: center; color: var(--text-3); font-size: 14px; }
.pcard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; color: inherit; margin-bottom: 10px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.pcard .cover { aspect-ratio: 4 / 5; background: var(--sunk); display: grid; place-items: center; color: var(--text-3); }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .body { padding: 10px 12px 12px; }
.pcard .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pcard .t { font-size: 16px; font-weight: 500; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 36px; }
.pcard .t.none { color: var(--text-3); font-weight: 400; }
.pcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; color: var(--text-3); }
.pcard .bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.pcard .bar i { display: block; height: 100%; background: var(--brand); }

/* ========== 选店铺 ========== */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.store-card {
  text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px; cursor: pointer; display: grid; gap: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.store-card:hover { border-color: var(--brand); box-shadow: var(--focus); transform: translateY(-1px); }
.store-card .head { display: flex; align-items: center; gap: 12px; }
.store-no { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.store-card b { font-size: 17px; display: block; }
.store-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-3); }

/* ========== 向导 ========== */
.draft-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.draft-head .thumb0 { width: 56px; height: 70px; border-radius: 8px; object-fit: cover; background: var(--sunk); border: 1px solid var(--border); flex: none; display: grid; place-items: center; color: var(--text-3); }
.draft-head .info { flex: 1; min-width: 240px; }
.draft-head .info .line { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 16px; margin-top: 4px; flex-wrap: wrap; }

.stepper { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); overflow-x: auto; }
.stepper a { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 500; white-space: nowrap; padding: 4px 6px; border-radius: 8px; }
.stepper a:hover { color: var(--text); }
.stepper .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; border: 2px solid var(--border-strong); color: var(--text-3); background: var(--surface); flex: none; }
.stepper .num .i { width: 14px; height: 14px; }
.stepper a.done .num { background: var(--green-dot); border-color: var(--green-dot); color: #fff; }
.stepper a.on { color: var(--text); font-weight: 650; }
.stepper a.on .num { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: var(--focus); }
.stepper .line { flex: 1; min-width: 24px; height: 2px; background: var(--border); margin: 0 12px; border-radius: 1px; }
.stepper .line.done { background: var(--green-dot); }

.wizard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }

/* 图片位 */
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.slot { position: relative; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.slot .frame { aspect-ratio: 4 / 5; background: var(--sunk); display: grid; place-items: center; }
.slot .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.empty-slot { border: 1.5px dashed var(--border-strong); box-shadow: none; background: var(--surface-2); }
.slot.empty-slot .frame { background: transparent; color: var(--text-3); text-align: center; font-size: 14px; gap: 6px; align-content: center; }
.slot.empty-slot .frame .i { width: 22px; height: 22px; margin: 0 auto; }
.slot .no { position: absolute; top: 8px; left: 8px; background: rgba(16, 24, 40, .72); color: #fff; font-size: 14px; font-weight: 600; padding: 2px 8px; border-radius: 6px; backdrop-filter: blur(4px); }
.slot .no.size { background: var(--brand); }
.slot .tools { display: flex; align-items: center; gap: 4px; padding: 8px; border-top: 1px solid var(--border); }
.slot .tools select { padding: 4px 8px; font-size: 14px; box-shadow: none; flex: 1; min-width: 0; }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tray .slot .frame { aspect-ratio: 1; }

.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r); padding: 28px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: border-color .15s, background .15s; display: grid; justify-items: center; gap: 6px; color: var(--text-2);
}
.dropzone .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 4px; }
.dropzone b { color: var(--brand); }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 14px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; }

.progress-ring { display: flex; align-items: center; gap: 12px; }
.meter { width: 120px; height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .3s; }
.meter.full i { background: var(--green-dot); }

/* 文案 */
.counter { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.counter.ok { color: var(--green); } .counter.bad { color: var(--red); }
.counter .i { width: 13px; height: 13px; }
.ai-card { background: linear-gradient(160deg, var(--brand-soft), var(--surface) 60%); }
.tips { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 16px; display: grid; gap: 4px; }

/* 预览 */
.pdp { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.pdp .strip { display: grid; gap: 8px; align-content: start; }
.pdp .strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; background: var(--sunk); }
.pdp .strip img.on { border-color: var(--text); }
.pdp .main-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-sm); background: var(--sunk); display: block; }
.pdp .ptitle { font-size: 18px; font-weight: 500; line-height: 1.45; }
.pdp .price { display: flex; align-items: baseline; gap: 10px; margin: 14px 0; }
.pdp .price b { font-size: 24px; color: #fa6338; }
.pdp .price s { color: var(--text-3); }
.pdp .price .off { background: #fa6338; color: #fff; font-size: 14px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.pdp .opt-label { font-size: 16px; font-weight: 600; margin: 14px 0 8px; }
.pdp .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pdp .chip { border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 14px; font-size: 16px; }
.pdp .swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); }
.pdp .desc { color: var(--text-2); font-size: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.checks li:last-child { border-bottom: 0; }
.checks .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--green-bg); color: var(--green); }
.checks .mark .i { width: 14px; height: 14px; stroke-width: 3; }
.checks li.bad .mark { background: var(--red-bg); color: var(--red); }
.checks b { display: block; font-weight: 500; }
.checks span { font-size: 14px; color: var(--red); }

.score { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.score .big { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: none; }
.score .big.ok { background: var(--green-bg); color: var(--green); }
.score .big.bad { background: var(--red-bg); color: var(--red); }

/* 提交 */
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 32px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: var(--border); }
.tl:last-child::before { display: none; }
.tl.done::before { background: var(--green-dot); }
.tl .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); background: var(--surface); color: var(--text-3); z-index: 1; }
.tl .dot .i { width: 15px; height: 15px; }
.tl.done .dot { background: var(--green-dot); border-color: var(--green-dot); color: #fff; }
.tl.now .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--focus); }
.tl b { display: block; padding-top: 4px; }
.tl p { color: var(--text-3); font-size: 16px; }
.tl.now b { color: var(--brand); }

.action-panel { display: grid; gap: 14px; }
.action-panel .big-action { display: grid; gap: 10px; padding: 20px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }

pre { background: var(--sunk); padding: 12px; border-radius: var(--r-sm); overflow: auto; font-size: 14px; max-height: 320px; margin: 0; }

/* ========== 登录 ========== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art {
  background: radial-gradient(1200px 600px at 10% 10%, #4f46e5 0%, transparent 60%), radial-gradient(800px 500px at 90% 90%, #7c3aed 0%, transparent 55%), #0f1117;
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art .brand b { font-size: 19px; }
.auth-art h2 { font-size: 34px; line-height: 1.25; font-weight: 700; max-width: 460px; letter-spacing: -.02em; }
.auth-art .feat { display: grid; gap: 14px; margin-top: 28px; max-width: 420px; }
.auth-art .feat div { display: flex; gap: 12px; align-items: center; color: #d0d4f7; }
.auth-art .feat .i { color: #a5a0ff; }
.auth-art .foot { color: #7d84a8; font-size: 14px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-form .box { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 26px; }
.auth-form .sub { color: var(--text-2); margin: 6px 0 28px; }
.auth-form .btn { width: 100%; padding: 11px; }

/* ========== 提示 ========== */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px); display: flex; align-items: center; gap: 10px;
  background: #101828; color: #fff; padding: 11px 18px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: min(560px, 90vw); z-index: 50; box-shadow: var(--shadow-lg); font-weight: 500;
}
#toast .i { color: #75e0a7; }
#toast.err .i { color: #fda29b; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ========== 通用补充 ========== */
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn-text { color: var(--amber); font-weight: 600; }
.sub-h { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 18px 0 12px; }
.sub-h .small { font-weight: 400; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
select.mini { width: auto; padding: 2px 8px; font-size: 14px; box-shadow: none; }
.red-tag { background: var(--red-bg); color: var(--red); border-color: transparent; }
main.wide { max-width: none; }

/* ========== 经营看板 ========== */
.viz-root {
  --series-1: #2a78d6; --series-2: #eb6834; --grid: #e1e0d9; --axis: #898781;
}
@media (prefers-color-scheme: dark) {
  .viz-root { --series-1: #3987e5; --series-2: #d95926; --grid: #2c2c2a; }
}
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.kpis .card + .card, .pgrid .card + .card { margin-top: 0; }
.page-head .actions select { width: auto; min-width: 140px; }
.kpi { padding: 18px 20px; }
.kpi .l { color: var(--text-2); font-size: 16px; }
.kpi .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 6px; line-height: 1.2; }
.kpi .cmp { display: flex; gap: 6px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.delta .i { width: 14px; height: 14px; stroke-width: 2.5; }
.delta.good { color: var(--green); } .delta.bad { color: var(--red); } .delta.flat { color: var(--text-3); }
.legend { display: flex; gap: 14px; font-size: 14px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); }
.chart-body { padding-top: 12px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .tick { fill: var(--axis); font-size: 14px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--series-1); } .chart .line.s2 { stroke: var(--series-2); }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.s1 { fill: var(--series-1); } .chart .dot.s2 { fill: var(--series-2); }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 8px 12px; font-size: 14px; min-width: 150px; }
.tip div { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.tip span { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.data-table { margin-top: 10px; font-size: 16px; }
.data-table summary { cursor: pointer; color: var(--text-2); }
.data-table .table-wrap { max-height: 260px; overflow: auto; margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; }
.data-table th, .data-table td { padding: 6px 12px; }
.flow { display: grid; gap: 14px; }
.flow-row { display: grid; grid-template-columns: 64px 1fr 96px; gap: 12px; align-items: center; font-size: 16px; }
.flow-row .k { color: var(--text-2); }
.flow-row .bar { height: 10px; background: var(--sunk); border-radius: 5px; overflow: hidden; }
.flow-row .bar i { display: block; height: 100%; border-radius: 5px; background: var(--border-strong); }
.flow-row.rev .bar i { background: var(--series-1, #2a78d6); }
.flow-row.pro .bar i { background: var(--green-dot); }
.flow-row.pro .v, .flow-row.rev .v { font-weight: 700; }
table.rank th, table.rank td { padding: 10px 12px; }
table.rank th:first-child, table.rank td:first-child { padding-left: 22px; }
table.rank th:last-child, table.rank td:last-child { padding-right: 22px; }
.rank-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.share { height: 3px; background: var(--sunk); border-radius: 2px; margin-top: 6px; width: 100px; }
.share i { display: block; height: 100%; background: #2a78d6; border-radius: 2px; }

.sync-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 18px; margin-bottom: 20px; flex-wrap: wrap; }
.sync-bar .sb-left { display: flex; gap: 10px; align-items: center; }
.sync-bar .sb-left .i { color: var(--brand); }
.sync-bar .sb-left b { display: block; font-size: 16px; }
.sync-bar .sb-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sync-bar select, .sync-bar input { width: auto; padding: 5px 10px; font-size: 16px; }
.sync-bar input { width: 80px; }
.sb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.card.sync-bar + .card { margin-top: 0; }

/* ========== 商品列表 ========== */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pgrid .pcard { margin: 0; }
.pgrid .pcard .cover .i { width: 36px; height: 36px; }
.seg .muted { font-size: 14px; }

/* ========== 编辑页：左资料 + 右对话 ========== */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.ed-main { min-width: 0; }
.ed-sections { border: 0; padding: 0; margin: 0; min-width: 0; }
.ed-sec { margin-bottom: 20px; scroll-margin-top: 70px; }
.card + .ed-sec, .ed-sec + .ed-sec { margin-top: 0; }
.head-actions { display: flex; gap: 8px; }
.secnav { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); padding: 10px 0; margin-bottom: 8px; }
.secnav button { border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 16px; color: var(--text-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.secnav button:hover { color: var(--text); border-color: var(--border-strong); }
.sdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--gray-dot); }
.sdot.ok { background: var(--green-dot); } .sdot.warn { background: var(--amber-dot); } .sdot.bad { background: var(--red-dot); } .sdot.none { background: var(--border-strong); }

.catpath { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 16px; }
.catpath .i { width: 14px; height: 14px; color: var(--text-3); }
.catpath .leaf { font-weight: 650; color: var(--brand); }
.catpath .muted { margin-left: 8px; }
.cat-list { display: grid; gap: 6px; margin-top: 12px; max-height: 300px; overflow: auto; }
.cat-item { text-align: left; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; color: var(--text); }
.cat-item:hover { border-color: var(--brand); background: var(--brand-soft); }

.legend-row { display: flex; gap: 16px; padding: 12px 22px 0; flex-wrap: wrap; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.attr-list { padding: 8px 0; }
.attr-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 84px; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--border); align-items: start; }
.attr-row:last-child { border-bottom: 0; }
.attr-row.warn { background: color-mix(in srgb, var(--amber-bg) 60%, transparent); }
.attr-row.bad { background: color-mix(in srgb, var(--red-bg) 50%, transparent); }
.an { display: flex; gap: 10px; align-items: flex-start; }
.an .sdot { margin-top: 7px; }
.an b { font-weight: 600; margin-right: 6px; }
.ac select, .ac input { padding: 6px 10px; }
.ev { color: var(--text-3); margin-top: 4px; }
.aa { text-align: right; }
.multi { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.multi select { width: auto; min-width: 120px; padding: 5px 8px; font-size: 16px; }
.chip-x { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 16px; font-weight: 500; }
.chip-x button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.chip-x button:hover { background: rgba(0, 0, 0, .08); }
.chip-x .i { width: 13px; height: 13px; }
.swatch-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-block; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.comp { display: grid; gap: 6px; }
.comp-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 14px 28px; gap: 6px; align-items: center; }
.comp-foot { display: flex; justify-content: space-between; align-items: center; }

.batch { display: flex; gap: 8px; align-items: center; padding: 0 22px 14px; flex-wrap: wrap; }
.batch input { width: 110px; padding: 6px 10px; }
.sku-table td, .size-table td { padding: 6px 10px; }
.sku-table input, .size-table input { padding: 5px 8px; min-width: 64px; text-align: right; box-shadow: none; }
.sku-table input[data-f="supplierSku"] { text-align: left; min-width: 100px; }
.sku-table th, .sku-table td { padding-left: 8px; padding-right: 8px; }
.size-table input { max-width: 110px; }
.size-table input.need { border-color: var(--red-dot); background: var(--red-bg); }
.req { color: var(--red); margin-left: 2px; }
tr.row-bad td { background: var(--red-bg); }

.slots .slot.draggable { cursor: grab; }
.slot.dragging { opacity: .4; }
.slot .no.main { background: #fa6338; }
.ai-badge { position: absolute; top: 8px; right: 8px; background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; font-size: 14px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.slot .tools { flex-wrap: wrap; }
.slot .tools select { flex: 1 1 100px; }
.slot .tools .btn { padding: 3px 10px; }
.gen { border-top: 1px solid var(--border); background: linear-gradient(160deg, var(--brand-soft), var(--surface) 55%); }
.gen-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gen-head h3 { display: flex; gap: 6px; align-items: center; }
.gen-form { display: grid; gap: 10px; }
.gen-opts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 16px; color: var(--text-2); }
.gen-opts label { display: flex; gap: 6px; align-items: center; }
.gen-opts select { width: auto; padding: 5px 8px; }
.lane-empty { border: 1.5px dashed var(--border-strong); border-radius: var(--r-sm); padding: 24px 12px; text-align: center; color: var(--text-3); font-size: 16px; }

.flowbar { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.flowbar span { flex: 1; min-width: 90px; text-align: center; font-size: 14px; padding: 6px 4px; border-radius: 6px; background: var(--sunk); color: var(--text-3); display: inline-flex; gap: 4px; justify-content: center; align-items: center; }
.flowbar span .i { width: 13px; height: 13px; }
.flowbar .done { background: var(--green-bg); color: var(--green); }
.flowbar .now { background: var(--brand); color: #fff; font-weight: 600; }
.checks.warn .mark { background: var(--amber-bg); color: var(--amber); }
.checks.warn b { color: var(--text-2); }
.check-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* 右侧对话 */
.ed-chat {
  position: sticky; top: 20px; height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden;
}
.chat-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.chat-head b { display: block; }
.chat-head span { font-size: 14px; color: var(--text-3); }
.bot-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7c3aed, #4f46e5); flex: none; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.chat-empty { margin: auto; text-align: center; color: var(--text-2); font-size: 16px; padding: 20px; display: grid; justify-items: center; gap: 10px; }
.chat-empty .i { width: 28px; height: 28px; color: var(--brand); }
.msg { display: flex; flex-direction: column; gap: 8px; max-width: 92%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble { padding: 9px 13px; border-radius: 14px; font-size: 16px; line-height: 1.55; word-break: break-word; }
.msg.user .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.att-imgs { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.att-imgs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.typing .bubble { display: flex; gap: 4px; }
.typing .bubble span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: bounce 1s infinite; }
.typing .bubble span:nth-child(2) { animation-delay: .15s; } .typing .bubble span:nth-child(3) { animation-delay: .3s; }
.pcard2 { background: var(--surface); border: 1px solid var(--violet-dot); border-radius: 12px; overflow: hidden; width: 100%; min-width: 260px; }
.pcard2.applied { border-color: var(--green-dot); } .pcard2.rejected { border-color: var(--border); opacity: .7; }
.pcard2 .ph { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--violet-bg); font-size: 16px; }
.pcard2.applied .ph { background: var(--green-bg); } .pcard2.rejected .ph { background: var(--sunk); }
.pcard2 .ph .i { width: 15px; height: 15px; }
.pcard2 .ph .pill { margin-left: auto; }
.pcard2 ul { list-style: none; margin: 0; padding: 4px 12px; max-height: 320px; overflow: auto; }
.pcard2 li { display: grid; grid-template-columns: 86px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
.pcard2 li:last-child { border-bottom: 0; }
.pcard2 .k { color: var(--text-3); }
.pcard2 .v { word-break: break-word; }
.pcard2 small { display: block; color: var(--text-3); margin-top: 2px; }
.conf { font-style: normal; font-size: 14px; font-weight: 600; padding: 0 6px; border-radius: 4px; margin-left: 4px; white-space: nowrap; }
.conf.hi { background: var(--green-bg); color: var(--green); } .conf.lo { background: var(--amber-bg); color: var(--amber); }
.pcard2 .pa { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.quick { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; border-top: 1px solid var(--border); }
.quick button { font: inherit; font-size: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.quick button:hover { border-color: var(--brand); color: var(--brand); }
.composer { padding: 10px 12px 12px; }
.att { display: flex; gap: 6px; flex-wrap: wrap; }
.att:not(:empty) { margin-bottom: 8px; }
.att-item { position: relative; }
.att-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.att-item button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: #101828; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.att-item .i { width: 11px; height: 11px; }
.input-row { display: flex; gap: 6px; align-items: flex-end; border: 1px solid var(--border-strong); border-radius: 12px; padding: 6px; background: var(--surface); }
.input-row:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.input-row textarea { border: 0; box-shadow: none; padding: 6px 4px; resize: none; max-height: 160px; min-height: 34px; }
.input-row textarea:focus { box-shadow: none; }
.icon-btn2 { border: 0; background: none; color: var(--text-2); padding: 7px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn2:hover { background: var(--sunk); color: var(--text); }
.icon-btn2:disabled { opacity: .4; cursor: not-allowed; }
.input-row .btn { padding: 7px 10px; }

/* ========== 批量上新 ========== */
tr.clickable { cursor: pointer; }
.bsteps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.bsteps .card + .card { margin-top: 0; }
.bstep h2 { display: flex; align-items: center; gap: 10px; }
.bn { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 16px; display: grid; place-items: center; flex: none; }
.small-dz { padding: 18px; }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-top: 14px; }
.design { position: relative; border: 1px solid var(--border); border-radius: 8px; background: var(--sunk); aspect-ratio: 1; overflow: hidden; }
.design img { width: 100%; height: 100%; object-fit: contain; }
.design .no { position: absolute; top: 4px; left: 4px; background: rgba(16, 24, 40, .72); color: #fff; font-size: 14px; font-weight: 700; padding: 0 6px; border-radius: 4px; }
.design .link-btn { position: absolute; top: 2px; right: 2px; background: var(--surface); padding: 3px; }
.mats { display: flex; gap: 8px; flex-wrap: wrap; }
.mat { position: relative; }
.mat img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.mat em { position: absolute; bottom: 2px; left: 2px; font-style: normal; font-size: 13px; background: var(--brand); color: #fff; padding: 0 4px; border-radius: 3px; }
label.btn input[type=file] { display: none; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 16px; cursor: pointer; }
.check input { width: auto; box-shadow: none; }
.spec-box { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: grid; gap: 12px; background: var(--surface-2); }
.spec-sum { display: flex; gap: 8px; align-items: flex-start; color: var(--green); font-weight: 500; }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.spec-grid .k { display: block; font-size: 14px; color: var(--text-3); }
.prog { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 14px; display: grid; gap: 8px; }
.prog.on { border-color: var(--brand); background: var(--brand-soft); }
.prog-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.results .card + .card { margin-top: 0; }
.result { padding: 14px; display: grid; gap: 10px; }
.r-head { display: flex; gap: 12px; align-items: center; }
.r-head > div { flex: 1; min-width: 0; }
.r-design { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: var(--sunk); border: 1px solid var(--border); }
.r-imgs { display: flex; gap: 6px; overflow-x: auto; min-height: 30px; align-items: center; }
.r-imgs img { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; background: var(--sunk); display: block; }
.r-title { font-size: 16px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) { .bsteps { grid-template-columns: 1fr; } .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.loose, .g-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.th { display: grid; gap: 4px; }
.th img, .g-files > img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--sunk); display: block; }
.th select { padding: 2px 4px; font-size: 14px; box-shadow: none; }
.doc-th { aspect-ratio: 1; border-radius: 8px; border: 1px dashed var(--border-strong); display: grid; place-items: center; align-content: center; gap: 4px; font-size: 14px; color: var(--text-2); text-align: center; padding: 6px; word-break: break-all; }
.run-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 14px; padding: 12px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.groups .card + .card { margin-top: 0; }
.gcard { padding: 14px; display: grid; gap: 10px; }
.gcard.running { border-color: var(--violet-dot); }
.gcard.failed { border-color: var(--red-dot); }
.g-head { display: flex; align-items: center; gap: 8px; }
.g-no { width: 22px; height: 22px; border-radius: 6px; background: var(--sunk); color: var(--text-2); font-size: 14px; font-weight: 700; display: grid; place-items: center; flex: none; }
.g-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-name-in { flex: 1; min-width: 0; padding: 4px 8px; font-weight: 600; box-shadow: none; }
.g-cat { font-size: 16px; font-weight: 600; color: var(--brand); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.g-spec { color: var(--text-2); }
.g-opts { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.g-opts select, .g-opts input { padding: 6px 8px; font-size: 16px; }
.g-foot { display: flex; justify-content: space-between; align-items: center; }
.stages { display: flex; gap: 3px; flex-wrap: wrap; }
.stages span { font-size: 14px; padding: 2px 7px; border-radius: 4px; background: var(--sunk); color: var(--text-3); }
.stages .done { background: var(--green-bg); color: var(--green); }
.stages .now { background: var(--violet-bg); color: var(--violet); font-weight: 700; }
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.flags li { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; color: var(--amber); background: var(--amber-bg); border-radius: 6px; padding: 5px 8px; }
.flags .i { width: 14px; height: 14px; flex: none; margin-top: 1px; }

/* ========== 新版：通用 ========== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: inherit; font-size: 14px; padding: 1px 6px; border-radius: 4px; background: var(--sunk); color: var(--text-2); border: 1px solid var(--border); }
.btn kbd { background: rgba(255, 255, 255, .18); color: inherit; border-color: transparent; }
.btn.ghost kbd { background: var(--sunk); color: var(--text-2); }
.ph { display: grid; place-items: center; background: var(--sunk); color: var(--text-3); }
.muted.small, .small.muted { font-size: 14px; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* AI 消息（首页、看板共用） */
.ai-msg { display: flex; gap: 12px; align-items: flex-start; }
.ai-msg > div { min-width: 0; flex: 1; display: grid; gap: 6px; padding-top: 3px; }
.ai-msg p { margin: 0; font-size: 17px; line-height: 1.65; }
.ai-dot { flex: 0 0 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.ai-dot .i { width: 15px; height: 15px; }
.spin-dot .i { animation: spin 1.6s linear infinite; }
.user-msg { align-self: flex-end; max-width: 80%; background: var(--sunk); padding: 9px 14px; border-radius: 14px 14px 4px 14px; font-size: 17px; }
.metric { display: grid; gap: 2px; margin-top: 4px; }
.metric span { font-size: 16px; color: var(--text-2); }
.metric b { font-size: 40px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric em { font-style: normal; font-size: 16px; color: var(--text-2); }
.mini-bars { height: 90px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--border-strong); margin-top: 6px; }
.mini-bars span { flex: 1; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; }
.mini-axis { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.answer-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ========== 首页 ========== */
.home { max-width: 760px; margin: 0 auto; padding: clamp(40px, 14vh, 140px) 0 40px; display: flex; flex-direction: column; gap: 22px; }
.home-hi { display: grid; gap: 6px; text-align: center; }
.home > .suggest { justify-content: center; }
.home-hi p { margin: 0; font-size: 16px; }
.home-hi h1 { font-size: 40px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.composer { position: relative; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow); padding: 16px 16px 12px; display: grid; gap: 12px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--text-3); }
.composer textarea { border: 0; box-shadow: none; padding: 2px; font-size: 18px; line-height: 1.6; resize: none; background: transparent; }
.composer textarea:focus { box-shadow: none; }
.composer .files { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 16px; font-weight: 500; }
.composer .files .link-btn { margin-left: auto; }
.composer-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 16px; color: var(--text-2); cursor: pointer; }
.chip-btn:hover { border-color: var(--border-strong); color: var(--text); }
.chip-btn .i { width: 16px; height: 16px; }
.select-chip select { border: 0; box-shadow: none; padding: 0 2px; width: auto; font-size: 16px; font-weight: 600; color: var(--text); background: transparent; cursor: pointer; }
.send { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; cursor: pointer; }
.send:disabled { opacity: .35; cursor: not-allowed; }
.drop-hint { display: none; position: absolute; inset: 0; border-radius: 20px; border: 2px dashed var(--brand); background: color-mix(in srgb, var(--brand-soft) 92%, transparent); color: var(--brand); font-weight: 600; place-items: center; font-size: 17px; }
.composer.over .drop-hint { display: grid; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -6px; }
.suggest button, .suggest a, .ask-chips button { height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-size: 16px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; }
.suggest button:hover, .suggest a:hover, .ask-chips button:hover { border-color: var(--border-strong); color: var(--text); }
.thread { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.mini-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-left: 40px; }
.mini-card { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); }
.mini-card:hover { border-color: var(--border-strong); }
.mini-card img, .mini-card .ph { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.mini-card > span:last-child { min-width: 0; display: grid; gap: 2px; }
.mini-card b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-card em { font-style: normal; font-size: 14px; }
em.done, .mini-card em.done { color: var(--green); } em.run { color: var(--brand); } em.warn { color: var(--amber); } em.muted { color: var(--text-3); }
.thread-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-left: 40px; }

/* ========== 上新处理（卡片墙 + 助手） ========== */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.work-main { min-width: 0; display: grid; gap: 18px; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.work-head h1 { font-size: 26px; }
.work-head p { margin: 4px 0 0; font-size: 16px; }
.work-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prog-line { width: 140px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.prog-line span { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s; }
.dropbox { display: grid; gap: 10px; }
.loose-card { margin: 0; }
.pgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pc { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.pc:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.pc.running { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.pc.failed { border-color: var(--red-dot); }
.pc-img { position: relative; aspect-ratio: 4 / 3; background: var(--sunk); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-img .ph { width: 100%; height: 100%; }
.pc-img .ph .i { width: 40px; height: 40px; }
.pc-tag { position: absolute; top: 10px; left: 10px; font-size: 14px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(17, 17, 17, .72); color: #fff; backdrop-filter: blur(6px); }
.pc-tag.ok { background: rgba(6, 118, 71, .9); } .pc-tag.warn { background: rgba(181, 71, 8, .92); } .pc-tag.bad { background: rgba(180, 35, 24, .92); } .pc-tag.run { background: var(--brand); }
.pc-del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .9); color: var(--text-2); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.pc:hover .pc-del, .pc-del:focus-visible { opacity: 1; }
.pc-del .i { width: 15px; height: 15px; }
.pc-body { padding: 12px 14px 14px; display: grid; gap: 8px; }
.pc-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-name-in { padding: 4px 8px; font-weight: 600; font-size: 16px; }
.pc-cat { font-size: 14px; color: var(--text-2); }
.steps { display: flex; gap: 3px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--sunk); }
.steps span.on { background: var(--brand); } .steps span.warn { background: var(--amber-dot); }
.steps span.now { background: color-mix(in srgb, var(--brand) 35%, transparent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.pc-spec { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--text-2); }
.pc-title { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-err { margin: 0; font-size: 14px; color: var(--red); }
.pc-foot { display: flex; justify-content: space-between; }
.pc-files { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pc-files .th img { aspect-ratio: 1; }
.pc-files .th select { display: none; }
.agent { position: sticky; top: 20px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.agent-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.agent-head h2 { font-size: 16px; }
.agent-head .muted { margin-left: auto; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.live.on { background: var(--green-dot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-dot) 22%, transparent); }
.log { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 8px; overflow-y: auto; font-size: 14px; line-height: 1.55; font-family: ui-monospace, "Cascadia Code", Consolas, "Microsoft YaHei UI", monospace; }
.log li { display: flex; gap: 10px; }
.log i { flex: 0 0 12px; font-style: normal; font-weight: 700; }
.log .ok i { color: var(--green); } .log .ask i { color: var(--amber); } .log .bad i { color: var(--red); } .log .run i { color: var(--brand); }
.log .ok span { color: var(--text-2); } .log .ask span { color: var(--text); } .log .dim span, .log .run span { color: var(--text-3); }
.ask-card { margin: 0 12px 10px; padding: 12px; border-radius: 14px; background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber-dot) 35%, transparent); display: grid; gap: 6px; }
.ask-card p { margin: 0 0 4px; font-size: 16px; line-height: 1.5; }
.ask-card .opt { height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.ask-card .opt.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.agent-say { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.agent-say textarea { font-size: 16px; resize: none; }
.agent-say-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ========== 待确认 ========== */
main.wide:has(.inbox) { padding: 0; }
.inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr); min-height: 100vh; }
.inbox-list { background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; max-height: 100vh; position: sticky; top: 0; }
.inbox-list header { padding: 20px 20px 12px; display: grid; gap: 2px; }
.inbox-list h1 { font-size: 19px; }
.inbox-list header span { font-size: 16px; }
.inbox-group { padding: 14px 20px 6px; font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); }
.inbox-row { width: 100%; display: flex; gap: 12px; align-items: center; padding: 9px 20px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.inbox-row:hover { background: var(--surface-2); }
.inbox-row.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.inbox-row img, .inbox-row .ph { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.inbox-row > span:last-child { min-width: 0; display: grid; gap: 1px; }
.inbox-row b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-row em { font-style: normal; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-detail { display: flex; flex-direction: column; min-height: 100vh; }
.dt-head { display: flex; align-items: center; gap: 14px; padding: 20px 32px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.dt-head img, .dt-head .ph { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.dt-head h2 { font-size: 19px; }
.dt-head p { margin: 2px 0 0; font-size: 16px; }
.dt-head .btn { margin-left: auto; }
.dt-body { padding: 28px 32px; display: grid; gap: 24px; max-width: 760px; align-content: start; }
.dt-sec { display: grid; gap: 10px; }
.dt-sec .label { font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); }
.dt-say { margin: 0; font-size: 17px; line-height: 1.65; }
.opts { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px; display: grid; gap: 2px; }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; cursor: pointer; }
.opt-row:hover { background: var(--surface-2); }
.opt-row:has(input:checked) { background: var(--brand-soft); }
.opt-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); box-shadow: none; }
.opt-row > span { flex: 1; display: grid; gap: 2px; }
.opt-row em { font-style: normal; font-size: 14px; color: var(--text-2); }
.kv-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.kv-list li { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.kv-list li:last-child { border-bottom: 0; }
.kv-list .k { color: var(--text-2); font-size: 16px; }
.kv-list .v { display: grid; gap: 2px; }
.kv-list em { font-style: normal; font-size: 14px; color: var(--text-3); }
.dt-pics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dt-pics img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--sunk); display: block; }
.dt-foot { margin-top: auto; position: sticky; bottom: 0; padding: 14px 32px; border-top: 1px solid var(--border); background: var(--surface); display: flex; gap: 10px; align-items: center; }
.inbox-empty { max-width: 560px; margin: 80px auto; }

/* ========== 看板提问 ========== */
.ask-bar { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 8px 0 18px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.ask-bar .i { color: var(--text-3); }
.ask-bar input { flex: 1; border: 0; box-shadow: none; padding: 0; font-size: 17px; background: transparent; }
.ask-bar input:focus { box-shadow: none; }
.ask-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.answer-box:not(:empty) { margin-top: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.answer-box + .sync-bar, .answer-box + .card, .answer-box + .banner, .answer-box + .kpis { margin-top: 20px; }

@media (max-width: 1100px) {
  .work { grid-template-columns: 1fr; }
  .agent { position: static; max-height: none; }
  .inbox { grid-template-columns: 1fr; }
  .inbox-list { position: static; max-height: 40vh; }
  .mini-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .thread-actions { padding-left: 0; }
}

/* ========== 上新模板 ========== */
.tpl-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.tpl-list { display: grid; gap: 8px; }
.tpl-item { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; }
.tpl-item b { display: flex; gap: 8px; align-items: center; }
.tpl-item:hover { border-color: var(--border-strong); }
.tpl-item.on { border-color: var(--brand); box-shadow: var(--focus); }
.tpl-form fieldset { border: 0; margin: 0; min-width: 0; }
.radio-row { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-row label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.radio-row input { width: auto; box-shadow: none; }
.mini-table { width: auto; margin-bottom: 8px; }
.mini-table th { padding: 6px 8px; background: none; }
.mini-table td { padding: 4px 8px 4px 0; border: 0; }
.mini-table input { width: 120px; padding: 6px 10px; }
.range { display: flex !important; gap: 8px; align-items: center; justify-content: flex-start !important; }
.range input { width: 100px; }

/* ========== 窄屏 ========== */
@media (max-width: 1400px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chat-fab { display: none; }
@media (max-width: 1200px) {
  .editor { grid-template-columns: 1fr; }
  .ed-chat { position: fixed; top: auto; right: 16px; bottom: 76px; width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100vh - 110px)); z-index: 40; box-shadow: var(--shadow-lg); display: none; }
  .editor.chat-open .ed-chat { display: flex; }
  .chat-fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: 16px; z-index: 41; border: 0; cursor: pointer;
    font: inherit; font-weight: 600; color: #fff; padding: 11px 18px; border-radius: 999px; background: linear-gradient(135deg, #7c3aed, #4f46e5); box-shadow: var(--shadow-lg);
  }
  .attr-row { grid-template-columns: 160px minmax(0, 1fr); }
  .attr-row .aa { grid-column: 2; text-align: left; }
}
@media (max-width: 820px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-layout { grid-template-columns: 1fr; }
  .attr-row { grid-template-columns: 1fr; gap: 8px; }
  .attr-row .aa { grid-column: 1; }
  .flow-row { grid-template-columns: 56px 1fr 84px; }
}
/* ========== 窄屏（旧） ========== */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .cols.wide-left { grid-template-columns: 1fr; }
  .pdp { grid-template-columns: 60px minmax(0, 1fr); }
  .pdp .info { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  #app { grid-template-columns: 1fr; }
  #nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
  #nav .brand { padding: 0 8px 0 0; } .nav-group, .mode { display: none; }
  #nav .me { margin: 0 0 0 auto; border: 0; padding: 0; } #nav .who, #nav a span, #nav .brand > div:last-child { display: none; }
  #nav a { padding: 0 10px; } .nav-sep { display: none; }
  main { padding: 20px 16px 48px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form .row2 { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; }
  th, td { padding: 10px 14px; }
}

/* ========== 看大图 ========== */
body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; background: #0b0b0d; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: #fff; animation: lb-in .15s ease-out; }
@keyframes lb-in { from { opacity: 0; } }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; flex-wrap: wrap; }
.lb-info { min-width: 0; display: grid; }
.lb-info b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-info span { font-size: 14px; color: rgba(255, 255, 255, .6); }
.lb-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 16px; cursor: pointer; text-decoration: none; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-btn.danger:hover { background: #d92d20; }
.lb-btn:disabled { opacity: .5; cursor: wait; }
.lb-btn .i { width: 16px; height: 16px; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: auto; padding: 8px 64px; min-height: 0; }
.lb-stage img { cursor: zoom-out; border-radius: 6px; background: #fff; }
.lb-stage img.fit { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; cursor: zoom-in; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav:hover { background: rgba(255, 255, 255, .25); }
.lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }
.lb-strip { display: flex; gap: 8px; justify-content: center; padding: 10px 16px 16px; overflow-x: auto; }
.lb-strip button { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #222; cursor: pointer; opacity: .55; }
.lb-strip button.on { border-color: #fff; opacity: 1; }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .lb-stage { padding: 8px; } .lb-nav { display: none; } .lb-btn span { display: none; } }
.zoomable { cursor: zoom-in; }

/* ========== 确认框 ========== */
.modal-wrap { position: fixed; inset: 0; z-index: 120; background: rgba(10, 10, 12, .45); display: grid; place-items: center; padding: 16px; animation: lb-in .12s ease-out; }
.modal { width: min(420px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px 22px 18px; display: grid; gap: 8px; }
.modal h3 { font-size: 18px; line-height: 1.5; }
.modal p { color: var(--text-2); font-size: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.btn.danger-solid { background: #d92d20; border-color: #d92d20; color: #fff; }
.btn.danger-solid:hover { background: #b42318; }

/* ========== 图片：添加格子、卡片缩略图条 ========== */
.slot.add-slot { border: 1.5px dashed var(--border-strong); background: var(--surface-2); box-shadow: none; cursor: pointer; display: grid; place-items: center; min-height: 160px; color: var(--text-3); font-size: 16px; text-align: center; transition: border-color .15s, color .15s; }
.slot.add-slot:hover, .slot.add-slot.over { border-color: var(--brand); color: var(--brand); }
.slot.add-slot .i { width: 22px; height: 22px; margin: 0 auto 6px; display: block; }
.pc-strip { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; }
.pc-strip button { flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--sunk); cursor: zoom-in; }
.pc-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-img img { cursor: zoom-in; }
.pcard2 .v img.pthumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); vertical-align: middle; margin-right: 8px; cursor: zoom-in; }
.autosave { font-size: 14px; color: var(--text-3); }
button.frame, .dt-pics button { border: 0; padding: 0; width: 100%; background: var(--sunk); cursor: zoom-in; display: block; border-radius: 0; }
.dt-pics button { border-radius: 10px; overflow: hidden; }
.att-imgs img, .att-item img { cursor: zoom-in; }

/* AI 生图：参考图挑选 */
.ref-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 10px; }
.ref-l { font-size: 16px; font-weight: 600; display: grid; line-height: 1.35; }
.ref-l em { font-style: normal; font-weight: 400; font-size: 14px; color: var(--text-3); }
.ref-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ref-th, .ref-none, .ref-add { width: 56px; height: 56px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); padding: 0; overflow: hidden; cursor: pointer; display: grid; place-items: center; font-size: 14px; color: var(--text-3); }
.ref-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-th.on, .ref-none.on { border-color: var(--brand); box-shadow: var(--focus); color: var(--brand); }
.ref-add { border-style: dashed; }
.ref-add:hover { border-color: var(--brand); color: var(--brand); }
@media (max-width: 640px) { .ref-row { grid-template-columns: 1fr; gap: 6px; } }

/* ========== 设计印花 ========== */
.design-home .sub-h { margin-top: 12px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.dgrid.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.dcard { display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; color: inherit; transition: box-shadow .15s, transform .15s; }
.dcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.dimg { aspect-ratio: 1; background: #fff; display: grid; place-items: center; color: var(--text-3); border: 0; padding: 0; width: 100%; overflow: hidden; }
.dimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dbody { padding: 10px 12px; display: grid; gap: 2px; }
.dbody b { font-size: 16px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ditem { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r); overflow: hidden; transition: border-color .15s; }
.ditem.on { border-color: var(--brand); box-shadow: var(--focus); }
.ditem.wait .dimg { background: var(--surface-2); }
.dpick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; border-top: 1px solid var(--border); }
.dpick input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.dpick span { display: grid; min-width: 0; }
.dpick b { font-size: 16px; }
.dpick em { font-style: normal; font-size: 14px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlayout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.dbrief { position: sticky; top: 16px; }
.dbrief .label { display: block; font-size: 14px; color: var(--text-3); margin: 12px 0 6px; font-weight: 600; }
.dbrief .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dref { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.dsend { display: grid; gap: 10px; }
.dsend select { width: 100%; }
.dsend .btn { width: 100%; justify-content: center; }
@media (max-width: 1100px) { .dlayout { grid-template-columns: 1fr; } .dbrief { position: static; } }

/* ========== 待确认：一个商品一行，问题一张张卡片 ========== */
.inbox { grid-template-columns: 340px minmax(0, 1fr); }
.inbox-list header { padding: 22px 20px 14px; border-bottom: 1px solid var(--border); }
.inbox-row { padding: 12px 20px; align-items: flex-start; border-bottom: 1px solid var(--border); }
.inbox-row img, .inbox-row .ph { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 10px; }
.ir-main { min-width: 0; display: grid; gap: 6px; }
.inbox-row .ir-main b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; font-weight: 600; }
.ir-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.itag { font-style: normal; font-size: 14px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.itag.violet { background: var(--violet-bg); color: var(--violet); }
.itag.amber { background: var(--amber-bg); color: var(--amber); }
.itag.blue { background: var(--blue-bg); color: var(--blue); }
.itag.red { background: var(--red-bg); color: var(--red); }
.inbox-detail { background: var(--bg); }
.dt-head { background: var(--surface); }
.dt-head h2 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.dt-head > div { min-width: 0; flex: 1; }
.dt-cover { border: 0; padding: 0; background: none; border-radius: 10px; overflow: hidden; flex: none; }
.dt-body { max-width: 880px; width: 100%; margin: 0 auto; gap: 16px; padding: 24px 32px; }
.icard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.icard > header { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.icard-body { padding: 14px 18px; display: grid; gap: 12px; }
.icard > footer { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: var(--surface-2); border-top: 1px solid var(--border); }
.icard > footer .link-btn { font-size: 16px; }
.price-in { width: 100%; }
.size-table.mini input { width: 80px; }
.dt-pics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dt-pics img { aspect-ratio: 1; }
.dt-foot { justify-content: space-between; }
@media (max-width: 1100px) { .inbox { grid-template-columns: 1fr; } .dt-pics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ========== 首页：整块在屏幕中间偏上，没有回答时不画分割线 ========== */
.home.home-center { min-height: calc(100vh - 96px); justify-content: center; padding: 32px 0 14vh; gap: 20px; }
.home-center .home-hi h1 { font-size: 36px; }
.home-center .suggest { margin-top: 0; }
.thread:empty { display: none; }

/* ========== 上新：一条流程线 ========== */
.flow { list-style: none; margin: 0 0 20px; padding: 0; display: flex; gap: 0; align-items: center; flex-wrap: wrap; }
.flow li { display: flex; align-items: center; }
.flow li + li::before { content: ''; width: 36px; height: 1.5px; background: var(--border-strong); margin: 0 10px; }
.flow li.done + li::before, .flow li.skip + li::before { background: var(--text-3); }
.flow a, .flow div { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 16px; font-weight: 500; text-decoration: none; }
.flow a:hover { color: var(--text); }
.flow i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 700; border: 1.5px solid var(--border-strong); background: var(--surface); }
.flow i .i { width: 13px; height: 13px; }
.flow span { display: grid; line-height: 1.25; }
.flow em { font-style: normal; font-size: 14px; font-weight: 400; color: var(--text-3); }
.flow .now a, .flow .now div { color: var(--text); font-weight: 650; }
.flow .now i { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.flow .done i { background: var(--green-bg); border-color: var(--green-bg); color: var(--green); }
.flow .skip i { border-style: dashed; }

.start2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.start-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.sc-head { display: flex; gap: 14px; align-items: flex-start; }
.sc-head h2 { font-size: 18px; }
.sc-head p { color: var(--text-2); font-size: 16px; margin-top: 2px; }
.sc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sunk); color: var(--text); flex: none; }
.sc-ic.ai { background: var(--brand-soft); color: var(--brand); }
.start-card .dropzone { flex: 1; min-height: 132px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 16px; }
.sc-form { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sc-form textarea { flex: 1; min-height: 132px; resize: none; }
.sc-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.runs { padding: 4px 0; }
.run-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 90px 90px; gap: 14px; align-items: center; padding: 10px 18px; color: inherit; border-bottom: 1px solid var(--border); }
.run-row:last-child { border-bottom: 0; }
.run-row:hover { background: var(--surface-2); }
.run-row img, .run-row .ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--sunk); display: grid; place-items: center; color: var(--text-3); }
.rr-main { display: grid; min-width: 0; }
.rr-main b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-main em { font-style: normal; font-size: 14px; color: var(--text-3); }
.rr-flow { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-2); }
.rr-flow i { width: 18px; height: 4px; border-radius: 2px; background: var(--border); }
.rr-flow i.done { background: var(--text-3); }
.rr-flow i.now { background: var(--brand); }
.rr-flow span { margin-left: 6px; }
.rr-state { font-size: 14px; font-weight: 600; color: var(--text-2); }
.rr-state.run { color: var(--brand); } .rr-state.ok { color: var(--green); } .rr-state.warn { color: var(--amber); }
.rr-at { text-align: right; }
@media (max-width: 900px) { .start2 { grid-template-columns: 1fr; } .run-row { grid-template-columns: 44px minmax(0, 1fr) 80px; } .rr-flow, .rr-at { display: none; } }

/* ========== 发布面板、店铺侧栏 ========== */
.pub { display: grid; gap: 14px; width: 100%; }
.pub-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pub-sum > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.pub-sum span { font-size: 14px; color: var(--text-3); }
.pub-sum b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-sum em { font-style: normal; font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-raw summary { cursor: pointer; font-size: 16px; color: var(--text-2); }
.pub-raw pre { max-height: 320px; overflow: auto; background: var(--sunk); border-radius: var(--r-sm); padding: 12px; font-size: 14px; margin: 8px 0 0; }
.pub-act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.side-stack { display: grid; gap: 16px; align-content: start; }
@media (max-width: 900px) { .pub-sum { grid-template-columns: 1fr 1fr; } }
.stores-page { display: grid; gap: 16px; }
.stores-page .side-stack { order: -1; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stores-page .side-stack:not(:has(> section:not([hidden]))) { display: none; }

/* ========== 图片：每个颜色一行 ========== */
.crows { display: grid; gap: 18px; }
.crow-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.crow-head b { font-size: 16px; }
.crow-head .swatch-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-strong); }
.crow-body { position: relative; display: flex; align-items: center; gap: 6px; }
.crow-nav { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.crow-nav:hover { border-color: var(--border-strong); color: var(--text); }
.crow-nav .i { width: 15px; height: 15px; }
.crow-strip, .tray-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 8px; min-height: 196px; flex: 1; border-radius: var(--r-sm); transition: background .15s; scrollbar-width: thin; }
.crow-strip.over { background: var(--brand-soft); }
.tray-strip { min-height: 0; }
.tile { position: relative; flex: none; width: 138px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--sunk); border: 1px solid var(--border); scroll-snap-align: start; cursor: grab; transition: transform .12s, box-shadow .12s; }
.tile:hover { box-shadow: var(--shadow); }
.tile.dragging { opacity: .35; }
.tile.shared { opacity: .85; border-style: dashed; }
.tile.drop-before { box-shadow: -4px 0 0 var(--brand); }
.tile.drop-after { box-shadow: 4px 0 0 var(--brand); }
.tile-img { border: 0; padding: 0; width: 100%; height: 100%; background: none; cursor: zoom-in; display: block; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-image-retry { position: absolute; left: 8px; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2; padding: 10px 7px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); font: inherit; font-size: 14px; line-height: 1.5; cursor: pointer; }
.tile-image-retry:hover, .tile-image-retry:focus-visible { border-color: var(--brand); color: var(--brand); outline: 2px solid var(--brand-soft); outline-offset: 2px; }
.tile-badge { position: absolute; left: 6px; top: 6px; font-size: 14px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: rgba(16, 24, 40, .7); color: #fff; pointer-events: none; }
.tile-badge.main { background: #fa6338; }
.tile .ai-badge { position: absolute; right: 6px; top: 6px; }
.tile-del { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .92); color: var(--red); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s; }
.tile:hover .tile-del, .tile-del:focus-visible { opacity: 1; }
.tile-del .i { width: 15px; height: 15px; }
.tile.add { display: grid; place-items: center; align-content: center; gap: 4px; border: 1.5px dashed var(--border-strong); background: var(--surface-2); color: var(--text-3); font-size: 14px; cursor: pointer; }
.tile.add:hover { border-color: var(--brand); color: var(--brand); }
.ref-pick.over { outline: 2px dashed var(--brand); outline-offset: 4px; border-radius: 10px; }
.ref-hint { font-size: 14px; color: var(--text-3); }
@media (max-width: 640px) { .tile { width: 110px; } .crow-nav { display: none; } }

/* ========== 上新模板 ========== */
.tpl-page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.tpl-list { display: grid; gap: 6px; position: sticky; top: 16px; }
.tpl-list a { display: grid; padding: 10px 14px; border-radius: 10px; color: var(--text); border: 1px solid transparent; }
.tpl-list a span { font-size: 14px; color: var(--text-3); }
.tpl-list a:hover { background: var(--surface); }
.tpl-list a.on { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.tpl-grid { display: grid; gap: 12px; }
.tpl-h { margin-top: 14px; font-size: 16px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tpl-h .hint { font-weight: 400; }
.tpl-rows { display: grid; gap: 8px; }
.tpl-row { display: grid; gap: 8px; align-items: center; }
.tpl-row.price { grid-template-columns: 120px 1fr 1fr 28px; }
.tpl-row.price label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); }
.tpl-row.attr { grid-template-columns: 1fr 1.2fr 2fr 28px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pair { display: flex; gap: 6px; } .pair input { min-width: 0; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pchip input[type=color] { width: 28px; height: 28px; padding: 0; border: 0; background: none; }
.pchip input:not([type=color]) { width: 84px; padding: 4px 6px; font-size: 14px; }
.blanks { display: flex; gap: 12px; }
.blank { width: 150px; aspect-ratio: 3 / 4; border: 1.5px dashed var(--border-strong); border-radius: 12px; display: grid; place-items: center; overflow: hidden; position: relative; cursor: pointer; background: var(--surface-2); }
.blank img { width: 100%; height: 100%; object-fit: cover; }
.blank em { position: absolute; bottom: 0; left: 0; right: 0; font-style: normal; font-size: 14px; text-align: center; padding: 4px; background: rgba(255, 255, 255, .85); color: var(--text-2); }
.check-field { display: flex; align-items: center; gap: 8px; }
@media (max-width: 900px) { .tpl-page { grid-template-columns: 1fr; } .tpl-list { position: static; display: flex; overflow-x: auto; } .row3 { grid-template-columns: 1fr; } }

/* 首页：输入框更大，整体更饱满 */
.home.home-center { max-width: 960px; padding: 24px 0 10vh; gap: 22px; }
.home-center .home-hi h1 { font-size: 42px; }
.home-center .home-hi p { font-size: 17px; }
.home-center .composer { padding: 20px 20px 14px; border-radius: 24px; }
.home-center .composer textarea { min-height: 150px; font-size: 19px; }
.home-center .chip-btn { height: 38px; }
.home-center .suggest button, .home-center .suggest a { height: 38px; font-size: 16px; padding: 0 16px; }

/* 设计审核 */
.ditem.review .dimg { position: relative; aspect-ratio: 3 / 4; }
.ditem.review .dimg img:first-child { object-fit: cover; }
.dart { position: absolute; right: 8px; bottom: 8px; width: 64px !important; height: 64px !important; object-fit: contain !important; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.dbusy { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; background: rgba(255, 255, 255, .78); font-size: 16px; color: var(--text-2); }
.ditem .dpick { justify-content: space-between; align-items: center; cursor: default; }
.ditem .dpick > .pill { flex: none; font-style: normal; }
.dact { display: flex; gap: 8px; padding: 0 12px 12px; }
.drev { display: grid; gap: 8px; padding: 0 12px 12px; }
.drev textarea { min-height: 60px; }
.drev-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.blank-pick { display: inline-flex; align-items: center; gap: 6px; }
.blank-pick img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); background: var(--sunk); }
.blank-pick img:not([src]) { display: none; }
.cref { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.cref .att-item img { width: 40px; height: 40px; }
.crow-regen { margin-left: auto; font-size: 14px; }
/* 图片行不能把编辑区撑宽（否则会跑到右边对话框下面） */
.ed-main, .ed-sections, .ed-sec, .crows, .crow, .crow-body { min-width: 0; }
.crow-strip, .tray-strip { min-width: 0; }
.ed-sections { display: grid; gap: 16px; }

/* ========== 下拉框（替代原生 select） ========== */
.dd { position: relative; display: inline-flex; vertical-align: middle; max-width: 100%; }
.dd.dd-block { display: flex; width: 100%; }
.dd-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; }
.dd-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dd-btn:hover { border-color: var(--text-3); }
.dd-btn.open, .dd-btn:focus-visible { border-color: var(--brand); box-shadow: var(--focus); outline: none; }
.dd-btn:disabled { opacity: .55; cursor: not-allowed; }
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dd-chev { flex: none; display: grid; color: var(--text-3); transition: transform .15s; }
.dd-chev svg { width: 15px; height: 15px; }
.dd-btn.open .dd-chev { transform: rotate(180deg); }
/* 放在“店铺 / 模板”这种小标签里：没有边框，粗体，像文字 */
.dd-chip .dd-btn { min-height: 0; height: auto; padding: 0 2px 0 6px; border: 0; background: none; font-weight: 600; box-shadow: none; gap: 4px; }
.dd-chip .dd-btn.open, .dd-chip .dd-btn:focus-visible { box-shadow: none; color: var(--brand); }
/* 紧凑场合（表格、属性多选、小工具条） */
.multi .dd-btn, .th .dd-btn, .sync-bar .dd-btn, .g-opts .dd-btn, .comp-row .dd-btn { min-height: 30px; font-size: 16px; border-radius: 8px; }

.dd-menu { position: fixed; z-index: 140; max-width: min(420px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px -8px rgba(16, 24, 40, .22), 0 2px 6px rgba(16, 24, 40, .06); padding: 6px; display: grid; gap: 4px; animation: dd-in .12s ease-out; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } }
.dd-search { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; font-size: 16px; }
.dd-list { max-height: 300px; overflow-y: auto; display: grid; gap: 1px; }
.dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; font-size: 16px; cursor: pointer; color: var(--text); white-space: nowrap; }
.dd-opt span { overflow: hidden; text-overflow: ellipsis; }
.dd-opt:hover, .dd-opt.act { background: var(--surface-2); }
.dd-opt.sel { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.dd-opt i { display: grid; flex: none; }
.dd-opt i svg { width: 15px; height: 15px; }
.dd-opt.dis { opacity: .4; cursor: not-allowed; }
.dd-empty { padding: 10px; font-size: 16px; color: var(--text-3); }

/* ========== 侧栏重做：暖灰底、分组标题、选中项浮起来 ========== */
:root { --side: #f4f4f1; --side-2: #e9e9e5; --side-text: #5c5c56; --side-active: #111111; }
@media (prefers-color-scheme: dark) { :root { --side: #111318; --side-2: #1c1f26; --side-text: #9aa3b2; --side-active: #ffffff; } }
#nav { background: var(--side); border-right: 1px solid var(--border); padding: 18px 14px 14px; gap: 2px; }
#nav .brand { padding: 2px 6px 18px; gap: 11px; }
#nav .brand .logo { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; color: #fff;
  background: linear-gradient(140deg, #3d5afe 0%, #7c4dff 100%); box-shadow: 0 4px 12px -4px rgba(61, 90, 254, .55); }
#nav .brand b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
#nav .brand span { font-size: 14px; color: var(--text-3); }
.nav-group { padding: 14px 12px 6px; font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--text-3); }
#nav .brand + .nav-group { padding-top: 2px; }
#nav a { height: 38px; padding: 0 12px; gap: 11px; border-radius: 10px; color: var(--side-text); font-size: 16px; font-weight: 500; }
#nav a .i { width: 18px; height: 18px; color: var(--text-3); transition: color .15s; }
#nav a:hover { background: var(--side-2); color: var(--text); }
#nav a:hover .i { color: var(--text-2); }
#nav a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px var(--border); }
#nav a.active .i { color: var(--brand); }
#nav a .badge { background: var(--brand); box-shadow: 0 2px 6px -2px rgba(61, 90, 254, .6); }
#nav .me { margin-top: auto; border-top: 0; padding: 10px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
#nav .me .avatar { background: linear-gradient(140deg, #ffd6a5 0%, #ffadad 100%); color: #7a2e0e; }
#nav .me .who b { font-size: 16px; }
#nav .me .who span { color: var(--text-3); }
@media (max-width: 1100px) and (min-width: 821px) { .nav-group { display: none; } #nav .me { padding: 8px 0; background: none; box-shadow: none; } }
@media (max-width: 820px) { .nav-group { display: none; } #nav .me { background: none; box-shadow: none; padding: 0; } }

/* ========== 侧栏 v3：白底、比例重排 ========== */
#app { grid-template-columns: 240px minmax(0, 1fr); }
#nav { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px 16px; gap: 3px; }
#nav .brand { padding: 0 8px 22px; gap: 12px; align-items: center; }
#nav .brand .logo-mark { flex: none; filter: drop-shadow(0 4px 10px rgba(61, 90, 254, .28)); }
#nav .brand b { display: flex; align-items: baseline; gap: 6px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--text); }
#nav .brand b em { font-style: normal; font-size: 16px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
#nav .brand span { display: block; margin-top: 2px; font-size: 14px; color: var(--text-3); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group { padding: 18px 12px 8px; font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--text-3); }
#nav .brand + .nav-group { padding-top: 0; }
#nav a { height: 40px; padding: 0 12px; gap: 12px; border-radius: 10px; font-size: 16px; font-weight: 500; color: #4a4a45; box-shadow: none; }
#nav a .i { width: 19px; height: 19px; color: #8b8b84; }
#nav a:hover { background: var(--surface-2); color: var(--text); }
#nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: none; }
#nav a.active .i { color: var(--brand); }
#nav a .badge { min-width: 22px; height: 20px; font-size: 14px; box-shadow: none; }
#nav .me { padding: 10px 10px; border-radius: 12px; background: var(--surface-2); box-shadow: none; gap: 10px; }
#nav .me .avatar { width: 34px; height: 34px; }
.auth-art .brand .logo-mark { filter: drop-shadow(0 6px 16px rgba(61, 90, 254, .45)); }
@media (prefers-color-scheme: dark) { #nav a { color: var(--text-2); } #nav a .i { color: var(--text-3); } }
@media (max-width: 1100px) and (min-width: 821px) { #app { grid-template-columns: 68px minmax(0, 1fr); } #nav .brand { padding: 0 0 16px; } }
/* 品牌副标题：英文小号、加宽字距，带一点渐变色 */
#nav .brand .tagline { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(90deg, #3d5afe, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
#nav .brand .tagline { max-width: none; overflow: visible; font-size: 13px; letter-spacing: .05em; }

/* 智境引擎品牌锁定：适配侧栏，不影响其他主题色。 */
#nav .brand .logo-mark { filter: drop-shadow(0 3px 8px rgba(15, 183, 220, .2)); }
#nav .brand b { font-size: 20px; letter-spacing: .04em; }
#nav .brand .tagline { font-size: 13px; letter-spacing: .1em; color: #089ab9; }

/* ========== 智境引擎 · 统一工作区 2026-10-31 ==========
   冷灰画布承托内容，青色只用于 AI、焦点与当前步骤。沿用业务状态。 */
:root {
  color-scheme: light;
  --bg: #f5f7fa; --surface: #ffffff; --surface-2: #f8fafc; --sunk: #eef2f6;
  --border: #e3e9ef; --border-strong: #ccd6e0;
  --text: #162735; --text-2: #516573; --text-3: #687c89;
  --brand: #087f91; --brand-hover: #066b7b; --brand-soft: #e9f6f8; --brand-ink: #ffffff;
  --ink: #173343; --ink-hover: #224858;
  --side: #eff3f7; --side-2: #e5ecf2; --side-text: #5b6d7b; --side-active: #172f3d;
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(26, 48, 64, .025);
  --shadow: 0 4px 20px -8px rgba(29, 54, 72, .12);
  --shadow-lg: 0 24px 72px -20px rgba(16, 38, 55, .24), 0 2px 8px rgba(16, 38, 55, .05);
  --focus: 0 0 0 3px rgba(8, 127, 145, .14);
  --motion-fast: 160ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0c151e; --surface: #131f2b; --surface-2: #172633; --sunk: #1c2d3b;
    --border: #263846; --border-strong: #3a5263;
    --text: #e7eff5; --text-2: #b0c0cd; --text-3: #91a6b7;
    --brand: #5cd5e3; --brand-hover: #8ae5ee; --brand-soft: #17343e; --brand-ink: #09242b;
    --ink: #d9eef3; --ink-hover: #effaff;
    --side: #101c27; --side-2: #1a2b39; --side-text: #a4b8c7; --side-active: #e7eff5;
    --green: #80dba8; --green-bg: #163529; --amber: #efc36b; --amber-bg: #362d1b;
    --red: #ffa39b; --red-bg: #3c2428; --blue: #8ac8ff; --blue-bg: #1a3047;
    --violet: #c5b5fb; --violet-bg: #302a46; --gray: #aec1cf; --gray-bg: #243442;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .08);
    --shadow: 0 8px 24px -12px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 72px -20px rgba(0, 0, 0, .65);
    --focus: 0 0 0 3px rgba(92, 213, 227, .18);
  }
}

/* 基础节奏与工作区外框 */
html { scrollbar-gutter: stable; }
body { font-size: 16px; line-height: 1.65; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { min-width: 0; }
button:not(:disabled), a, label.chip-btn { touch-action: manipulation; }
:where(button, a, summary, input, textarea, select):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
:where(button, a) { transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast); }
:where(p, h1, h2, h3, .banner, .log li) { overflow-wrap: anywhere; }
h1 { font-size: 28px; line-height: 1.3; font-weight: 680; letter-spacing: -.035em; }
h2 { font-size: 18px; letter-spacing: -.015em; }
#app { grid-template-columns: 232px minmax(0, 1fr); }
#app.bare { grid-template-columns: minmax(0, 1fr); }
.workspace, #view { min-width: 0; }
#app.bare .workspace-topbar { display: none; }
main { max-width: 1400px; padding: 28px 36px 60px; }
main.wide { max-width: 1800px; }
#nav { background: var(--side); border-right-color: var(--border); padding: 24px 14px 16px; gap: 4px; }
#nav .brand { padding: 0 8px 27px; gap: 10px; }
#nav .brand .logo-mark { width: 36px; height: 36px; filter: drop-shadow(0 3px 6px rgba(8, 127, 145, .12)); }
#nav .brand b { font-size: 20px; line-height: 1.3; letter-spacing: .025em; font-weight: 750; }
#nav .brand b em:empty { display: none; }
#nav .brand .tagline { color: var(--text-3); background: none; -webkit-background-clip: border-box; background-clip: border-box; font-size: 13px; font-weight: 500; letter-spacing: .08em; }
.nav-group { color: var(--text-3); padding: 23px 12px 8px; font-size: 14px; letter-spacing: .08em; }
#nav a { height: 42px; border: 1px solid transparent; border-radius: 10px; color: var(--side-text); gap: 12px; }
#nav a .i { width: 18px; height: 18px; color: var(--side-text); stroke-width: 1.7; }
#nav a:hover { background: var(--side-2); color: var(--text); }
#nav a.active { color: var(--brand); background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
#nav a.active::before { content: ''; position: absolute; left: -1px; height: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
#nav a.active .i { color: var(--brand); }
#nav a .badge { color: var(--brand-ink); background: var(--brand); min-width: 20px; height: 19px; font-size: 13px; }
#nav .me { padding: 14px 5px 0; border-top: 1px solid var(--border); border-radius: 0; background: none; gap: 10px; }
#nav .me .avatar { background: var(--surface); color: var(--brand); border: 1px solid var(--border); width: 32px; height: 32px; font-size: 14px; }
#nav .me .who b { font-size: 14px; font-weight: 600; }
#nav .me .who span { font-size: 14px; }
.workspace-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 36px; min-height: 58px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 14px; color: var(--text-3); }
.workspace-context { display: flex; gap: 9px; align-items: center; min-width: 0; }
.workspace-context b { color: var(--text-2); font-size: 14px; font-weight: 500; }
.workspace-context .i { width: 15px; height: 15px; }
.workspace-status { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; font-size: 14px; color: var(--text-3); }
.workspace-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green-dot); }
.workspace-status.offline::before { background: var(--gray-dot); }
.workspace-topbar .link-btn { font-size: 14px; }
.page-head { align-items: center; margin-bottom: 28px; gap: 18px; }
.page-head .sub { font-size: 16px; line-height: 1.7; max-width: 760px; margin-top: 6px; color: var(--text-3); }
.page-head .actions { gap: 8px; }
.crumb { color: var(--text-3); margin-bottom: 14px; font-size: 14px; }

/* 卡片、表单、表格和操作反馈 */
.card, .pc, .store-card, .ditem, .icard { box-shadow: var(--shadow-sm); }
.card-head { padding: 20px 24px; align-items: center; }
.card-head p { line-height: 1.6; margin-top: 4px; font-size: 14px; }
.card-body { padding: 24px; }
.card-foot { padding: 16px 24px; background: var(--surface-2); gap: 10px; flex-wrap: wrap; }
.cols { gap: 22px; }
.btn { min-height: 38px; padding: 8px 15px; border-radius: 9px; font-size: 16px; font-weight: 600; box-shadow: 0 1px 2px rgba(15, 36, 50, .04); }
.btn:hover:not(:disabled) { box-shadow: 0 2px 6px rgba(15, 36, 50, .1); }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 14px; }
.btn.lg { min-height: 46px; font-size: 16px; padding: 11px 20px; }
.btn.ai { color: var(--brand-ink); }
.btn.ghost { border-color: var(--border); }
.btn.ghost:hover { border-color: var(--border-strong); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; box-shadow: none; }
.link-btn, .icon-btn { border-radius: 7px; }
.form { gap: 20px; }
.field { gap: 8px; }
.field > span { font-size: 14px; color: var(--text-2); font-weight: 600; }
input, textarea { border-color: var(--border-strong); border-radius: 9px; padding: 10px 12px; box-shadow: none; font-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: .85; }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
.dd-btn { min-height: 39px; border-color: var(--border-strong); font-size: 16px; border-radius: 9px; }
.dd-menu { padding: 7px; border-radius: 13px; box-shadow: var(--shadow-lg); }
.dd-opt { padding: 9px 11px; font-size: 16px; border-radius: 7px; }
.dd-search { border-radius: 7px; }
.dd-chip .dd-btn { min-height: 0; }
.table-wrap { border-radius: 0 0 var(--r) var(--r); scrollbar-width: thin; }
th { background: var(--surface-2); color: var(--text-3); font-size: 14px; font-weight: 600; letter-spacing: .025em; padding: 12px 24px; }
td { padding: 16px 24px; font-size: 16px; }
th:first-child, td:first-child { padding-left: 24px; }
:where(.card, .table-wrap) table { font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: color-mix(in srgb, var(--brand-soft) 32%, var(--surface)); }
.pill { padding: 3px 9px; font-size: 14px; font-weight: 600; gap: 5px; }
.pill i { width: 5px; height: 5px; }
.tag { padding: 2px 8px; font-size: 14px; border-radius: 6px; }
.banner { border-radius: 11px; padding: 14px 16px; font-size: 14px; line-height: 1.7; }
.banner b { font-size: 16px; }
.empty { padding: 70px 24px; gap: 11px; }
.empty-icon { background: var(--surface-2); border: 1px solid var(--border); color: var(--brand); width: 58px; height: 58px; border-radius: 17px; }
.empty h3 { font-size: 18px; }
.empty p { font-size: 16px; line-height: 1.8; max-width: 360px; }
.modal-wrap { background: rgba(9, 24, 36, .46); backdrop-filter: blur(4px); }
.modal { padding: 28px; gap: 12px; border: 1px solid var(--border); max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal h3 { font-size: 20px; }
.modal p { font-size: 16px; line-height: 1.8; }
.modal-foot { gap: 10px; margin-top: 14px; }
#toast { background: var(--ink); color: var(--surface); padding: 13px 18px; border-radius: 12px; border: 1px solid var(--border-strong); font-size: 16px; }

/* 首页：安静的 AI 入口，氛围集中在输入区 */
.home.home-center { position: relative; max-width: 900px; min-height: calc(100dvh - 160px); justify-content: center; padding: 24px 0 7vh; gap: 24px; isolation: isolate; }
.home.home-center::before { content: ''; position: absolute; z-index: -1; pointer-events: none; width: min(880px, 100%); height: 420px; top: 4%; left: 50%; transform: translateX(-50%); background: radial-gradient(ellipse, color-mix(in srgb, var(--brand) 5%, transparent), transparent 68%); }
.home-hi { gap: 12px; }
.home-eyebrow { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--brand); font-size: 14px; font-weight: 600; letter-spacing: .12em; }
.home-eyebrow .i { width: 15px; height: 15px; }
.home-center .home-hi h1 { font-size: clamp(30px, 3.3vw, 44px); letter-spacing: -.04em; font-weight: 650; line-height: 1.3; }
.home-center .home-hi p, .home-stat { font-size: 16px; color: var(--text-3); }
.home-note { color: var(--text-3); font-size: 14px; text-align: center; line-height: 1.8; }
.home-orbit { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 3px; background: var(--surface); border: 1px solid var(--border); color: var(--brand); box-shadow: 0 6px 18px -10px rgba(8, 127, 145, .3); }
.home-orbit .i { width: 22px; height: 22px; }
.home-center .composer { padding: 22px 22px 15px; border-radius: 22px; border-color: var(--border-strong); box-shadow: 0 8px 36px -18px rgba(23, 51, 67, .19), 0 1px 2px rgba(23, 51, 67, .03); gap: 16px; }
.home-center .composer:focus-within { border-color: color-mix(in srgb, var(--brand) 65%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 6%, transparent), var(--shadow); }
.home-center .composer textarea { min-height: 124px; font-size: 18px; padding: 0 1px; line-height: 1.85; }
.home-center .composer-bar { gap: 7px; padding-top: 12px; border-top: 1px solid var(--border); }
.home-center .chip-btn { height: 33px; padding: 0 9px; background: var(--surface); border-color: transparent; font-size: 14px; gap: 5px; }
.home-center .chip-btn:hover { background: var(--surface-2); border-color: var(--border); }
.home-center .chip-btn .i { width: 15px; height: 15px; }
.chip-btn { border-radius: 8px; }
.send { background: var(--brand); color: var(--brand-ink); border-radius: 12px; width: 37px; height: 37px; box-shadow: 0 3px 8px rgba(8, 127, 145, .13); }
.send:hover:not(:disabled) { background: var(--brand-hover); }
.home-center .suggest { gap: 8px; max-width: 820px; align-self: center; }
.home-center .suggest button, .home-center .suggest a, .ask-chips button { height: auto; min-height: 32px; font-size: 14px; padding: 6px 12px; border-color: var(--border); border-radius: 8px; background: transparent; }
.suggest button:hover, .suggest a:hover, .ask-chips button:hover { background: var(--surface); border-color: var(--border-strong); color: var(--brand); }
.composer-hint { display: flex; align-items: center; justify-content: flex-start; gap: 6px; font-size: 14px; color: var(--text-3); padding: 0 5px; }
.composer-hint > span { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.composer-hint .i { width: 13px; height: 13px; }
.composer-hint kbd { font-size: 13px; }
.home .thread { border: 0; padding-top: 12px; gap: 22px; }
.ai-msg { gap: 13px; }
.ai-msg p { font-size: 16px; line-height: 1.85; }
.ai-dot { background: var(--brand-soft); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--border)); border-radius: 10px; flex-basis: 32px; height: 32px; }
.user-msg { background: var(--surface); border: 1px solid var(--border); font-size: 16px; padding: 11px 16px; }
.metric b { font-size: 34px; color: var(--text); }

/* 上新、设计与编辑：内容密度跟任务匹配 */
ol.flow { display: flex; gap: 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin: 0 0 24px; flex-wrap: wrap; }
ol.flow li { padding: 3px 0; }
ol.flow li + li::before { width: 30px; margin: 0 12px; background: var(--border); }
ol.flow a, ol.flow div { font-size: 14px; }
ol.flow i { width: 26px; height: 26px; font-size: 14px; border-color: var(--border-strong); }
ol.flow .now i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--brand-soft); }
ol.flow .now a, ol.flow .now div { color: var(--brand); }
.start2 { gap: 22px; margin-bottom: 32px; }
.start-card { padding: 25px; gap: 20px; }
.sc-head { gap: 13px; }
.sc-head h2 { font-size: 19px; }
.sc-head p { font-size: 14px; line-height: 1.8; margin-top: 4px; }
.sc-ic { background: var(--surface-2); border: 1px solid var(--border); width: 42px; height: 42px; }
.sc-ic.ai { border-color: color-mix(in srgb, var(--brand) 15%, var(--border)); }
.start-card .dropzone { min-height: 165px; border-radius: 12px; background: var(--surface-2); border-color: var(--border-strong); }
.sc-form textarea { min-height: 165px; background: var(--surface-2); padding: 14px; line-height: 1.8; font-size: 16px; }
.sc-foot { gap: 12px; }
.run-row { padding: 15px 22px; gap: 16px; }
.rr-main b { font-size: 16px; font-weight: 600; }
.rr-main em { font-size: 14px; margin-top: 2px; }
.rr-state { font-size: 14px; }
.sub-h { font-size: 16px; margin: 26px 0 14px; }
.work { gap: 24px; grid-template-columns: minmax(0, 1fr) 320px; }
.work-main { gap: 20px; }
.work-head { align-items: center; }
.work-head h1 { font-size: 26px; }
.work-actions { gap: 8px; }
.agent, .ed-chat { border-radius: 16px; box-shadow: var(--shadow-sm); top: 22px; }
.agent-head, .chat-head { padding: 18px; background: var(--surface-2); }
.agent-head h2, .chat-head b { font-size: 16px; }
.agent-head .muted { font-size: 14px; }
.log { padding: 18px; gap: 14px; font-family: inherit; font-size: 14px; line-height: 1.75; }
.log li { gap: 10px; }
.log .run { color: var(--brand); }
.agent-say { padding: 16px; background: var(--surface-2); }
.agent-say textarea { background: var(--surface); line-height: 1.8; }
.agent-say-bar { flex-wrap: wrap; }
.pgrid2 { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.pc { border-radius: 15px; }
.pc-body { padding: 16px; gap: 10px; }
.pc-img { background: var(--surface-2); }
.pc.running { border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); }
.pc-tag.run { color: var(--brand-ink); }
.pc-name-in { font-size: 16px; border-color: transparent; background: var(--surface-2); }
.pc-name-in:focus { border-color: var(--brand); }
.ai-badge { background: var(--brand); color: var(--brand-ink); }
.pc-tag, .tile-badge { backdrop-filter: none; }
.dlayout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.dlayout > section { min-width: 0; }
.dbrief { border-radius: 16px; top: 22px; overflow: hidden; }
.dbrief .card-body { padding: 20px; }
.dbrief .card-head { padding: 20px; }
.dbrief .card-head p { font-size: 14px; }
.dbrief .card-foot { padding: 18px 20px; }
.dgrid, .dgrid.big { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 20px; }
.ditem { border-radius: 15px; border-color: var(--border); }
.ditem.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.dpick { padding: 15px; gap: 8px; }
.dpick b { font-size: 16px; }
.dpick em { font-size: 14px; line-height: 1.75; }
.dact, .drev { padding-left: 15px; padding-right: 15px; padding-bottom: 15px; }
.dact .btn { flex: 1; }
.dbusy { background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--brand); gap: 12px; }
.editor { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.ed-chat { height: calc(100dvh - 44px); }
.ed-sections { gap: 20px; }
.ed-sec { scroll-margin-top: 80px; }
.secnav { padding: 10px 0 14px; gap: 6px; }
.secnav button { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.secnav button:hover { color: var(--brand); border-color: var(--brand); }
.attr-row { grid-template-columns: 165px minmax(0, 1fr) 70px; padding: 16px 24px; gap: 14px; }
.attr-row .an { font-size: 14px; }
.ev { font-size: 14px; line-height: 1.7; }
.chat-head .ai-dot { border-radius: 10px; }
.msgs { padding: 18px; gap: 18px; background: var(--surface-2); }
.msg .bubble { line-height: 1.8; font-size: 16px; }
.msg.user .bubble { background: var(--brand); color: var(--brand-ink); }
.ed-chat > .composer { border: 0; border-radius: 0; box-shadow: none; padding: 14px; }
.input-row { border-radius: 11px; padding: 7px; }
.chat-fab { background: var(--brand); color: var(--brand-ink); }
.crows { gap: 24px; }
.crow-head { margin-bottom: 12px; flex-wrap: wrap; }
.crow-head b { font-size: 16px; }
.crow-regen { font-size: 14px; }
.crow-strip { gap: 12px; }
.tile { width: 130px; border-radius: 10px; }
.tile-badge.main { background: var(--brand); color: var(--brand-ink); }
.pub-sum { gap: 12px; }
.pub-sum > div { padding: 14px; background: var(--surface-2); }
.pub-sum span { font-size: 14px; }
.pub-act { padding-top: 8px; }

/* 待确认：固定清单与专注的内容面板 */
main.wide:has(.inbox) { padding: 0; max-width: none; }
.inbox { grid-template-columns: 310px minmax(0, 1fr); min-height: calc(100dvh - 59px); }
.inbox-list { background: var(--surface); max-height: calc(100dvh - 59px); }
.inbox-list header { padding: 28px 22px 22px; border-bottom: 1px solid var(--border); gap: 6px; }
.inbox-list h1 { font-size: 19px; }
.inbox-list header span { font-size: 14px; }
.inbox-row { padding: 15px 18px; gap: 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.inbox-row img, .inbox-row .ph { flex-basis: 44px; width: 44px; height: 52px; border-radius: 8px; }
.inbox-row.on { background: var(--brand-soft); }
.ir-main { gap: 8px; }
.ir-main b { font-weight: 600; font-size: 14px; }
.itag { font-size: 13px; padding: 2px 7px; }
.inbox-detail { min-width: 0; min-height: calc(100dvh - 59px); background: var(--bg); }
.dt-head { padding: 24px 30px; gap: 12px; }
.dt-head h2 { font-size: 18px; }
.dt-head p { font-size: 14px; }
.dt-body { padding: 26px 30px; max-width: 900px; gap: 20px; }
.icard > header, .icard-body, .icard > footer { padding: 17px 20px; }
.icard > header { font-size: 16px; }
.icard > footer { gap: 10px; flex-wrap: wrap; }
.dt-foot { padding: 17px 30px; gap: 12px; flex-wrap: wrap; box-shadow: 0 -5px 20px -12px rgba(24, 51, 70, .15); }

/* 模板、店铺、看板和管理页 */
.tpl-page { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
.tpl-list { top: 22px; gap: 8px; }
.tpl-list a { padding: 13px 14px; border-radius: 10px; font-size: 16px; }
.tpl-list a span { font-size: 14px; margin-top: 3px; }
.tpl-list a.on { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.tpl-list a.on b { color: var(--brand); }
.tpl-h { font-size: 16px; border-top: 1px solid var(--border); padding-top: 22px; margin-top: 16px; }
.tpl-grid { gap: 18px; }
.palette { gap: 10px; }
.pchip { padding: 6px; border-radius: 9px; }
.blank { background: var(--surface-2); border-radius: 12px; }
.blank em { color: var(--text-2); background: color-mix(in srgb, var(--surface) 94%, transparent); }
.store-grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 20px; }
.store-card { padding: 22px; gap: 18px; border-radius: 15px; }
.store-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: none; }
.store-no { width: 42px; height: 42px; font-size: 16px; border-radius: 11px; background: var(--surface-2); color: var(--brand); border: 1px solid var(--border); }
.store-card b { font-size: 16px; }
.store-card .meta { font-size: 14px; gap: 8px; flex-wrap: wrap; }
.stores-page { grid-template-columns: minmax(0, 1fr); gap: 22px; min-width: 0; }
.stores-page > .card, .stores-page > .side-stack { min-width: 0; max-width: 100%; }
.stores-page > .card > .table-wrap { max-width: 100%; overflow-x: auto; }
.stores-page .side-stack { gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.kpis { gap: 14px; }
.kpi { padding: 22px 20px; }
.kpi .l { font-size: 14px; color: var(--text-3); }
.kpi .n { font-size: 28px; font-weight: 650; letter-spacing: -.035em; margin: 8px 0; }
.kpi .cmp { font-size: 14px; }
.viz-root { --series-1: var(--brand); --series-2: #7c8fa8; --grid: var(--border); --axis: var(--text-3); }
.chart-body { padding-top: 16px; }
.legend { gap: 16px; font-size: 14px; }
.share i { background: var(--brand); }
div.flow { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
div.flow .flow-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 96px; align-items: center; font-size: 14px; gap: 14px; }
div.flow .flow-row .bar { display: block; height: 7px; }
div.flow .flow-row .bar i { display: block; height: 100%; border: 0; border-radius: 5px; }
.sync-bar { padding: 18px 22px; border-radius: 14px; }
.sync-bar .sb-left b { font-size: 16px; }
.sync-bar .muted.small { font-size: 14px; }
.ask-bar { box-shadow: var(--shadow-sm); border-color: var(--border); border-radius: 12px; min-height: 54px; }
.ask-bar input { font-size: 16px; }
.answer-box:not(:empty) { border-radius: 14px; padding: 24px; }
.toolbar { gap: 10px; margin-bottom: 20px; }
.seg { border: 1px solid var(--border); background: var(--surface-2); padding: 3px; border-radius: 9px; }
.seg button { font-size: 14px; min-height: 30px; padding: 4px 12px; }
.seg button.on { box-shadow: var(--shadow-sm); }
pre { line-height: 1.8; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); }

/* 登录：品牌与产品信息分开，用轨道隐喻 AI 协作 */
.auth-wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { padding: clamp(32px, 4vw, 64px); background: radial-gradient(ellipse at 20% 45%, rgba(16, 159, 179, .14), transparent 60%), #0b1b29; isolation: isolate; }
.auth-art::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(133, 183, 205, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(133, 183, 205, .035) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(transparent, #000 30%, transparent); }
.auth-art .brand b { color: #f1f6fa; font-size: 21px; letter-spacing: .04em; }
.auth-art .brand span { color: #8ca8bb; font-size: 14px; margin-top: 5px; }
.auth-art .brand .logo-mark { width: 44px; height: 44px; filter: none; }
.auth-story { position: relative; padding: 40px 0; max-width: 520px; }
.auth-art h2 { font-size: clamp(30px, 3vw, 46px); line-height: 1.45; font-weight: 600; letter-spacing: -.03em; max-width: 510px; position: relative; z-index: 1; }
.auth-kicker { color: #68c8d6; letter-spacing: .16em; font-size: 13px; font-weight: 600; margin-bottom: 22px; }
.auth-description { color: #9db1c0; max-width: 370px; line-height: 1.95; margin-top: 22px; font-size: 16px; }
.auth-art .feat { gap: 16px; margin-top: 30px; }
.auth-art .feat div { color: #9cb1c1; font-size: 14px; gap: 12px; }
.auth-art .feat .i { color: #65bfcf; width: 16px; height: 16px; }
.auth-art .foot { color: #7891a4; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.auth-orbit { position: relative; width: 240px; height: 150px; margin: 22px 0 12px; display: grid; place-items: center; pointer-events: none; }
.auth-orbit > .logo-mark { position: relative; z-index: 1; width: 64px; height: 64px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .18)); }
.auth-orbit-ring { position: absolute; inset: 23px 12px; border: 1px solid rgba(98, 179, 196, .22); border-radius: 50%; transform: rotate(-22deg); }
.auth-orbit-ring:nth-child(2) { inset: 7px 28px; transform: rotate(32deg); border-color: rgba(98, 179, 196, .12); }
.auth-orbit-ring:nth-child(3) { inset: 45px -10px; transform: rotate(-22deg); border-color: rgba(98, 179, 196, .12); }
.auth-orbit-ring:first-child::after { content: ''; position: absolute; top: 13px; right: 12px; width: 6px; height: 6px; background: #66dae4; border-radius: 50%; box-shadow: 0 0 14px rgba(102, 218, 228, .4); }
.auth-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.auth-flow { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin: 28px 0 0; padding: 0; list-style: none; color: #8da8b9; font-size: 14px; }
.auth-flow li { display: flex; align-items: center; gap: 7px; border: 1px solid rgba(141, 168, 185, .18); background: rgba(141, 168, 185, .04); padding: 6px 10px; border-radius: 7px; }
.auth-flow li i { font-style: normal; color: #64c5d2; font-size: 13px; }
.auth-flow .i { width: 12px; height: 12px; }
.auth-form { padding: 48px 36px; }
.auth-form .box { max-width: 360px; }
.auth-form h1 { font-size: 28px; letter-spacing: -.03em; }
.auth-form .sub { font-size: 16px; margin: 10px 0 34px; line-height: 1.8; }
.auth-form-head .auth-kicker { display: block; color: var(--brand); margin-bottom: 18px; }
.auth-form .form { gap: 22px; }
.auth-form input { min-height: 46px; }
.auth-form .btn { margin-top: 4px; min-height: 46px; }
.field > .password-wrap { position: relative; display: block; font-size: 16px; font-weight: 400; }
.password-wrap input { padding-right: 46px; }
.password-toggle { position: absolute; right: 6px; top: 6px; bottom: 6px; width: 34px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--text-3); display: grid; place-items: center; cursor: pointer; font-size: 14px; white-space: nowrap; }
.password-toggle:hover { color: var(--brand); background: var(--surface-2); }
.password-toggle .i { width: 16px; height: 16px; }
.auth-form-foot, .auth-security { font-size: 14px; color: var(--text-3); line-height: 1.8; display: flex; gap: 7px; align-items: flex-start; margin-top: 24px; }
.auth-form-foot .i, .auth-security .i { width: 14px; height: 14px; margin-top: 2px; }
.auth-error { font-size: 14px; line-height: 1.8; color: var(--red); background: var(--red-bg); padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--red) 20%, var(--border)); border-radius: 8px; }

/* 加载：真实状态 + 低干扰轨道与占位。动画只发生在正在等待的元素。 */
.ai-loading { width: 100%; padding: 60px 0 30px; max-width: 1100px; margin: 0 auto; }
.ai-loading-main { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 20px; }
.ai-loading-orbit { position: relative; flex: 0 0 54px; height: 54px; display: grid; place-items: center; color: var(--brand); }
.ai-loading-orbit > .i { width: 20px; height: 20px; }
.ai-loading-orbit > span { position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border)); border-radius: 50%; }
.ai-loading-orbit > span:nth-child(1) { border-top: 2px solid var(--brand); animation: engine-orbit 2.8s linear infinite; }
.ai-loading-orbit > span:nth-child(2) { inset: 7px; border-bottom: 1px solid var(--brand); animation: engine-orbit 3.6s linear infinite reverse; }
.ai-loading-orbit > span:nth-child(3) { inset: -5px; border-style: dashed; opacity: .28; animation: engine-orbit 18s linear infinite; }
.ai-loading-copy strong { display: block; font-size: 16px; font-weight: 600; color: var(--text); }
.ai-loading-copy p { margin: 5px 0 0; font-size: 14px; color: var(--text-3); max-width: 360px; line-height: 1.8; }
.ai-loading-skeleton { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 42px; }
.ai-skeleton-card { padding: 24px; min-height: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; display: grid; align-content: center; gap: 14px; }
.ai-skeleton-card > span { display: block; height: 9px; border-radius: 5px; background: linear-gradient(90deg, var(--sunk) 8%, color-mix(in srgb, var(--sunk) 40%, var(--surface)) 40%, var(--sunk) 72%); background-size: 250% 100%; animation: engine-shimmer 2s ease-in-out infinite; }
.ai-skeleton-card > span:first-child { width: 36%; height: 12px; }
.ai-skeleton-card > span:nth-child(2) { width: 87%; animation-delay: .1s; }
.ai-skeleton-card > span:nth-child(3) { width: 64%; animation-delay: .2s; }
.ai-loading.compact { padding: 28px 12px; }
.ai-loading.compact .ai-loading-main { justify-content: flex-start; padding: 0; gap: 14px; }
.ai-loading.compact .ai-loading-orbit { flex-basis: 36px; height: 36px; }
.ai-loading.compact .ai-loading-orbit > .i { width: 14px; height: 14px; }
.ai-loading.compact .ai-loading-copy strong { font-size: 14px; }
.ai-loading.compact .ai-loading-copy p { font-size: 14px; }
.ai-loading.compact .ai-loading-skeleton { display: none; }
.busy-spinner { width: 13px; height: 13px; flex: none; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: engine-orbit .8s linear infinite; }
.is-busy { cursor: progress; }
.btn.is-busy { opacity: .8; }
.send.is-busy .busy-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loading { padding: 80px 16px; gap: 7px; }
.loading span { width: 5px; height: 5px; }
.spin { border-width: 1.5px; }
.spin-dot .i { animation: engine-breathe 2s ease-in-out infinite; }
.live.on { background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent); animation: engine-breathe 2.4s ease-in-out infinite; }
.pc.running .pc-img::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.16) 48%, transparent 75%); background-size: 250% 100%; animation: engine-shimmer 3s linear infinite; }
@keyframes engine-orbit { to { transform: rotate(360deg); } }
@keyframes engine-shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes engine-breathe { 50% { opacity: .5; } }
.start2 > .card + .card, .stats > .card + .card, .kpis > .card + .card { margin-top: 0; }
.start2 > .card { align-self: stretch; }
.tpl-row.price label { display: grid; grid-template-columns: auto minmax(0, 1fr); white-space: nowrap; }
.tpl-row.price label input { min-width: 0; width: 100%; }
.workspace-status::before { display: inline-block; }
.workspace-status > i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gray-dot); }
.workspace-status > i.ready { background: var(--green-dot); }

/* 窄屏：覆盖早期样式的冲突，保持导航与表单可用。 */
@media (min-width: 1500px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1350px) {
  main { padding-left: 28px; padding-right: 28px; }
  .workspace-topbar { padding-left: 28px; padding-right: 28px; }
  .work { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .editor { grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
  .attr-row { grid-template-columns: 135px minmax(0, 1fr) 62px; gap: 10px; padding-left: 20px; padding-right: 20px; }
  .dlayout { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .tpl-page { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 1200px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .ed-chat { top: auto; height: min(640px, calc(100dvh - 110px)); }
  .attr-row { grid-template-columns: 160px minmax(0, 1fr); gap: 12px; }
  .attr-row .aa { grid-column: 2; }
}
@media (max-width: 1100px) and (min-width: 821px) {
  #app { grid-template-columns: 72px minmax(0, 1fr); }
  #app.bare { grid-template-columns: minmax(0, 1fr); }
  #nav { padding: 24px 10px 16px; align-items: center; }
  #nav .brand { padding: 0 0 22px; }
  #nav a { width: 44px; padding: 0; gap: 0; justify-content: center; }
  #nav .brand > div:last-child, #nav a span, #nav .who, #nav .nav-group { display: none; }
  #nav .me { padding-top: 15px; gap: 10px; }
  .auth-art { padding: 36px; }
  .auth-art h2 { font-size: 34px; }
}
@media (max-width: 1100px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .agent { position: static; max-height: none; }
  .dlayout { grid-template-columns: minmax(0, 1fr); }
  .dbrief { position: static; }
  .dbrief .card-body { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
  .dbrief .label { margin: 0; }
  .inbox { grid-template-columns: 270px minmax(0, 1fr); }
  .inbox-list { position: sticky; max-height: calc(100dvh - 59px); }
  .dt-head { padding: 22px; }
  .dt-body { padding: 22px; }
  .dt-foot { padding: 16px 22px; }
  .dt-pics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .start2, .tpl-page { grid-template-columns: minmax(0, 1fr); }
  .tpl-list { position: static; display: flex; overflow-x: auto; padding-bottom: 4px; }
  .tpl-list a { flex: 0 0 170px; }
}
@media (max-width: 820px) {
  html { scrollbar-gutter: auto; }
  #app, #app.bare { grid-template-columns: minmax(0, 1fr); }
  #nav { position: sticky; top: 0; height: auto; min-height: 66px; width: 100%; max-width: 100vw; z-index: 30; padding: 10px 12px; gap: 5px; border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: nowrap; align-items: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  #nav .brand { padding: 0 9px 0 0; gap: 0; flex: none; }
  #nav .brand .logo-mark { width: 34px; height: 34px; }
  #nav .brand > div:last-child, #nav .nav-group, #nav .nav-sep, #nav a span, #nav .who { display: none; }
  #nav a { flex: 0 0 40px; height: 40px; padding: 0; justify-content: center; gap: 0; }
  #nav a .badge { position: absolute; right: 0; top: -1px; min-width: 15px; height: 15px; padding: 0 3px; font-size: 13px; }
  #nav a.active::before { left: 10px; right: 10px; bottom: -1px; width: auto; height: 2px; border-radius: 3px; }
  #nav .me { flex: none; flex-direction: row; padding: 0 0 0 8px; margin: 0 0 0 auto; border: 0; gap: 4px; }
  #nav .me .avatar { display: none; }
  main, main.wide { padding: 22px 18px 46px; }
  .workspace-topbar { padding: 15px 18px; gap: 12px; }
  .workspace-status { font-size: 13px; }
  .page-head { margin-bottom: 22px; align-items: flex-start; }
  h1 { font-size: 25px; }
  .page-head .actions { width: 100%; }
  .card-head, .card-body { padding: 19px; }
  .card-foot { padding: 15px 19px; }
  .card-head { flex-wrap: wrap; }
  .cols, .cols.wide-left, .bsteps, .tpl-layout { grid-template-columns: minmax(0, 1fr); }
  .home.home-center { min-height: calc(100dvh - 190px); padding: 35px 0; gap: 23px; }
  .home-center .home-hi h1 { font-size: 33px; }
  .home-center .composer { padding: 18px 15px 13px; border-radius: 18px; }
  .home-center .composer textarea { min-height: 132px; font-size: 17px; }
  .home-center .suggest { gap: 7px; }
  .home-center .suggest button, .home-center .suggest a { font-size: 14px; padding: 6px 9px; }
  .start-card { padding: 21px; }
  ol.flow { padding: 12px; gap: 10px 0; }
  ol.flow li + li::before { width: 16px; margin: 0 8px; }
  ol.flow a, ol.flow div { gap: 7px; font-size: 14px; }
  ol.flow em { display: none; }
  .attr-row { grid-template-columns: minmax(0, 1fr); padding: 17px 19px; gap: 10px; }
  .attr-row .aa { grid-column: 1; text-align: left; }
  .attr-row .an { font-size: 16px; }
  .inbox { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .inbox-list { position: static; max-height: 340px; border-right: 0; border-bottom: 1px solid var(--border); }
  .inbox-list header { padding: 22px 20px 16px; }
  .inbox-row { padding: 13px 20px; }
  .inbox-detail { min-height: 60vh; }
  .dt-head, .dt-body { padding: 20px; }
  .dt-head .btn { margin-left: 0; }
  .dt-foot { padding: 14px 20px; }
  .inbox-empty { margin: 45px auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 18px; }
  .kpi .n { font-size: 25px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sync-bar { padding: 18px; gap: 14px; }
  .sync-bar .sb-right { gap: 8px; }
  .sync-bar .sb-left { align-items: flex-start; }
  .sb-sep { display: none; }
  .store-grid { gap: 14px; }
  .store-card { padding: 19px; }
  .row3, .form .row2 { grid-template-columns: minmax(0, 1fr); }
  .tpl-row.price { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; }
  .tpl-row.price > :first-child { grid-column: 1 / -1; }
  .tpl-row.attr { grid-template-columns: minmax(0, 1fr) 28px; }
  .tpl-row.attr > :not(:last-child) { grid-column: 1; }
  .tpl-row.attr > :last-child { grid-column: 2; grid-row: 1; }
  .tpl-form .range { flex-wrap: wrap; }
  .kv-list li { grid-template-columns: 100px minmax(0, 1fr); }
  .pub-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-art { display: flex; min-height: 0; padding: 24px 28px; background: #0b1b29; }
  .auth-art .brand { padding: 0; gap: 12px; }
  .auth-art .brand b { font-size: 20px; }
  .auth-art .brand .logo-mark { width: 38px; height: 38px; }
  .auth-art .auth-story, .auth-art .feat, .auth-art .foot, .auth-orbit { display: none; }
  .auth-form { padding: 42px 28px 64px; align-items: start; }
  .auth-form .box { margin-top: 4vh; max-width: 390px; }
  .auth-form h1 { font-size: 27px; }
  .ai-loading { padding: 36px 0 20px; }
  .ai-loading-skeleton { margin-top: 30px; gap: 12px; }
  .ai-skeleton-card { padding: 18px; min-height: 130px; }
  .modal { padding: 24px; }
}
@media (max-width: 560px) {
  main, main.wide { padding-left: 15px; padding-right: 15px; }
  .workspace-context b { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace-status { display: none; }
  .home.home-center { gap: 22px; padding-top: 26px; justify-content: flex-start; }
  .home-center .home-hi h1 { font-size: 30px; }
  .home-center .home-hi p { font-size: 14px; line-height: 1.85; }
  .home-center .composer textarea { min-height: 150px; font-size: 16px; }
  .home-center .chip-btn { font-size: 14px; height: 31px; padding: 0 6px; }
  .home-center .composer-bar { gap: 6px; }
  .home-center .composer-bar .select-chip { max-width: calc(50% - 9px); }
  .home-center .dd-chip { min-width: 0; }
  .home-center .dd-label { max-width: 90px; }
  .home-center .send { width: 33px; height: 33px; border-radius: 10px; }
  .home-center .suggest { justify-content: flex-start; }
  .composer-hint { font-size: 13px; align-items: flex-start; }
  .composer-hint > span:last-child { display: none; }
  .page-head .actions > .btn { flex: 1; }
  .page-head .actions .dd { max-width: 100%; }
  .start-card { padding: 18px; }
  .sc-head h2 { font-size: 18px; }
  .sc-head p { font-size: 14px; }
  .sc-foot > span { max-width: 100%; }
  .run-row { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 15px; }
  .run-row img, .run-row .ph { width: 38px; height: 44px; }
  .rr-state { grid-column: 2; margin-top: -6px; }
  ol.flow { justify-content: space-between; gap: 12px 0; }
  ol.flow li + li::before { width: 9px; margin: 0 5px; }
  ol.flow i { width: 21px; height: 21px; font-size: 13px; }
  ol.flow a, ol.flow div { font-size: 13px; gap: 5px; }
  .card-head, .card-body { padding: 17px; }
  .card-head h2 { font-size: 17px; }
  .dt-head, .dt-body { padding: 17px; }
  .icard > header, .icard-body, .icard > footer { padding: 15px; }
  .dt-foot { padding: 13px 17px; }
  .dt-pics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dgrid, .dgrid.big { grid-template-columns: minmax(0, 1fr); }
  .dpick { padding: 15px; }
  .ditem.review .dimg { max-height: 500px; }
  .kpi { padding: 17px 15px; }
  .kpi .n { font-size: 23px; }
  .kpi .cmp { font-size: 13px; }
  .legend { gap: 10px; }
  .sync-bar .sb-right { align-items: flex-end; }
  .sync-bar .dd { max-width: 150px; }
  .toolbar { align-items: stretch; }
  .toolbar .seg { max-width: 100%; overflow-x: auto; }
  .toolbar .seg button { white-space: nowrap; }
  .tile { width: 112px; }
  .crow-nav { display: none; }
  .crow-head { gap: 6px; }
  .crow-regen { margin-left: 0; }
  .pub-sum { grid-template-columns: minmax(0, 1fr); }
  .pub-act .btn { width: 100%; }
  .blank { width: min(150px, 43vw); }
  .pchip input:not([type=color]) { width: 70px; }
  .ask-bar { padding-left: 13px; gap: 7px; }
  .ask-bar input { font-size: 14px; }
  .ask-chips { gap: 6px; }
  .ask-chips button { font-size: 14px; }
  .ai-loading-main { align-items: center; gap: 15px; padding: 15px 5px; }
  .ai-loading-orbit { flex-basis: 44px; height: 44px; }
  .ai-loading-copy strong { font-size: 16px; }
  .ai-loading-copy p { font-size: 14px; }
  .ai-loading-skeleton { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ai-skeleton-card { min-height: 100px; }
  .ai-skeleton-card:not(:first-child) { display: none; }
  .ai-loading.compact .ai-loading-main { align-items: flex-start; }
  .modal-foot .btn { flex: 1; }
}
@media (hover: none) { .tile-del, .pc-del { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ai-loading-orbit > span { animation: none !important; }
  .ai-skeleton-card > span { background: var(--sunk); animation: none !important; }
}

/* ========== 资料暂存与执行前确认：文件用途保持明确 ========== */
.intake-uploads { min-width: 0; width: 100%; display: grid; gap: 12px; }
.intake-upload-controls { display: flex; flex-wrap: wrap; gap: 7px; }
.intake-upload { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; min-height: 34px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .16s ease, color .16s ease, background .16s ease; }
.intake-upload .i { width: 14px; height: 14px; }
.intake-upload:hover, .intake-upload:focus-within, .intake-upload.intake-over { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.intake-dragging { outline: 2px dashed var(--brand); outline-offset: 5px; }
.intake-over:not(.intake-upload) { background: var(--brand-soft); }
.intake-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; min-width: 0; }
.intake-asset { display: grid; grid-template-columns: 48px minmax(0, 1fr) 23px; align-items: center; gap: 10px; min-width: 0; margin: 0; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.intake-asset-preview { display: grid; place-items: center; width: 48px; height: 56px; overflow: hidden; border-radius: 6px; background: var(--surface-2); color: var(--text-3); }
.intake-asset-preview img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.intake-asset-meta { display: grid; gap: 3px; min-width: 0; }
.intake-asset-meta > b { font-size: 14px; font-weight: 500; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.intake-asset-meta .dd { min-width: 0; width: 100%; }
.intake-asset-meta .dd-btn { width: 100%; min-height: 25px; height: 25px; border: 0; padding: 0; box-shadow: none; background: transparent; color: var(--text-3); font-size: 13px; }
.intake-asset-meta .dd-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.intake-asset-meta .dd-chev { width: 12px; }
.intake-role { min-height: 25px; height: 25px; padding: 0 14px 0 0; font-size: 13px; border: 0; background: transparent; }
.intake-remove { display: inline-grid; place-items: center; flex: none; width: 26px; height: 28px; padding: 0; border: 0; border-radius: 7px; color: var(--text-3); background: transparent; cursor: pointer; }
.intake-remove .i { width: 15px; height: 15px; }
.intake-remove:hover { color: var(--red); background: var(--red-bg); }
.intake-feedback { padding: 8px 10px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 14px; line-height: 1.7; }
.home .intake-uploads { margin: 2px 0 12px; text-align: left; }
.sc-form .intake-uploads { margin-bottom: 4px; }
.intake-backdrop { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 26px; background: rgba(6, 19, 31, .58); backdrop-filter: blur(5px); }
.intake-confirm { display: flex; flex-direction: column; width: min(100%, 1000px); max-height: calc(100dvh - 52px); min-width: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); outline: 0; }
.intake-confirm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex: none; padding: 25px 30px 21px; border-bottom: 1px solid var(--border); }
.intake-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 7px; color: var(--brand); font-size: 14px; font-weight: 600; }
.intake-kicker .i { width: 14px; height: 14px; }
.intake-confirm-head h2 { font-size: 22px; font-weight: 600; line-height: 1.5; letter-spacing: -.03em; }
.intake-confirm-head > .intake-remove { margin: -4px -8px 0 0; }
.intake-confirm-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 30px 30px; }
.intake-confirm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 32px; min-width: 0; }
.intake-confirm-fields { display: grid; gap: 20px; min-width: 0; }
.intake-destination { display: flex; flex-wrap: wrap; gap: 9px 16px; padding-bottom: 3px; color: var(--text-3); font-size: 14px; }
.intake-destination > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.intake-destination b { color: var(--text-2); font-weight: 500; overflow-wrap: anywhere; }
.intake-destination .i { width: 15px; height: 15px; }
.intake-confirm .field { margin: 0; min-width: 0; }
.intake-confirm textarea { min-height: 130px; resize: vertical; font-size: 16px; line-height: 1.85; }
.intake-confirm .field .dd { width: 100%; min-width: 0; }
.intake-confirm .field .dd-btn { width: 100%; }
.intake-confirm .intake-side, .intake-confirm .intake-colors { min-width: 0; border: 0; padding: 0; margin: 0; }
.intake-confirm legend { display: block; width: 100%; margin-bottom: 9px; padding: 0; color: var(--text-2); font-size: 14px; font-weight: 600; }
.intake-side > label { display: inline-flex; align-items: center; gap: 8px; margin-right: 23px; font-size: 14px; cursor: pointer; }
.intake-side input[type=radio], .intake-color input[type=checkbox] { flex: none; width: 14px; height: 14px; min-height: 0; padding: 0; margin: 0; accent-color: var(--brand); }
.intake-color-options { display: flex; flex-wrap: wrap; gap: 7px; }
.intake-color { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 33px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 14px; cursor: pointer; }
.intake-color:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--text); }
.intake-color > i { display: block; flex: none; width: 12px; height: 12px; border: 1px solid rgba(80, 91, 104, .2); border-radius: 50%; background: var(--intake-color); }
.intake-color-map { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 10px; color: var(--text-3); font-size: 13px; line-height: 1.8; }
.intake-color-map > span { display: inline-block; }
.intake-color-map b { padding: 0 3px; color: var(--brand); font-weight: 400; }
.intake-color-map em { margin-left: 3px; font-style: normal; }
.intake-confirm-assets { display: grid; gap: 22px; min-width: 0; }
.intake-confirm-group { min-width: 0; }
.intake-confirm-group h3 { margin-bottom: 10px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.intake-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.intake-preview-grid figure { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.intake-preview-grid img { display: block; width: 100%; height: 170px; object-fit: contain; background: #fff; }
.intake-preview-grid figcaption { padding: 8px 10px; overflow: hidden; color: var(--text-3); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.intake-document { display: grid; place-items: center; height: 110px; color: var(--text-3); }
.intake-document .i { width: 30px; height: 30px; }
.intake-empty { display: grid; place-items: center; gap: 12px; min-height: 230px; padding: 24px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--text-3); font-size: 14px; }
.intake-empty .i { width: 28px; height: 28px; color: var(--brand); }
.intake-confirm-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; flex: none; padding: 17px 30px; border-top: 1px solid var(--border); background: var(--surface-2); }
@media (max-width: 700px) {
  .intake-backdrop { padding: 12px; }
  .intake-confirm { max-height: calc(100dvh - 24px); border-radius: 15px; }
  .intake-confirm-head { padding: 19px 20px 16px; }
  .intake-confirm-head h2 { font-size: 21px; }
  .intake-confirm-body { padding: 20px; }
  .intake-confirm-grid { grid-template-columns: minmax(0, 1fr); gap: 27px; }
  .intake-confirm-fields { gap: 18px; }
  .intake-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .intake-preview-grid img { height: 130px; }
  .intake-confirm-foot { padding: 14px 20px; }
}
@media (max-width: 420px) {
  .intake-upload-controls { gap: 6px; }
  .intake-upload { padding: 6px 8px; font-size: 13px; }
  .intake-list { grid-template-columns: minmax(0, 1fr); }
  .intake-confirm-head h2 { font-size: 19px; }
  .intake-confirm-body { padding: 17px; }
  .intake-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-color { font-size: 13px; padding: 6px; }
  .intake-confirm-foot { padding: 13px 17px; }
  .intake-confirm-foot .btn { flex: 1; min-width: 0; }
}

/* 颜色参考识别：仅扫描衣身颜色，不表示商品开始生成。 */
.intake-color-resolution { display: flex; align-items: flex-start; gap: 11px; margin: 0 0 13px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.intake-color-status { min-width: 0; }
.intake-color-status > strong { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); }
.intake-color-status > p { margin-top: 3px; font-size: 13px; line-height: 1.75; color: var(--text-3); overflow-wrap: anywhere; }
.intake-color-status .link-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 13px; }
.intake-color-status .link-btn .i { width: 12px; height: 12px; }
.intake-color-scan { display: grid; place-items: center; position: relative; flex: none; width: 32px; height: 36px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--brand); background: var(--surface); }
.intake-color-scan > .i { width: 18px; height: 18px; opacity: .5; }
.intake-color-scan > i { position: absolute; left: 2px; right: 2px; top: 0; height: 1px; background: var(--brand); box-shadow: 0 0 7px var(--brand); animation: intake-color-scan 1.9s ease-in-out infinite; }
@keyframes intake-color-scan { 0%, 100% { transform: translateY(4px); opacity: .4; } 50% { transform: translateY(29px); opacity: 1; } }
.intake-color-resolution.has-error { border-color: var(--amber-dot); background: var(--amber-bg); }
.intake-color-resolution.has-error .intake-color-status > strong { color: var(--amber); }
.intake-color-resolution.is-ready { border-color: var(--border); background: var(--brand-soft); }
.intake-color-resolution.is-ready .intake-color-status > strong { color: var(--brand); }
.intake-color:has(input:disabled) { cursor: wait; opacity: .5; }
.intake-color-map.from-images { display: grid; gap: 9px; }
.intake-color-map > .intake-image-match { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.intake-image-match:last-child { border-bottom: 0; padding-bottom: 0; }
.intake-match-source, .intake-match-target { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.intake-match-source > i, .intake-match-target > i { width: 11px; height: 11px; flex: none; border: 1px solid rgba(80, 91, 104, .2); border-radius: 50%; background: var(--match-color); }
.intake-match-target > strong { font-size: 13px; font-weight: 500; color: var(--text-2); }
.intake-image-match small { padding: 1px 5px; border-radius: 4px; color: var(--amber); background: var(--amber-bg); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .intake-color-scan > i { animation: none !important; transform: translateY(16px); opacity: .7; } }

/* 对照颜色时保留原图，长色卡也能边看边确认。 */
@media (min-width: 701px) {
  .intake-confirm-assets { position: sticky; top: 0; align-self: start; max-height: 420px; overflow-y: auto; }
  .intake-confirm-group:only-child .intake-preview-grid { grid-template-columns: minmax(0, 1fr); }
  .intake-confirm-group:only-child .intake-preview-grid img { height: 220px; }
}
.design-ref { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.research-sources { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 15px; font-size: 14px; }
.research-sources summary { color: var(--brand); cursor: pointer; }
.research-sources ol { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 14px; }
.research-sources a { line-height: 1.7; overflow-wrap: anywhere; }
.research-sources p { margin-top: 4px; }

/* 自动识别资料用途：衣色以结果展示，印花支持正反双面。 */
.intake-upload-main { border-color: var(--border-strong); color: var(--text-2); }
.intake-asset-meta .intake-role-label { font-size: 13px; color: var(--text-3); line-height: 1.7; }
.intake-color-heading { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.intake-color-results { display: flex; flex-wrap: wrap; gap: 7px; }
.intake-color-result { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.intake-color-result > i { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(80, 91, 104, .2); background: var(--match-color); }
.intake-color-result > b { font-size: 14px; font-weight: 500; color: var(--text-2); }
.intake-color-result > em { font-size: 13px; font-style: normal; color: var(--text-3); }
.intake-color-source { margin-top: 8px; color: var(--text-3); font-size: 13px; line-height: 1.8; }
.intake-image-match .intake-source-label { color: var(--text-3); background: var(--sunk); }
.intake-side { display: flex; flex-wrap: wrap; gap: 8px 0; }
.intake-side > legend { flex: 0 0 100%; }
.ditem.review .dimg:has(.dpreview-pair) { aspect-ratio: 3 / 2; }
.dpreview-pair { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; width: 100%; height: 100%; overflow: hidden; background: var(--border); }
.dpreview-pair > span { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.ditem.review .dimg .dpreview-pair > span > img { width: 100%; height: 100%; object-fit: contain; }
.dpreview-pair > span > em { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 6px; background: rgba(8, 24, 35, .7); color: #fff; font-size: 13px; font-style: normal; line-height: 1.6; white-space: nowrap; }
.dimg:has(.dpreview-pair) .dart { right: calc(50% - 32px); bottom: 8px; z-index: 2; }
@media (max-width: 560px) {
  .intake-upload-main { flex: 1 0 100%; justify-content: center; }
  .intake-side > label { margin-right: 17px; font-size: 14px; }
  .intake-color-result { padding: 6px 8px; }
  .intake-color-result > b { font-size: 13px; }
  .intake-color-result > em { font-size: 13px; }
  .intake-match-source, .intake-match-target { gap: 4px; }
  .dpreview-pair > span > em { bottom: 8px; padding: 3px 8px; }
}

/* 2026-10 可读性：全站固定字号已同步放大，窄屏也保留文字层级。 */
:root { --text-3: #526673; --side-text: #4d6474; }
input::placeholder, textarea::placeholder { opacity: 1; }
body { font-size: 16px; }
#nav { overflow-y: auto; }
#nav a { min-height: 46px; font-size: 16px; }
#nav .brand .tagline { font-size: 13px; letter-spacing: .03em; }
#nav a .badge { min-width: 24px; height: 24px; padding: 0 5px; line-height: 1; }
#nav .me .who { min-width: 0; }
#nav .me .who span { font-size: 13px; }
.workspace-topbar { min-height: 64px; }
.workspace-status .i { width: 17px; height: 17px; }
.btn { min-height: 42px; }
.btn.sm { min-height: 38px; }
.btn.lg { min-height: 48px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]), .dd-btn { min-height: 44px; }
.dd-chip .dd-btn { min-height: 34px; }
.dd-menu { grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.dd-menu:has(.dd-search) { grid-template-rows: auto minmax(0, 1fr); }
.dd-list { min-height: 0; }
.intake-asset-meta .dd-btn { min-height: 30px; height: auto; }
.intake-asset-meta .intake-role-label { font-size: 14px; }
.intake-asset-meta > b { font-size: 14px; }
.intake-upload { min-height: 40px; font-size: 14px; gap: 8px; }
.intake-upload .i { width: 17px; height: 17px; }
.intake-side > label { min-height: 38px; font-size: 16px; }
.intake-side input[type=radio], .intake-color input[type=checkbox] { width: 17px; height: 17px; }
.intake-color { min-height: 38px; }
.intake-color-status > strong { font-size: 16px; }
.intake-color-status > p, .intake-color-source, .intake-color-result > em { font-size: 14px; }
.intake-color-result > b { font-size: 16px; }
.intake-remove { min-height: 32px; width: 32px; }
.intake-asset { grid-template-columns: 48px minmax(0, 1fr) 32px; }
.intake-preview-grid figcaption { font-size: 14px; }
.pill, .tag { line-height: 1.55; }
.crow-head { flex-wrap: wrap; row-gap: 9px; }
.crow-regen { white-space: normal; }
.tabbar { flex-wrap: wrap; }
.flow { row-gap: 12px; }
.sc-foot { flex-wrap: wrap; gap: 10px; }
.sc-foot .btn { margin-left: auto; }

/* 青蓝核心、连线与聚焦反馈，集中在 AI 入口和实际等待状态。 */
.home.home-center { max-width: 960px; padding: 22px 0 42px; gap: 24px; min-height: calc(100dvh - 160px); }
.home.home-center::before { top: 0; height: 560px; width: 100%; background: radial-gradient(ellipse at 50% 35%, rgba(24, 186, 216, .12), rgba(53, 111, 239, .035) 45%, transparent 70%); }
.home-hi { gap: 13px; }
.home-engine { display: grid; place-items: center; position: relative; width: 88px; height: 88px; margin: 0 auto 2px; }
.home-engine > b { display: grid; place-items: center; position: relative; width: 52px; height: 52px; border-radius: 18px; border: 1px solid rgba(53, 181, 226, .5); color: #a9f9ff; background: linear-gradient(145deg, #143746, #10316a); box-shadow: 0 9px 32px -8px rgba(24, 130, 213, .45), inset 0 1px 1px rgba(255,255,255,.2); transform: rotate(-7deg); }
.home-engine > b > .i { width: 27px; height: 27px; transform: rotate(7deg); }
.home-engine > span { position: absolute; inset: 3px; border: 1px solid rgba(25, 157, 206, .2); border-radius: 50%; transform: rotate(-25deg) scaleY(.62); }
.home-engine > span:nth-child(2) { inset: -1px; transform: rotate(38deg) scaleY(.62); }
.home-engine > span::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #24bcd5; left: 12px; top: 7px; box-shadow: 0 0 8px rgba(21,186,218,.35); }
.home-eyebrow { font-size: 14px; letter-spacing: .09em; }
.home-center .home-hi h1 { font-size: clamp(34px, 3.1vw, 46px); line-height: 1.35; font-weight: 700; }
.home-center .home-hi h1 > span { background: linear-gradient(105deg, #087f91, #2661bc); background-clip: text; -webkit-background-clip: text; color: transparent; }
.home-center .home-hi p.home-note { font-size: 18px; line-height: 1.8; color: var(--text-2); }
.home-center .home-hi p.home-stat { font-size: 14px; margin-top: 0; }
.home-center .composer { position: relative; border: 1px solid transparent; padding: 22px 24px 18px; border-radius: 24px; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #87c9d8, #b4c9ef 65%, #a4d8de) border-box; box-shadow: 0 14px 50px -26px rgba(20, 86, 135, .3); gap: 18px; }
.home-center .composer:focus-within { border-color: transparent; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 8%, transparent), 0 18px 50px -20px rgba(25, 106, 163, .23); }
.composer-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--brand); font-size: 15px; font-weight: 600; text-align: left; }
.composer-heading > span { display: inline-flex; align-items: center; gap: 8px; }
.composer-heading .i { width: 18px; height: 18px; }
.composer-heading .composer-capabilities { font-size: 14px; font-weight: 400; color: var(--text-3); gap: 9px; }
.composer-capabilities i { width: 3px; height: 3px; border-radius: 50%; background: #77a7ba; }
.home-center .composer textarea { min-height: 108px; font-size: 18px; }
.home-center .composer-bar { flex-wrap: wrap; gap: 10px; }
.home-center .chip-btn { height: auto; min-height: 40px; font-size: 15px; padding: 0 10px; }
.home-center .chip-btn .dd-btn { font-size: 15px; }
.home-center .composer-bar .select-chip { max-width: 100%; }
.home-center .send { width: 44px; height: 44px; margin-left: auto; background: linear-gradient(140deg, #0697a9, #176cad); color: #fff; flex: 0 0 44px; }
.home-center .send:hover:not(:disabled) { box-shadow: 0 5px 16px -4px rgba(8, 127, 145, .5); transform: translateY(-1px); }
.home .intake-uploads { margin: 0; }
.home-center .suggest { justify-content: center; max-width: none; gap: 10px; }
.home-center .suggest button, .home-center .suggest a { font-size: 14px; min-height: 38px; padding: 7px 13px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.composer-hint { font-size: 14px; gap: 8px; padding: 0 4px; margin-top: -8px; }
.composer-hint .i { width: 16px; height: 16px; }
.ai-loading-orbit { background: radial-gradient(circle, color-mix(in srgb, var(--brand) 12%, transparent), transparent 68%); }
.ai-loading-orbit > .i { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--brand) 35%, transparent)); }
.ai-loading-copy strong { font-size: 18px; }
.ai-loading-copy p { font-size: 16px; }
.ai-loading.compact .ai-loading-copy strong { font-size: 16px; }
.ai-loading.compact .ai-loading-copy p { font-size: 14px; }
.busy-spinner { width: 17px; height: 17px; border-width: 2px; }

@media (prefers-color-scheme: dark) {
  :root { --text-3: #a4bacb; --side-text: #aec3d2; }
  .home-center .home-hi h1 > span { background-image: linear-gradient(105deg, #75e8e8, #83aeff); }
  .home-center .composer { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #327986, #36558a 65%, #327880) border-box; }
}
@media (max-width: 820px) {
  #nav { overflow-y: hidden; }
  #nav a { min-height: 44px; flex-basis: 44px; }
  #nav a .badge { min-width: 22px; height: 22px; font-size: 13px; top: -4px; right: -4px; }
  .home.home-center { padding: 24px 0 32px; min-height: auto; }
  .home-center .home-hi h1 { font-size: 34px; }
  .home-center .home-hi p.home-note { font-size: 17px; }
  .home-center .composer { padding: 20px 18px 16px; }
  .home-center .composer textarea { font-size: 18px; }
}
@media (max-width: 560px) {
  .home.home-center { gap: 24px; }
  .home-engine { width: 76px; height: 76px; }
  .home-center .home-hi h1 { font-size: 31px; }
  .home-center .home-hi h1 > span { display: block; }
  .home-center .home-hi p.home-note { font-size: 16px; }
  .home-center .home-hi p.home-stat { font-size: 14px; }
  .home-center .composer { padding: 18px 16px 14px; }
  .composer-heading { gap: 8px; }
  .composer-heading .composer-capabilities { font-size: 13px; gap: 6px; }
  .home-center .composer textarea { min-height: 125px; font-size: 17px; }
  .home-center .chip-btn { padding: 0 7px; font-size: 14px; }
  .home-center .chip-btn .dd-btn { font-size: 14px; }
  .home-center .composer-bar { gap: 7px; }
  .home-center .composer-bar > .chip-btn:first-child { width: 100%; padding: 0; }
  .home-center .composer-bar .select-chip { max-width: calc(50% - 29px); }
  .home-center .dd-label { max-width: 110px; }
  .home-center .suggest { justify-content: flex-start; }
  .composer-hint { font-size: 14px; margin-top: -8px; }
  .intake-upload-controls { gap: 8px; }
  .intake-upload { padding: 8px 10px; font-size: 14px; }
  .intake-side > label { font-size: 16px; }
  ol.flow { justify-content: flex-start; }
  ol.flow li + li::before { width: 12px; margin: 0 7px; }
  ol.flow i { min-width: 25px; height: 25px; }
  ol.flow a, ol.flow div { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-center .send:hover:not(:disabled) { transform: none; }
}

/* 印花位置（卡片上选正面/背面/双面）与色块采集色（确认弹层） —— Claude 流程改动，字号已对齐 10 月可读性调整，样式待 Codex 复审 */
.intake-side-pick { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding: 2px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.intake-side-pick > em { padding: 0 6px 0 8px; color: var(--text-3); font-size: 14px; font-style: normal; }
.intake-side-pick > button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: background .16s ease, color .16s ease; }
.intake-side-pick > button:hover { color: var(--text); }
.intake-side-pick > button[aria-checked="true"] { background: var(--brand-soft); color: var(--brand); }
.intake-color-result > small { margin-left: 4px; padding: 1px 6px; border-radius: 4px; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.intake-sample-name { display: inline-flex; align-items: center; gap: 6px; }
.intake-sample-name > i { width: 16px; height: 16px; flex: none; border: 1px solid rgba(80, 91, 104, .2); border-radius: 4px; background: var(--match-color); }
.intake-sample-name > input[data-sample-name]:not([type=checkbox]) { width: 150px; min-height: 34px; padding: 2px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; }
.intake-sample-name > input:invalid, .intake-sample-name > input:focus { border-color: var(--brand); outline: none; }
.intake-sample-name > strong { font-size: 14px; font-weight: 500; color: var(--text-2); }
.intake-image-match.is-sample .link-btn { font-size: 14px; }
.intake-sample-save { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.intake-sample-save > input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--brand); }
@media (max-width: 560px) {
  .intake-side-pick { margin-left: 0; }
}
