/* ============================================================
   衣镜 · 搭配台（.st-*）
   桌面：左 280 / 中自适应 / 右 340；移动：单列 + 固定生成条
   ============================================================ */

.st-page { gap: 16px; --mu: #6f6961; }

/* ---------- 顶部 ---------- */
.st-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding: 4px 2px 0; }
.st-head-main { flex: 1; min-width: 240px; }
.st-head-side { flex: none; padding-bottom: 4px; }
.st-prov {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--sh1);
  font-size: 12.5px; color: var(--tx2); max-width: 100%;
}
.st-prov .dot { background: var(--mu); flex: none; }
.st-prov.on .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--oks); }
.st-prov-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.st-prov .btn { height: 30px; padding: 0 12px; flex: none; }

/* ---------- 无 Key 引导 ---------- */
.st-onboard {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--r);
  background: linear-gradient(120deg, var(--bg2), var(--sf)); border: 1px solid var(--line);
  box-shadow: var(--sh1);
}
.st-onboard-ico {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--ink); color: var(--bg);
}
.st-onboard-txt { flex: 1; min-width: 220px; }
.st-onboard-txt b { font-size: 14px; color: var(--ink); }
.st-onboard-txt p { font-size: 12.5px; color: var(--tx2); margin-top: 2px; line-height: 1.55; }
.st-onboard-act { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 步骤条（移动端） ---------- */
.st-steps { display: none; gap: 6px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.st-steps::-webkit-scrollbar { display: none; }
.st-steps button {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border-radius: 99px; background: var(--sf); color: var(--tx2); font-size: 12.5px; white-space: nowrap;
}
.st-steps button i {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font: 600 10.5px/1 var(--sans); background: var(--bg2); color: var(--tx2); font-style: normal;
}
.st-steps button.done { color: var(--ink); }
.st-steps button.done i { background: var(--ink); color: var(--bg); }
.st-steps button.on { background: var(--ink); color: var(--bg); }

/* ---------- 三栏骨架 ---------- */
.st-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.st-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-col-l, .st-col-r { scroll-margin-top: calc(var(--hdr) + 14px); }
.st-sec { scroll-margin-top: calc(var(--hdr) + 14px); overflow: hidden; }
.st-sec-h {
  display: flex; align-items: center; gap: 8px; padding: 13px 16px 0;
}
.st-sec-h h2 { font: 600 15px/1.3 var(--serif); color: var(--ink); flex: 1; }
.st-sec-tag { font-size: 11px; color: var(--mu); flex: none; }
.st-sec-b { padding: 12px 16px 15px; }
.st-sec-b > .hint { margin-top: 10px; }
.st-link { font-size: 12px; color: var(--tx2); padding: 4px 2px; }
.st-link:hover { color: var(--ac); }

/* ---------- 模特 ---------- */
.st-mode { display: flex; width: 100%; }
.st-mode button { flex: 1; padding: 0 6px; font-size: 12.5px; }

.st-drop {
  margin-top: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 110px; padding: 16px 10px; border-radius: 13px;
  border: 1.5px dashed var(--line2); background: var(--sf); color: var(--tx2);
  text-align: center; transition: border-color .2s, background .2s, transform .2s;
}
.st-drop:hover, .st-drop.over { border-color: var(--ink); background: var(--sf2); }
.st-drop:active { transform: scale(.995); }
.st-drop b { font-size: 13px; color: var(--ink); }
.st-drop small { font-size: 11.5px; color: var(--mu); }
.st-drop svg { color: var(--mu); }
.st-drop.mini { flex-direction: row; min-height: 40px; padding: 8px; gap: 6px; }
.st-drop.mini small { font-size: 12px; color: var(--tx2); }
.st-drop.full { opacity: .45; pointer-events: none; }

.st-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.st-photo { position: relative; border-radius: 10px; overflow: hidden; background: var(--tile); aspect-ratio: 3/4; }
.st-photo img { width: 100%; height: 100%; object-fit: cover; }
.st-photo span {
  position: absolute; left: 4px; bottom: 4px; font-size: 10px; line-height: 1;
  padding: 3px 6px; border-radius: 99px; background: rgba(22,21,19,.62); color: #fff;
}
.st-photo-x {
  position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.9); color: #161513;
}
.st-model-acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.st-model-acts .btn { flex: 1; }

.st-note {
  display: flex; gap: 10px; padding: 11px 12px; border-radius: 12px; background: var(--sf);
  color: var(--tx2); font-size: 12.5px; line-height: 1.55;
}
.st-note svg { flex: none; margin-top: 2px; color: var(--mu); }
.st-note b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }
.st-note p { font-size: 12px; }

