/* ============================================================
   自助生图（studio，v0.56.112）：主屏第一页长条小组件 .sxw-* ＋ 生图页 .sx-*
   ============================================================ */

/* ---------- 主屏长条小组件 ---------- */
.home-grid + .sxw { margin-top: var(--grid-gap); }
.sxw {
  flex: none; display: flex; align-items: center; gap: 12px;
  height: 74px; padding: 0 18px 0 13px; border-radius: 24px;
  background: rgba(252, 252, 253, 0.84);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  color: #1d1d20;
}
.home-wide .sxw { width: var(--gw); }
.sxw-pics { position: relative; flex: none; width: 50px; height: 50px; }
.sxw-pics.n1 { width: 44px; } .sxw-pics.n2 { width: 59px; } .sxw-pics.n3 { width: 74px; }
.sxw-pic {
  position: absolute; top: 0; width: 42px; height: 50px; border-radius: 11px;
  background: #e9e9ec center / cover no-repeat;
  box-shadow: 0 0 0 2px #fcfcfd, 0 3px 8px rgba(0, 0, 0, 0.10);
}
.sxw-pic:nth-child(1) { left: 0; }
.sxw-pic:nth-child(2) { left: 15px; }
.sxw-pic:nth-child(3) { left: 30px; }
.sxw-mark {
  position: absolute; left: 2px; top: 2px; width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #f0f0f3; color: #9a9aa0;
}
.sxw-mark svg { width: 24px; height: 24px; }
.sxw-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sxw-txt b { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.sxw-txt span { font-size: 12px; color: #8e8e93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sxw-go { flex: none; display: flex; color: #a1a1a6; }
.sxw-go svg { width: 21px; height: 21px; }
.sxw-dot { width: 8px; height: 8px; border-radius: 50%; background: #8a7ba8; animation: sxw-pulse 1.2s ease-in-out infinite; }
@keyframes sxw-pulse { 50% { opacity: .3; } }
.app-open .sxw-dot { animation: none; }

/* 矮屏（如 4.7 英寸）：第一页放不下 74px 长条，整体收窄 */
@media (max-height: 720px) {
  .home-grid + .sxw { margin-top: 10px; }
  .sxw { height: 56px; border-radius: 19px; padding: 0 15px 0 9px; gap: 10px; }
  .sxw-pics { height: 40px; width: 40px; }
  .sxw-pics.n1 { width: 34px; } .sxw-pics.n2 { width: 46px; } .sxw-pics.n3 { width: 58px; }
  .sxw-pic { width: 34px; height: 40px; border-radius: 9px; }
  .sxw-pic:nth-child(2) { left: 12px; } .sxw-pic:nth-child(3) { left: 24px; }
  .sxw-mark { left: 2px; top: 2px; width: 36px; height: 36px; border-radius: 11px; }
  .sxw-mark svg { width: 20px; height: 20px; }
  .sxw-txt { flex-direction: row; align-items: baseline; gap: 8px; }
  .sxw-txt b { font-size: 14px; flex: none; }
}

/* ---------- 生图页 ---------- */
.sx-screen { background: #f4f4f6; }
.sx-app { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; }
.sx { flex: 1; padding: 4px 16px 18px; color: #1d1d20; }

.sx-stage {
  position: relative; margin: 0 auto 12px; border-radius: 20px; overflow: hidden;
  width: min(100%, calc(42vh * var(--r, 1))); background: #e9e9ec;
}
.sx-stage img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sx-empty, .sx-busy {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.sx-empty svg { width: 30px; height: 30px; color: #b4b4ba; }
.sx-empty b { font-size: 12px; font-weight: 500; letter-spacing: .08em; color: #a1a1a6; font-variant-numeric: tabular-nums; }
.sx-busy b { position: relative; font-size: 14px; font-weight: 600; color: #6e6e73; }
.sx-busy em { position: relative; font-style: normal; font-size: 12px; color: #a1a1a6; font-variant-numeric: tabular-nums; }
.sx-shim {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 70%) #e9e9ec;
  background-size: 250% 100%; animation: sx-shim 1.6s linear infinite;
}
@keyframes sx-shim { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.sx-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 2px; scrollbar-width: none; }
.sx-strip::-webkit-scrollbar { display: none; }
.sx-th {
  position: relative; flex: none; width: 50px; height: 50px; border-radius: 12px;
  background: #e9e9ec center / cover no-repeat; opacity: .72; transition: opacity .15s, transform .15s;
}
.sx-th.on { opacity: 1; transform: translateY(-2px); }
.sx-th.on::after {
  content: ""; position: absolute; left: 50%; bottom: -9px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: #8a7ba8;
}

.sx-card { background: #fff; border-radius: 20px; padding: 15px 15px 16px; margin-top: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.sx-lab { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.sx-lab span { font-size: 13.5px; font-weight: 600; }
.sx-lab em { font-style: normal; font-size: 12px; color: #a1a1a6; }
.sx-ta {
  display: block; width: 100%; border: 0; outline: 0; resize: none;
  background: #f4f4f6; border-radius: 14px; padding: 11px 13px;
  font: inherit; font-size: 16px; line-height: 1.5; color: #1d1d20;
  -webkit-user-select: text; user-select: text;
}
.sx-ta::placeholder { color: #b4b4ba; }
.sx-miss { margin-top: 9px; font-size: 12px; color: #8e8e93; line-height: 1.9; }
.sx-miss span { display: inline-block; margin: 0 5px 0 0; padding: 0 8px; border-radius: 7px; background: #f3e3e6; color: #6e5a60; line-height: 22px; }
.sx-tools { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.sx-tools button {
  display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 7px 12px 7px 10px; border-radius: 999px;
  background: #f4f4f6; color: #3a3a3e; font: inherit; font-size: 13px; font-weight: 600;
}
.sx-tools button svg { width: 16px; height: 16px; }
.sx-tools button.on { background: #e7e7ec; }
.sx-tools .info-q { margin-left: -4px; }
.sx-tools .sx-tclr { margin-left: auto; padding: 6px; background: none; color: #a1a1a6; }
.sx-tools .sx-tclr svg { width: 19px; height: 19px; }

.sx-lib { margin-top: 13px; padding-top: 12px; border-top: .5px solid rgba(0,0,0,.06); }
.sx-cats { display: flex; gap: 2px; overflow-x: auto; margin: 0 -4px 10px; scrollbar-width: none; }
.sx-cats::-webkit-scrollbar { display: none; }
.sx-cats span { position: relative; flex: none; padding: 5px 9px 9px; font-size: 13px; color: #8e8e93; }
.sx-cats span.on { color: #1d1d20; font-weight: 600; }
.sx-cats span.on::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #8a7ba8;
}
.sx-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 236px; overflow-y: auto; }
.sx-chips span {
  position: relative; display: flex; flex-direction: column; gap: 1px;
  padding: 6px 11px 7px; border-radius: 12px; background: #f4f4f6;
  font-size: 10.5px; color: #a1a1a6; line-height: 1.3;
}
.sx-chips span b { font-size: 13px; font-weight: 500; color: #1d1d20; }
.sx-chips span.on { background: #ebe9f0; color: #8a7ba8; }
.sx-chips span.on b { color: #3e3850; font-weight: 600; }

.sx-neg { margin-top: 14px; padding-top: 12px; border-top: .5px solid rgba(0,0,0,.06); }
.sx-fold { margin-bottom: 0; align-items: center; cursor: pointer; }
.sx-fold em { margin-left: auto; margin-right: 4px; }
.sx-fold svg { width: 16px; height: 16px; color: #a1a1a6; transition: transform .2s; }
.sx-neg.open .sx-fold { margin-bottom: 9px; }
.sx-neg.open .sx-fold svg { transform: rotate(180deg); }

.sx-row { display: flex; align-items: center; justify-content: space-between; }
.sx-row2 { margin-top: 16px; }
.sx-k { font-size: 13.5px; font-weight: 600; }
.sx-k2 { margin-top: 16px; }
.sx-eng, .sx-num { display: flex; padding: 3px; border-radius: 999px; background: rgba(120,120,128,.08); }
.sx-eng span, .sx-num span {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #6e6e73; transition: all .15s;
}
.sx-num span { min-width: 38px; padding: 6px 0; text-align: center; font-variant-numeric: tabular-nums; }
.sx-eng span.on, .sx-num span.on { background: #fff; color: #1d1d20; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.sx-sub { margin-top: 7px; font-size: 12px; color: #a1a1a6; text-align: right; }
.sx-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.sx-sz {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 4px 10px; border-radius: 14px; background: #f4f4f6; transition: all .15s;
}
.sx-asp { display: block; height: 18px; margin-bottom: 6px; border: 1.5px solid #b4b4ba; border-radius: 3.5px; box-sizing: border-box; }
.sx-sz b { font-size: 13px; font-weight: 600; color: #3a3a3e; }
.sx-sz span { font-size: 11px; color: #a1a1a6; font-variant-numeric: tabular-nums; }
.sx-sz.on { background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.08); }
.sx-sz.on .sx-asp { border-color: #8a7ba8; }
.sx-sz.on b { color: #1d1d20; }
.sx-seed { display: flex; align-items: center; gap: 8px; }
.sx-seed input {
  width: 128px; border: 0; outline: 0; border-radius: 10px; padding: 6px 10px; background: #f4f4f6;
  font: inherit; font-size: 16px; color: #1d1d20; font-variant-numeric: tabular-nums; text-align: right;
  -webkit-user-select: text; user-select: text;
}
.sx-seed input:disabled { color: #c2c2c7; opacity: 1; }
.sx-seed > span:not(.sx-lock) { display: flex; color: #a1a1a6; }
.sx-seed > span svg { width: 21px; height: 21px; }
.sx-lock { padding: 5px 11px; border-radius: 999px; background: #f4f4f6; font-size: 12.5px; font-weight: 600; color: #8e8e93; }
.sx-lock.on { background: #ebe9f0; color: #3e3850; }

.sx-gobar {
  position: sticky; bottom: 0; flex: none;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(rgba(244,244,246,0), #f4f4f6 34%);
}
.sx-go {
  width: 100%; height: 52px; border: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #1d1d20; color: #fff; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: .04em;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.35);
}
.sx-go svg { width: 19px; height: 19px; }
.sx-go.busy { background: #6e6e73; box-shadow: none; font-variant-numeric: tabular-nums; }

/* ---------- 查看一张 ---------- */
.sx-view {
  position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: #f4f4f6; color: #1d1d20; animation: sx-in .18s ease;
}
@keyframes sx-in { from { opacity: 0; } }
.sx-vtop {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 12px 6px;
}
.sx-vtop button { border: 0; background: none; padding: 6px; color: #3a3a3e; display: flex; }
.sx-vtop button svg { width: 24px; height: 24px; }
.sx-vtop span { font-size: 13px; color: #8e8e93; font-variant-numeric: tabular-nums; }
.sx-vtop i { width: 36px; }
.sx-vimg { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 20px 14px; }
.sx-vimg img { max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: 0 14px 34px -14px rgba(0,0,0,.35); }
.sx-vcard {
  margin: 0 14px calc(14px + env(safe-area-inset-bottom, 0px)); padding: 14px 15px 10px;
  border-radius: 22px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.sx-vmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-vmeta span { padding: 2px 9px; border-radius: 7px; background: #f4f4f6; font-size: 11.5px; color: #6e6e73; font-variant-numeric: tabular-nums; }
.sx-vp {
  margin-top: 10px; max-height: 84px; overflow-y: auto; font-size: 13px; line-height: 1.55; color: #3a3a3e;
  -webkit-user-select: text; user-select: text;
}
.sx-vn { margin-top: 6px; max-height: 50px; font-size: 12px; color: #a1a1a6; }
.sx-vacts { display: flex; margin-top: 10px; border-top: .5px solid rgba(0,0,0,.06); padding-top: 8px; }
.sx-vacts div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; font-size: 11.5px; color: #6e6e73; }
.sx-vacts svg { width: 22px; height: 22px; color: #3a3a3e; }

/* ---------- 收藏的提示词 ---------- */
.sx-mask { position: absolute; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: rgba(0,0,0,.22); animation: sx-in .18s ease; }
.sx-sheet {
  width: 100%; max-height: 72%; overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px));
}
.sx-shd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sx-shd b { font-size: 16px; font-weight: 600; }
.sx-shd button {
  display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 7px 13px 7px 11px;
  background: #f4f4f6; color: #3a3a3e; font: inherit; font-size: 13px; font-weight: 600;
}
.sx-shd button svg { width: 16px; height: 16px; }
.sx-sv { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: .5px solid rgba(0,0,0,.06); }
.sx-sv > div { flex: 1; min-width: 0; }
.sx-sv b { display: block; font-size: 14px; font-weight: 600; }
.sx-sv span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 12px; color: #8e8e93; line-height: 1.45; }
.sx-sv i { display: flex; color: #b4b4ba; }
.sx-sv i svg { width: 20px; height: 20px; }
.sx-sv0 { padding: 26px 0 14px; text-align: center; font-size: 13px; color: #b4b4ba; }
