/* ShopAO conservative UI fixes for the extracted Huiwa workspace. */

.ihw-real-userbar {
  display: none !important;
}

.ihw-real-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2147481900;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  background: #111827;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .2);
  font: 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  text-align: center;
}

#J_headMenu.shopao-enhanced-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding-right: 18px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  white-space: nowrap !important;
  contain: layout style !important;
}

#J_headMenu.shopao-enhanced-nav > .ant-menu,
#J_headMenu.shopao-enhanced-nav > .ant-menu-overflow {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 56px !important;
  margin-left: auto !important;
  margin-right: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  overflow: visible !important;
}

#J_headMenu.shopao-enhanced-nav .ant-menu-item,
#J_headMenu.shopao-enhanced-nav .ant-menu-submenu,
#J_headMenu.shopao-enhanced-nav > .ant-menu > li,
#J_headMenu.shopao-enhanced-nav > .ant-menu-overflow > li {
  flex: 0 0 auto !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

#J_headMenu.shopao-enhanced-nav > .shopao-extra-nav {
  display: none !important;
}

#J_headMenu.shopao-enhanced-nav > .shopao-extra-control {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  z-index: 20 !important;
  flex: 0 0 auto !important;
  margin: 0 0 0 6px !important;
  transform: none !important;
}

#J_headMenu.shopao-enhanced-nav > .shopao-buy {
  order: 70 !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 96px !important;
  height: 28px !important;
  padding: 0 10px 0 30px !important;
  border: 1px solid rgba(255, 122, 0, .18) !important;
  border-radius: 14px !important;
  color: #333 !important;
  background: #fff7ed !important;
  box-shadow: none !important;
  font-weight: 400 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.shopao-point-ledger{margin-top:24px;border-top:1px solid #eee}.shopao-point-ledger-status{padding:28px 4px;color:#8a9099;text-align:center}.shopao-point-ledger-status.is-error{color:#c23b52}.shopao-point-transaction{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 4px;border-bottom:1px solid #f0f1f4}.shopao-point-transaction-info{display:flex;flex-direction:column;gap:5px;min-width:0}.shopao-point-transaction-info strong{font-size:14px;font-weight:500;color:#30343b}.shopao-point-transaction-info time,.shopao-point-transaction-meta{font-size:12px;color:#9aa0aa}.shopao-point-transaction-delta{flex:none;font-size:15px}.shopao-point-transaction-delta.is-credit{color:#17a673}.shopao-point-transaction-delta.is-debit{color:#d24a5f}@media(max-width:700px){.shopao-point-transaction{gap:10px;padding:14px 0}.shopao-point-transaction-info{max-width:68%}.shopao-point-transaction-delta{font-size:14px}}

#J_headMenu.shopao-enhanced-nav > .shopao-promo {
  order: 80 !important;
  display: inline-flex !important;
  width: 114px !important;
  min-width: 114px !important;
  max-width: 114px !important;
  height: 28px !important;
  padding: 0 12px !important;
  border: 1px solid #f0f0f0 !important;
  border-radius: 14px !important;
  justify-content: center !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #333 !important;
  background: #fff !important;
  box-shadow: none !important;
  font-weight: 400 !important;
}

#J_headMenu.shopao-enhanced-nav > .shopao-promo::before {
  content: none;
}

#J_headMenu.shopao-enhanced-nav > .shopao-help {
  order: 90 !important;
  display: inline-flex !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  margin-left: 8px !important;
}

#J_headMenu.shopao-enhanced-nav > .shopao-login {
  order: 100 !important;
  position: relative !important;
  right: auto !important;
  left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: 8px !important;
}

body.ihw-auth-logged-out #J_headMenu.shopao-enhanced-nav > .shopao-login {
  width: auto !important;
  min-width: 78px !important;
  height: 32px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: #050b18 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  text-indent: 0 !important;
  overflow: visible !important;
}

body.ihw-auth-logged-out #J_headMenu.shopao-enhanced-nav > .shopao-login::before,
body.ihw-auth-logged-out #J_headMenu.shopao-enhanced-nav > .shopao-login::after {
  display: none !important;
}

body.ihw-auth-logged-in #J_headMenu.shopao-enhanced-nav > .shopao-login.ihw-personal-center {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #dbe6ff !important;
  color: transparent !important;
  text-indent: -999px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

body.ihw-auth-logged-in #J_headMenu.shopao-enhanced-nav > .shopao-login.ihw-personal-center::before {
  content: "🐷";
  position: absolute;
  left: 0;
  top: 0;
  display: block !important;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffe9f0;
  color: #e56b8a;
  font-size: 23px;
  line-height: 34px;
  text-indent: 0;
}

body.ihw-auth-logged-in #J_headMenu.shopao-enhanced-nav > .shopao-login.ihw-personal-center::after {
  display: none !important;
}

body.ihw-auth-logged-in .shopao-login:not(.ihw-personal-center) {
  display: none !important;
}

body.ihw-auth-logged-in #J_globalUserAvatar,
body.ihw-auth-logged-in #J_headMenu.shopao-enhanced-nav #J_globalUserAvatar {
  display: none !important;
}

body.ihw-auth-logged-in.shopao-generation-board-active #create-new-task-btn {
  font-size: 0 !important;
}

body.ihw-auth-logged-in.shopao-generation-board-active #create-new-task-btn::after {
  content: "\91cd\65b0\751f\6210";
  font-size: 16px;
}

#J_headMenu .ihw-login-sentinel {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

.ihw-personal-menu {
  position: fixed;
  z-index: 2147482400;
  width: min(336px, calc(100vw - 24px));
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18), 0 0 0 1px rgba(15, 23, 42, .06);
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.ihw-personal-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 4px 6px 8px;
  box-sizing: border-box;
}

