/* Picset AI 精确克隆样式 */

/* ===== CSS变量 (shadcn HSL) ===== */
:root {
  --bg: 240 5% 96%;
  --fg: 240 6% 10%;
  --card: 0 0% 100%;
  --card-fg: 240 6% 10%;
  --primary: 240 6% 10%;
  --primary-fg: 0 0% 100%;
  --secondary: 240 5% 96%;
  --secondary-fg: 240 4% 46%;
  --muted: 240 5% 96%;
  --muted-fg: 240 4% 46%;
  --border: 240 6% 90%;
  --border-light: 240 6% 94%;
  --text-primary: 240 6% 10%;
  --text-secondary: 240 4% 46%;
  --text-subtle: 240 4% 63%;
  --radius: 1rem;
  --success: 160 84% 39%;
  --scrollbar-size: 6px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: hsl(240 5% 84%);
  --scrollbar-thumb-hover: hsl(240 4% 72%);
  --scrollbar-thumb-active: hsl(240 5% 58%);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  padding-top: 0 !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: hsl(var(--fg));
  background: hsl(var(--bg));
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
*:focus, *:focus-visible, *:active { outline: none !important; box-shadow: none !important; }
a:focus, a:active, a:hover { text-decoration: none !important; }
img { max-width: 100%; height: auto; }

/* ===== 全局滚动条美化 ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 32px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active);
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

/* 需要隐藏滚动条的区域（横向标签、缩略图条等） */
.picset-no-scrollbar,
.history-category-tabs,
.mirror-upload-preview-grid.is-row {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.picset-no-scrollbar::-webkit-scrollbar,
.history-category-tabs::-webkit-scrollbar,
.mirror-upload-preview-grid.is-row::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ===== 容器 ===== */
.container-picset {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-picset-narrow {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-picset-hero {
  max-width: 896px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 站点通知栏（避免使用 announcement 命名，减少被广告拦截器误杀） ===== */
.picset-site-notice {
  background: #d9ff66;
  padding: 12px 20px;
  text-align: center;
}
.picset-site-notice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: #000;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.picset-site-notice-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #000;
  opacity: 0.5;
  margin-left: 8px;
  line-height: 1;
}
.picset-site-notice-close:hover { opacity: 1; }
.icon-site-notice { flex-shrink: 0; color: #000; }
html.picset-notice-dismissed #picsetSiteNotice { display: none !important; }

/* ===== 头部导航（精确克隆） ===== */
.picset-header {
  width: 100%;
  padding: 24px 16px;
  background: transparent;
}
.picset-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.picset-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.picset-logo:hover { text-decoration: none; }
.picset-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: hsl(var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.picset-logo-icon svg { color: hsl(var(--primary-fg)); }
.picset-logo-icon--custom {
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}
.picset-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picset-logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: hsl(var(--fg));
  line-height: 1;
}
.picset-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 24px;
}
.picset-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: hsl(var(--text-secondary));
  border-radius: 12px;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}
.picset-nav-item:hover {
  color: hsl(var(--fg));
  background: hsl(var(--secondary));
  text-decoration: none;
}
.picset-nav-item.is-active,
.picset-nav-item.is-active:hover {
  background: hsl(var(--primary));
  color: #fff;
}
.picset-nav-item.is-active svg { color: #fff; }
.picset-nav-item svg { flex-shrink: 0; color: inherit; }
.picset-nav-item span { display: none; }
@media (min-width: 640px) {
  .picset-nav-item span { display: inline; }
}
.picset-nav-chevron {
  opacity: 0.7;
  display: none;
}
@media (min-width: 640px) {
  .picset-nav-chevron { display: inline; }
}
.picset-badge-beta {
  font-size: 9px;
  font-weight: 700;
  background: #fef3c7;
  color: #b45309;
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1.4;
  display: none;
}
@media (min-width: 640px) {
  .picset-badge-beta { display: inline; }
}
.picset-badge-new {
  font-size: 9px;
  font-weight: 700;
  background: #ff4d4f;
  color: #fff;
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1.4;
  display: none;
}
@media (min-width: 640px) {
  .picset-badge-new { display: inline; }
}
/* ===== 更多工具下拉菜单 ===== */
.picset-nav-dropdown-wrap {
  list-style: none;
  position: relative;
}
.picset-nav-dropdown-wrap .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 180px;
  background: #fff;
}
.picset-nav-dropdown-wrap.open .dropdown-menu,
.picset-nav-dropdown-wrap .dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
  display: block;
}
.picset-nav-dropdown-wrap .dropdown-menu li a:hover {
  background: hsl(var(--secondary));
  text-decoration: none;
}

/* 用户头像下拉（去掉 frontend.min.css 后需自行补 Bootstrap dropdown 样式） */
.picset-nav > li {
  list-style: none;
  position: relative;
}
#userDropdown {
  list-style: none;
}
#userDropdown .dropdown-menu,
.picset-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1200;
  float: none;
  min-width: 180px;
  margin: 8px 0 0;
  padding: 8px;
  background: #fff;
  list-style: none;
  box-sizing: border-box;
}
#userDropdown .dropdown-menu {
  right: 0;
  left: auto;
}
#userDropdown.open .dropdown-menu,
#userDropdown .dropdown-toggle[aria-expanded="true"] + .dropdown-menu,
.picset-nav .dropdown.open .dropdown-menu {
  display: block;
}
.picset-nav .dropdown-menu > li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.picset-nav .dropdown-menu > li > a:hover {
  background: #f4f4f5;
  text-decoration: none;
}

.picset-nav-auth {
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.picset-nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  padding: 0 16px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface));
  color: hsl(var(--fg));
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.picset-nav-login:hover {
  background: hsl(var(--surface-hover));
  text-decoration: none;
}

/* 未登录：导航登录按钮（跳转 /auth） */
.picset-nav-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  padding: 0 16px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: #fff;
  color: hsl(var(--fg));
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.picset-nav-login-btn:hover {
  background: hsl(var(--secondary));
  text-decoration: none;
}

/* 导航邀请有礼按钮 */
.picset-nav-invite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  margin-left: 4px;
  border-radius: 12px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #ea580c;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.picset-nav-invite-btn:hover,
.picset-nav-invite-btn.is-active {
  background: #ffedd5;
  border-color: #fb923c;
  text-decoration: none;
  color: #c2410c;
}
.picset-nav-invite-icon {
  font-size: 14px;
  line-height: 1;
}

/* 推广计划弹窗 */
.affiliate-modal { position: fixed; inset: 0; z-index: 10000; }
.affiliate-modal[hidden] { display: none !important; }
.affiliate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
.affiliate-dialog {
  position: relative;
  width: min(1040px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 48px));
  margin: 24px auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}
.affiliate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: rgba(255,255,255,0.9);
  color: #71717a;
  cursor: pointer;
  font-size: 22px;
  line-height: 32px;
}
.affiliate-close:hover { background: #fff; color: #18181b; }
.affiliate-inner {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}
.affiliate-hero {
  margin: 24px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  background: #fff;
}
.affiliate-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: hsl(var(--secondary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: #18181b;
}
.affiliate-hero-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: #18181b;
}
.affiliate-hero-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: #71717a;
}
.affiliate-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9999px;
  border: none;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.affiliate-hero-btn:hover { opacity: 0.92; }
.affiliate-body {
  padding: 0 32px 28px;
  overflow: auto;
}
.affiliate-body h4 {
  margin: 18px 0 10px;
  font-size: 15px;
  font-weight: 800;
  color: #18181b;
}
.affiliate-body h5 {
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #18181b;
}
.affiliate-body p, .affiliate-body li {
  font-size: 13px;
  line-height: 1.75;
  color: #52525b;
}
.affiliate-body ul { margin: 8px 0 0 18px; padding: 0; }