.st-vpresets { margin-top: 10px; }
.st-vpresets .chip { height: 30px; font-size: 12.5px; }
.st-vmodels-wrap { margin-top: 12px; }
.st-vmodels-h { font-size: 11.5px; color: var(--tx2); display: flex; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.st-vmodels-h em { font-style: normal; color: var(--mu); font-size: 10.5px; }
.st-vmodels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.st-vmodel {
  position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 3/4; background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--tile-line); transition: transform .2s var(--ease), box-shadow .2s;
}
.st-vmodel img { width: 100%; height: 100%; object-fit: cover; }
.st-vmodel span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 3px 3px;
  font-size: 9.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); text-align: center;
}
.st-vmodel.on { box-shadow: inset 0 0 0 2px var(--ac); transform: translateY(-1px); }

.st-profiles-wrap { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 11px; }
.st-profiles-h { font-size: 11.5px; color: var(--tx2); margin-bottom: 7px; }
.st-profiles { display: flex; flex-direction: column; gap: 6px; }
.st-profile { display: flex; align-items: center; gap: 4px; border-radius: 10px; background: var(--sf); padding: 4px 6px 4px 4px; }
.st-profile.on { background: var(--sf2); box-shadow: inset 0 0 0 1px var(--line2); }
.st-profile > button:first-child { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; padding: 2px; text-align: left; }
.st-profile img, .st-profile > button > svg { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; flex: none; color: var(--mu); padding: 6px; background: var(--bg2); }
.st-profile span { font-size: 12.5px; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-profile-x { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--mu); flex: none; }
.st-profile-x:hover { background: var(--bg2); color: var(--bad); }

/* ---------- 姿势 ---------- */
.st-pose-card {
  display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 12px;
  background: var(--sf); border: 1px solid var(--line);
}
.st-pose-card img, .st-pose-noimg {
  width: 58px; height: 78px; border-radius: 8px; object-fit: cover; flex: none;
  background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-line);
}
.st-pose-noimg { display: grid; place-items: center; color: var(--mu); }
.st-pose-txt { flex: 1; min-width: 0; }
.st-pose-txt b { display: block; font-size: 13px; color: var(--ink); line-height: 1.35; }
.st-pose-txt small { display: block; font-size: 11px; color: var(--mu); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pose-x { width: 26px; height: 26px; flex: none; }
.st-angchips { margin-top: 9px; }
.st-angchips .chip { height: 28px; font-size: 12px; padding: 0 11px; }
.st-pose-card + .btn { margin-top: 9px; }

.st-pose-empty {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px;
  border-radius: 12px; border: 1.5px dashed var(--line2); background: var(--sf);
  text-align: left; color: var(--tx2); transition: border-color .2s, background .2s;
}
.st-pose-empty:hover { border-color: var(--ink); background: var(--sf2); }
.st-pose-empty-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--bg2); color: var(--mu); box-shadow: var(--sh1);
}
.st-pose-empty b { display: block; font-size: 13px; color: var(--ink); }
.st-pose-empty small { display: block; font-size: 11.5px; color: var(--mu); margin-top: 1px; line-height: 1.45; }
.st-pose-empty > svg { flex: none; margin-left: auto; color: var(--mu); }
.st-custom-pose { margin-top: 12px; }
.st-custom-pose .textarea { min-height: 54px; font-size: 12.5px; }

