/* 一键生成详情图组 · 科学美观布局 */
.eed-set-page {
  --eed-ink: #0f172a;
  --eed-muted: #64748b;
  --eed-line: #e2e8f0;
  --eed-soft: #f8fafc;
  --eed-card: #ffffff;
  --eed-accent: #0f766e;
  --eed-accent-2: #14b8a6;
  --eed-warn: #b45309;
  --eed-radius: 16px;
  --eed-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}
.eed-set-page .ecom-inset { padding-bottom: 8px; }

/* 顶栏额度：仅问号，点开再看详情 */
.eed-set-page .nav-header { position: relative; }
.eed-set-page .eed-quota-q {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  padding: 0;
}
.eed-set-page .eed-quota-q.active,
.eed-set-page .eed-quota-q:active {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.45);
  background: #ecfdf5;
}
.eed-set-page .eed-quota-pop {
  margin: 0 16px 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(20, 184, 166, 0.06));
  border: 1px solid rgba(15, 118, 110, 0.14);
  animation: eedQuotaIn 0.22s ease;
}
@keyframes eedQuotaIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.eed-set-page .eed-quota-pop__inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eed-set-page .eed-quota-pop .lh-quota-icon {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}
.eed-set-page .eed-quota-pop__tip {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}
.eed-set-page .lh-quota-wrap { display: none !important; }
.eed-set-page .ecom-pro-bar { display: none !important; }
.eed-hero {
  margin: 0 0 14px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(20, 184, 166, 0.18), transparent 55%),
    linear-gradient(160deg, #0f172a 0%, #134e4a 55%, #0f766e 100%);
  color: #fff;
  box-shadow: var(--eed-shadow);
  /* 必须在 .main-content 滚动区内，禁止 sticky/fixed 盖住下方表单 */
  position: relative !important;
  top: auto !important;
  z-index: 0 !important;
  flex-shrink: 0;
}
.eed-set-page .main-content {
  /* 整页一体滚动：介绍卡随内容上滑，不钉在顶部 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.eed-hero__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.eed-hero__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.88;
}

.eed-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--eed-soft);
  border: 1px solid var(--eed-line);
  border-radius: 999px;
  overflow-x: auto;
}
.eed-flow__step {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}
.eed-flow__step.is-on { color: var(--eed-accent); }
.eed-flow__line {
  flex: 1 1 16px;
  height: 1px;
  background: var(--eed-line);
  min-width: 12px;
}

.eed-card {
  background: var(--eed-card);
  border: 1px solid var(--eed-line);
  border-radius: var(--eed-radius);
  padding: 14px 14px 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.eed-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.eed-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--eed-ink);
}
.eed-card__meta { font-size: 12px; color: var(--eed-muted); }
.eed-card__tip {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--eed-muted);
  line-height: 1.45;
}

.eed-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.eed-up {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px dashed #cbd5e1;
  background: var(--eed-soft);
}
.eed-up--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--eed-muted);
  font-size: 12px;
  cursor: pointer;
  border-style: dashed;
}
.eed-up--add strong { font-size: 22px; line-height: 1; color: var(--eed-accent); font-weight: 500; }
.eed-up img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eed-up__x {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border: 0; border-radius: 999px;
  background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}
.eed-up__badge {
  position: absolute; left: 4px; bottom: 4px;
  font-size: 10px; color: #fff; background: rgba(15, 118, 110, 0.9);
  padding: 2px 6px; border-radius: 6px;
}

.eed-textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--eed-line);
  border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.5;
  resize: vertical; min-height: 88px; color: var(--eed-ink); background: #fff;
}
.eed-textarea:focus { outline: none; border-color: var(--eed-accent); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.eed-count { text-align: right; font-size: 11px; color: #94a3b8; margin-top: 6px; }

.eed-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.eed-chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  cursor: grab;
}
.eed-chips--scroll.is-xscroll-drag { cursor: grabbing; }
.eed-chips--scroll::-webkit-scrollbar { height: 5px; }
.eed-chips--scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
@media (hover: hover) and (pointer: fine) {
  .eed-chips--scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    cursor: default;
    mask-image: none;
    -webkit-mask-image: none;
  }
}
.eed-chip {
  flex: 0 0 auto;
  border: 1px solid var(--eed-line);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.eed-chip.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--eed-accent), #0d9488);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.22);
}

.eed-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
}
.eed-seg--wrap { flex-wrap: wrap; }
.eed-seg__btn {
  flex: 1;
  min-width: 64px;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.eed-seg__btn.active {
  background: #fff;
  color: var(--eed-accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.eed-count-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.eed-count-btn {
  border: 1px solid var(--eed-line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}
.eed-count-btn.active {
  border-color: var(--eed-accent);
  color: #fff;
  background: linear-gradient(135deg, var(--eed-accent), #0d9488);
}
.eed-cost {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--eed-accent);
  font-weight: 600;
}

.eed-primary {
  width: 100%;
  margin: 6px 0 8px;
  border: 0;
  border-radius: 14px;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #0f766e 100%);
  background-size: 180% 180%;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
  animation: eedBtnGlow 4s ease infinite;
}
.eed-primary:disabled { opacity: 0.45; cursor: not-allowed; animation: none; box-shadow: none; }
@keyframes eedBtnGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.eed-ghost {
  border: 1px solid var(--eed-line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  width: 100%;
}
.eed-hist-bar { margin-bottom: 12px; }

/* 规划层 */
.eed-plan {
  position: fixed; inset: 0; z-index: 12000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.eed-plan[hidden] { display: none !important; }
.eed-plan__panel {
  width: min(560px, 100%);
  max-height: 92vh;
  background: #f8fafc;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: eedSheetUp .28s ease;
}
@keyframes eedSheetUp {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.eed-plan__head {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px 10px;
  background: #fff;
  border-bottom: 1px solid var(--eed-line);
  border-radius: 20px 20px 0 0;
}
.eed-plan__back {
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: #f1f5f9; font-size: 18px; cursor: pointer;
}
.eed-plan__title { margin: 2px 0 2px; font-size: 17px; font-weight: 800; color: var(--eed-ink); }
.eed-plan__sub { margin: 0; font-size: 12px; color: var(--eed-muted); line-height: 1.4; }
.eed-plan__body {
  flex: 1; overflow-y: auto; padding: 12px 14px 20px;
  -webkit-overflow-scrolling: touch;
}
.eed-plan__foot {
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--eed-line);
}
.eed-plan__cost {
  margin: 0 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--eed-accent);
}

.eed-spec {
  background: #fff;
  border: 1px solid var(--eed-line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.eed-spec__h {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--eed-ink);
  display: flex; align-items: center; gap: 6px;
}
.eed-spec__h::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--eed-accent-2);
}
.eed-spec__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  padding: 5px 0;
  border-top: 1px dashed #e2e8f0;
}
.eed-spec__row:first-of-type { border-top: 0; }
.eed-spec__k { color: #94a3b8; }
.eed-spec__v { color: #334155; }

.eed-slot {
  background: #fff;
  border: 1px solid var(--eed-line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
}
.eed-slot__top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.eed-slot__n {
  width: 24px; height: 24px; border-radius: 8px;
  background: rgba(15,118,110,.1); color: var(--eed-accent);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.eed-slot input, .eed-slot textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 8px 10px; font-size: 13px; color: var(--eed-ink); background: #fff;
}
.eed-slot input { font-weight: 700; margin-bottom: 6px; }
.eed-slot textarea { min-height: 56px; resize: vertical; line-height: 1.45; }

/* 启动动画 */
.eed-launch {
  position: fixed; inset: 0; z-index: 13000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(20,184,166,.25), transparent 40%),
    linear-gradient(160deg, #0f172a, #134e4a 60%, #0f766e);
  color: #fff;
  text-align: center;
  padding: 24px;
}
.eed-launch[hidden] { display: none !important; }
.eed-launch__ring {
  width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #5eead4;
  animation: eedSpin 1s linear infinite;
  margin-bottom: -90px;
}
.eed-launch__core {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #2dd4bf);
  box-shadow: 0 0 40px rgba(45, 212, 191, .55);
  margin-bottom: 28px;
  animation: eedPulse 1.4s ease-in-out infinite;
}
@keyframes eedSpin { to { transform: rotate(360deg); } }
@keyframes eedPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.eed-launch__title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.eed-launch__sub { margin: 0 0 22px; font-size: 13px; opacity: .78; }
.eed-launch__steps {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.eed-launch__steps span {
  font-size: 11px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.55);
}
.eed-launch__steps span.is-done { background: rgba(94,234,212,.22); color: #99f6e4; }
.eed-launch__steps span.is-on { background: #fff; color: #0f766e; font-weight: 700; }

/* 历史 Tab：强制可见（修复未加 .active 时整区空白） */
.eed-set-page #tabHistory.active,
.eed-set-page #tabHistory[style*="display: block"],
.eed-set-page #tabHistory[style*="display:block"] {
  display: block !important;
}
.eed-set-page .eed-history-list {
  min-height: 120px;
}
.eed-set-page .eed-history-list .history-empty {
  display: block !important;
  padding: 36px 16px;
  text-align: center;
  color: #64748b;
}

/* 历史：一行两卡 + 四步进度 + 生成中动画 */
.eed-set-page #tabHistory .history-grid,
.eed-set-page .eed-hist-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 10px !important;
  width: 100%;
  box-sizing: border-box;
}
.eed-set-page .eed-hist-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}
.eed-set-page .eed-hist-del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  line-height: 1.2;
}
.eed-set-page .eed-hist-del:active {
  background: rgba(185, 28, 28, 0.9);
}
.eed-set-page .eed-hist-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(165deg, #f8fafc, #ecfdf5 50%, #f1f5f9);
  overflow: hidden;
}
.eed-set-page .eed-hist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.eed-set-page .eed-hist-thumb__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
}
.eed-set-page .eed-hist-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #fff;
  z-index: 2;
}
.eed-set-page .eed-hist-spin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  border-top-color: #5eead4;
  animation: eedHistSpin 0.8s linear infinite;
}
@keyframes eedHistSpin { to { transform: rotate(360deg); } }
.eed-set-page .eed-hist-loading__t {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.eed-set-page .eed-hist-loading__s {
  font-size: 10px;
  opacity: 0.88;
}
.eed-set-page .eed-hist-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.eed-set-page .eed-hist-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.eed-set-page .eed-hist-status {
  font-size: 11px;
  font-weight: 700;
  color: #0f766e;
}
.eed-set-page .eed-hist-status.is-fail { color: #b91c1c; }
.eed-set-page .eed-hist-status.is-done { color: #047857; }
.eed-set-page .eed-hist-status.is-run { color: #0f766e; }

.eed-pipe {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 2px 0 0;
}
.eed-pipe__row {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
}
.eed-pipe span {
  flex: 1;
  text-align: center;
  font-size: 9px;
  padding: 4px 2px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eed-pipe span.is-done { background: #ecfdf5; color: #0f766e; }
.eed-pipe span.is-on {
  background: #0f766e;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.18);
  animation: eedPipePulse 1.2s ease-in-out infinite;
}
.eed-pipe span.is-fail { background: #fef2f2; color: #b91c1c; }
@keyframes eedPipePulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
.eed-hist-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
  border: 1px solid #99f6e4;
  font-size: 12px;
  color: #0f766e;
  font-weight: 600;
  display: none;
}
.eed-hist-banner.show { display: flex; align-items: center; gap: 8px; }
.eed-hist-banner .eed-hist-spin {
  width: 16px; height: 16px; border-width: 2px; flex-shrink: 0;
}

.eed-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(10px);
  background: rgba(15,23,42,.92); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 13px; z-index: 14000; opacity: 0; pointer-events: none; transition: .2s;
  max-width: 86vw; text-align: center;
}
.eed-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#imageViewer {
  position: fixed; inset: 0; z-index: 15000; background: rgba(0,0,0,.88);
  align-items: center; justify-content: center; display: none;
}
#imageViewer img { max-width: 94%; max-height: 86%; border-radius: 12px; }

@media (min-width: 768px) {
  .eed-plan { align-items: center; }
  .eed-plan__panel {
    border-radius: 20px;
    max-height: 86vh;
  }
}