body.is-modal-open { overflow: hidden; }
/* ===== 按钮 ===== */
.btn-picset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-picset-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
}
.btn-picset-primary:hover {
  opacity: 0.85;
}
.btn-picset-ghost {
  background: transparent;
  color: hsl(var(--fg));
  border: none;
}
.btn-picset-ghost:hover {
  background: hsl(var(--secondary));
}
.btn-picset-lg {
  padding: 14px 36px;
  font-size: 16px;
  border-radius: 9999px;
}
.btn-picset-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-picset-hero-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
/* ===== 工具页面交互状态 ===== */
.tab-active { background: #1a1a1a !important; color: #fff !important; border: none !important; box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important; }
.tab-inactive { background: #fff !important; color: #333 !important; border: 1px solid #e5e7eb !important; box-shadow: none !important; }
.step-active { background: #1a1a1a !important; color: #fff !important; border: none !important; }
.step-inactive { background: #f5f5f6 !important; color: #666 !important; border: 1px solid #d1d5db !important; }
.text-foreground { color: #333 !important; }
.text-muted { color: #666 !important; }
.tool-select { cursor: pointer; position: relative; }
.tool-select-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); margin-top: 4px; padding: 4px; }
.tool-select.open .tool-select-menu { display: block; }
.tool-select-option { padding: 8px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; color: #333; }
.tool-select-option:hover { background: #f5f5f6; }
.upload-dragover { border-color: hsl(var(--primary)) !important; background: #f0f0f0 !important; }
.upload-zone-wrap { position: relative; }
.upload-zone {
  border: 1px dashed #d4d4d8;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  background: transparent;
  transition: border-color 0.2s ease;
}
.upload-zone:hover:not(.has-grid) {
  background: #f0f0f2;
  border-color: #8e8e93;
}
.upload-zone.is-dragover:not(.has-grid) {
  background: #e4e4e7;
  border-color: #18181b;
}
.upload-zone:hover:not(.has-grid) .mirror-upload-icon,
.upload-zone:hover:not(.has-grid) .upload-icon {
  color: #71717a;
}
.upload-zone.is-dragover:not(.has-grid) .mirror-upload-icon,
.upload-zone.is-dragover:not(.has-grid) .upload-icon {
  color: #3f3f46;
}
.select-box { cursor: pointer; position: relative; z-index: 1; }
.select-box.is-open { z-index: 10150; }
.select-dropdown { display: block; position: absolute; top: calc(100% + 4px); left: 0; width: 100%; min-width: 160px; z-index: 10100; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); padding: 0; overflow: hidden; }
.select-option { padding: 10px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; color: #18181b; font-weight: 400; transition: background 0.1s; }
.select-option:hover { background: #f4f4f5; }
.select-option.selected { background: #f4f4f5; font-weight: 500; color: #000; }
.tag-dropdown-wrap { position: relative; display: inline-flex; }
.tag-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 100; min-width: 160px; background: #fff; border: 1px solid #e4e4e7; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); padding: 6px; margin-top: 6px; }
.tag-dropdown-menu .dd-option { padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; color: #18181b; white-space: nowrap; }
.tag-dropdown-menu .dd-option:hover { background: #f4f4f5; }
.tag-dropdown-menu .dd-option.selected { background: #f4f4f5; font-weight: 600; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-picset-hero-primary:hover {
  opacity: 0.85;
  color: #fff;
  text-decoration: none;
}
.btn-picset-hero-secondary {
  background: #fff;
  color: hsl(var(--fg));
  border: 1px solid hsl(var(--border));
}
.btn-picset-hero-secondary:hover {
  background: hsl(var(--secondary));
  color: hsl(var(--fg));
  text-decoration: none;
}

/* ===== Hero ===== */
.picset-hero {
  padding: 96px 0;
  text-align: center;
}
.picset-hero h1 {
  font-size: 60px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: hsl(var(--fg));
  margin: 0 0 24px;
}
.picset-hero .lead {
  font-size: 18px;
  color: hsl(var(--text-secondary));
  line-height: 1.6;
  margin: 0 auto 40px;
  max-width: 640px;
}
.picset-hero .btn-pair {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
}

/* ===== 功能区块 (2列网格) ===== */
.picset-features {
  padding: 80px 0;
  background: rgba(244, 244, 245, 0.3);
}
.picset-feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 80px;
}
@media (min-width: 1024px) {
  .picset-feature-row {
    grid-template-columns: 1fr 1fr;
  }
}
.picset-feature-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.picset-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}
.picset-feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
  color: hsl(var(--fg));
}
.picset-feature-card p {
  font-size: 15px;
  color: hsl(var(--text-secondary));
  line-height: 1.7;
  margin: 0 0 16px;
}
.picset-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.picset-feature-list li {
  padding: 3px 0;
  font-size: 14px;
  color: hsl(var(--text-secondary));
}
.picset-feature-list li::before {
  content: "✓";
  color: hsl(160 84% 39%);
  font-weight: 700;
  margin-right: 8px;
}
.picset-feature-link {
  color: hsl(var(--fg));
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.picset-feature-link:hover { gap: 8px; }
.picset-feature-image {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.picset-feature-image .placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: hsl(var(--secondary));
  border-radius: 16px;
  border: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-subtle));
  font-size: 15px;
}
.picset-video {
  width: 100%;
  height: 100%;
  min-height: 200px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

/* ===== 步骤区 ===== */
.picset-steps {
  padding: 80px 0;
  text-align: center;
}
.section-title {
  text-align: center;
  margin-bottom: 56px;
}
.section-title h2 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: hsl(var(--fg));
}
.section-title p {
  font-size: 16px;
  color: hsl(var(--text-secondary));
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}
.picset-step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 896px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .picset-step-grid { grid-template-columns: 1fr; }
}
.picset-step {
  text-align: center;
  padding: 24px;
}
.picset-step-num {
  width: 44px;
  height: 44px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 16px;
}
.picset-step h4 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}
.picset-step p {
  font-size: 14px;
  color: hsl(var(--text-secondary));
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== 技术亮点网格 ===== */
.picset-grid-section { padding: 80px 0; }
.picset-grid-section-alt { padding: 80px 0; background: rgba(244, 244, 245, 0.3); }
.picset-tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) {
  .picset-tech-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .picset-tech-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .picset-tech-grid { grid-template-columns: 1fr; }
}
.picset-tech-item {
  padding: 24px 16px;
  text-align: center;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border-light));
  border-radius: 12px;
  transition: all 0.2s;
}
.picset-tech-item:hover {
  border-color: hsl(var(--border));
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.picset-tech-icon { font-size: 26px; display: block; margin-bottom: 10px; }
.picset-tech-item h5 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}
.picset-tech-item p {
  font-size: 13px;
  color: hsl(var(--text-secondary));
  margin: 0;
  line-height: 1.5;
}

/* ===== 为什么选择 ===== */
.picset-why {
  background: hsl(var(--bg));
  padding: 80px 0;
}
.picset-why-list {
  max-width: 720px;
  margin: 0 auto;
}
.picset-why-item {
  padding: 20px 24px;
  margin-bottom: 16px;
  border-left: 3px solid hsl(var(--primary));
  background: hsl(var(--bg));
  border-radius: 0 12px 12px 0;
}
.picset-why-item h4 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}
.picset-why-item p {
  color: hsl(var(--text-secondary));
  margin: 0;
  font-size: 14px;
}

/* ===== 案例展示 ===== */
.picset-cases { padding: 80px 0; }
.picset-cases-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) {
  .picset-cases-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .picset-cases-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .picset-cases-grid { grid-template-columns: repeat(2, 1fr); }
}
.picset-case-item {
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.3);
  transition: all 0.3s;
  cursor: pointer;
}
.picset-case-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: scale(1.02);
}
.picset-case-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== FAQ ===== */
.picset-faq-section { padding: 80px 0; }
.picset-faq {
  max-width: 720px;
  margin: 0 auto;
}
.picset-faq-item {
  border: 1px solid hsl(var(--border-light));
  border-radius: 12px;
  margin-bottom: 12px;
  background: hsl(var(--card));
  overflow: hidden;
}
.picset-faq-q {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  margin: 0;
}
.picset-faq-q::after {
  content: "+";
  font-size: 18px;
  color: hsl(var(--text-subtle));
}
.picset-faq-q.active::after {
  content: "−";
}
.picset-faq-a {
  padding: 0 20px 16px;
  color: hsl(var(--text-secondary));
  font-size: 14px;
  line-height: 1.7;
  display: none;
}
.picset-faq-a.show { display: block; }

/* ===== CTA ===== */
.picset-cta {
  text-align: center;
  padding: 80px 0;
}
.picset-cta h2 {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 12px;
}
.picset-cta p {
  font-size: 16px;
  color: hsl(var(--text-secondary));
  margin: 0 0 32px;
}

/* ===== 页脚 ===== */
.picset-footer {
  background: hsl(var(--card));
  border-top: 1px solid hsl(var(--border-light));
  padding: 48px 0 32px;
}
.picset-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 768px) {
  .picset-footer-grid { grid-template-columns: 1fr 1fr; }
}
.picset-footer-brand {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}
.picset-footer p { color: hsl(var(--text-secondary)); font-size: 13px; line-height: 1.6; }
.picset-footer a { color: hsl(var(--text-secondary)); font-size: 13px; transition: color 0.2s; }
.picset-footer a:hover { color: hsl(var(--fg)); }
.picset-footer h5 { font-weight: 600; font-size: 14px; margin: 0 0 12px; }
.picset-footer ul { list-style: none; padding: 0; margin: 0; }
.picset-footer li { padding: 3px 0; }
.picset-footer hr {
  border: none;
  border-top: 1px solid hsl(var(--border-light));
  margin: 24px 0;
}
.picset-footer-copy {
  text-align: center;
  margin: 0;
  font-size: 13px;
  color: hsl(var(--text-secondary));
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .picset-header { padding: 16px; }
  .picset-header-inner { flex-wrap: wrap; gap: 12px; }
  .picset-nav-invite-btn span:last-child { display: none; }
  .picset-hero { padding: 48px 0 0; }
  .picset-hero h1 { font-size: 32px; }
  .picset-hero .lead { font-size: 16px; }
  .section-title h2 { font-size: 26px; }
  .picset-feature-row { margin-bottom: 48px; }
  .picset-feature-card { padding: 24px; }
}