.shopao-center-page{min-height:calc(100vh - 56px);padding:34px 28px 60px;background:#f6f7f9;box-sizing:border-box;color:#20242c;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif}.shopao-center-inner{width:min(980px,100%);margin:0 auto}.shopao-center-page h1{margin:10px 0 22px;font-size:26px;font-weight:600}.shopao-center-back{height:36px;padding:0 16px;border:1px solid #dfe1e6;border-radius:4px;background:#fff;color:#333;cursor:pointer}.shopao-center-card{padding:32px;border:1px solid #e8e9ed;border-radius:8px;background:#fff}.shopao-center-card h2{margin:10px 0 4px;font-size:20px}.shopao-center-muted{color:#8a9099}.shopao-center-card dl{display:grid;grid-template-columns:140px 1fr;margin:28px 0 0;border-top:1px solid #eee}.shopao-center-card dt,.shopao-center-card dd{margin:0;padding:17px 4px;border-bottom:1px solid #eee}.shopao-center-card dt{color:#8a9099}.shopao-center-avatar{width:60px;height:60px;border-radius:50%;background:#dbe6ff}.shopao-points-total{display:flex;align-items:center;justify-content:space-between}.shopao-points-total strong{font-size:34px;color:#ff4d67}.shopao-center-table{margin-top:24px;padding:20px 0;border-top:1px solid #eee;color:#777}.shopao-member-form,.shopao-password-form{display:flex;gap:14px;margin-bottom:22px}.shopao-member-form input,.shopao-password-form input{min-width:0;height:48px;flex:1;padding:0 14px;border:1px solid #dfe1e6;border-radius:4px;font-size:15px}.shopao-member-form button,.shopao-password-form button,.shopao-member-row button{height:48px;padding:0 22px;border:0;border-radius:4px;background:#ff4d67;color:#fff;cursor:pointer;font-size:15px}.shopao-member-list{border-top:1px solid #eee}.shopao-member-row{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid #eee}.shopao-member-row span,.shopao-member-row small{display:block}.shopao-member-row small{margin-top:3px;color:#999}.shopao-member-row button{height:34px;background:#fff;color:#d9304f;border:1px solid #f2b7c2}.shopao-password-form{max-width:620px;flex-direction:column}.shopao-password-form p{min-height:20px;margin:0;color:#666}@media(max-width:700px){.shopao-center-page{padding:20px 12px 32px}.shopao-center-card{padding:18px}.shopao-member-form{flex-direction:column}.shopao-center-card dl{grid-template-columns:100px 1fr}}

.ihw-personal-identity {
  min-width: 0;
}

.shopao-generation-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.shopao-enterprise-summary{padding:4px 0 22px;margin-bottom:22px;border-bottom:1px solid #eee}.shopao-enterprise-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.shopao-enterprise-summary h2{margin:6px 0 0;font-size:22px}.shopao-enterprise-role{padding:5px 10px;border-radius:999px;background:#fff0f2;color:#d9304f;font-size:13px;white-space:nowrap}.shopao-enterprise-summary dl{display:grid;grid-template-columns:140px 1fr;margin:22px 0 0;border-top:1px solid #eee}.shopao-enterprise-summary dt,.shopao-enterprise-summary dd{margin:0;padding:13px 4px;border-bottom:1px solid #eee}.shopao-enterprise-summary dt{color:#8a9099}.shopao-enterprise-summary dd{font-weight:500;color:#20242c}@media(max-width:700px){.shopao-enterprise-summary dl{grid-template-columns:100px 1fr}}
.shopao-enterprise-create-form h2{margin:0 0 8px;font-size:22px}.shopao-enterprise-create-form p{margin:0 0 18px}.shopao-enterprise-create-form input{box-sizing:border-box;width:100%;min-height:44px;margin:0 0 12px;padding:0 12px;border:1px solid #e3e5ea;border-radius:6px;font:inherit}.shopao-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.shopao-form-label{margin:8px 0;color:#666;font-size:13px}.shopao-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}.shopao-check-grid label{display:flex;align-items:center;gap:6px;color:#4b5563;font-size:13px}.shopao-check-grid input{width:auto;min-height:0;margin:0}@media(max-width:600px){.shopao-form-row{grid-template-columns:1fr}.shopao-check-grid{grid-template-columns:1fr}}

.shopao-image-new-task {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #ff2d4d;
  border-radius: 4px;
  background: #fff;
  color: #ff2d4d;
  font-size: 13px;
  cursor: pointer;
}

.shopao-image-new-task:hover {
  background: #fff5f7;
}

.ihw-personal-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dbe6ff;
  background-position: center;
  background-size: cover;
}

.ihw-personal-head b {
  display: block;
  margin-bottom: 2px;
  overflow: hidden;
  color: #222;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ihw-personal-head span {
  display: block;
  overflow: hidden;
  color: #8a9099;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ihw-personal-switch {
  height: 28px;
  padding: 0 9px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 12px;
  cursor: pointer;
}

.ihw-personal-upgrade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  margin: 0 0 6px;
  padding: 0 10px;
  border-radius: 4px;
  color: #7c56cf;
  background: #f8f4ff;
  font-size: 13px;
  cursor: pointer;
}

.ihw-personal-upgrade::after {
  content: "\203A";
  font-size: 20px;
}

.ihw-personal-menu > button {
  display: block;
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  border-top: 1px solid #f0f1f5;
  background: transparent;
  color: #333;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.ihw-personal-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  margin: 0 2px 8px;
  padding: 10px 12px;
  border: 1px solid #f0e8ff;
  border-radius: 6px;
  background: #fbf8ff;
}

.ihw-personal-balance span {
  display: block;
  color: #7b8494;
  font-size: 12px;
}

.ihw-personal-balance strong {
  display: block;
  margin-top: 3px;
  color: #252a35;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.ihw-personal-balance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ihw-personal-balance button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #d9c8ff;
  border-radius: 4px;
  background: #fff;
  color: #6b46c1;
  font-size: 12px;
  cursor: pointer;
}

.ihw-personal-balance button:hover,
.ihw-personal-balance button:focus-visible {
  border-color: #7c56cf;
  outline: none;
}

.ihw-personal-menu > button:hover {
  background: #f5f6fa;
}

.ihw-personal-menu > button:focus-visible,
.ihw-personal-upgrade:focus-visible,
.ihw-personal-switch:focus-visible {
  outline: 2px solid #8c6bd1;
  outline-offset: -2px;
}

.ihw-personal-menu > button.danger {
  color: #ff2d4d;
}

.shopao-recent-task-rail {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  flex: 0 0 89px;
  width: 89px;
  min-width: 89px;
  height: 100%;
  padding: 24px 8px 0;
  box-sizing: border-box;
  border-right: 1px solid #eef0f4;
  background: #fff;
  overflow: visible;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-recent-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.shopao-recent-head b {
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

.shopao-recent-head a {
  display: none;
}

.shopao-recent-create {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border: 1px solid #eef0f4;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(20, 28, 45, .04);
}

.shopao-recent-list {
  display: grid;
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  gap: 12px;
  align-content: start;
  grid-auto-rows: max-content;
  justify-items: center;
  overflow: hidden auto;
  padding: 0 0 12px;
}

.shopao-recent-all {
  display: flex;
  width: 100%;
  padding: 0;
  border: 0;
  align-items: center;
  justify-content: center;
  flex: 0 0 52px;
  border-top: 1px solid #eef0f4;
  color: #222;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.shopao-recent-item.is-failed span {
  outline: 1px solid #ff4d4f;
  outline-offset: -1px;
}

.shopao-recent-item.is-failed em {
  color: #ff4d4f;
}

.shopao-all-tasks-panel {
  position: absolute;
  z-index: 11;
  top: 0;
  left: 0;
  display: flex;
  flex: none;
  flex-direction: column;
  width: 464px;
  height: 100%;
  min-width: 464px;
  overflow: hidden;
  border-right: 1px solid #eef0f4;
  background: #fff;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-all-tasks-header {
  flex: 0 0 110px;
  height: 110px;
  padding: 18px 16px 12px;
  box-sizing: border-box;
  border-bottom: 1px solid #f0f1f5;
}

.shopao-all-tasks-header > div,
.shopao-all-tasks-header form,
.shopao-all-tasks-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shopao-all-tasks-header strong {
  font-size: 16px;
  font-weight: 600;
}

.shopao-all-tasks-tile,
.shopao-all-tasks-panel footer button {
  border: 0;
  background: transparent;
  color: #555;
  cursor: pointer;
}

.shopao-all-tasks-header form {
  justify-content: flex-start;
  margin-top: 12px;
  color: #777;
  font-size: 12px;
}

.shopao-all-tasks-header form label { white-space: nowrap; }

.shopao-all-tasks-header input {
  box-sizing: border-box;
  height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  background: #fff;
  color: #333;
  font-size: 12px;
}

.shopao-all-tasks-header input[type="date"] { width: 90px; }
.shopao-all-tasks-header input[type="search"] { width: 140px; padding: 0 8px; }

.shopao-all-tasks-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.shopao-all-tasks-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: flex-start;
  gap: 4px;
}

.shopao-all-task-card {
  position: relative;
  width: 100%;
  height: 99.2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #444;
  cursor: pointer;
}

.shopao-all-task-card > span {
  display: block;
  width: 100%;
  height: 82px;
  overflow: hidden;
  border-radius: 3px;
  background: #f4f5f7;
}

.shopao-all-task-card img { width: 100%; height: 100%; object-fit: cover; }
.shopao-all-task-card b { display: block; height: 13.2px; padding-top: 4px; overflow: hidden; font-size: 11px; font-weight: 400; line-height: 13.2px; text-overflow: ellipsis; white-space: nowrap; }
.shopao-all-task-card i { position: absolute; top: 0; left: 0; right: 0; padding: 5px 0; background: rgba(255,255,255,.82); color: #ff4d4f; font-size: 11px; font-style: normal; }
.shopao-all-task-card.is-processing i { color: #777; }
.shopao-all-task-card.is-create { height: 82px; }
.shopao-all-task-card.is-create > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid #f0f1f5; background: #fff; color: #777; }
.shopao-all-task-card.is-create strong { font-size: 20px; font-weight: 400; line-height: 20px; }
.shopao-all-task-card.is-create em { font-size: 11px; font-style: normal; line-height: 14px; }

.shopao-all-tasks-panel > footer {
  flex: 0 0 56px;
  padding: 0 16px;
  border-top: 1px solid #f0f1f5;
}

.shopao-all-tasks-panel > footer > div { display: flex; align-items: center; gap: 12px; color: #666; font-size: 12px; }
.shopao-all-tasks-panel footer button:disabled { color: #ccc; cursor: default; }


.shopao-recent-item {
  display: grid;
  width: 74px;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
}

.shopao-recent-item.is-selected span {
  outline: 2px solid #ff2d4d;
  outline-offset: 2px;
}

.shopao-recent-item.is-selected b {
  color: #ff2d4d;
}

.shopao-recent-item.is-processing span {
  position: relative;
}

.shopao-recent-item.is-processing span::after {
  content: "\751f\6210\4e2d";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .74);
  color: #666;
  font-size: 11px;
}

.shopao-recent-item span {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
  background: #f3f4f6;
}

.shopao-recent-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopao-recent-item b {
  display: none;
  overflow: hidden;
  color: #333;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopao-recent-item em {
  display: none;
  color: #9ca3af;
  font-size: 10px;
  font-style: normal;
}

.shopao-imported-task-preview {
  display: none !important;
}

.shopao-workspace-task-host {
  position: relative;
}

.shopao-workspace-selected-material {
  position: absolute;
  inset: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: #f6f7f9;
  pointer-events: none;
}

.shopao-workspace-selected-material img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shopao-workspace-selected-material span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .72);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
}

.task-panel-footer.shopao-screen-safe-footer {
  position: fixed !important;
  left: var(--shopao-footer-left) !important;
  top: var(--shopao-footer-top) !important;
  z-index: 40 !important;
  width: var(--shopao-footer-width) !important;
  box-sizing: border-box !important;
  border-top: 1px solid #f0f1f4 !important;
  background: #fff !important;
}

body[data-shopao-ai-operation="creative_scene"] .creative-scene-inner,
body[data-shopao-ai-operation="image_fusion"] .image-fusion-inner {
  height: calc(var(--shopao-visible-bottom, 100vh) - var(--shopao-workspace-top, 56px)) !important;
  max-height: calc(var(--shopao-visible-bottom, 100vh) - var(--shopao-workspace-top, 56px)) !important;
  min-height: 0 !important;
}

body[data-shopao-ai-operation="image_fusion"] .shopao-generation-board {
  bottom: auto !important;
  height: calc(var(--shopao-visible-bottom, 100vh) - 56px) !important;
  max-height: calc(var(--shopao-visible-bottom, 100vh) - 56px) !important;
}

body[data-shopao-ai-operation="image_fusion"] .shopao-image-fusion-input-panel {
  max-height: calc(var(--shopao-visible-bottom, 100vh) - 108px) !important;
}

body[data-shopao-ai-operation="creative_scene"] .creative-cases-content,
body[data-shopao-ai-operation="image_fusion"] .cases-content,
body[data-shopao-ai-operation="image_fusion"] .shopao-generation-board,
body[data-shopao-ai-operation="image_fusion"] .shopao-image-fusion-input-panel {
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}

body.shopao-image-fusion-board-active .cases-content {
  overflow: hidden !important;
  background: #f7f8fb !important;
}

body.shopao-image-fusion-board-active .image-fusion-inner {
  display: flex !important;
}

body.shopao-image-fusion-board-active .cases-content h1,
body.shopao-image-fusion-board-active .cases-content h2,
body.shopao-image-fusion-board-active .cases-content h3 {
  display: none !important;
}

body.shopao-image-fusion-board-active .cases-content-list {
  display: none !important;
}

body.shopao-image-fusion-board-active .ecl-header,
body.shopao-image-fusion-board-active .ecl-cases,
body.shopao-image-fusion-board-active .view-layer.mini-view,
body.shopao-image-fusion-board-active .image-fusion-input-mini {
  display: none !important;
}

body.shopao-image-fusion-board-active .image-fusion-input-normal {
  display: flex !important;
}

body[data-shopao-ai-operation="image_fusion"].shopao-generation-board-active .shopao-generation-board {
  top: 56px !important;
  left: var(--shopao-image-fusion-left, 160px) !important;
  right: 0 !important;
  bottom: auto !important;
  height: 390px !important;
  max-height: 390px !important;
  padding: 12px 24px 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: #f4f5ff !important;
}

body[data-shopao-ai-operation="image_fusion"].shopao-generation-board-active .shopao-result-panel-shell {
  width: min(1040px, 100%) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 14px !important;
  border-radius: 8px !important;
  background: #fff !important;
}

body[data-shopao-ai-operation="image_fusion"].shopao-generation-board-active .shopao-generation-note {
  margin-bottom: 8px !important;
  font-size: 12px !important;
}

body[data-shopao-ai-operation="image_fusion"].shopao-generation-board-active .shopao-generation-grid {
  grid-template-columns: repeat(var(--shopao-result-count, 1), minmax(0, 1fr)) !important;
  gap: 8px !important;
  justify-content: center !important;
}

body[data-shopao-ai-operation="image_fusion"].shopao-generation-board-active .shopao-generation-card {
  min-height: 220px !important;
  max-height: 260px !important;
}

body[data-shopao-ai-operation="image_fusion"].shopao-generation-board-active .shopao-generation-reference {
  width: 72px !important;
  height: 96px !important;
}

body.shopao-image-fusion-board-active .image-fusion-list-back-to-bottom {
  display: none !important;
}

.shopao-image-fusion-input-panel {
  position: fixed;
  left: 184px;
  top: 84px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-height: calc(100vh - 108px);
  padding: 18px;
  box-sizing: border-box;
  border: 1px solid #eceef3;
  border-radius: 4px;
  overflow: auto;
  background: #fff;
  color: #333;
}

.shopao-image-fusion-input-panel h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
}

.shopao-image-fusion-input-gallery {
  display: grid;
  flex: 0 1 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 72px;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.shopao-image-fusion-input-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 4px;
  background: #f6f7f9;
  object-fit: contain;
}

.shopao-image-fusion-role-group {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.shopao-image-fusion-role-group > strong {
  color: #555;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.shopao-image-fusion-input-panel button {
  align-self: flex-start;
  min-width: 104px;
  height: 36px;
  margin-top: 16px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #7187c5;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.shopao-image-fusion-prompt {
  width: 100%;
  min-height: 72px;
  margin-top: 14px;
  padding: 9px 10px;
  resize: vertical;
  box-sizing: border-box;
  border: 1px solid #d9dce5;
  border-radius: 4px;
  outline: none;
  color: #25272d;
  background: #fff;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-image-fusion-prompt:focus {
  border-color: #ff405b;
}

.shopao-image-fusion-input-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.shopao-image-fusion-input-panel .shopao-image-fusion-input-actions button {
  margin-top: 0;
}

.shopao-image-fusion-input-panel .shopao-image-fusion-reupload {
  min-width: 92px;
  border: 1px solid #d9dce5;
  color: #333;
  background: #fff;
}

.shopao-image-fusion-count {
  height: 36px;
  min-width: 92px;
  padding: 0 8px;
  border: 1px solid #d9dce5;
  border-radius: 4px;
  color: #333;
  background: #fff;
}

.shopao-image-fusion-input-panel .shopao-image-fusion-generate {
  min-width: 104px;
  margin-left: auto;
  background: #ff304f;
}

.shopao-matting-editor-dialog .shopao-matting-finish-button {
  position: absolute !important;
  right: 24px !important;
  bottom: 16px !important;
  z-index: 80 !important;
  display: inline-flex !important;
  width: 88px !important;
  height: 36px !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
}

.shopao-matting-editor-dialog .ant-modal-content,
.shopao-matting-editor-dialog .ant-modal-body {
  overflow: hidden !important;
}

.shopao-workspace-selected-material.is-image-fusion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  box-sizing: border-box;
}

.shopao-workspace-selected-material.is-image-fusion img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 3px;
  background: #fff;
  object-fit: contain;
}

.shopao-restored-image-editor .image-cut-selector {
  position: relative;
}

.shopao-restored-slot-preview {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f6f8;
  pointer-events: none;
}

.shopao-restored-slot-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shopao-restored-image-editor .image-cut-float-actions {
  z-index: 6;
}

.shopao-workspace-option-host {
  position: relative !important;
}

.shopao-workspace-reference-material {
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: 12px;
  z-index: 4;
  width: 78px;
  overflow: hidden;
  border-radius: 4px;
  background: #f3f4f6;
  pointer-events: none;
}

/* Item-detail owns its reference preview inside the drawer; never cover native copy fields. */
body[data-shopao-ai-operation="item_detail"] .shopao-workspace-reference-material {
  display: none !important;
}

.shopao-workspace-reference-material img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopao-workspace-reference-material.is-clothing-detail {
  bottom: auto;
  height: 78px;
  background: #fff;
}

.shopao-workspace-reference-material.is-clothing-detail img {
  object-fit: contain;
}

.shopao-workspace-reference-material span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 4px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
}

