/* ============================================================================
   3D 立体服装图（图片板块 · 子页 sub-to3d）· 样式
   —— 类名前缀 td-（已跑 check-css-collisions.py 确认全局唯一）
   ----------------------------------------------------------------------------
   配色说明：图标品红紫 H=306°（#d50bc1 → #5c0a55）。
   它是用 **CIE Lab 感知距离**在图片板块已占色相里算出的最大空位，不是肉眼挑的。
   白字在浅端对比度 4.52:1，达 WCAG AA。
   ⚠️ 2026-09-23 本功能由「2D转3D」整体替换为「3D立体服装图」，
      技术标识（sub-to3d / 路由 / 类名前缀）**故意保持不变**（见 lib/tod3.js 头注），
      只把布局从"上传→强度→视频结果"改成"上传→立体程度→背景画幅→成品图"。
   ========================================================================== */

/* 🔴 [hidden] 兜底必须**按子页作用域**写：站内 .card/.gen-btn 之类带 display:flex/grid，
      会把浏览器默认的 [hidden]{display:none} 盖掉 → 隐藏的卡片照样显示。 */
#sub-to3d [hidden] { display: none !important; }

/* ------------------------------- 头部横幅 ------------------------------- */
#sub-to3d .td-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0 14px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #fdeafb 0%, #f7f2ff 100%);
  border: 1px solid #f2d9ef;
}
#sub-to3d .td-banner-ico {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, #d50bc1, #5c0a55);
  box-shadow: 0 4px 12px rgba(160, 10, 145, .28);
}
#sub-to3d .td-banner-t { font-size: 15px; font-weight: 800; color: #1e1030; letter-spacing: .2px; }
#sub-to3d .td-banner-s { margin-top: 3px; font-size: 12px; line-height: 1.55; color: #7a6a86; }

/* ------------------------------- 上传区 ------------------------------- */
#sub-to3d .td-drop {
  margin-top: 10px; padding: 30px 16px; border-radius: 16px; cursor: pointer;
  border: 1.5px dashed #d9c8e4; background: #fdfbff;
  text-align: center; transition: border-color .18s, background .18s;
}
#sub-to3d .td-drop:hover, #sub-to3d .td-drop.over { border-color: #d50bc1; background: #fdf4fc; }
#sub-to3d .td-drop-ico {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 300; color: #b8149f;
  background: #fbeaf9; border: 1px solid #f4d6f1;
}
#sub-to3d .td-drop-t { font-size: 14px; font-weight: 700; color: #2a1a38; }
#sub-to3d .td-drop-s { margin-top: 6px; font-size: 11.5px; line-height: 1.6; color: #8a7a96; }

#sub-to3d .td-shot { margin-top: 12px; }
#sub-to3d .td-shot img {
  width: 100%; border-radius: 14px; display: block;
  background: #f4f0f8; max-height: 300px; object-fit: contain;
}
#sub-to3d .td-shot-meta {
  margin-top: 8px; font-size: 11.5px; color: #6f6178;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
#sub-to3d .td-shot-meta b { color: #3a2a48; font-weight: 700; }

/* --------------------------- 立体程度档位（三列） --------------------------- */
#sub-to3d .td-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
#sub-to3d .td-lv {
  position: relative; padding: 12px 9px 11px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid #e8dfee; background: #fff; text-align: center;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