/* AI 帮写方案弹窗（Studio Genesis） */
.genesis-ai-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 24px; }
.genesis-ai-modal[hidden] { display: none !important; }
.genesis-ai-backdrop { position: absolute; inset: 0; z-index: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); cursor: default; }
.genesis-ai-dialog {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: calc(100vh - 48px);
  background: #fff; border-radius: 16px; border: 1px solid hsl(var(--border));
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2); display: flex; flex-direction: column; overflow: hidden;
}
.genesis-ai-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: none; background: transparent;
  color: #71717a; font-size: 20px; line-height: 1; cursor: pointer; border-radius: 8px; z-index: 2;
}
.genesis-ai-close:hover { background: #f4f4f5; color: #18181b; }
.genesis-ai-head { padding: 20px 20px 12px; border-bottom: 1px solid #f0f0f0; }
.genesis-ai-head-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #18181b; margin: 0 0 4px; }
.genesis-ai-head-title svg { color: hsl(var(--primary)); flex-shrink: 0; }
.genesis-ai-head-sub { font-size: 12px; color: #71717a; margin: 0; }
.genesis-ai-body { padding: 16px 20px; flex: 1; overflow: auto; min-height: 0; }
.genesis-ai-plan-label { font-size: 13px; font-weight: 500; color: #18181b; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.genesis-ai-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.genesis-ai-tab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid #e4e4e7; background: #fff;
  font-size: 12px; color: #52525b; cursor: pointer; font-family: inherit; transition: all .15s;
}
.genesis-ai-tab.is-active { background: #18181b; color: #fff; border-color: #18181b; }
.genesis-ai-tab:disabled { opacity: 0.5; cursor: not-allowed; }
.genesis-ai-editor-wrap {
  border: 1px solid #e4e4e7; border-radius: 10px; background: #fafafa; min-height: 360px; position: relative;
}
.genesis-ai-editor {
  width: 100%; min-height: 360px; max-height: 52vh; padding: 14px 16px; border: none; background: transparent;
  font-size: 13px; line-height: 1.65; color: #27272a; resize: vertical; font-family: inherit; box-sizing: border-box;
  white-space: pre-wrap; word-break: break-word;
}
.genesis-ai-editor:focus { outline: none; }
.genesis-ai-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: rgba(250, 250, 250, 0.92); border-radius: 10px; color: #71717a; font-size: 13px;
}
.genesis-ai-loading[hidden] { display: none !important; }
#genesisAiLoadingText {
  transition: opacity 0.22s ease;
  min-height: 1.2em;
  text-align: center;
  padding: 0 16px;
}
#genesisAiLoadingText.is-changing { opacity: 0.35; }
.genesis-ai-spinner {
  width: 28px; height: 28px; border: 3px solid #e4e4e7; border-top-color: #18181b; border-radius: 50%;
  animation: genesis-ai-spin .7s linear infinite;
}
@keyframes genesis-ai-spin { to { transform: rotate(360deg); } }
.genesis-ai-foot { padding: 12px 20px 20px; border-top: 1px solid #f0f0f0; }
.genesis-ai-confirm {
  width: 100%; height: 44px; border: none; border-radius: 10px; background: #18181b; color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.genesis-ai-confirm:disabled { background: #a1a1aa; cursor: not-allowed; }
.genesis-ai-regen {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px;
  font-size: 12px; color: #71717a; background: none; border: none; cursor: pointer; width: 100%; font-family: inherit;
}
.genesis-ai-regen:hover { color: #18181b; }
.genesis-ai-regen:disabled { opacity: 0.5; cursor: not-allowed; }
body.genesis-ai-modal-open { overflow: hidden; }

/* ===== 通用生成结果卡片（服装组图 / 广告图等） ===== */
.result-panel.has-results {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
}
.picset-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.picset-result-header-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.picset-result-header-main svg { color: hsl(var(--muted-fg)); flex-shrink: 0; }
.picset-result-title { font-size: 14px; font-weight: 600; color: hsl(var(--fg)); }
.picset-result-count { font-size: 12px; color: hsl(var(--muted-fg)); margin-left: 4px; }
.picset-result-toolbar { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.picset-result-batch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--fg));
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.picset-result-batch-btn:hover { background: hsl(var(--secondary)); border-color: hsl(var(--muted-fg)); }
.picset-result-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding-right: 4px;
}
.picset-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.picset-result-grid.is-single { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
.picset-result-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  aspect-ratio: 3 / 4;
}
.picset-result-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.picset-result-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity .2s ease;
}
.picset-result-card:hover .picset-result-overlay,
.picset-result-card:focus-within .picset-result-overlay { opacity: 1; }
.picset-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.picset-result-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: hsl(var(--fg));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.picset-result-action:hover { transform: scale(1.06); background: #fff; }
.picset-result-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}
.picset-result-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.picset-result-lightbox img {
  max-width: min(960px, 100%);
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transition: opacity .2s ease;
}
.picset-result-lightbox.is-loading img {
  opacity: 0.35;
}
.picset-result-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.picset-result-lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
body.is-modal-open { overflow: hidden; }
@media (hover: none) {
  .picset-result-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.15) 55%, transparent 100%);
    align-items: flex-end;
    padding-bottom: 42px;
  }
}

/* ===== 全品类商品图页面 ===== */
.genesis-card {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.genesis-card .upload-zone {
  padding: 24px 0;
}
.genesis-result-panel {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
  align-self: stretch;
}
section[data-tool="genesis"] {
  align-items: stretch;
}
.genesis-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: hsl(var(--secondary));
  font-size: 12px;
  color: hsl(var(--fg));
  cursor: pointer;
  overflow: visible;
}
.genesis-select svg { opacity: 0.45; flex-shrink: 0; }
.genesis-textarea {
  width: 100%;
  min-height: 120px;
  padding: 8px 12px 40px;
  border: none;
  border-radius: 10px;
  background: hsl(var(--secondary));
  font-size: 14px;
  color: hsl(var(--fg));
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
}
.genesis-textarea::placeholder { color: hsl(var(--muted-fg)); }
.genesis-textarea:focus { outline: none; box-shadow: inset 0 0 0 1px hsl(var(--border)); }
.btn-ai-write-wrap {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
}
.btn-ai-write-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px 4px 10px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 9999px;
  box-shadow: none;
}
.btn-ai-write {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #18181b;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
}
.btn-ai-write-wand {
  flex-shrink: 0;
  color: #18181b;
}
.btn-ai-write-label {
  line-height: 1;
}
.btn-ai-write-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0 0 0 1px;
  border: none;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 50%;
}
.btn-ai-write-help:hover {
  color: #52525b;
}
.btn-ai-write-help svg {
  display: block;
}
.btn-ai-write:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-ai-write:disabled .btn-ai-write-wand,
.btn-ai-write:disabled .btn-ai-write-label {
  opacity: 0.7;
}
.genesis-mode-tabs {
  display: flex;
  gap: 8px;
}
.genesis-mode-tabs button {
  flex: 1;
  padding: 0 16px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: #fff;
  font-size: 12px;
  color: hsl(var(--fg));
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.genesis-mode-tabs button.is-active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ===== Genesis 设计规划预览 ===== */
.genesis-design-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 420px;
  color: #71717a;
  font-size: 13px;
}
.genesis-design-loading-text {
  transition: opacity 0.22s ease;
  text-align: center;
  padding: 0 16px;
}
.genesis-design-loading-text.is-changing { opacity: 0.35; }

/* Genesis 规划分析中 */
.genesis-analyze-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding-bottom: 4px;
}
.genesis-analyze-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
}
.genesis-analyze-head-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--muted-fg));
}
.genesis-analyze-title {
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--fg));
  margin: 0 0 4px;
}
.genesis-analyze-sub {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.5;
}
.genesis-analyze-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 14px;
  flex-wrap: wrap;
}
.genesis-analyze-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 11px;
  color: #71717a;
  transition: all .2s ease;
}
.genesis-analyze-step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  background: #f4f4f5;
  color: #71717a;
  flex-shrink: 0;
}
.genesis-analyze-step.is-active {
  border-color: #18181b;
  color: #18181b;
  background: #fafafa;
}
.genesis-analyze-step.is-active .genesis-analyze-step-dot {
  background: #18181b;
  color: #fff;
}
.genesis-analyze-step.is-done {
  border-color: #d4d4d8;
  color: #52525b;
}
.genesis-analyze-step.is-done .genesis-analyze-step-dot {
  background: #18181b;
  color: #fff;
  font-size: 9px;
}
.genesis-analyze-progress-wrap {
  position: relative;
  height: 6px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.genesis-analyze-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #e4e4e7;
  border-radius: 1px;
}
.genesis-analyze-progress-bar {
  position: relative;
  height: 4px;
  background: #18181b;
  border-radius: 2px;
  width: 10%;
  z-index: 1;
  transition: width 0.8s ease;
}
.genesis-analyze-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 11px;
  color: #a1a1aa;
}
.genesis-analyze-meta-sep { opacity: 0.7; }
.genesis-analyze-preview {
  flex: 1;
  min-height: 220px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f4f4f5 0%, #ececee 50%, #f0f0f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.genesis-analyze-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.genesis-analyze-preview-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  color: #a1a1aa;
}
.genesis-analyze-preview-empty p {
  margin: 0;
  font-size: 13px;
  color: #71717a;
}
.genesis-analyze-preview-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.genesis-analyze-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.genesis-analyze-divider {
  height: 1px;
  background: hsl(var(--border));
  margin: 20px 0 0;
}
.genesis-analyze-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}
.genesis-analyze-hint {
  font-size: 13px;
  color: hsl(var(--fg));
  text-align: center;
  margin: 0 0 8px;
  min-height: 1.4em;
  line-height: 1.55;
  transition: opacity 0.22s ease;
}
.genesis-analyze-hint.is-changing { opacity: 0.35; }

.genesis-result-panel.is-loading .mirror-result-header {
  margin-bottom: 20px;
}

.genesis-design-preview {
  display: flex;
  flex-direction: column;
}
.genesis-design-body {
  overflow: visible;
  padding-right: 0;
}
.genesis-design-head {
  margin-bottom: 16px;
  flex-shrink: 0;
}
.genesis-design-head-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.genesis-design-head-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #71717a;
}
.genesis-design-title {
  font-size: 16px;
  font-weight: 700;
  color: #18181b;
  margin: 0 0 4px;
}
.genesis-design-sub {
  font-size: 12px;
  color: #71717a;
  margin: 0;
}
.genesis-design-block-title {
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
  margin: 0 0 10px;
}
.genesis-design-lead-group {
  margin-bottom: 12px;
}
.genesis-design-lead-p {
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 3px solid #d4d4d8;
  font-size: 13px;
  line-height: 1.65;
  color: #3f3f46;
}
.genesis-design-lead-p:last-child { margin-bottom: 0; }
.genesis-design-h4 {
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
  margin: 12px 0 6px;
}
.genesis-design-h4:first-child { margin-top: 0; }
.genesis-design-h5 {
  font-size: 12px;
  font-weight: 600;
  color: #52525b;
  margin: 10px 0 6px;
  padding-left: 2px;
}
.genesis-design-p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.65;
  color: #3f3f46;
}
.genesis-design-muted {
  margin: 0;
  font-size: 13px;
  color: #a1a1aa;
}
.genesis-design-kv {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.6;
}
.genesis-design-k {
  color: #52525b;
  font-weight: 500;
  flex-shrink: 0;
}
.genesis-design-v {
  color: #27272a;
  flex: 1;
  min-width: 0;
}
.genesis-design-list {
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
}
.genesis-design-bullet {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #3f3f46;
}
.genesis-design-bullet::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #a1a1aa;
}
.genesis-design-scroll {
  display: contents;
}
.genesis-design-specs-scroll {
  max-height: min(280px, 36vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.genesis-design-specs-card {
  width: 100%;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}
.genesis-design-specs-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px 0;
}
.genesis-design-specs-toggle {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 0 0 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.genesis-design-specs-edit-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  color: #71717a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.genesis-design-specs-title {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
}
.genesis-design-specs-sub {
  grid-column: 1;
  margin: 0;
  font-size: 12px;
  color: #71717a;
}
.genesis-design-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #a1a1aa;
  transition: transform 0.2s ease;
}
.genesis-design-specs-card.is-open .genesis-design-chevron {
  transform: rotate(180deg);
}
.genesis-design-specs-body {
  display: none;
  padding: 0 18px 18px;
}
.genesis-design-specs-card.is-open .genesis-design-specs-body {
  display: block;
}
.genesis-design-specs-view {
  font-size: 13px;
  line-height: 1.65;
  color: #3f3f46;
}
.genesis-design-specs-card textarea.genesis-design-specs-edit {
  display: none;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.65;
  color: #27272a;
  resize: vertical;
  min-height: 160px;
  max-height: min(280px, 36vh);
  overflow-y: auto;
  font-family: inherit;
}
.genesis-design-specs-card.is-editing .genesis-design-specs-scroll {
  display: none;
}
.genesis-design-specs-card.is-editing .genesis-design-specs-view {
  display: none;
}
.genesis-design-specs-card.is-editing textarea.genesis-design-specs-edit {
  display: block;
  background: #fff;
}
.genesis-design-specs-edit:focus {
  outline: none;
  border-color: #a1a1aa;
}
.genesis-design-plans-section {
  width: 100%;
  display: block;
  box-sizing: border-box;
  margin-top: 4px;
}
.genesis-design-plans-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  width: 100%;
  flex-shrink: 0;
}
.genesis-design-plans-head svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #71717a;
}
.genesis-design-plans-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
}
.genesis-design-plans-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #71717a;
}
.genesis-design-plans-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.genesis-design-plan-card {
  width: 100%;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}