.shopao-param-panel {
  display: grid;
  gap: 14px;
  margin: 16px 0 88px;
  padding: 0 4px;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-param-panel.is-floating {
  position: fixed;
  z-index: 15;
  margin: 0;
  padding: 0 2px 24px;
  overflow: auto;
  background: #fff;
}

.shopao-param-panel.is-inline {
  position: static;
  margin: 0 0 88px;
  padding: 0;
  background: transparent;
}

.shopao-param-title {
  color: #333;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
}

.shopao-param-title small {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 400;
}

.shopao-param-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  gap: 16px;
  color: #333;
  font-size: 16px;
  line-height: 22px;
}

.shopao-param-line span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.shopao-param-switch {
  position: relative;
  width: 42px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #b8bcc4;
  cursor: pointer;
}

.shopao-param-switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: transform .16s ease;
}

.shopao-param-switch.is-on {
  background: #315fdc;
}

.shopao-param-switch.is-on::after {
  transform: translateX(20px);
}

.shopao-param-text-control {
  display: none;
  margin-top: -6px;
  padding: 12px 10px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f7f7f7;
  color: #333;
}

.shopao-param-text-control.is-open {
  display: block;
  border-color: #111;
}

.shopao-param-text-control textarea {
  display: block;
  width: 100%;
  min-height: 134px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #111;
  border-radius: 4px;
  outline: none;
  resize: vertical;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 13px;
  line-height: 20px;
}