/* ---------- 画布 ---------- */
.st-canvas {
  position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh1); overflow: hidden;
}
.st-stage {
  position: relative; display: grid; width: 100%;
  aspect-ratio: 3 / 4; max-height: calc(100vh - 190px);
  background: var(--sf); overflow: hidden;
}
.st-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* 空态拼贴 */
.st-empty { grid-area: 1 / 1; display: flex; flex-direction: column; min-height: 0; padding: 14px 14px 16px; }
.st-collage { position: relative; flex: 1; min-height: 240px; margin: 6px 6px 12px; }
.st-collage-eyebrow {
  position: absolute; left: 4px; top: 0; font-size: 9.5px; letter-spacing: .22em;
  color: var(--mu); z-index: 3;
}
.st-col-photo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-2deg);
  width: 52%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  background: var(--bg2); border: 5px solid var(--bg2); box-shadow: var(--sh2); z-index: 2;
}
.st-col-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.st-col-photo > span {
  position: absolute; left: 9px; bottom: 9px; font-size: 10.5px; padding: 3px 8px; border-radius: 99px;
  background: rgba(22,21,19,.58); color: #fff;
}
.st-col-photo.ghost {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--tile); border: 1.5px dashed var(--line2); color: var(--mu); text-align: center; padding: 10px;
}
.st-col-photo.ghost svg { color: var(--mu); opacity: .8; }
.st-col-photo.ghost > span { position: static; background: none; color: var(--mu); font-size: 11.5px; }
.st-col-g {
  position: absolute; width: 23%; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: var(--bg2); border: 4px solid var(--bg2); box-shadow: var(--sh2); z-index: 1;
}
.st-col-g .cutout { width: 100%; height: 100%; border-radius: 8px; box-shadow: none; }
.st-col-g.g0 { left: 1%; top: 9%; transform: rotate(-7deg); }
.st-col-g.g1 { right: 1%; top: 13%; transform: rotate(6deg); }
.st-col-g.g2 { left: 5%; bottom: 7%; transform: rotate(5deg); }
.st-col-g.g3 { right: 4%; bottom: 5%; transform: rotate(-6deg); }
.st-col-pose {
  position: absolute; right: 2%; top: 0; width: 15%; aspect-ratio: 3 / 4; z-index: 3;
  border-radius: 10px; overflow: hidden; background: var(--bg2); border: 3px solid var(--bg2);
  box-shadow: var(--sh2);
}
.st-col-pose img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; background: var(--tile); }
.st-col-pose span {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 9px;
  padding: 3px 0; background: rgba(255,255,255,.8); color: var(--tx2);
}
.st-collage-tag {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); z-index: 4;
  font-size: 11px; letter-spacing: .06em; color: var(--tx2);
  background: var(--bg2); padding: 4px 12px; border-radius: 99px; box-shadow: var(--sh1);
}
.st-empty-copy { text-align: center; padding: 0 6px; flex: none; }
.st-empty-copy h3 { font: 600 19px/1.3 var(--serif); color: var(--ink); }
.st-empty-copy p { font-size: 12.5px; color: var(--tx2); margin: 5px auto 0; max-width: 40ch; line-height: 1.6; }
.st-empty-act { justify-content: center; margin-top: 12px; }
.st-empty-act .btn { height: 36px; font-size: 13px; }

/* 结果 / 对比 */
.st-compare { grid-area: 1 / 1; position: relative; overflow: hidden; background: transparent; }
.st-img-after, .st-img-before {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px;
}
.st-img-before { clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); }
.st-range {
  position: absolute; left: 8%; bottom: 16px; width: 84%; z-index: 5; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; height: 24px;
}
.st-range::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.st-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 2px solid var(--ink); margin-top: -9px; box-shadow: var(--sh1); cursor: ew-resize;
}
.st-range::-moz-range-track { height: 3px; background: rgba(255,255,255,.75); }
.st-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.st-lb {
  position: absolute; top: 12px; z-index: 4; font-size: 10.5px; padding: 3px 9px; border-radius: 99px;
  background: rgba(22,21,19,.55); color: #fff; backdrop-filter: blur(4px);
}
.st-lb-before { left: 12px; }
.st-lb-after { right: 12px; }
.st-badge {
  position: absolute; left: 12px; bottom: 12px; z-index: 4; font-size: 10.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.86); color: #161513;
  box-shadow: var(--sh1); backdrop-filter: blur(6px);
}
.st-badge.local { background: rgba(22,21,19,.78); color: #fff; }
.st-compare:not(.cmp) .st-img-before, .st-compare:not(.cmp) .st-range, .st-compare:not(.cmp) .st-lb { display: none; }
.st-zoom {
  position: absolute; right: 12px; top: 12px; z-index: 5; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.88); color: #161513;
  box-shadow: var(--sh1); backdrop-filter: blur(6px);
}
.st-zoom:hover { background: #fff; }
.st-compare .st-badge { left: 12px; bottom: 12px; }
.st-compare.cmp .st-badge { bottom: 12px; }

/* 本地搭配卡 */
.st-local { grid-area: 1 / 1; position: relative; display: grid; place-items: center; background: transparent; padding: 12px; }
.st-local img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; box-shadow: var(--sh2); }
.st-local .st-badge { left: auto; right: 12px; bottom: 12px; }