.genesis-design-plan-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
}
.genesis-design-plan-index {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #18181b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.genesis-design-plan-title-wrap {
  flex: 1;
  min-width: 0;
}
.genesis-design-plan-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #18181b;
  line-height: 1.4;
}
.genesis-design-plan-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: #71717a;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.genesis-design-plan-card.is-open .genesis-design-plan-desc {
  -webkit-line-clamp: unset;
}
.genesis-design-plan-edit,
.genesis-design-plan-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  color: #71717a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.genesis-design-plan-toggle svg {
  transition: transform 0.2s ease;
}
.genesis-design-plan-card.is-open .genesis-design-plan-toggle svg {
  transform: rotate(180deg);
}
.genesis-design-plan-body {
  display: none;
  padding: 0 14px 14px 48px;
  font-size: 13px;
  line-height: 1.65;
  color: #3f3f46;
}
.genesis-design-plan-card.is-open .genesis-design-plan-body {
  display: block;
}
.genesis-design-plan-card.is-open:not(.is-editing) .genesis-design-plan-rich {
  max-height: min(280px, 36vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
.genesis-design-plan-card.is-editing .genesis-design-plan-content-edit {
  max-height: min(280px, 36vh);
  overflow-y: auto;
}
.genesis-design-plan-card.is-editing .genesis-design-plan-rich {
  display: none;
}
.genesis-design-plan-title-edit,
.genesis-design-plan-desc-edit,
.genesis-design-plan-content-edit {
  display: none;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.genesis-design-plan-card.is-editing .genesis-design-plan-title-edit,
.genesis-design-plan-card.is-editing .genesis-design-plan-desc-edit,
.genesis-design-plan-card.is-editing .genesis-design-plan-content-edit {
  display: block;
}
.genesis-design-plan-rich {
  margin-top: 4px;
}
.genesis-design-foot {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fff;
  justify-content: flex-start;
}
.genesis-design-foot .genesis-design-btn {
  flex: 0 1 auto;
  min-width: 120px;
}
.genesis-design-btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.genesis-design-btn-ghost {
  background: #fff;
  border: 1px solid #e4e4e7;
  color: #52525b;
}
.genesis-design-btn-primary {
  background: #18181b;
  border: none;
  color: #fff;
}
.genesis-design-btn-primary:hover { background: #27272a; }
.genesis-result-panel.has-design-preview {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  height: auto;
  max-height: none;
  overflow: visible;
}
.genesis-result-panel.has-design-preview .genesis-design-preview {
  overflow: visible;
}

/* Genesis 后台生成等待卡片 */
.genesis-result-panel.has-bg-task {
  min-height: 420px;
  height: auto;
  max-height: none;
  overflow: visible;
  justify-content: flex-start;
}
.genesis-bg-generating {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  min-height: 360px;
}
.genesis-bg-slots-grid {
  flex: 1;
  min-height: 360px;
  align-content: start;
  width: 100%;
}
.genesis-bg-failed {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 24px;
}
.genesis-bg-failed-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 360px;
  text-align: center;
}
.genesis-bg-failed-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fef2f2;
  color: #ef4444;
  font-size: 24px;
  font-weight: 700;
  line-height: 48px;
  flex-shrink: 0;
}
.genesis-bg-failed-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #71717a;
  text-align: center;
}
.genesis-bg-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: hsl(var(--primary));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.genesis-bg-retry-btn:hover {
  opacity: 0.9;
}
.genesis-bg-retry-btn svg {
  flex-shrink: 0;
}
.genesis-bg-back-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: hsl(var(--muted-fg));
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.genesis-bg-back-btn:hover {
  color: hsl(var(--fg));
}
.genesis-bg-done-card {
  aspect-ratio: 3 / 4;
}
.genesis-bg-done-card .picset-result-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
  color: #3f3f46;
  pointer-events: none;
}
.genesis-bg-slot {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e4e4e7;
  background: #fff;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
}
.genesis-bg-slot-media {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #f4f4f5;
}
.genesis-bg-slot-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.genesis-bg-slot-shimmer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  background: linear-gradient(110deg, #f4f4f5 8%, #ececef 18%, #f8f8f9 33%, #f4f4f5 50%);
  background-size: 220% 100%;
  animation: genesis-slot-shimmer 1.8s ease-in-out infinite;
}
.genesis-bg-slot.is-pending .genesis-bg-slot-shimmer {
  animation: none;
  background: linear-gradient(145deg, #f4f4f5 0%, #ececee 50%, #f0f0f2 100%);
}
.genesis-bg-slot.is-queued .genesis-bg-slot-shimmer {
  animation: genesis-slot-shimmer 2.4s ease-in-out infinite;
}
@keyframes genesis-slot-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.genesis-bg-slot-shimmer-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  color: #a1a1aa;
}
.genesis-bg-slot-shimmer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #71717a;
}
.genesis-bg-slot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #f0f0f1;
  background: #fff;
}
.genesis-bg-slot-label {
  font-size: 12px;
  font-weight: 600;
  color: #3f3f46;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.genesis-bg-slot-badge {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #71717a;
}
.genesis-bg-slot.is-generating .genesis-bg-slot-badge {
  background: #18181b;
  color: #fff;
}
.genesis-bg-slot.is-queued .genesis-bg-slot-badge {
  background: #ecfdf5;
  color: #16a34a;
}
.genesis-bg-slot.is-done .genesis-bg-slot-badge {
  background: #ecfdf5;
  color: #16a34a;
}
.genesis-bg-task-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 12px 4px;
  border: 1px solid #f0f0f1;
  border-radius: 16px;
  background: #fafafa;
  flex-shrink: 0;
}
.genesis-bg-task-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.genesis-bg-task-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f4f4f5;
  color: #52525b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: genesis-bg-pulse 2s ease-in-out infinite;
}
.genesis-bg-task-icon.is-done {
  animation: none;
  background: #ecfdf5;
  color: #16a34a;
}
.genesis-bg-task-icon.is-failed {
  animation: none;
  background: #fef2f2;
  color: #dc2626;
}
@keyframes genesis-bg-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(0.96); }
}
.genesis-bg-task-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #18181b;
}
.genesis-bg-task-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #71717a;
}
.genesis-bg-task-phases {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.genesis-bg-phase {
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #a1a1aa;
  transition: background 0.25s ease, color 0.25s ease;
}
.genesis-bg-phase.is-done {
  background: #ecfdf5;
  color: #16a34a;
}
.genesis-bg-phase.is-active {
  background: #18181b;
  color: #fff;
}
.genesis-bg-task-progress-wrap {
  position: relative;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #f4f4f5;
}
.genesis-bg-task-progress-track {
  position: absolute;
  inset: 0;
  background: #f4f4f5;
}
.genesis-bg-task-progress-bar {
  position: relative;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #18181b, #52525b);
  transition: width 0.45s ease;
}
.genesis-bg-task-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #52525b;
  min-height: 1.6em;
}
.genesis-bg-task-hint.is-changing { opacity: 0.35; }
.genesis-bg-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.genesis-bg-task-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #18181b;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.genesis-bg-task-btn:hover { background: #fafafa; }
.genesis-bg-task-btn-primary {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
}
.genesis-bg-task-btn-primary:hover { background: #27272a; }

/* ===== 图片精修页面 ===== */
.refinement-page-hero .refinement-page-badge {
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.refinement-page-hero .mirror-page-desc {
  max-width: 640px;
}
.refinement-product-card {
  border-radius: 24px;
  padding: 24px;
}

.refinement-upload-primary {
  font-size: 13px;
  font-weight: 500;
  color: #18181b;
  margin: 0;
  line-height: 1.5;
  text-align: center;
}
.refinement-upload-secondary {
  font-size: 12px;
  color: #71717a;
  margin: 4px 0 0;
  line-height: 1.4;
  text-align: center;
}
.refinement-config-card,
.refinement-speed-card {
  border-radius: 24px;
  padding: 24px;
}
.refinement-config-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.refinement-config-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--muted-fg));
}
.refinement-config-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  color: #18181b;
  line-height: 1.3;
}
.refinement-config-desc {
  font-size: 12px;
  color: #71717a;
  margin: 0;
  line-height: 1.4;
}
.refinement-prompt-textarea {
  margin-bottom: 16px;
}
.refinement-action-wrap {
  margin-top: 4px;
}