.shopao-param-text-control textarea::placeholder {
  color: #b5b5b5;
}

.shopao-param-text-control div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.shopao-param-text-control button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  color: #555;
  font-size: 12px;
  cursor: pointer;
}

.shopao-param-text-control [data-param-clear-text] {
  margin-left: 0;
  padding: 0 2px;
  border-color: transparent;
  color: #999;
}

.shopao-param-text-count {
  margin-left: auto;
  color: #777;
  font-size: 12px;
}

.shopao-one-shot-prompt-control {
  display: grid;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  margin: 14px 0 86px;
  padding: 0;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-one-shot-prompt-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

.shopao-one-shot-prompt-title span {
  color: #999;
  font-size: 12px;
  font-weight: 400;
}

.shopao-one-shot-prompt-control textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  box-sizing: border-box;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.shopao-one-shot-prompt-control textarea:focus {
  border-color: #4e73d8;
}

.shopao-one-shot-prompt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 24px;
}

.shopao-one-shot-prompt-count {
  color: #888;
  font-size: 12px;
}

.shopao-one-shot-prompt-actions button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  color: #666;
  cursor: pointer;
}

.shopao-param-segment,
.shopao-param-ratios {
  display: grid;
  gap: 8px;
}

.shopao-param-segment {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shopao-param-ratios {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shopao-param-reference-ratio {
  grid-column: span 2;
}

.shopao-param-segment button,
.shopao-param-ratios button {
  height: 40px;
  min-width: 0;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f7f7f7;
  color: #333;
  font-size: 15px;
  cursor: pointer;
}

.shopao-param-segment button.is-active,
.shopao-param-ratios button.is-active {
  border-color: #4e73d8;
  background: #f7faff;
  color: #4e73d8;
}

.shopao-param-custom-ratio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
}

.shopao-param-custom-ratio input,
.shopao-param-custom-ratio button {
  height: 40px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f7f7f7;
  color: #333;
  font-size: 14px;
}

.shopao-param-custom-ratio input {
  min-width: 0;
  padding: 0 12px;
  outline: none;
}

.shopao-param-custom-ratio button {
  padding: 0 10px;
  cursor: pointer;
}

.shopao-param-custom-ratio.is-active input,
.shopao-param-custom-ratio input:focus {
  border-color: #4e73d8;
  background: #f7faff;
}

.shopao-param-count {
  position: relative;
  display: block;
}

.shopao-param-count select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 14px;
  border: 0;
  border-radius: 4px;
  appearance: none;
  background: #f7f7f7;
  color: #333;
  font-size: 15px;
}

.shopao-param-count span {
  position: absolute;
  right: 14px;
  top: 50%;
  color: #b8bcc4;
  transform: translateY(-50%);
  pointer-events: none;
}

.shopao-official-right-panel {
  position: fixed !important;
  left: var(--shopao-official-panel-left, 620px) !important;
  right: 0 !important;
  top: var(--shopao-official-panel-top, 40px) !important;
  bottom: 0 !important;
  z-index: 45 !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  box-sizing: border-box !important;
  overflow: auto !important;
  background: #fff !important;
}

.shopao-official-panel-collapsed {
  display: none !important;
}

.shopao-official-action-grid {
  position: absolute;
  left: 32px;
  top: 172px;
  z-index: 6;
  display: grid;
  width: calc(100% - 64px);
  max-width: none;
  grid-template-columns: repeat(auto-fill, minmax(140px, 160px));
  gap: 16px;
  align-items: start;
  pointer-events: none;
}

.shopao-official-action-grid.is-model {
  top: 162px;
}

.shopao-official-action-card {
  position: relative;
  display: flex;
  width: 160px;
  height: 212px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px dashed #d8dbe4;
  border-radius: 4px;
  background: #fbfbfc;
  color: #333;
  cursor: pointer;
  overflow: hidden;
  pointer-events: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-official-action-card.is-model {
  background: #ececec;
}

.shopao-official-action-card.is-selected {
  border-color: #ff2d4d;
  box-shadow: 0 0 0 2px rgba(255, 45, 77, .18);
}

.shopao-official-action-card.is-selected::after {
  content: "\5df2\9009\4e2d";
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ff2d4d;
  color: #fff;
  font-size: 12px;
}

.shopao-official-action-card:hover {
  border-color: #6b82c9;
  background: #f7f9ff;
}

.shopao-official-action-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.shopao-official-action-card > span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .22);
  color: #fff;
  font-size: 14px;
}

.shopao-native-reference-upload-action {
  position: relative !important;
  display: flex !important;
  flex: 0 0 auto !important;
  width: 180px !important;
  min-height: 88px !important;
  height: 88px !important;
  margin: 0 0 16px 0 !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
}

.shopao-official-action-inner {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.shopao-official-action-inner strong {
  min-width: 118px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 4px;
  background: #738bc9;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.shopao-official-action-inner em {
  color: #9ca3af;
  font-size: 13px;
  font-style: normal;
}

.shopao-model-picker-root {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  justify-content: flex-end;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-model-picker-mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .28);
}

.shopao-model-picker-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(640px, calc(100vw - 360px));
  min-width: 460px;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: -12px 0 30px rgba(15, 23, 42, .12);
}

.shopao-model-picker-panel > header {
  display: flex;
  min-height: 74px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px 14px;
  box-sizing: border-box;
  border-bottom: 1px solid #eceef2;
}

.shopao-model-picker-panel h2 {
  margin: 0 0 5px;
  color: #222;
  font-size: 20px;
  line-height: 28px;
}

.shopao-model-picker-panel header p {
  margin: 0;
  color: #8a8f98;
  font-size: 13px;
}

.shopao-model-picker-panel [data-model-picker-close] {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 26px;
  line-height: 30px;
  cursor: pointer;
}

.shopao-model-picker-panel > nav {
  display: flex;
  gap: 6px;
  padding: 12px 22px;
  border-bottom: 1px solid #eceef2;
}

.shopao-model-picker-panel > nav button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #666;
  cursor: pointer;
}