#sub-to3d .td-lv:hover { border-color: #e0b7dd; }
#sub-to3d .td-lv.on {
  border-color: #d50bc1; background: #fef6fe;
  box-shadow: 0 3px 12px rgba(213, 11, 193, .16);
}
/* 立体感图示：三根柱子的高低 = 体积还原程度（比文字更快看懂） */
#sub-to3d .td-lv-bars { height: 22px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; margin-bottom: 7px; }
#sub-to3d .td-lv-bars i { width: 5px; border-radius: 3px; background: #e3d6ec; display: block; }
#sub-to3d .td-lv.on .td-lv-bars i { background: linear-gradient(180deg, #d50bc1, #8d0a82); }
#sub-to3d .td-lv-k { font-size: 13.5px; font-weight: 800; color: #241633; }
#sub-to3d .td-lv-tag {
  display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700; color: #a0108f; background: #fbeaf9;
}
#sub-to3d .td-lv-d { margin-top: 6px; font-size: 10.5px; line-height: 1.5; color: #7d6d8a; }
#sub-to3d .td-note { margin-top: 10px; font-size: 12px; line-height: 1.62; color: #5f5170; }
#sub-to3d .td-warn { margin-top: 8px; font-size: 11.5px; line-height: 1.6; color: #8a5a12; background: #fdf6e6; border-radius: 10px; padding: 8px 10px; }

/* ------------------------- 背景 / 画幅 选项（chip） ------------------------- */
#sub-to3d .td-opts { display: grid; gap: 8px; margin-top: 10px; }
#sub-to3d .td-opts.c3 { grid-template-columns: repeat(3, 1fr); }
#sub-to3d .td-opts.c2 { grid-template-columns: repeat(2, 1fr); }
#sub-to3d .td-opt {
  position: relative; padding: 11px 8px 10px; border-radius: 13px; cursor: pointer;
  border: 1.5px solid #e8dfee; background: #fff; text-align: center;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
#sub-to3d .td-opt:hover { border-color: #e0b7dd; }
#sub-to3d .td-opt.on {
  border-color: #d50bc1; background: #fef6fe;
  box-shadow: 0 3px 12px rgba(213, 11, 193, .16);
}
#sub-to3d .td-opt-i { font-size: 17px; line-height: 1; }
#sub-to3d .td-opt-k { margin-top: 5px; font-size: 12.5px; font-weight: 800; color: #241633; }
#sub-to3d .td-opt.on .td-opt-k { color: #a0108f; }
#sub-to3d .td-opt-h { margin-top: 3px; font-size: 10px; line-height: 1.45; color: #8a7a96; }
#sub-to3d .td-opt-tag {
  position: absolute; top: -6px; right: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #d50bc1, #8d0a82);
}

/* ------------------------------- 生成按钮 ------------------------------- */
#sub-to3d .td-run-tip { margin-top: 10px; font-size: 11.5px; line-height: 1.6; color: #7a6a86; text-align: center; }
#sub-to3d .td-run-tip b { color: #a0108f; }

/* ------------------------------- 生成中（读秒区） ------------------------------- */
#sub-to3d .td-prog {
  margin-top: 4px; padding: 16px; border-radius: 16px;
  background: linear-gradient(135deg, #faf5ff 0%, #fdf3fb 100%);
  border: 1px solid #f0e2f4;
}
#sub-to3d .td-prog-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
#sub-to3d .td-prog-phase { font-size: 13.5px; font-weight: 800; color: #2a1a38; }
#sub-to3d .td-clock {
  font-size: 20px; font-weight: 800; color: #a0108f; letter-spacing: .3px;
  font-variant-numeric: tabular-nums;   /* 数字等宽 —— 否则每秒跳动时整行会左右抖 */
}
#sub-to3d .td-clock-v { font-variant-numeric: tabular-nums; }
#sub-to3d .td-prog-eta { margin-top: 7px; font-size: 11.5px; line-height: 1.6; color: #7a6a86; }
#sub-to3d .td-prog-eta b { color: #a0108f; font-variant-numeric: tabular-nums; }
#sub-to3d .td-bar {
  margin-top: 11px; height: 7px; border-radius: 999px; background: #efe6f4; overflow: hidden;
}
#sub-to3d .td-bar-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #d50bc1, #7a0b8f);
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
#sub-to3d .td-prog-note { margin-top: 11px; font-size: 11.5px; line-height: 1.6; color: #7a6a86; }