/* ===== 批量翻译页面 ===== */
.translation-page-hero .translation-page-badge {
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.translation-page-hero .mirror-page-desc {
  max-width: 640px;
}
.translation-product-card,
.translation-config-card,
.translation-speed-card {
  border-radius: 24px;
  padding: 24px;
}
.translation-upload-primary {
  font-size: 13px;
  font-weight: 500;
  color: #18181b;
  margin: 0;
  line-height: 1.5;
  text-align: center;
}
.translation-upload-secondary {
  font-size: 12px;
  color: #71717a;
  margin: 4px 0 0;
  line-height: 1.4;
  text-align: center;
}
.translation-config-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.translation-config-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #18181b;
  letter-spacing: -0.02em;
}
.translation-config-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  color: #18181b;
  line-height: 1.3;
}
.translation-config-desc {
  font-size: 12px;
  color: #71717a;
  margin: 0;
  line-height: 1.4;
}
.translation-prompt-textarea {
  margin: 12px 0 16px;
}
.translation-info-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: hsl(var(--secondary));
  color: #71717a;
}
.translation-info-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #a1a1aa;
}
.translation-info-tip p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}
.translation-action-wrap {
  margin-top: 4px;
}
.translation-submit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.translation-result-panel {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
}
.translation-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--fg));
}
.translation-result-head svg {
  color: hsl(var(--muted-fg));
}
.translation-result-hint {
  font-size: 12px;
  font-weight: 400;
  color: hsl(var(--muted-fg));
  margin-left: 4px;
}
.translation-result-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.translation-result-body svg {
  color: hsl(var(--border));
}
.translation-result-body p {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* ===== 产品精修页面布局 ===== */
.refinement-page-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 32px;
}
@media (max-width: 768px) {
  .refinement-page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .refinement-result-panel {
    min-height: 360px;
  }
}

.refinement-result-panel {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
}
.refinement-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--fg));
}
.refinement-result-hint {
  font-size: 12px;
  font-weight: 400;
  color: hsl(var(--muted-fg));
  margin-left: 4px;
}
.refinement-result-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.refinement-result-body p {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* ===== 服装组图页面 ===== */
.clothing-page-hero .mirror-page-desc {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.6;
  color: hsl(var(--text-secondary));
}

/* 步骤条（Genesis / 服装组图等） */
.step-bar.picset-step-bar,
.picset-step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0 16px 32px;
  margin-bottom: 8px;
}

.step-bar.picset-step-bar .step-item,
.picset-step-bar .step-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-bar.picset-step-bar .step-circle,
.picset-step-bar .step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  background: #e4e4e7;
  color: #fff;
  line-height: 1;
}

.step-bar.picset-step-bar .step-label,
.picset-step-bar .step-label {
  font-size: 12px;
  font-weight: 400;
  color: #a1a1aa;
  white-space: nowrap;
}

.step-bar.picset-step-bar .step-item.is-active .step-circle,
.picset-step-bar .step-item.is-active .step-circle {
  background: #18181b;
  color: #fff;
}

.step-bar.picset-step-bar .step-item.is-active .step-label,
.picset-step-bar .step-item.is-active .step-label {
  color: #18181b;
  font-weight: 500;
}

.step-bar.picset-step-bar .step-item.is-done .step-circle,
.picset-step-bar .step-item.is-done .step-circle {
  background: #22c55e;
  color: #fff;
}

.step-bar.picset-step-bar .step-item.is-done .step-label,
.picset-step-bar .step-item.is-done .step-label {
  color: #18181b;
  font-weight: 500;
}

.step-bar.picset-step-bar .step-bar-line,
.picset-step-bar .step-bar-line {
  width: 36px;
  height: 1px;
  background: #e4e4e7;
  margin: 0 10px;
  flex-shrink: 0;
  border-radius: 1px;
}

.step-bar.picset-step-bar .step-bar-line.is-done,
.picset-step-bar .step-bar-line.is-done {
  background: #22c55e;
}

.clothing-card {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.clothing-studio-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}
.clothing-result-panel {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
}
.clothing-sidebar .clothing-mode-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
}
.clothing-sidebar .clothing-mode-btn {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  border: none;
  background: transparent;
  color: #52525b;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease;
}
.clothing-sidebar .clothing-mode-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: currentColor;
}
.clothing-sidebar .clothing-mode-btn span {
  white-space: nowrap;
}
.clothing-sidebar .clothing-mode-btn.is-active {
  padding: 10px 16px;
  min-height: 36px;
  border-radius: 9999px;
  background: #18181b;
  color: #fff;
}
.clothing-sidebar .clothing-mode-btn:not(.is-active) {
  padding: 10px 16px;
  min-height: 36px;
  border-radius: 9999px;
  color: #71717a;
}
.clothing-sidebar .clothing-mode-btn:not(.is-active):hover {
  color: #3f3f46;
}
.clothing-sidebar .clothing-upload-card.mirror-sidebar-card,
.clothing-sidebar .clothing-settings-card.mirror-sidebar-card,
.clothing-sidebar .clothing-gen-types-card.mirror-sidebar-card {
  width: 100%;
  box-sizing: border-box;
  border-radius: 24px;
  padding: 24px;
}
.clothing-sidebar .upload-zone-wrap {
  width: 100%;
}
.clothing-sidebar .clothing-upload-zone {
  width: 100%;
  box-sizing: border-box;
}
.clothing-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--muted-fg));
}
.clothing-card-optional {
  font-size: 12px;
  font-weight: 400;
  color: hsl(var(--muted-fg));
}
.clothing-upload-primary {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--fg));
  margin: 0;
  line-height: 1.5;
  text-align: center;
}
.clothing-upload-secondary {
  font-size: 11px;
  color: hsl(var(--muted-fg));
  margin: 2px 0 0;
  line-height: 1.4;
  text-align: center;
}
.clothing-upload-zone {
  border: 1px dashed #d4d4d8;
  border-radius: 16px;
  min-height: 128px;
  padding: 28px 16px;
  transition: border-color 0.2s ease;
}
.clothing-model-zone .mirror-upload-icon,
.clothing-scene-zone .mirror-upload-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: hsl(var(--muted-fg));
}
.clothing-model-zone:hover:not(.has-grid) .mirror-upload-icon,
.clothing-scene-zone:hover:not(.has-grid) .mirror-upload-icon,
.clothing-model-zone.is-dragover:not(.has-grid) .mirror-upload-icon,
.clothing-scene-zone.is-dragover:not(.has-grid) .mirror-upload-icon {
  background: transparent;
}
.clothing-upload-card:not(.has-upload) .clothing-upload-zone:not(.has-grid):hover {
  background: #f0f0f2;
  border-color: #8e8e93;
}
.clothing-upload-zone.is-dragover {
  background: #e4e4e7;
  border-color: #18181b;
}
.clothing-model-zone,
.clothing-scene-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 28px 16px 48px !important;
}
#clothingModelCard.has-upload .clothing-model-zone {
  padding: 12px 12px 48px !important;
  border: none;
  background: transparent;
  cursor: default;
}
#clothingModelCard.has-upload #clothingModelUploadDefault {
  display: none !important;
}
#clothingSceneCard.has-upload #clothingSceneUploadDefault {
  display: none !important;
}
#clothingModelCard.clothing-card-highlight,
#clothingSceneCard.clothing-card-highlight {
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
  transition: box-shadow 0.25s ease;
}
.clothing-model-hero-preview {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f4f5;
}
.clothing-model-hero-preview[hidden] {
  display: none !important;
}
.clothing-model-hero-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.clothing-scene-zone {
  min-height: 152px;
}
.clothing-zone-ai-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  color: #71717a;
  cursor: pointer;
  font-family: inherit;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.clothing-zone-ai-btn:hover {
  border-color: #d4d4d8;
  background: #fafafa;
  color: #52525b;
}
.clothing-zone-ai-btn svg {
  flex-shrink: 0;
  color: currentColor;
}