.shopao-model-picker-panel > nav button.is-active {
  border-color: #ffc8cf;
  background: #fff2f4;
  color: #ef3349;
}

.shopao-model-picker-panel > main {
  flex: 1;
  overflow: auto;
  padding: 20px 22px 30px;
}

.shopao-model-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px 12px;
}

.shopao-model-picker-grid .shopao-official-action-card {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
}

.shopao-model-picker-empty {
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  color: #9297a1;
  font-size: 14px;
}

.shopao-model-picker-empty[hidden] {
  display: none;
}

.shopao-model-picker-trigger-host {
  position: relative;
}

@media (max-width: 760px) {
  .shopao-model-picker-panel {
    width: 100%;
    min-width: 0;
  }

  .shopao-model-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.shopao-generation-board {
  position: fixed;
  top: 56px;
  right: 0;
  bottom: 0;
  z-index: 8;
  box-sizing: border-box;
  overflow: auto;
  padding: 16px 24px 40px;
  background: #f4f5ff;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-result-panel-shell {
  width: 100%;
  min-height: 100%;
}

.shopao-generation-note {
  margin: 0 0 12px;
  color: #999;
  font-size: 14px;
  line-height: 1.35;
}

.shopao-generation-time {
  margin: 0 0 12px;
  color: #888;
  font-size: 14px;
  line-height: 1.35;
}

.shopao-result-group {
  width: 100%;
}

.shopao-generation-grid {
  display: grid;
  grid-template-columns: 100px repeat(var(--shopao-result-count, 1), minmax(220px, 376px));
  gap: 12px;
  align-items: start;
  justify-content: start;
}

.shopao-generation-grid[data-count="1"] {
  grid-template-columns: 100px minmax(260px, 376px);
}

.shopao-generation-reference {
  position: relative;
  width: 100px;
  height: 134px;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.shopao-generation-reference img,
.shopao-generation-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopao-generation-reference b {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 6px;
  border-radius: 0 0 4px 0;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 13px;
}

.shopao-generation-card {
  position: relative;
  aspect-ratio: 3 / 4;
  width: min(100%, 376px);
  min-height: 300px;
  max-height: calc(100vh - 180px);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.shopao-generation-card.is-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 15px;
}

.shopao-generation-card.is-pending::before {
  content: "";
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border: 3px solid #ffd2da;
  border-top-color: #ff2d4d;
  border-radius: 50%;
  animation: shopao-spin 1s linear infinite;
}

.shopao-generation-card.is-failed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  box-sizing: border-box;
  color: #d92d3f;
  text-align: center;
}

.shopao-fission-settings {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  padding: 10px 24px;
  box-sizing: border-box;
  border-top: 1px solid #f0f1f4;
  background: #fff;
  color: #333;
  font-size: 13px;
}

.shopao-fission-settings-title {
  display: none;
  font-size: 15px;
  font-weight: 600;
}

.shopao-fission-settings-label {
  display: block;
  margin: 9px 0 6px;
  color: #666;
}

.shopao-fission-ratio-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.shopao-fission-settings button,
.shopao-fission-settings select {
  min-height: 32px;
  box-sizing: border-box;
  border: 1px solid #e1e4ea;
  border-radius: 4px;
  background: #fff;
  color: #444;
  cursor: pointer;
  font: inherit;
}

.shopao-fission-settings button.is-active {
  border-color: #6c86c9;
  background: #f1f5ff;
  color: #4f67a1;
}

.shopao-fission-settings select {
  width: 100%;
  padding: 0 8px;
}

.shopao-generation-board[data-workspace-path="/workspace/ai-image/fission-pattern"] .shopao-generation-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.shopao-generation-board[data-workspace-path="/workspace/ai-image/fission-pattern"] .shopao-generation-card {
  aspect-ratio: var(--shopao-result-ratio, 3 / 4);
  min-height: 0;
  max-height: none;
  width: 100%;
}

.shopao-generation-board[data-workspace-path="/workspace/ai-image/fission-pattern"] img {
  object-fit: contain;
}

.shopao-generation-board[data-workspace-path="/workspace/ai-image/fission-pattern"] .shopao-generation-card img {
  height: auto;
}

@media (max-width: 700px) {
  body[data-shopao-ai-operation="fission_pattern"] .shopao-fission-editor {
    position: fixed;
    inset: 104px 0 0;
    z-index: 9;
    width: 100vw !important;
    max-width: none !important;
    height: calc(100dvh - 104px);
    background: #fff;
  }

  body[data-shopao-ai-operation="fission_pattern"] .shopao-fission-editor .task-panel-footer {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
  }

  .shopao-generation-board[data-workspace-path="/workspace/ai-image/fission-pattern"] {
    top: 104px;
    left: 0 !important;
    z-index: 10;
    padding: 16px;
  }
}

.shopao-generation-card.is-failed span {
  max-width: 100%;
  color: #767676;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.shopao-generation-slot-retry {
  min-width: 88px;
  height: 36px;
  padding: 0 18px;
  border: 1px solid #ff2d4d;
  border-radius: 4px;
  background: #fff;
  color: #ff2d4d;
  cursor: pointer;
  font: inherit;
}

.shopao-generation-slot-retry:hover,
.shopao-generation-slot-retry:focus-visible {
  background: #fff2f4;
}

.shopao-generation-slot-retry:disabled {
  border-color: #d5d5d5;
  color: #999;
  cursor: wait;
}

.shopao-clothing-result-card {
  display: flex;
  flex-direction: column;
}

.shopao-clothing-result-card > img {
  min-height: 0;
  flex: 0 0 auto;
  height: calc(100% - 54px);
}

.shopao-clothing-result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 8px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.shopao-clothing-result-actions button {
  min-width: 42px;
  height: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #555;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.shopao-clothing-result-actions button:hover,
.shopao-clothing-result-actions button:focus-visible {
  background: #f5f5f5;
  color: #111;
}

.shopao-clothing-result-actions button[data-shopao-clothing-action="delete"] {
  min-width: 30px;
  padding: 0;
  color: #888;
  font-size: 16px;
}

.shopao-video-generation-board {
  padding: 28px 34px 40px;
  background: #f5f6ff;
}

.shopao-video-board-shell {
  width: min(100%, 980px);
  min-height: 100%;
}

.shopao-video-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.shopao-video-board-head h3 {
  margin: 0 0 6px;
  color: #22242a;
  font-size: 18px;
  font-weight: 600;
}

.shopao-video-board-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shopao-video-new-task {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d8dce8;
  border-radius: 4px;
  background: #fff;
  color: #3e4656;
  font-size: 13px;
  cursor: pointer;
}

.shopao-video-new-task:hover {
  border-color: #ff3654;
  color: #ff3654;
}

.shopao-video-task-id,
.shopao-video-created {
  margin: 0;
  color: #8f939d;
  font-size: 12px;
}

.shopao-video-status {
  min-width: 82px;
  padding: 6px 10px;
  border-radius: 4px;
  background: #eef2ff;
  color: #5269ad;
  text-align: center;
  font-size: 13px;
}

.shopao-video-status.is-done {
  background: #e9f8ef;
  color: #278052;
}

.shopao-video-status.is-failed {
  background: #fff0f1;
  color: #d63b4d;
}

.shopao-video-board-grid {
  display: grid;
  grid-template-columns: 112px minmax(300px, 620px);
  gap: 16px;
  align-items: start;
}

.shopao-video-reference {
  position: relative;
  width: 112px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
}

.shopao-video-reference b {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  padding: 3px 7px;
  border-radius: 0 0 4px 0;
  background: rgba(0, 0, 0, .48);
  color: #fff;
  font-size: 12px;
}

.shopao-video-reference img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopao-video-reference > span {
  display: none;
}

.shopao-video-reference.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d9dce7;
  color: #a4a8b2;
}

.shopao-video-reference.is-empty img,
.shopao-video-reference.is-empty b {
  display: none;
}

.shopao-video-reference.is-empty > span {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 12px;
}

.shopao-video-stage {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: var(--shopao-video-ratio, 16 / 9);
  min-height: 360px;
  max-height: calc(100vh - 180px);
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
}

.shopao-video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  background: #111;
  object-fit: contain;
}