/* ------------------------------- 结果区 ------------------------------- */
#sub-to3d .td-stage-wrap {
  margin-top: 12px; border-radius: 16px; overflow: hidden;
  background: repeating-conic-gradient(#f6f3f9 0% 25%, #fdfcfe 0% 50%) 50% / 18px 18px;
  border: 1px solid #efe8f5;
}
#sub-to3d .td-pic { width: 100%; display: block; }
#sub-to3d .td-cmp { display: flex; align-items: center; gap: 6px; margin-top: 11px; }
#sub-to3d .td-cmp button {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer;
  border: 1.5px solid #e8dfee; background: #fff; color: #6f6178;
  transition: border-color .16s, background .16s, color .16s;
}
#sub-to3d .td-cmp button.on { border-color: #d50bc1; background: #fef6fe; color: #a0108f; }
#sub-to3d .td-cmp-note { margin-left: auto; font-size: 10.5px; color: #9a8ca6; }

#sub-to3d .td-meta { margin-top: 11px; font-size: 11.5px; line-height: 1.7; color: #6f6178; }
#sub-to3d .td-meta b { color: #3a2a48; }

#sub-to3d .td-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
#sub-to3d .td-act {
  padding: 11px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1.5px solid #e8dfee; background: #fff; color: #3a2a48;
  transition: border-color .16s, background .16s;
}
#sub-to3d .td-act:hover { border-color: #d50bc1; background: #fef6fe; }
#sub-to3d .td-act.main {
  grid-column: 1 / -1; border: none; color: #fff;
  background: linear-gradient(135deg, #d50bc1, #7a0b8f);
  box-shadow: 0 4px 14px rgba(160, 10, 145, .26);
}
#sub-to3d .td-act:disabled { opacity: .55; cursor: not-allowed; }

/* ------------------------------- 怎么用得好 ------------------------------- */
#sub-to3d .td-steps-list { list-style: none; margin: 10px 0 0; padding: 0; }
#sub-to3d .td-steps-list li {
  display: flex; gap: 9px; align-items: flex-start;
  margin-bottom: 10px; font-size: 12.5px; line-height: 1.65; color: #4d4059;
}
#sub-to3d .td-steps-list li i {
  flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-style: normal; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #d50bc1, #8d0a82);
}
#sub-to3d .td-limits { margin-top: 10px; padding: 11px 12px; border-radius: 12px; background: #faf7fd; border: 1px solid #f0e8f6; }
#sub-to3d .td-limits-h { font-size: 12px; font-weight: 800; color: #3a2a48; margin-bottom: 6px; }
#sub-to3d .td-limits ul { margin: 0; padding-left: 16px; }
#sub-to3d .td-limits li { font-size: 11.5px; line-height: 1.66; color: #6f6178; margin-bottom: 4px; }

/* ------------------------------- toast ------------------------------- */
#sub-to3d .td-toast {
  position: fixed; left: 50%; bottom: 88px; transform: translate(-50%, 8px);
  max-width: 84vw; padding: 10px 16px; border-radius: 999px;
  background: rgba(28, 12, 40, .93); color: #fff; font-size: 12.5px; line-height: 1.5;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; z-index: 9999;
  text-align: center;
}
#sub-to3d .td-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 窄屏：三列的档位/背景卡会把 10.5px 的说明挤成一列一个字 → 降到两列 */
@media (max-width: 380px) {
  #sub-to3d .td-levels { grid-template-columns: repeat(2, 1fr); }
  #sub-to3d .td-opts.c3 { grid-template-columns: repeat(2, 1fr); }
  #sub-to3d .td-acts { grid-template-columns: 1fr; }
  #sub-to3d .td-act.main { grid-column: 1; }
}

/* --------------------- 图片板块入口卡图标 --------------------- */
/* 品红紫 H=306°。用 CIE Lab 感知距离在图片板块已占色相里扫出的最大空位：
   浅端对白色对比度 4.52:1（达 WCAG AA）。
   ⚠️ 定义在自己的 css 里、不动 style.css（全站铁律）。 */
.f-to3d { background: linear-gradient(135deg, #d50bc1, #5c0a55); }