/* 服装组图 — AI 生成模特图弹窗 */
.clothing-model-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.clothing-model-ai-modal[hidden] {
  display: none !important;
}
.clothing-model-ai-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}
.clothing-model-ai-dialog {
  position: relative;
  width: min(960px, 100%);
  height: min(640px, calc(100vh - 48px));
  background: #fff;
  border-radius: 20px;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: clothing-model-ai-in 0.22s ease;
}
@keyframes clothing-model-ai-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.clothing-model-ai-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.clothing-model-ai-close:hover {
  background: #f4f4f5;
  color: #18181b;
}
.clothing-model-ai-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  height: 100%;
  min-height: 0;
}
.clothing-model-ai-main {
  background: #f5f5f5;
  padding: 24px 28px 28px;
  overflow: auto;
  min-height: 0;
}
.clothing-model-ai-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
  line-height: 1.3;
}
.clothing-model-ai-title svg {
  color: #18181b;
  flex-shrink: 0;
}
.clothing-model-ai-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.clothing-model-ai-grid {
  display: grid;
  gap: 12px;
}
.clothing-model-ai-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.clothing-model-ai-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.clothing-model-ai-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.clothing-model-ai-label {
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
}
.clothing-model-ai-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.clothing-model-ai-link-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease;
}
.clothing-model-ai-link-btn:hover {
  color: #18181b;
}
.clothing-model-ai-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #d4d4d8;
  font-size: 13px;
}
.clothing-model-ai-preview-zone.is-empty {
  flex-direction: column;
}
.clothing-model-ai-select {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  color: #18181b;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: visible;
}
.clothing-model-ai-select:hover {
  border-color: #d4d4d8;
}
.clothing-model-ai-select.is-open,
.clothing-model-ai-select:focus-visible {
  z-index: 10150;
  border-color: #a1a1aa;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.06);
  outline: none;
}
.clothing-model-ai-select svg {
  opacity: 0.45;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.clothing-model-ai-select.is-open svg {
  transform: rotate(180deg);
}
.clothing-model-ai-textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
  color: #18181b;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.clothing-model-ai-textarea::placeholder {
  color: #a1a1aa;
}
.clothing-model-ai-textarea:focus {
  outline: none;
  border-color: #a1a1aa;
}
.clothing-model-ai-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: none;
  border-radius: 14px;
  background: #18181b;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.clothing-model-ai-submit:hover:not(:disabled) {
  background: #27272a;
}
.clothing-model-ai-submit:disabled {
  background: #a1a1aa;
  cursor: not-allowed;
}
.clothing-model-ai-submit.is-loading {
  pointer-events: none;
  opacity: 0.88;
}
.clothing-model-ai-submit-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: clothing-model-ai-spin 0.65s linear infinite;
}
@keyframes clothing-model-ai-spin {
  to { transform: rotate(360deg); }
}
.clothing-model-ai-credits {
  margin: -8px 0 0;
  text-align: center;
  font-size: 12px;
  color: #71717a;
}
.clothing-model-ai-preview-block {
  margin-top: 4px;
}
.clothing-model-ai-preview-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #18181b;
}
.clothing-model-ai-preview-zone {
  min-height: 180px;
  border: 1px dashed #d4d4d8;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4d4d8;
  transition: border-color 0.15s ease;
}
.clothing-model-ai-preview-zone.has-image {
  border-style: solid;
  border-color: #e4e4e7;
  padding: 12px;
}
.clothing-model-ai-preview-zone img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 12px;
  object-fit: contain;
}
.clothing-model-ai-preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #71717a;
}
.clothing-model-ai-side {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid #f0f0f0;
  min-height: 0;
  /* 为右上角关闭按钮留出空间，避免遮挡上传/生成选项卡 */
  padding-top: 48px;
}
.clothing-model-ai-side-tabs {
  display: flex;
  gap: 4px;
  margin: 0 16px 12px;
  padding: 4px;
  background: #f4f4f5;
  border-radius: 12px;
}
.clothing-model-ai-side-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #71717a;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.clothing-model-ai-side-tab:hover:not(.is-active) {
  color: #52525b;
}
.clothing-model-ai-side-tab.is-active {
  background: #fff;
  color: #18181b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.clothing-model-ai-side-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 0 16px 8px;
}
.clothing-model-ai-side-panel[hidden] {
  display: none !important;
}
.clothing-model-ai-side-hint {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: #a1a1aa;
  padding: 12px 8px;
}
.clothing-model-ai-side-hint[hidden] {
  display: none !important;
}
.clothing-model-ai-side-hint svg {
  color: #d4d4d8;
}
.clothing-model-ai-side-hint p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #71717a;
}
.clothing-model-ai-goto-upload {
  margin-top: 4px;
  padding: 8px 16px;
  border: 1px solid #e4e4e7;
  border-radius: 9999px;
  background: #fff;
  color: #18181b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.clothing-model-ai-goto-upload:hover {
  border-color: #a1a1aa;
  background: #fafafa;
}
.clothing-model-ai-thumb-grid-single {
  grid-template-columns: 1fr;
}
.clothing-model-ai-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.clothing-model-ai-thumb-grid[hidden] {
  display: none !important;
}
.clothing-model-ai-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #f4f4f5;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.clothing-model-ai-thumb:hover {
  border-color: #d4d4d8;
}
.clothing-model-ai-thumb.is-selected {
  border-color: #18181b;
  box-shadow: 0 0 0 1px #18181b;
}
.clothing-model-ai-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.clothing-model-ai-thumb-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #18181b;
  color: #fff;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
}
.clothing-model-ai-thumb.is-selected .clothing-model-ai-thumb-check {
  display: flex;
}
.clothing-model-ai-side-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #a1a1aa;
  text-align: center;
}
.clothing-model-ai-side-empty[hidden] {
  display: none !important;
}
.clothing-model-ai-side-empty svg {
  color: #d4d4d8;
}
.clothing-model-ai-side-empty p {
  margin: 0;
  font-size: 13px;
}
.clothing-model-ai-side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #f0f0f0;
}
.clothing-model-ai-cancel {
  border: none;
  background: transparent;
  color: #71717a;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 4px;
}
.clothing-model-ai-cancel:hover {
  color: #18181b;
}
.clothing-model-ai-apply {
  flex: 1;
  max-width: 200px;
  height: 40px;
  border: none;
  border-radius: 9999px;
  background: #a1a1aa;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: not-allowed;
  font-family: inherit;
}
.clothing-model-ai-apply:not(:disabled) {
  background: #18181b;
  cursor: pointer;
}
.clothing-model-ai-apply:not(:disabled):hover {
  background: #27272a;
}
@media (max-width: 860px) {
  .clothing-model-ai-side {
    padding-top: 0;
  }
  .clothing-model-ai-side-tabs {
    margin-top: 20px;
  }
  .clothing-model-ai-main {
    padding-right: 56px;
  }
  .clothing-model-ai-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .clothing-model-ai-side {
    border-left: none;
    border-top: 1px solid #f0f0f0;
    max-height: 280px;
  }
  .clothing-model-ai-grid-3 {
    grid-template-columns: 1fr;
  }
}

.clothing-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: hsl(var(--fg));
}
.clothing-section-head {
  margin-bottom: 12px;
}
.clothing-section-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: hsl(var(--muted-fg));
}
.clothing-gen-types-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.clothing-gen-types-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--fg));
}
.clothing-gen-types-badge {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  white-space: nowrap;
}
.clothing-gen-type-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.clothing-gen-type-card {
  border: 1px solid #ececef;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f7f7f8;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.clothing-gen-type-card:not(.is-selected):not([data-gen-type="3d"]):not([data-gen-type="mannequin"]) {
  opacity: 0.55;
}
.clothing-gen-type-card.is-selected {
  opacity: 1;
  background: #f7f7f8;
  border-color: #ececef;
}
.clothing-gen-type-card[data-gen-type="3d"]:not(.is-selected) .clothing-gen-type-icon,
.clothing-gen-type-card[data-gen-type="3d"]:not(.is-selected) .clothing-gen-type-name,
.clothing-gen-type-card[data-gen-type="3d"]:not(.is-selected) .clothing-gen-type-desc,
.clothing-gen-type-card[data-gen-type="mannequin"]:not(.is-selected) .clothing-gen-type-icon,
.clothing-gen-type-card[data-gen-type="mannequin"]:not(.is-selected) .clothing-gen-type-name,
.clothing-gen-type-card[data-gen-type="mannequin"]:not(.is-selected) .clothing-gen-type-desc {
  opacity: 0.55;
}
.clothing-gen-type-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.clothing-gen-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #e4e4e7;
  color: #71717a;
}
.clothing-gen-type-card.is-selected .clothing-gen-type-icon {
  background: #18181b;
  color: #fff;
}
.clothing-gen-type-text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}
.clothing-gen-type-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #18181b;
  line-height: 1.35;
}
.clothing-gen-type-desc {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #71717a;
}
.clothing-gen-type-card:not(.is-selected) .clothing-gen-type-name,
.clothing-gen-type-card:not(.is-selected) .clothing-gen-type-desc {
  color: #a1a1aa;
}
.clothing-gen-type-opts {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  padding-top: 6px;
}
.clothing-gen-toggle {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 12px;
  color: #71717a;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  white-space: nowrap;
}
.clothing-gen-toggle.is-active {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
}
.clothing-gen-type-card:not(.is-selected) .clothing-gen-toggle {
  opacity: 0.85;
}
.clothing-gen-type-card[data-gen-type="3d"] .clothing-gen-type-icon,
.clothing-gen-type-card[data-gen-type="3d"] .clothing-gen-type-text,
.clothing-gen-type-card[data-gen-type="mannequin"] .clothing-gen-type-icon,
.clothing-gen-type-card[data-gen-type="mannequin"] .clothing-gen-type-text {
  cursor: pointer;
}
.clothing-gen-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
}
.clothing-gen-pill-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #d4d4d8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}
.clothing-gen-pill-check {
  display: none;
  color: #18181b;
}
.clothing-gen-pill.is-active {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
}
.clothing-gen-pill.is-active .clothing-gen-pill-icon {
  background: #fff;
  border-color: #fff;
}
.clothing-gen-pill.is-active .clothing-gen-pill-check {
  display: block;
}
.clothing-gen-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.clothing-gen-type-card:not(.is-selected) .clothing-gen-stepper {
  opacity: 0.85;
}
.clothing-gen-stepper-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  color: #18181b;
  cursor: pointer;
  font-family: inherit;
}
.clothing-gen-stepper-btn:hover {
  background: #f4f4f5;
}
.clothing-gen-stepper-val {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: #18181b;
}
.clothing-sidebar > .clothing-submit-btn {
  margin-top: 0;
}
.clothing-analyze-btn {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 16px;
  padding: 16px;
}
.clothing-analyze-btn .clothing-submit-icon {
  flex-shrink: 0;
}
.clothing-analyze-btn #clothingSubmitCredits {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
}
.clothing-field { display: flex; flex-direction: column; gap: 8px; }
.clothing-field-label {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-fg));
}
.clothing-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: hsl(var(--secondary));
  font-size: 13px;
  color: hsl(var(--fg));
  cursor: pointer;
}
.clothing-select svg { opacity: 0.45; flex-shrink: 0; }
.clothing-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: hsl(var(--secondary));
  font-size: 13px;
  color: hsl(var(--fg));
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
  margin-bottom: 16px;
}
.clothing-textarea::placeholder { color: hsl(var(--muted-fg)); }
.clothing-textarea:focus { outline: none; box-shadow: inset 0 0 0 1px hsl(var(--border)); }
.clothing-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.clothing-count-hint {
  font-size: 11px;
  color: hsl(var(--muted-fg));
  margin: 0;
  line-height: 1.4;
}
.clothing-secondary-btn {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  border-radius: 10px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border: none;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.clothing-submit-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  font-family: inherit;
  margin-top: 0;
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.clothing-submit-btn.clothing-analyze-btn {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.clothing-submit-btn #clothingSubmitCredits {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
}
.clothing-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--fg));
}
.clothing-result-hint {
  font-size: 12px;
  font-weight: 400;
  color: hsl(var(--muted-fg));
  margin-left: 4px;
}
.clothing-result-head-actions {
  margin-left: auto;
}
.clothing-result-head-actions .picset-result-batch-btn {
  font-size: 12px;
}
.clothing-result-panel.has-results .clothing-result-body {
  align-items: stretch;
  justify-content: flex-start;
}
.clothing-result-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.clothing-result-body p {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* ===== 广告图页面 ===== */
.ad-page-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 32px;
}
@media (max-width: 768px) {
  .ad-page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ad-result-panel {
    min-height: 360px;
  }
}
.ad-card {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.ad-result-panel {
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
}
.ad-field { display: flex; flex-direction: column; gap: 8px; }
.ad-field-label {
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-fg));
}
.ad-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: hsl(var(--secondary));
  font-size: 13px;
  color: hsl(var(--fg));
  cursor: pointer;
}
.ad-select svg { opacity: 0.45; flex-shrink: 0; }
.ad-textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: hsl(var(--secondary));
  font-size: 13px;
  color: hsl(var(--fg));
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
}
.ad-textarea::placeholder { color: hsl(var(--muted-fg)); }
.ad-textarea:focus { outline: none; box-shadow: inset 0 0 0 1px hsl(var(--border)); }
.ad-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.ad-upload-zone {
  padding: 28px 16px;
}
.ad-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ad-page-hero .mirror-page-desc {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.6;
  color: hsl(var(--text-secondary));
}
.ad-config-card {
  gap: 16px;
}
.ad-submit-btn {
  width: 100%;
}
.ad-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--fg));
}
.ad-result-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.ad-result-body p {
  font-size: 12px;
  color: hsl(var(--muted-fg));
  text-align: center;
  line-height: 1.5;
  margin: 0;
}
.select-dropdown {
  display: block;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 160px;
  z-index: 10100;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 0;
  overflow: hidden;
}
/* 细滚动条（弹窗 / 下拉等，继承全局变量） */
.picset-scrollbar {
  overscroll-behavior: contain;
}
.select-dropdown-viewport {
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.select-dropdown-inner {
  padding: 4px 6px;
}
.select-dropdown-item {
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.select-dropdown-item:hover {
  background: hsl(var(--secondary));
}
.select-dropdown-check {
  font-size: 12px;
  opacity: 0.55;
  flex-shrink: 0;
}
.select-dropdown-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 6px 0;
  border: none;
  background: hsl(var(--card));
  color: hsl(var(--muted-fg));
  cursor: pointer;
  flex-shrink: 0;
}
.select-dropdown-nav:hover:not(:disabled) {
  color: hsl(var(--fg));
  background: hsl(var(--secondary));
}
.select-dropdown-nav:disabled {
  opacity: 0.25;
  cursor: default;
}
.select-dropdown-nav[hidden] {
  display: none;
}

/* 服装基础套图 — 分析规划预览（全宽布局） */
.clothing-result-panel.has-clothing-design-preview,
.clothing-result-panel.has-clothing-generate-loading {
  display: flex;
  flex-direction: column;
}
.clothing-result-panel.has-clothing-generate-loading .clothing-result-head {
  flex-shrink: 0;
  padding: 16px 28px 0;
  border-bottom: none;
}
.clothing-result-panel.has-clothing-generate-loading .clothing-result-hint {
  color: #71717a;
}
.clothing-result-panel.has-clothing-generate-loading .clothing-result-body {
  flex: 1;
  min-height: 0;
}
.clothing-generate-loading-wrap {
  width: 100%;
  box-sizing: border-box;
}
.clothing-result-panel.has-clothing-design-loading {
  padding: 0;
}
.clothing-result-panel.has-clothing-design-preview .clothing-result-head,
.clothing-result-panel.has-clothing-design-loading .clothing-result-head {
  padding: 20px 28px;
  margin: 0;
  border-bottom: 1px solid #f0f0f1;
  flex-shrink: 0;
}
.clothing-result-panel.has-clothing-design-preview .clothing-result-hint,
.clothing-result-panel.has-clothing-design-loading .clothing-result-hint {
  margin-left: auto;
}
.clothing-result-panel.has-clothing-design-preview .clothing-result-body,
.clothing-result-panel.has-clothing-design-loading .clothing-result-body {
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}
.clothing-design-preview-wrap,
.clothing-design-loading-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.clothing-design-preview-wrap .clothing-design-preview {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.clothing-design-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 28px 12px;
  width: 100%;
  box-sizing: border-box;
}
.clothing-design-loading-wrap {
  overflow-y: auto;
  padding: 20px 28px 28px;
  gap: 16px;
}
.clothing-analyze-status {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid #ececee;
  border-radius: 16px;
  background: #fafafa;
  box-sizing: border-box;
}
.clothing-analyze-status-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.clothing-analyze-status-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e4e4e7;
  color: #52525b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: clothingAnalyzePulse 1.6s ease-in-out infinite;
}
.clothing-analyze-status-copy {
  flex: 1;
  min-width: 0;
}
.clothing-analyze-status-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
}
.clothing-analyze-status-sub {
  margin: 0;
  font-size: 13px;
  color: #71717a;
  line-height: 1.5;
}
.clothing-design-loading-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #ececee;
  overflow: hidden;
}
.clothing-design-loading-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: #18181b;
  transition: width 0.6s ease;
}
.clothing-design-loading-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.5;
}
.clothing-design-loading-hint.is-changing {
  opacity: 0.35;
}
.clothing-analyze-plan-card {
  width: 100%;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  background: #fff;
  padding: 18px 20px;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.clothing-analyze-plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}