.shopao-video-pending,
.shopao-video-failed {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  box-sizing: border-box;
  color: #8d929d;
  text-align: center;
}

.shopao-video-pending i {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border: 3px solid #ffd3da;
  border-top-color: #ff3654;
  border-radius: 50%;
  animation: shopao-spin 1s linear infinite;
}

.shopao-video-pending strong,
.shopao-video-failed strong {
  margin-bottom: 7px;
  color: #343741;
  font-size: 16px;
}

.shopao-video-pending > span,
.shopao-video-failed > span {
  font-size: 13px;
  line-height: 1.5;
}

.shopao-video-progress {
  width: min(260px, 78%);
  height: 6px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 3px;
  background: #edf0f6;
}

.shopao-video-progress em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ff3654;
  transition: width .25s ease;
}

.shopao-video-pending small {
  margin-top: 7px;
  color: #a0a4ae;
  font-size: 12px;
}

.shopao-video-failed strong,
.shopao-video-failed span {
  color: #d63b4d;
}

.shopao-video-created {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .shopao-video-generation-board {
    padding: 22px 20px 32px;
  }

  .shopao-video-board-grid {
    grid-template-columns: 88px minmax(240px, 1fr);
  }

  .shopao-video-reference {
    width: 88px;
  }
}

@keyframes shopao-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1280px) {
  .shopao-generation-grid {
    grid-template-columns: 92px repeat(var(--shopao-result-count, 1), minmax(180px, 1fr));
  }

  .shopao-generation-grid[data-count="1"] {
    grid-template-columns: 92px minmax(220px, 1fr);
  }

  .shopao-generation-reference {
    width: 92px;
    height: 123px;
  }
}

.shopao-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 2147482100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .62);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.shopao-login-modal.ihw-fallback-login {
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.shopao-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #999;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.shopao-upload-text-hidden,
.ant-upload-list-item-name,
.ant-upload-list-item-actions,
.ant-upload-list-item-card-actions,
.ant-upload-list-item-thumbnail + .ant-upload-list-item-name {
  display: none !important;
}

.shopao-local-upload-fallback {
  width: calc(100% - 24px);
  min-height: 40px;
  margin: 12px;
  padding: 0 16px;
  border: 1px dashed #c8ccd6;
  border-radius: 4px;
  background: #fff;
  color: #4f67a1;
  font-size: 14px;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
}

.shopao-local-upload-fallback:hover {
  border-color: #7187c5;
  background: #f7f9ff;
}

body.shopao-works-picker-open {
  overflow: hidden !important;
}

.shopao-works-picker-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

body[data-shopao-ai-operation="creative_scene"].shopao-generation-board-active .shopao-generation-board {
  bottom: var(--shopao-creative-input-offset, 236px) !important;
  padding: 56px 24px 32px !important;
}

body[data-shopao-ai-operation="creative_scene"].shopao-generation-board-active .shopao-result-panel-shell {
  width: min(1112px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

body[data-shopao-ai-operation="creative_scene"].shopao-generation-board-active .shopao-generation-grid {
  justify-content: center;
}

body[data-shopao-ai-operation="creative_scene"].shopao-generation-board-active .creative-scene-inner-input {
  z-index: 12 !important;
}

body[data-shopao-ai-operation="creative_scene"].shopao-generation-board-active .creative-input-header-template-trigger {
  display: inline-flex !important;
}

body[data-shopao-ai-operation="creative_scene"].shopao-generation-board-active .ant-popover:has(.creative-cases-content) {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  transition: none !important;
  animation: none !important;
}

body[data-shopao-ai-operation="creative_scene"].shopao-generation-board-active .creative-scene-inner .creative-cases-content {
  visibility: hidden !important;
  pointer-events: none !important;
}

.creative-uploader {
  position: relative;
}

.shopao-creative-reference-preview {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f6f8;
  pointer-events: none;
}

.shopao-creative-reference-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopao-creative-reference-preview span {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .52);
  color: #fff;
  font-size: 11px;
}

.shopao-works-picker-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .48);
}

.shopao-works-picker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1112px, calc(100vw - 48px));
  height: min(772px, calc(100vh - 48px));
  transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
}

.shopao-works-picker header {
  height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.shopao-works-picker header strong {
  font-size: 18px;
  color: #202124;
}

.shopao-works-picker header button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 26px;
  cursor: pointer;
}

.shopao-works-picker-toolbar {
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #f3f3f3;
}

.shopao-works-picker-toolbar b {
  color: #fd2845;
  font-size: 14px;
}

.shopao-works-picker-toolbar span {
  color: #999;
  font-size: 12px;
}

.shopao-works-picker-list {
  height: calc(100% - 110px);
  padding: 18px 20px 24px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
  box-sizing: border-box;
}

.shopao-works-picker-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.shopao-works-picker-card:hover {
  border-color: #fd2845;
  box-shadow: 0 4px 14px rgba(253, 40, 69, .1);
}

.shopao-works-picker-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 4px;
  background: #f5f6f8;
}

.shopao-works-picker-card span,
.shopao-works-picker-card em {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shopao-works-picker-card span {
  color: #222;
  font-size: 14px;
}

.shopao-works-picker-card em {
  color: #999;
  font-size: 12px;
  font-style: normal;
}

.shopao-works-picker-empty {
  grid-column: 1 / -1;
  padding: 120px 0;
  color: #999;
  text-align: center;
}

.shopao-resumed-task-id {
  margin: 4px 0 12px;
  color: #999;
  font-size: 12px;
  font-weight: 400;
}

@media (max-width: 1180px) {
  #J_headMenu.shopao-enhanced-nav {
    gap: 8px !important;
  }

  #J_headMenu.shopao-enhanced-nav > .shopao-promo {
    display: inline-flex !important;
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
    padding: 0 8px !important;
  }
}

@media (max-width: 700px) {
  .shopao-generation-board,
  .shopao-model-market-toolbar,
  .shopao-plan-page-mask,
  .shopao-model-market-page {
    top: 104px !important;
  }

  .shopao-model-market-page { inset: 104px 0 0 !important; }

  header:has(#J_headMenu.shopao-enhanced-nav),
  header > div:has(> #J_headMenu.shopao-enhanced-nav) {
    height: 104px !important;
  }

  header > div:has(> #J_headMenu.shopao-enhanced-nav) {
    display: grid !important;
    grid-template-columns: 100px minmax(0, 1fr);
    grid-template-rows: 48px 56px;
    padding: 0 8px !important;
  }

  #J_headMenu.shopao-enhanced-nav {
    position: relative !important;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
    gap: 3px !important;
    padding-right: 0 !important;
  }

  #J_headMenu.shopao-enhanced-nav > .ant-menu {
    position: absolute !important;
    top: -48px !important;
    right: 0 !important;
    width: calc(100% - 100px) !important;
    height: 48px !important;
    margin: 0 !important;
  }

  #J_headMenu.shopao-enhanced-nav > .shopao-extra-control {
    margin: 0 !important;
  }

  #J_headMenu.shopao-enhanced-nav > .shopao-help {
    width: 24px !important;
    min-width: 24px !important;
  }

  body.ihw-auth-logged-out #J_headMenu.shopao-enhanced-nav > .shopao-login {
    min-width: 66px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }

  body.ihw-auth-logged-out #J_headMenu.shopao-enhanced-nav > .shopao-buy {
    min-width: 0 !important;
    padding: 0 5px !important;
    font-size: 11px !important;
  }

  body.ihw-auth-logged-out #J_headMenu.shopao-enhanced-nav > .shopao-buy::before,
  body.ihw-auth-logged-out #J_headMenu.shopao-enhanced-nav > .shopao-buy::after {
    content: none;
  }

  #J_headMenu.shopao-enhanced-nav > .shopao-buy {
    min-width: 92px !important;
    padding: 0 7px 0 30px !important;
    font-size: 12px !important;
  }

  #J_headMenu.shopao-enhanced-nav > .shopao-promo {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 980px) {
  .shopao-recent-task-rail {
    display: none !important;
  }
}
body.shopao-real-works-active .shopao-recent-task-rail {
  display: none !important;
}

