:root {
  --bg: #ffffff;
  --bg-soft: #faf8f5;
  --ink: #1a1a1a;
  --ink-soft: #6b6b6b;
  --line: #e7e2da;
  --gold: #b8975a;
  --gold-deep: #9c7e44;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  --font-serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 40px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.18em;
  font-weight: 600;
}
.nav-item {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

main { max-width: 960px; margin: 0 auto; padding: 0 24px 80px; }

.hero { text-align: center; padding: 72px 0 56px; }
.eyebrow { font-size: 12px; letter-spacing: 0.32em; color: var(--gold); margin-bottom: 18px; }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 46px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.subtitle { color: var(--ink-soft); font-size: 16px; font-weight: 300; }

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}
.upload-card {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.upload-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.upload-card.dragover { border-color: var(--gold); background: #fdfbf7; }

.upload-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.upload-placeholder { text-align: center; padding: 24px; color: var(--ink-soft); }
.upload-icon {
  width: 54px; height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--gold);
  margin: 0 auto 16px;
}
.upload-title { font-size: 15px; color: var(--ink); margin-bottom: 6px; font-weight: 400; }
.upload-hint { font-size: 12px; font-weight: 300; }

.upload-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.change-btn {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.change-btn:hover { border-color: var(--gold); color: var(--gold-deep); }

.actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.btn-primary {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 15px 48px;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s, opacity 0.25s;
}
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-primary:disabled { opacity: 0.32; cursor: not-allowed; }

.demo-toggle { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; cursor: pointer; }

/* 模型选择（仅显示 默认 / Pro，不展示版本号与费用） */
.model-select {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px; margin-top: 36px;
}
.ms-label { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.04em; }
.ms-option {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; background: #fff;
  font-size: 13px; color: var(--ink); transition: border-color .2s, background .2s;
}
.ms-option input { accent-color: var(--gold-deep); margin: 0; }
.ms-option .ms-name { font-weight: 500; }
.ms-option:has(input:checked) { border-color: var(--gold-deep); background: #fdf8ef; }
.ms-cost {
  font-size: 12px; color: var(--ink-soft); margin-left: 4px;
  min-width: 200px; text-align: left;
}
.ms-cost:empty { display: none; }

.result { margin-top: 48px; }
.result-loading { text-align: center; padding: 60px 0; color: var(--ink-soft); }
.spinner {
  width: 38px; height: 38px;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result-sub { font-size: 13px; margin-top: 6px; font-weight: 300; }

.result-done { text-align: center; }
#resultImg { max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.result-actions { display: flex; gap: 14px; justify-content: center; margin-top: 24px; }
.btn-secondary { background: var(--gold); color: #fff; text-decoration: none; padding: 13px 34px; border-radius: 999px; font-size: 13px; }
.btn-secondary:hover { background: var(--gold-deep); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); padding: 13px 34px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); }

.badge-demo {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.err-msg { color: #b4232a; margin-top: 16px; font-size: 14px; }

.site-footer { text-align: center; padding: 40px 24px; color: var(--ink-soft); font-size: 12px; border-top: 1px solid var(--line); }

@media (max-width: 680px) {
  .upload-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .site-header { padding: 20px; }
}

/* ===== 多类目试穿新增样式 ===== */
.step { margin-bottom: 44px; }
.step-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.step-no { width: 30px; height: 30px; border: 1px solid var(--gold); color: var(--gold-deep); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-family: var(--font-sans); }
.step-tip { font-family: var(--font-sans); font-size: 12px; font-weight: 300; color: var(--ink-soft); letter-spacing: 0; }
.limit-notice { font-family: var(--font-sans); font-size: 13px; line-height: 1.6; color: var(--gold-deep); background: #fbf7ee; border: 1px solid #ecdcb8; border-radius: 8px; padding: 10px 16px; margin: 2px 0 0; text-align: center; max-width: 420px; }
.limit-notice .ln-en { display: none; }
html[data-lang="en"] .limit-notice .ln-zh { display: none; }
html[data-lang="en"] .limit-notice .ln-en { display: inline; }

.model-area { display: flex; gap: 18px; flex-wrap: wrap; align-items: stretch; }
.model-gallery { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; min-width: 240px; }
.model-thumb { width: 110px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--bg-soft); transition: border-color .2s, box-shadow .2s; }
.model-thumb img { width: 100%; height: 150px; object-fit: cover; display: block; }
.model-thumb .model-name { display: block; font-size: 11px; color: var(--ink-soft); padding: 6px 8px; text-align: center; }
.model-thumb:hover { border-color: var(--gold); }
.model-thumb.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(184,151,90,.35); }
.model-thumb.model-missing { opacity: .5; }
.model-upload { width: 160px; flex: none; }

.category-palette { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font-size: 13px; color: var(--ink); cursor: pointer; transition: all .2s; }
.cat-chip .cat-icon { font-size: 15px; }
.cat-chip:hover { border-color: var(--gold); color: var(--gold-deep); }
.cat-chip.used { opacity: .4; cursor: not-allowed; background: var(--bg-soft); }
.cat-chip.full { opacity: .35; cursor: not-allowed; background: var(--bg-soft); }

.item-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.item-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); aspect-ratio: 3/4; overflow: hidden; }
.item-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.item-card .upload-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item-remove { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(26,26,26,.6); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; z-index: 2; }
.item-remove:hover { background: #b4232a; }
.item-card .item-gallery-btn { position: absolute; bottom: 8px; left: 8px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 11px; cursor: pointer; z-index: 2; }
.item-card .item-gallery-btn:hover { border-color: var(--gold); color: var(--gold-deep); }

/* ===== 结果多图 + 二次操作 ===== */
.result-images { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.result-images img { max-width: 100%; max-height: 70vh; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ===== 搭配推荐 ===== */
.reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.reco-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.reco-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.reco-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.reco-card .rn { font-size: 12px; padding: 7px 9px; color: var(--ink); }
.reco-card .rc { font-size: 11px; color: var(--ink-soft); padding: 0 9px 8px; }

/* ===== 图库选择弹窗 ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); width: min(720px, 94vw); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.modal-close { font-size: 24px; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.modal-grid .gitem { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; }
.modal-grid .gitem:hover { border-color: var(--gold); }
.modal-grid .gitem img { width: 100%; height: 120px; object-fit: cover; display: block; }
.modal-grid .gitem .gn { font-size: 11px; padding: 6px 8px; color: var(--ink); }
.modal-empty { color: var(--ink-soft); font-size: 14px; padding: 16px 0; }

/* 游客试用次数用尽提示 */
.guest-exhausted { width: min(460px, 94vw); }
.guest-exhausted .modal-body { padding: 22px 24px 26px; text-align: center; }
.guest-exhausted .ge-text { font-size: 14px; line-height: 1.7; color: var(--ink); margin: 0 0 10px; }
.guest-exhausted .ge-emphasis { color: var(--gold-deep); font-weight: 600; font-size: 15px; }
.guest-exhausted .ge-hint { font-size: 12px; color: var(--ink-soft); margin: 6px 0 0; }

/* 主页商品图库 */
.pg-step { margin-bottom: 44px; }
.pg-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.pg-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 13px; color: var(--ink); cursor: pointer; transition: all .2s; }
.pg-chip:hover { border-color: var(--gold); color: var(--gold-deep); }
.pg-chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.pg-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s; display: flex; flex-direction: column; }
.pg-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.pg-thumb { width: 100%; aspect-ratio: 3/4; background: var(--bg-soft); overflow: hidden; }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-meta { padding: 10px 12px 4px; }
.pg-name { font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.pg-cat { font-size: 11px; color: var(--ink-soft); }
.pg-add { margin: 8px 12px 12px; border: 1px solid var(--gold); background: transparent; color: var(--gold-deep); border-radius: 999px; padding: 8px 0; font-size: 13px; cursor: pointer; transition: all .2s; }
.pg-add:hover { background: var(--gold); color: #fff; }
.toast { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 999; }

/* ===== 浮动联系窗（微信 / WhatsApp） ===== */
.contact-float { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 12px; }
.cf-tab {
  width: 60px; height: 60px; border: none; cursor: pointer;
  border-radius: 14px 0 0 14px; background: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,.16);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: width .15s ease, box-shadow .15s ease;
}
.cf-tab:hover { width: 66px; box-shadow: 0 6px 22px rgba(0,0,0,.22); }
.cf-tab.active { box-shadow: 0 0 0 3px var(--gold-deep), 0 6px 22px rgba(0,0,0,.22); }
.cf-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; font-family: var(--font-sans); }
.cf-wechat { background: #07C160; }
.cf-wa { background: #25D366; }
.cf-text { font-size: 11px; color: var(--ink); font-family: var(--font-sans); letter-spacing: .02em; }

.cf-pop {
  position: fixed; right: 76px; top: 50%; transform: translateY(-50%);
  width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 44px rgba(0,0,0,.2); padding: 14px; z-index: 41;
}
.cf-pop[hidden] { display: none; }
.cf-pop-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 10px; }
.cf-pop-close { font-size: 22px; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.cf-pop-close:hover { color: var(--ink); }
.cf-pop-img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--line); }
.cf-pop-hint { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); text-align: center; line-height: 1.5; }

@media (max-width: 600px) {
  .cf-tab { width: 52px; height: 52px; }
  .cf-icon { width: 24px; height: 24px; font-size: 12px; }
  .cf-text { font-size: 10px; }
  .cf-pop { right: 64px; width: 184px; }
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