.clothing-analyze-plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #f0f0f1;
  border-radius: 12px;
  background: #fafafa;
  box-sizing: border-box;
}
.clothing-analyze-plan-row.is-active {
  background: #fff;
  border-color: #e4e4e7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.clothing-analyze-plan-row.is-done {
  background: #f0fdf4;
  border-color: #dcfce7;
}
.clothing-analyze-plan-index {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #18181b;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clothing-analyze-plan-row.is-done .clothing-analyze-plan-index {
  background: #16a34a;
}
.clothing-analyze-plan-row.is-pending .clothing-analyze-plan-index {
  background: #e4e4e7;
  color: #71717a;
}
.clothing-analyze-plan-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: #18181b;
  line-height: 1.4;
}
.clothing-analyze-plan-row.is-pending .clothing-analyze-plan-name {
  color: #71717a;
}
.clothing-analyze-plan-status {
  font-size: 11px;
  color: #a1a1aa;
  flex-shrink: 0;
}
.clothing-analyze-plan-row.is-active .clothing-analyze-plan-status {
  color: #18181b;
  font-weight: 500;
}
.clothing-analyze-plan-row.is-done .clothing-analyze-plan-status {
  color: #16a34a;
  font-weight: 500;
}
@keyframes clothingAnalyzePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.82; }
}
.clothing-design-section-h {
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
}
.clothing-design-section-h:first-child {
  margin-top: 0;
}
.clothing-design-specs-card {
  width: 100%;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-sizing: border-box;
}
.clothing-design-specs-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px 0;
}
.clothing-design-specs-toggle {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 0 0 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.clothing-design-specs-edit-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  color: #71717a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.clothing-design-specs-title {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
}
.clothing-design-specs-sub {
  grid-column: 1;
  margin: 0;
  font-size: 12px;
  color: #71717a;
}
.clothing-design-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #a1a1aa;
  transition: transform 0.2s ease;
}
.clothing-design-specs-card.is-open .clothing-design-chevron {
  transform: rotate(180deg);
}
.clothing-design-specs-body {
  display: none;
  padding: 0 18px 18px;
}
.clothing-design-specs-card.is-open .clothing-design-specs-body {
  display: block;
}
.clothing-design-specs-view {
  font-size: 13px;
  line-height: 1.65;
  color: #3f3f46;
  margin-bottom: 12px;
}
.clothing-design-specs-card textarea.clothing-design-specs-edit {
  display: none;
  width: 100%;
  box-sizing: border-box;
}
.clothing-design-specs-card.is-editing .clothing-design-specs-view {
  display: none;
}
.clothing-design-specs-card.is-editing textarea.clothing-design-specs-edit {
  display: block;
}
.clothing-design-plans-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.clothing-design-plans-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  width: 100%;
}
.clothing-design-plans-head svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #71717a;
}
.clothing-design-plans-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
}
.clothing-design-plans-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #71717a;
}
.clothing-design-plans-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.clothing-design-plan-card {
  width: 100%;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}