/* 进度 */
.st-prog {
  grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 28px 24px; text-align: center; background: var(--sf);
}
.st-prog h3 { font: 600 19px/1.3 var(--serif); color: var(--ink); margin-top: 4px; }
.st-prog p { font-size: 12.5px; color: var(--tx2); }
.st-prog .hint { max-width: 34ch; }
.st-orb {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ink) calc(var(--p, 0) * 1%), var(--sf2) 0);
  transition: background .3s linear;
}
.st-orb::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg2); }
.st-orb span { position: relative; font: 600 18px/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.st-bar { width: min(260px, 80%); height: 6px; border-radius: 99px; background: var(--sf2); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .5s var(--ease); }
.st-prog-time { font-variant-numeric: tabular-nums; }
.st-prog .btn { margin-top: 4px; }
.st-spinner {
  width: 46px; height: 46px; border-radius: 50%; border: 2.5px solid var(--sf2); border-top-color: var(--ink);
  animation: st-spin 0.9s linear infinite;
}
@keyframes st-spin { to { transform: rotate(360deg); } }

/* ---------- 画布下方操作区 ---------- */
.st-foot { display: flex; flex-direction: column; gap: 9px; padding: 13px 16px 15px; border-top: 1px solid var(--line); }
.st-foot:empty { display: none; }
.st-foot-hint { line-height: 1.6; }
.st-ai-note {
  display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--mu); margin: 0;
}
.st-ai-note svg { color: var(--mu); flex: none; }
.st-meta { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.st-meta b { font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.st-meta span { font-size: 11px; color: var(--mu); }
.st-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.st-actions .btn { height: 31px; font-size: 12.5px; padding: 0 12px; }
.st-aimark { margin-top: 1px; }
.st-aimark .lbl { font-size: 11.5px; color: var(--tx2); }
.st-aimark .trk { width: 34px; height: 20px; }
.st-aimark .trk::after { width: 14px; height: 14px; }
.st-aimark input:checked + .trk::after { transform: translateX(14px); }

.st-results-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 1px; scrollbar-width: none; }
.st-results-strip::-webkit-scrollbar { display: none; }
.st-res-thumb {
  width: 50px; height: 66px; border-radius: 8px; overflow: hidden; flex: none; background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--line);
}
.st-res-thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-res-thumb.on { box-shadow: inset 0 0 0 2px var(--ac); }

.st-warn {
  display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 10%, var(--bg2)); color: var(--tx2); font-size: 12px; line-height: 1.55;
}
.st-warn svg { color: var(--warn); flex: none; margin-top: 1px; }