.shopao-real-works-host {
  position: relative !important;
}

.shopao-real-works-grid {
  position: absolute;
  z-index: 3;
  top: 76px;
  right: 24px;
  bottom: 82px;
  left: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
  grid-auto-rows: max-content;
  justify-content: start;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 0 0 18px;
  background: #f7f7ff;
}

.shopao-real-work-card {
  width: 100%;
  max-width: 300px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ececf2;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.shopao-real-work-card:focus-visible {
  outline: 2px solid #ff405b;
  outline-offset: 2px;
}

.shopao-real-work-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  aspect-ratio: 4 / 3;
  gap: 1px;
  overflow: hidden;
  background: #f1f1f4;
}

.shopao-real-work-images.count-1 {
  position: relative;
  display: block;
  grid-template-columns: minmax(0, 1fr);
}

.shopao-real-work-images.count-3,
.shopao-real-work-images.count-4 {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.shopao-real-work-images img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  background: #f6f7f9;
}

.shopao-real-work-images.count-1 img {
  position: absolute;
  inset: 0;
  height: 100% !important;
}

.shopao-real-work-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px 14px;
}

.shopao-real-work-footer > div {
  min-width: 0;
}

.shopao-real-work-footer b,
.shopao-real-work-footer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopao-real-work-footer b {
  color: #22242a;
  font-size: 15px;
  font-weight: 600;
}

.shopao-real-work-footer span {
  margin-top: 5px;
  color: #9a9ca4;
  font-size: 12px;
}

.shopao-real-work-footer button {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #33363d;
  font-size: 22px;
  cursor: pointer;
}

body.shopao-real-materials-active .generation-task-list-empty {
  display: none !important;
}

body.shopao-real-materials-active .generation-task-list-content .ant-spin-spinning {
  display: none !important;
}

body.shopao-real-materials-active .generation-task-list-content .loading-more-status {
  display: none !important;
}

.shopao-real-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 190px));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: 20px 24px 32px;
  overflow: auto;
  box-sizing: border-box;
}

.shopao-real-material-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ececf2;
  border-radius: 6px;
  background: #fff;
}

.shopao-real-material-card > button {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #f5f6f8;
  cursor: zoom-in;
}

.shopao-real-material-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shopao-real-material-card > div {
  padding: 10px 12px 12px;
}

.shopao-real-material-card b,
.shopao-real-material-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopao-real-material-card b {
  color: #26282f;
  font-size: 13px;
  font-weight: 500;
}

.shopao-real-material-card span {
  margin-top: 5px;
  color: #999ca5;
  font-size: 11px;
}

.shopao-real-material-empty {
  grid-column: 1 / -1;
  padding: 120px 0;
  color: #999;
  text-align: center;
}

@media (max-width: 1280px) {
  .shopao-real-works-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  }
}

@media (max-width: 900px) {
  .shopao-real-works-grid {
    right: 14px;
    left: 14px;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.shopao-works-preview-root {
  position: fixed;
  inset: 0;
  z-index: 2147482600;
}

.shopao-works-preview-mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 24, .78);
}

.shopao-works-preview {
  position: absolute;
  inset: 32px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  grid-template-rows: minmax(0, 1fr) 76px;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #11141b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.shopao-works-preview-image {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.shopao-works-preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 28px;
  line-height: 34px;
  cursor: pointer;
}

.shopao-works-preview-arrow {
  grid-row: 1;
  width: 40px;
  height: 56px;
  margin: auto;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 36px;
  cursor: pointer;
}

.shopao-works-preview-arrow.is-prev { grid-column: 1; }
.shopao-works-preview-arrow.is-next { grid-column: 3; }
.shopao-works-preview-arrow:disabled { visibility: hidden; }

.shopao-works-preview-thumbs {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px 12px;
}

.shopao-works-preview-thumbs button {
  width: 54px;
  height: 54px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #242833;
  cursor: pointer;
}

.shopao-works-preview-thumbs button.is-active { border-color: #ff405b; }
.shopao-works-preview-thumbs img { width: 100%; height: 100%; object-fit: contain; }

body.shopao-real-video-works-active .video-task-task-list > .task-list-content,
body.shopao-real-video-works-active .video-task-task-list > .task-list-footer {
  visibility: hidden !important;
}

.shopao-real-video-works-grid {
  position: absolute;
  z-index: 3;
  top: 76px;
  right: 24px;
  bottom: 32px;
  left: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
  grid-auto-rows: max-content;
  align-content: start;
  justify-content: start;
  gap: 14px;
  overflow: auto;
  padding-bottom: 18px;
  background: #f7f7ff;
}

.shopao-real-video-card {
  overflow: hidden;
  border: 1px solid #ececf2;
  border-radius: 8px;
  background: #fff;
}

.shopao-real-video-media {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 10;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #11141b;
}

.shopao-real-video-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shopao-real-video-state {
  color: #d9dce4;
  font-size: 14px;
}

.shopao-real-video-footer {
  min-height: 62px;
  padding: 11px 14px;
}

.shopao-real-video-footer b,
.shopao-real-video-footer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopao-real-video-footer b { color: #22242a; font-size: 14px; }
.shopao-real-video-footer span { margin-top: 5px; color: #9296a1; font-size: 12px; }

.shopao-real-video-empty {
  grid-column: 1 / -1;
  padding: 120px 20px;
  color: #90949e;
  text-align: center;
}

.step-init-start-right { position: relative !important; }

.shopao-video-submit-wrap {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 8;
  display: flex;
  justify-content: center;
  padding-top: 40px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.94) 48%);
}

.shopao-video-submit-wrap button {
  width: min(260px, 100%);
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: #ff2747;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .shopao-works-preview { inset: 12px; grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .shopao-real-video-works-grid { right: 14px; left: 14px; grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

.shopao-item-detail-native-category {
  display: none !important;
}

.shopao-item-detail-category-select,
.shopao-feature-category-select,
.shopao-feature-output-count {
  width: 100%;
  height: 32px;
  padding: 0 32px 0 11px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}

.shopao-item-detail-category-select:focus,
.shopao-feature-category-select:focus,
.shopao-feature-output-count:focus {
  border-color: #597ef7;
  box-shadow: 0 0 0 2px rgba(89, 126, 247, .1);
}

.shopao-item-detail-type-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0 0 24px;
  box-sizing: border-box;
  color: #262626;
}

.shopao-item-detail-type-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.shopao-item-detail-type-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  gap: 8px 16px;
}

.shopao-item-detail-type-label {
  min-width: 0;
  font-size: 14px;
  line-height: 22px;
}

.shopao-item-detail-type-stepper {
  display: grid;
  grid-template-columns: 32px 32px 32px;
  align-items: center;
  width: 96px;
  height: 32px;
  flex: 0 0 96px;
}

.shopao-item-detail-type-stepper button,
.shopao-item-detail-type-stepper output {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #262626;
  font: inherit;
  line-height: 1;
}

.shopao-item-detail-type-stepper button {
  cursor: pointer;
}

.shopao-item-detail-type-stepper button:first-child {
  border-radius: 4px 0 0 4px;
}

.shopao-item-detail-type-stepper button:last-child {
  border-radius: 0 4px 4px 0;
}

.shopao-item-detail-type-stepper output {
  border-right: 0;
  border-left: 0;
}

.shopao-item-detail-type-stepper button:hover {
  border-color: #ff3152;
  color: #ff3152;
}

.shopao-item-detail-type-reference {
  grid-column: 1 / -1;
  min-width: 0;
}

.shopao-item-detail-type-reference .lms-item-content-main-image-wrapper {
  position: relative;
  width: 100%;
  min-height: 120px;
  overflow: hidden;
  border: 1px dashed #d9d9d9;
  border-radius: 4px;
  background: #fafafa;
  box-sizing: border-box;
}

.shopao-item-detail-type-reference .lms-item-content-main-image-wrapper > img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: contain;
  background: #f5f5f5;
}

.shopao-item-detail-type-reference-pick {
  width: 100%;
  min-height: 118px;
  border: 0;
  background: transparent;
  color: #8c8c8c;
  font-size: 13px;
  cursor: pointer;
}