.clothing-design-plan-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
}
.clothing-design-plan-index {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #18181b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clothing-design-plan-title-wrap {
  flex: 1;
  min-width: 0;
}
.clothing-design-plan-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #18181b;
  line-height: 1.4;
}
.clothing-design-plan-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: #71717a;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clothing-design-plan-card.is-open .clothing-design-plan-desc {
  -webkit-line-clamp: unset;
}
.clothing-design-plan-edit,
.clothing-design-plan-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  color: #71717a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.clothing-design-plan-toggle svg {
  transition: transform 0.2s ease;
}
.clothing-design-plan-card.is-open .clothing-design-plan-toggle svg {
  transform: rotate(180deg);
}
.clothing-design-plan-body {
  display: none;
  padding: 0 14px 14px 48px;
  font-size: 13px;
  line-height: 1.65;
  color: #3f3f46;
}
.clothing-design-plan-card.is-open .clothing-design-plan-body {
  display: block;
}
.clothing-design-plan-card.is-editing .clothing-design-plan-rich {
  display: none;
}
.clothing-design-plan-desc-edit,
.clothing-design-plan-content-edit {
  display: none;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.clothing-design-plan-card.is-editing .clothing-design-plan-desc-edit,
.clothing-design-plan-card.is-editing .clothing-design-plan-content-edit {
  display: block;
}
.clothing-design-plan-rich {
  margin-top: 4px;
}
.clothing-design-foot {
  margin: 0;
  padding: 16px 28px 24px;
  border-top: 1px solid #e4e4e7;
  background: #fff;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 960px) {
  .clothing-studio-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 全局联系按钮 ===== */
.picset-contact-fab {
  position: fixed;
  right: 24px;
  bottom: 32px;
  z-index: 10030;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px 13px 20px;
  border-radius: 100px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  line-height: 1;
}
.picset-contact-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  color: hsl(var(--primary-fg));
  text-decoration: none;
}
.picset-contact-fab svg {
  flex-shrink: 0;
}

/* ===== 全局侧栏：任务队列 + 作品记录 ===== */
.picset-side-dock {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10040;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.picset-side-dock[hidden] {
  display: none !important;
}

.picset-task-queue-fab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 52px;
  padding: 14px 10px;
  border: 2px solid hsl(var(--primary) / 0.35);
  border-right: none;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.12), hsl(var(--card)));
  color: hsl(var(--fg));
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.12), 0 0 0 1px hsl(var(--border) / 0.5);
  cursor: pointer;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.picset-task-queue-fab:hover {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.2), hsl(var(--surface)));
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.16);
  transform: translateX(-2px);
}
.picset-task-queue-fab.is-open {
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border-color: hsl(var(--primary));
  box-shadow: -8px 0 32px hsl(var(--primary) / 0.35);
}
.picset-task-queue-fab.has-active-tasks {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, hsl(var(--primary) / 0.22), hsl(var(--primary) / 0.08));
  animation: picsetTaskQueuePulse 2s ease-in-out infinite;
}
.picset-task-queue-fab.has-active-tasks > svg {
  animation: picsetTaskQueueSpin 1.2s linear infinite;
}
@keyframes picsetTaskQueuePulse {
  0%, 100% { box-shadow: -6px 0 24px rgba(0, 0, 0, 0.12), 0 0 0 0 hsl(var(--primary) / 0.35); }
  50% { box-shadow: -8px 0 28px rgba(0, 0, 0, 0.14), 0 0 0 6px hsl(var(--primary) / 0.12); }
}
.picset-history-fab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 52px;
  padding: 14px 10px;
  border: 2px solid hsl(var(--border));
  border-right: none;
  border-radius: 14px 0 0 14px;
  background: hsl(var(--card));
  color: hsl(var(--fg));
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.picset-history-fab:hover {
  background: hsl(var(--surface));
  border-color: hsl(var(--primary) / 0.4);
  box-shadow: -6px 0 22px rgba(0, 0, 0, 0.12);
  transform: translateX(-2px);
  color: hsl(var(--fg));
}
.picset-history-fab-label,
.picset-task-queue-fab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
}
.picset-task-queue-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px hsl(var(--card));
}
.picset-task-queue-fab.is-open .picset-task-queue-badge {
  box-shadow: 0 0 0 2px hsl(var(--primary));
}

.picset-task-queue-root {
  position: fixed;
  inset: 0;
  z-index: 10045;
  pointer-events: none;
}
.picset-task-queue-root.is-open {
  pointer-events: auto;
}
.picset-task-queue-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.picset-task-queue-root.is-open .picset-task-queue-backdrop {
  opacity: 1;
}
.picset-task-queue-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(400px, calc(100vw - 48px));
  height: 100%;
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  border-left: 2px solid hsl(var(--primary) / 0.28);
  box-shadow: -12px 0 48px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.picset-task-queue-root.is-open .picset-task-queue-panel {
  transform: translateX(0);
}
.picset-task-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px 14px;
  border-bottom: 1px solid hsl(var(--border));
}
.picset-task-queue-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: hsl(var(--fg));
}
.picset-task-queue-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: hsl(var(--muted-fg));
}
.picset-task-queue-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: hsl(var(--secondary));
  color: hsl(var(--muted-fg));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.picset-task-queue-close:hover {
  background: hsl(var(--border));
}
.picset-task-queue-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  overscroll-behavior: contain;
}
.picset-task-queue-section-title {
  margin: 0 0 8px;
  padding: 8px 4px 4px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-fg));
  letter-spacing: 0.02em;
}
.picset-task-queue-section-title.is-recent {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid hsl(var(--border));
}
.picset-task-queue-item-legacy {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #b45309;
}
.picset-task-queue-empty,
.picset-task-queue-loading {
  margin: 48px 0;
  text-align: center;
  font-size: 13px;
  color: hsl(var(--muted-fg));
}
.picset-task-queue-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.picset-task-queue-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: picsetTaskQueueSpin 0.7s linear infinite;
}
@keyframes picsetTaskQueueSpin {
  to { transform: rotate(360deg); }
}
.picset-task-queue-item {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}
.picset-task-queue-item.is-deleting {
  opacity: 0.5;
  pointer-events: none;
}
.picset-task-queue-item-open {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--surface));
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.picset-task-queue-item-open:hover {
  border-color: hsl(var(--primary) / 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.picset-task-queue-delete {
  flex-shrink: 0;
  width: 36px;
  align-self: stretch;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--surface));
  color: hsl(var(--muted-fg));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.picset-task-queue-delete:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: #ef4444;
}
.picset-task-queue-item.is-active .picset-task-queue-item-open {
  border-color: hsl(var(--primary) / 0.28);
  background: hsl(var(--primary) / 0.03);
}
.picset-task-queue-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: hsl(var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.picset-task-queue-thumb.is-generating::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.picset-task-queue-thumb-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid hsl(var(--primary) / 0.25);
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: picsetTaskQueueSpin 0.7s linear infinite;
  z-index: 1;
}
.picset-task-queue-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picset-task-queue-thumb-placeholder {
  color: hsl(var(--muted-fg));
  opacity: 0.6;
}
.picset-task-queue-meta {
  flex: 1;
  min-width: 0;
}
.picset-task-queue-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.picset-task-queue-tool {
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-fg));
}
.picset-task-queue-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.picset-task-queue-status-spinner {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: picsetTaskQueueSpin 0.7s linear infinite;
  opacity: 0.9;
  flex-shrink: 0;
}
.picset-task-queue-status.is-pending {
  background: #fef3c7;
  color: #b45309;
}
.picset-task-queue-status.is-processing {
  background: #dbeafe;
  color: #1d4ed8;
}
.picset-task-queue-status.is-completed {
  background: #dcfce7;
  color: #15803d;
}
.picset-task-queue-status.is-failed {
  background: #fee2e2;
  color: #b91c1c;
}
.picset-task-queue-item-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--fg));
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.picset-task-queue-item-progress {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.45;
  color: #71717a;
}
.picset-task-queue-item-progress.is-active-hint {
  color: hsl(var(--primary));
}
.picset-task-queue-item-time {
  font-size: 11px;
  color: hsl(var(--muted-fg));
}
.picset-task-queue-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--surface) / 0.5);
}
.picset-task-queue-history-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid hsl(var(--primary) / 0.35);
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.picset-task-queue-history-btn:hover {
  background: hsl(var(--primary) / 0.14);
  border-color: hsl(var(--primary) / 0.55);
  color: hsl(var(--primary));
  text-decoration: none;
}
.picset-task-queue-history-link {
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--primary));
  text-decoration: none;
}
.picset-task-queue-history-link:hover {
  text-decoration: underline;
}
.picset-task-queue-refresh {
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 6px 12px;
  background: hsl(var(--surface));
  color: hsl(var(--fg));
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.picset-task-queue-refresh:hover {
  background: hsl(var(--secondary));
}
body.picset-task-queue-open {
  overflow: hidden;
}

/* 任务队列 — 详情弹窗 */
.picset-task-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.picset-task-detail-modal[hidden] {
  display: none !important;
}
.picset-task-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.picset-task-detail-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.picset-task-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid hsl(var(--border));
  background: #fff;
}
.picset-task-detail-tool {
  margin: 0 0 4px;
  font-size: 12px;
  color: hsl(var(--muted-fg));
}
.picset-task-detail-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: hsl(var(--fg));
  line-height: 1.4;
}
.picset-task-detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.picset-task-detail-legacy {
  font-size: 11px;
  color: #b45309;
}
.picset-task-detail-close {
  border: none;
  background: transparent;
  color: hsl(var(--muted-fg));
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.picset-task-detail-close:hover {
  background: hsl(var(--secondary));
  color: hsl(var(--fg));
}
.picset-task-detail-body {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
  background: #fafafa;
}
.picset-task-detail-grid {
  gap: 12px;
}
.picset-task-detail-media.picset-result-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  background: #fff;
}
.picset-task-detail-media.picset-result-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #f4f4f5;
}
/* 弹窗内操作按钮始终居中悬浮，不受移动端底部渐变影响 */
.picset-task-detail-media .picset-result-overlay {
  opacity: 1;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
  background: rgba(0, 0, 0, 0.38);
}
.picset-task-detail-media .picset-result-label {
  pointer-events: none;
}
.picset-task-detail-error {
  margin: 12px 0 0;
  font-size: 12px;
  color: #dc2626;
  line-height: 1.5;
}
.picset-task-detail-error.is-warning {
  color: #b45309;
}
.picset-task-detail-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid hsl(var(--border));
  background: #fff;
}
.picset-task-detail-btn {
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 8px 14px;
  background: #fff;
  color: hsl(var(--fg));
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.picset-task-detail-btn:hover {
  background: hsl(var(--secondary));
}
.picset-task-detail-btn.is-secondary {
  margin-right: auto;
}
.picset-task-detail-btn.is-primary {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
}
.picset-task-detail-btn.is-primary:hover {
  background: #27272a;
}
.picset-task-detail-btn.is-danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.25);
}
.picset-task-detail-btn.is-danger:hover {
  background: rgba(220, 38, 38, 0.06);
}
.picset-task-detail-empty {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: hsl(var(--muted-fg));
  font-size: 13px;
}
.picset-task-detail-empty.is-error {
  color: #dc2626;
}
.picset-task-detail-media video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f4f4f5;
}
.picset-task-detail-media-actions {
  padding: 8px;
}
.picset-task-detail-media-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #18181b;
  font-size: 12px;
  text-decoration: none;
}
body.picset-task-detail-open {
  overflow: hidden;
}
body.picset-task-detail-open #picsetResultLightbox,
body.picset-task-detail-open .picset-result-lightbox {
  z-index: 10100;
}

@media (max-width: 640px) {
  .picset-task-queue-fab-label,
  .picset-history-fab-label {
    display: none;
  }
  .picset-task-queue-fab,
  .picset-history-fab {
    min-width: 44px;
    padding: 12px 8px;
  }
  .picset-task-queue-panel {
    width: 100vw;
  }
}