.st-err {
  display: flex; flex-direction: column; gap: 7px; padding: 12px 13px; border-radius: 12px;
  background: var(--bads); color: var(--tx); border: 1px solid color-mix(in srgb, var(--bad) 26%, transparent);
}
.st-err.safe { background: color-mix(in srgb, var(--warn) 9%, var(--bg2)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.st-err-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.st-err-h svg { color: var(--bad); flex: none; }
.st-err.safe .st-err-h svg { color: var(--warn); }
.st-err-h b { font-size: 13.5px; color: var(--ink); }
.st-err-h .tag { margin-left: auto; font-size: 10.5px; height: 20px; background: var(--bg2); }
.st-err p { font-size: 12.5px; line-height: 1.65; color: var(--tx2); }
.st-err-act { margin-top: 2px; }
.st-err-act .btn { height: 30px; font-size: 12px; padding: 0 11px; }
.st-raw { margin-top: 3px; }
.st-raw summary { font-size: 11.5px; color: var(--mu); cursor: pointer; }
.st-raw pre {
  margin: 6px 0 0; padding: 9px 10px; border-radius: 8px; background: var(--bg2);
  font-size: 10.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  max-height: 170px; overflow: auto; color: var(--tx2);
}

/* ---------- 右侧：槽位 ---------- */
.st-slots { display: flex; flex-direction: column; gap: 6px; }
.st-slot { position: relative; display: flex; align-items: center; border-radius: 12px; }
.st-slot.add {
  gap: 9px; padding: 9px 12px; background: var(--sf); color: var(--tx2);
  border: 1.5px dashed var(--line2); transition: border-color .2s, background .2s, color .2s; text-align: left;
}
.st-slot.add:hover { border-color: var(--ink); background: var(--sf2); color: var(--ink); }
.st-slot.add > svg { margin-left: auto; color: var(--mu); }
.st-slot-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg2); color: var(--mu); flex: none; }
.st-slot-name { font-size: 12.5px; font-weight: 500; }
.st-slot.has { background: var(--sf); padding: 5px; }
.st-slot-main { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; text-align: left; padding: 2px; }
.st-slot-thumb {
  width: 40px; height: 50px; border-radius: 8px; overflow: hidden; flex: none;
  background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-line); display: grid; place-items: center;
}
.st-slot-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.st-slot-txt { min-width: 0; flex: 1; }
.st-slot-txt b { display: block; font-size: 12.5px; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-slot-txt small { display: block; font-size: 10.5px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.st-slot-x { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--mu); flex: none; }
.st-slot-x:hover { background: var(--bg2); color: var(--bad); }
.st-slot-hint { margin-top: 9px; }

/* ---------- 右侧：场景 / 画幅 ---------- */
.st-opt { margin-bottom: 13px; }
.st-opt:last-of-type { margin-bottom: 0; }
.st-opt-label { font-size: 11.5px; color: var(--tx2); margin-bottom: 7px; font-weight: 500; }
.st-opt .chips { gap: 6px; }
.st-opt .chip { height: 30px; padding: 0 11px; font-size: 12px; }
.st-opt-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.st-aspect { display: flex; width: 100%; flex-wrap: wrap; background: none; padding: 0; gap: 4px; }
.st-aspect button {
  flex: 1; min-width: 44px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--sf);
  font-size: 11.5px; color: var(--tx2); border: 1px solid transparent;
}
.st-aspect button.on { background: var(--ink); color: var(--bg); }
.st-count { display: inline-flex; }
.st-count button { width: 36px; padding: 0; }
.st-keepbg { margin-top: 2px; align-items: flex-start; }
.st-keepbg .lbl { font-size: 12.5px; line-height: 1.4; }
.st-keepbg .hint { margin-top: 2px; }