.shopao-item-detail-type-reference-pick:hover {
  color: #ff3152;
}

.shopao-item-detail-type-reference-actions {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  background: rgba(0, 0, 0, .48);
}

.shopao-item-detail-type-reference-actions button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.shopao-item-detail-type-reference-input {
  display: none !important;
}

.shopao-item-detail-type-reference-status {
  display: block;
  min-height: 18px;
  padding-top: 3px;
  color: #8c8c8c;
  font-size: 12px;
  line-height: 18px;
}

.shopao-feature-category-native {
  display: none !important;
}

.shopao-feature-output-count-native {
  display: none !important;
}

.shopao-billing-mask{position:fixed;inset:0;z-index:10050;background:rgba(15,23,42,.42);display:flex;align-items:center;justify-content:center;padding:20px}.shopao-billing-modal{position:relative;width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:12px;padding:28px;box-shadow:0 20px 60px rgba(15,23,42,.2);color:#1f2937}.shopao-billing-close{position:absolute;right:16px;top:14px;border:0;background:transparent;font-size:22px;color:#64748b;cursor:pointer}.shopao-billing-modal h3{margin:0 0 8px;font-size:20px}.shopao-billing-balance{margin:0 0 18px;color:#64748b}.shopao-billing-packages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}.shopao-billing-package{display:flex;flex-direction:column;align-items:flex-start;gap:4px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;padding:12px;text-align:left;cursor:pointer}.shopao-billing-package.is-active{border-color:#111827;box-shadow:0 0 0 1px #111827}.shopao-billing-package span{font-size:18px;font-weight:700}.shopao-billing-package small{color:#64748b}.shopao-billing-method-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;color:#4b5563}.shopao-billing-method{min-width:180px;border:1px solid #d1d5db;border-radius:6px;background:#fff;padding:8px}.shopao-billing-submit{width:100%;border:0;border-radius:7px;background:#111827;color:#fff;padding:11px 16px;cursor:pointer}.shopao-billing-submit:disabled{opacity:.55;cursor:not-allowed}.shopao-billing-result{margin-top:14px;line-height:1.7;word-break:break-word}.shopao-billing-result code{display:block;color:#475569;font-size:12px}@media(max-width:520px){.shopao-billing-packages{grid-template-columns:1fr}.shopao-billing-method-label{align-items:stretch;flex-direction:column}.shopao-billing-method{width:100%}}

.shopao-model-market-page {
  position: fixed;
  inset: 56px 0 0;
  z-index: 900;
  overflow: auto;
  background: #f5f6f8;
  color: #252525;
  letter-spacing: 0;
}

.shopao-model-market-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 28px;
  border-bottom: 1px solid #eceef1;
  background: #fff;
}

.shopao-model-market-brand {
  flex: none;
  color: #ff4055;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.shopao-model-market-header nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.shopao-model-market-header nav a {
  color: #666;
  font-size: 14px;
  text-decoration: none;
}

.shopao-model-market-header nav a.is-active {
  color: #ff4055;
  font-weight: 600;
}

.shopao-model-market-banner {
  min-height: 126px;
  padding: 28px 24px 24px;
  border-bottom: 1px solid #edf0f3;
  background: #fff;
  text-align: center;
}

.shopao-model-market-banner h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 36px;
}

.shopao-model-market-banner p {
  margin: 0;
  color: #8a8f98;
  font-size: 14px;
}

.shopao-model-market-toolbar {
  position: sticky;
  top: 56px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 24px;
  border-bottom: 1px solid #eceef1;
  background: #fff;
}

.shopao-model-market-tabs,
.shopao-model-market-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shopao-model-market-tabs button,
.shopao-model-market-filters button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #666;
  cursor: pointer;
}

.shopao-model-market-tabs button.is-active,
.shopao-model-market-filters button.is-active {
  border-color: #ffc8cf;
  background: #fff2f4;
  color: #ef3349;
}

.shopao-model-market-toolbar input {
  width: min(260px, 24vw);
  min-height: 34px;
  margin-left: auto;
  padding: 0 11px;
  border: 1px solid #d8dce2;
  border-radius: 4px;
  outline: none;
}

.shopao-model-market-toolbar input:focus {
  border-color: #ff4055;
}

.shopao-model-market-create,
.shopao-model-market-primary,
.shopao-model-market-login button {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #ff4055;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.shopao-model-market-page main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.shopao-model-market-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px 12px;
}

.shopao-model-market-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e7e9ed;
  border-radius: 4px;
  background: #fff;
}

.shopao-model-market-image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eef0f3;
}

.shopao-model-market-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.shopao-model-market-card:hover .shopao-model-market-image img {
  transform: scale(1.025);
}

.shopao-model-market-card-meta {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  gap: 8px;
}

.shopao-model-market-card-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #333;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shopao-model-market-card-meta span {
  flex: none;
  padding: 2px 5px;
  border-radius: 3px;
  background: #eef3fa;
  color: #60769e;
  font-size: 11px;
}

.shopao-model-market-actions {
  position: absolute;
  right: 8px;
  bottom: 52px;
  left: 8px;
  display: flex;
  opacity: 0;
  transition: opacity 150ms ease;
}

.shopao-model-market-card:hover .shopao-model-market-actions,
.shopao-model-market-card:focus-within .shopao-model-market-actions {
  opacity: 1;
}

.shopao-model-market-actions button {
  flex: 1;
  min-height: 36px;
  border: 0;
  background: rgba(30, 33, 38, 0.88);
  color: #fff;
  cursor: pointer;
}

.shopao-model-market-actions button:first-child {
  background: #ff4055;
}

.shopao-model-market-status,
.shopao-model-market-login {
  display: flex;
  min-height: 320px;
  align-items: center;
  justify-content: center;
  color: #888;
}

.shopao-model-market-login {
  flex-direction: column;
  gap: 16px;
}

.shopao-model-market-login h2 {
  margin: 0;
  color: #333;
  font-size: 20px;
}

.shopao-model-market-detail {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
}

.shopao-model-market-detail-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 48%) 1fr;
  width: min(880px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
}

.shopao-model-market-detail-panel > img {
  width: 100%;
  height: min(76vh, 720px);
  object-fit: cover;
}

.shopao-model-market-detail-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 36px;
}

.shopao-model-market-detail-copy span,
.shopao-model-market-detail-copy p {
  color: #888;
}

.shopao-model-market-detail-copy h2 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.shopao-model-market-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 24px;
  line-height: 30px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .shopao-model-market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shopao-model-market-header nav { gap: 16px; }
}

@media (max-width: 760px) {
  .shopao-model-market-header { padding: 0 14px; }
  .shopao-model-market-header nav { gap: 12px; overflow-x: auto; margin-left: 18px; }
  .shopao-model-market-header nav a { flex: none; }
  .shopao-model-market-toolbar { position: static; flex-wrap: wrap; padding: 10px 12px; }
  .shopao-model-market-toolbar input { order: 3; width: 100%; margin-left: 0; }
  .shopao-model-market-create { margin-left: auto; }
  .shopao-model-market-page main { padding: 14px 12px 28px; }
  .shopao-model-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .shopao-model-market-actions { position: static; opacity: 1; margin: 0 8px 8px; }
  .shopao-model-market-detail-panel { grid-template-columns: 1fr; overflow: auto; }
  .shopao-model-market-detail-panel > img { height: 52vh; }
  .shopao-model-market-detail-copy { padding: 22px; }
}
.shopao-affiliate-link{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:24px;padding-top:20px;border-top:1px solid #eee}.shopao-affiliate-link b{grid-column:1/-1}.shopao-affiliate-link input{min-width:0;height:40px;padding:0 10px;border:1px solid #dfe1e6;border-radius:4px}.shopao-affiliate-link button{height:40px;padding:0 16px;border:0;border-radius:4px;background:#ff4d67;color:#fff;cursor:pointer}.shopao-affiliate-status{min-height:20px;color:#8a9099}@media(max-width:700px){.shopao-affiliate-link{grid-template-columns:1fr}.shopao-affiliate-link button{width:100%}}