/* ---------- 右侧：提示词 ---------- */
.st-prompt-sec { padding: 0; }
.st-prompt { display: flex; flex-direction: column; }
.st-prompt-h { display: flex; align-items: center; gap: 6px; padding: 11px 10px 11px 14px; }
.st-prompt-tog {
  flex: 1; display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600;
  color: var(--ink); text-align: left; min-width: 0;
}
.st-prompt-tog svg { flex: none; color: var(--tx2); }
.st-prompt-tog span { flex: none; }
.st-dirty-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac); flex: none; }
.st-prompt-h .row { gap: 2px; flex: none; }
.st-prompt-h .btn { padding: 0 8px; height: 28px; font-size: 11.5px; gap: 4px; }
.st-prompt-b { padding: 0 14px 14px; border-top: 1px solid var(--line); margin-top: 1px; }
.st-prompt-b.hide { display: none; }
.st-prompt-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 11px 0 8px; flex-wrap: wrap; }
.st-prompt-tools .lbl { font-size: 11.5px; color: var(--tx2); }
.st-prompt-tools .switch { gap: 7px; }
.st-prompt-tools .trk { width: 36px; height: 21px; }
.st-prompt-tools .trk::after { width: 15px; height: 15px; }
.st-prompt-tools input:checked + .trk::after { transform: translateX(15px); }
.st-prompt-ta { min-height: 132px; font-size: 12px; line-height: 1.6; font-family: var(--sans); }
.st-prompt-hint { margin-top: 6px; font-size: 11px; }
.st-extra { margin-top: 10px; }
.st-extra .input { height: 36px; font-size: 12.5px; }
.st-order { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.st-order summary { font-size: 11.5px; color: var(--tx2); cursor: pointer; }
.st-order ol { margin: 7px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.st-order li { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--tx2); }
.st-order-n {
  width: 18px; height: 18px; border-radius: 6px; flex: none; display: grid; place-items: center;
  background: var(--sf); color: var(--ink); font: 600 10px/1 var(--sans);
}
.st-order-role { color: var(--mu); font-size: 10.5px; flex: none; }

/* ---------- 右侧：生成记录 ---------- */
.st-hist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.st-hist-i { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.st-hist-i img { width: 100%; height: 100%; object-fit: cover; }
.st-hist-i.on { box-shadow: inset 0 0 0 2px var(--ac); }
.st-hist-i:hover img { transform: scale(1.04); }
.st-hist-i img { transition: transform .35s var(--ease-out); }

/* ---------- 右下：生成按钮 ---------- */
.st-col-r { padding-bottom: 96px; }
.st-go-wrap { position: sticky; bottom: 12px; z-index: 8; padding-top: 2px; }
.st-go {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh2); padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.st-go-info { display: flex; flex-direction: column; gap: 1px; }
.st-go-info b { font-size: 12.5px; color: var(--ink); }
.st-go-info small { font-size: 10.5px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-go .btn-lg { height: 44px; font-size: 14.5px; }
.st-go .btn-block { height: 40px; }
.st-go-act { display: flex; gap: 7px; }
.st-go-act .btn { flex: 1; min-width: 0; height: 38px; font-size: 12.5px; padding: 0 8px; gap: 5px; }
.st-go-act .btn svg { width: 15px; height: 15px; }

/* ---------- 移动端固定生成条 ---------- */
.st-mobile-cta { display: none; }
.st-mcta {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: transparent; border-top: 0; box-shadow: none;
}
.st-mcta-info { flex: 1; min-width: 0; }
.st-mcta-info b { display: block; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mcta-info small { display: block; font-size: 10px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mcta .btn { flex: none; height: 40px; padding: 0 18px; }
.st-mcta .btn-line { height: 40px; }

/* ---------- 弹层：单品 / 姿势选择器 ---------- */
.st-pick { display: flex; flex-direction: column; gap: 11px; }
.st-pick-search { position: relative; }
.st-pick-search > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mu); display: flex; }
.st-pick-search .input { height: 40px; padding-left: 40px; }
.st-pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-pick-i {
  display: flex; flex-direction: column; gap: 5px; text-align: left; min-width: 0;
  padding: 6px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.st-pick-i:hover { border-color: var(--line2); box-shadow: var(--sh1); transform: translateY(-1px); }
.st-pick-i .cutout { width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; }
.st-pick-i .cutout img { padding: 6%; }
.st-pick-i b { font-size: 12px; color: var(--ink); font-weight: 500; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-pick-i small { font-size: 10.5px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pick-i.on { border-color: var(--ac); box-shadow: inset 0 0 0 1px var(--ac); }
.st-pick-empty { text-align: center; padding: 30px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tx2); }
.st-pick-empty-ico { width: 54px; height: 54px; border-radius: 16px; background: var(--sf); display: grid; place-items: center; color: var(--mu); }
.st-pick-empty b { font-size: 14.5px; color: var(--ink); }
.st-pick-empty .hint { max-width: 36ch; }

.st-pose-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-quick {
  display: flex; align-items: center; gap: 9px; padding: 11px; border-radius: 11px;
  background: var(--sf); text-align: left; color: var(--tx2); transition: background .18s;
}
.st-quick:hover { background: var(--sf2); }
.st-quick svg { flex: none; color: var(--tx2); }
.st-quick b { display: block; font-size: 12.5px; color: var(--ink); font-weight: 500; }
.st-quick small { display: block; font-size: 10.5px; color: var(--mu); margin-top: 1px; }
.st-pose-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.st-pose-cats::-webkit-scrollbar { display: none; }
.st-pose-cats .chip { height: 30px; font-size: 12px; padding: 0 11px; flex: none; }
.st-pose-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-pose-i .st-pose-thumb {
  width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--tile);
  display: grid; place-items: center; color: var(--mu); box-shadow: inset 0 0 0 1px var(--tile-line);
}
.st-pose-i .st-pose-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 4%; }

.st-big img { width: 100%; height: auto; border-radius: 12px; }
.st-prompt-sheet { display: flex; flex-direction: column; gap: 10px; }
.st-prompt-sheet pre {
  margin: 0; padding: 12px; border-radius: 10px; background: var(--sf); color: var(--tx);
  font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto;
}
.st-prompt-sheet .btn { align-self: flex-start; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .st-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .st-col-r { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .st-col-r > .st-go-wrap { grid-column: 1 / -1; }
  .st-stage { max-height: 72vh; }
}

@media (max-width: 900px) {
  .st-col-r { grid-template-columns: 1fr; }
  .st-grid { grid-template-columns: 1fr; max-width: 700px; margin: 0 auto; }
  .st-stage { aspect-ratio: 4 / 5; max-height: none; }
  .st-head { align-items: flex-start; }
  .st-head-side { padding-bottom: 0; }
}

@media (max-width: 760px) {
  .st-page { gap: 13px; }
  .st-steps { display: flex; }
  .st-head .page-sub { display: none; }
  .st-head-side { width: 100%; }
  .st-prov { width: 100%; justify-content: flex-start; }
  .st-prov-txt { flex: 1; max-width: none; }
  .st-page .page-title { font-size: 27px; }
  .st-grid { gap: 13px; }
  .st-col { gap: 13px; }
  .st-col-m { order: -1; }
  .st-stage { aspect-ratio: 4 / 5; }
  .st-sec-b { padding: 11px 14px 14px; }
  .st-sec-h { padding: 12px 14px 0; }
  .st-col-l .st-col-r { gap: 13px; }
  .st-go-wrap { display: none; }
  .st-col-r { padding-bottom: 0; }
  .st-mobile-cta {
    display: block; position: fixed; left: 0; right: 0; z-index: 46;
    bottom: calc(62px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg2) 94%, transparent);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 30px rgba(22,21,19,.1);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }
  .st-mcta { padding: 8px 14px 30px; }
  body[data-route='studio'] .view { padding-bottom: calc(62px + 92px + 74px + env(safe-area-inset-bottom)); }
  .st-empty { padding: 12px 12px 14px; }
  .st-collage { min-height: 200px; margin-bottom: 8px; }
  .st-col-photo { width: 50%; }
  .st-empty-copy h3 { font-size: 17px; }
  .st-empty-copy p { font-size: 12px; }
  .st-empty-act .btn { height: 34px; font-size: 12.5px; }
  .st-foot { padding: 11px 14px 13px; }
  .st-actions { gap: 6px; }
  .st-actions .btn { flex: 1 1 auto; justify-content: center; min-width: calc(50% - 3px); }
  .st-meta { gap: 3px 8px; }
  .st-stage .st-badge { left: 10px; bottom: 10px; }
  .st-lb { top: 10px; }
  .st-zoom { right: 10px; top: 10px; }
  .st-range { bottom: 14px; }
  .st-prog { padding: 22px 18px; }
  .st-orb { width: 78px; height: 78px; }
  .st-pick-grid, .st-pose-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-pose-quick { grid-template-columns: 1fr; }
  .st-hist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-vmodels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-onboard { gap: 10px; padding: 12px 13px; }
  .st-onboard-txt { min-width: 0; flex-basis: calc(100% - 54px); }
  .st-onboard-act { width: 100%; }
  .st-onboard-act .btn { flex: 1; }
}

@media (max-width: 390px) {
  .st-empty-copy p { max-width: 30ch; }
  .st-col-photo { width: 54%; }
  .st-collage { min-height: 180px; }
  .st-actions .btn { min-width: 100%; }
  .st-hist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .st-spinner { animation-duration: 2s; }
}


/* ============================================================
   深色主题：画布跟随主题，小字提亮
   ============================================================ */
[data-theme=dark] .st-page { --mu: #aaa39a; }
[data-theme=dark] .st-stage { background: #1a1917; }
[data-theme=dark] .st-prog { background: #1e1c1a; }
[data-theme=dark] .st-col-photo.ghost {
  background: var(--sf2); border-color: var(--line2); color: var(--tx2);
}
[data-theme=dark] .st-col-photo.ghost > span { color: var(--tx2); }
[data-theme=dark] .st-col-g { border-color: #2a2825; }
[data-theme=dark] .st-col-pose { border-color: #2a2825; }
[data-theme=dark] .st-collage-tag { background: #232120; color: var(--tx2); }
[data-theme=dark] .st-badge { background: rgba(245,242,238,.9); color: #161513; }
[data-theme=dark] .st-badge.local { background: rgba(22,21,19,.85); color: #fff; }
[data-theme=dark] .st-zoom { background: rgba(245,242,238,.9); color: #161513; }
[data-theme=dark] .st-lb { background: rgba(22,21,19,.7); }
[data-theme=dark] .st-spinner { border-color: #383530; border-top-color: var(--ink); }
[data-theme=dark] .st-range::-webkit-slider-runnable-track { background: rgba(245,242,238,.6); }

/* ============================================================
   身体档案入口 / 卡片 / 性别与男性姿势提示
   ============================================================ */
.st-head-body { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.st-body-entry {
  display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 12px;
  border-radius: 99px; background: var(--sf); color: var(--tx2); font-size: 12px;
  border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.st-body-entry svg { color: var(--mu); flex: none; }
.st-body-entry small {
  font-size: 10.5px; color: var(--mu); padding-left: 7px; margin-left: 1px;
  border-left: 1px solid var(--line2); white-space: nowrap;
}
.st-body-entry:hover { background: var(--sf2); color: var(--ink); }
.st-body-entry.on { background: var(--acs); color: var(--ac); border-color: color-mix(in srgb, var(--ac) 30%, transparent); }
.st-body-entry.on svg { color: var(--ac); }

.st-body-id {
  margin: 0 0 12px; border-radius: 13px; background: var(--sf); border: 1px solid var(--line);
  overflow: hidden; transition: background .2s, box-shadow .2s;
}
.st-body-id.on { background: var(--acs); box-shadow: inset 0 0 0 1.5px var(--ac); border-color: transparent; }
.st-body-id-main { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 10px 10px 5px; text-align: left; }
.st-body-id-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--bg2); color: var(--mu); box-shadow: var(--sh1);
}
.st-body-id.on .st-body-id-ico { background: var(--ink); color: var(--bg); }
.st-body-id-txt { flex: 1; min-width: 0; }
.st-body-id-txt b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink); line-height: 1.35; }
.st-body-id-txt b em {
  font-style: normal; font-size: 10px; font-weight: 500; color: var(--ac);
  background: var(--bg2); border: 1px solid color-mix(in srgb, var(--ac) 26%, var(--line));
  border-radius: 99px; padding: 1px 6px;
}
.st-body-id-txt small {
  display: block; font-size: 11px; color: var(--mu); margin-top: 2px;
  line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-body-id-txt .st-body-id-photos { font-size: 10.5px; }
.st-body-id-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px 9px; }
.st-body-id-acts .btn { height: 30px; font-size: 12px; padding: 0 11px; }
.st-body-id-acts .st-link { font-size: 11px; white-space: nowrap; }

.st-body-empty {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px;
  margin-bottom: 12px; border-radius: 13px; border: 1.5px dashed var(--line2);
  background: var(--sf); text-align: left; color: var(--tx2); transition: border-color .2s, background .2s;
}
.st-body-empty:hover { border-color: var(--ink); background: var(--sf2); }
.st-body-empty b { display: block; font-size: 12.5px; color: var(--ink); }
.st-body-empty small { display: block; font-size: 11px; color: var(--mu); line-height: 1.45; margin-top: 1px; }
.st-body-empty > svg { flex: none; margin-left: auto; color: var(--mu); }

.st-vfold { margin-top: 12px; }
.st-vfold > summary {
  cursor: pointer; list-style: none; font-size: 11.5px; color: var(--tx2);
  padding: 7px 10px; border-radius: 9px; background: var(--sf);
}
.st-vfold > summary::-webkit-details-marker { display: none; }
.st-vfold > summary::before { content: "+ "; color: var(--mu); }
.st-vfold[open] > summary::before { content: "− "; }
.st-vfold[open] > summary { margin-bottom: 8px; }
.st-vfold .st-vmodels-h { margin-top: 0; }

.st-male-hint {
  display: flex; align-items: flex-start; gap: 7px; margin: 0 0 10px; padding: 8px 10px;
  border-radius: 9px; background: var(--sf); color: var(--tx2); font-size: 11px; line-height: 1.55;
}
.st-male-hint svg { flex: none; color: var(--warn); margin-top: 1px; }

@media (max-width: 760px) {
  .st-page .input, .st-page .textarea, .st-page .select,
  .st-pick .input, .st-pick .textarea, .st-prompt-sheet .input { font-size: 16px; }
  .st-head-body { margin-top: 8px; }
  .st-body-entry { height: 32px; }
  .st-body-id-acts .btn { min-height: 34px; }
  .st-vmodels-wrap .st-vmodel { min-height: 84px; }
}

@media (max-width: 390px) {
  .st-body-entry small { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .st-body-id-acts { flex-wrap: wrap; }
  .st-body-id-acts .btn { flex: 1; justify-content: center; }
}
