
/* 变量统一由 tokens.css 提供（原 :root 已迁移，2026-10-29） */
  *{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
  .tool-wrap,.tool-wrap{height:100%}
  .tool-wrap{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
    background:var(--bg); color:var(--text);
    display:flex; flex-direction:column; min-height:100vh;
  }
  .tool-wrap header{
    background:var(--card); border-bottom:1px solid var(--line);
    padding:14px 20px; display:flex; align-items:center; justify-content:space-between;
    position:sticky; top:0; z-index:50;
  }
  .tool-wrap .logo{display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px}
  .tool-wrap .logo .dot{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--purple),#A78BFA);display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px}
  .tool-wrap .logo small{display:block;font-size:11px;color:var(--text2);font-weight:400}
  .tool-wrap .btn{
    border:none;border-radius:12px;padding:10px 18px;font-size:15px;font-weight:600;cursor:pointer;
    transition:transform .12s, box-shadow .12s, opacity .12s;
  }
  .tool-wrap .btn:active{transform:scale(.96)}
  .btn-primary{background:var(--purple);color:#fff}
  .btn-primary:hover{box-shadow:0 6px 18px rgba(124,58,237,.35)}
  .btn-orange{background:var(--orange);color:#fff}
  .btn-orange:hover{box-shadow:0 6px 18px rgba(249,115,22,.35)}
  .tool-wrap .btn-ghost{background:var(--purple-light);color:var(--purple-dark)}
  .btn-danger{background:#fff;color:#DC2626;border:1px solid #FCA5A5}
  .btn-danger:hover{background:#FEF2F2;box-shadow:0 4px 12px rgba(220,38,38,.2)}
  .btn-block{width:100%;padding:14px;font-size:16px}
  .tool-wrap .btn:disabled{opacity:.5;cursor:not-allowed}
  .tool-wrap main{flex:1;display:flex;flex-direction:column;gap:14px;padding:16px 20px;max-width:1500px;width:100%;margin:0 auto}
  .upload-zone{
    border:2px dashed #C4B5FD;border-radius:16px;background:var(--card);
    padding:22px;text-align:center;cursor:pointer;transition:all .2s;
  }
  .upload-zone:hover,.upload-zone.drag{border-color:var(--purple);background:var(--purple-light)}
  .upload-zone .big{font-size:17px;font-weight:600;margin-bottom:6px}
  .upload-zone .sub{font-size:13px;color:var(--text2)}
  .upload-zone .sub b{color:var(--purple-dark)}
  .workspace{display:grid;grid-template-columns:230px 1fr 340px;gap:14px;flex:1;min-height:480px}
  .panel{background:var(--card);border-radius:16px;border:1px solid var(--line);display:flex;flex-direction:column;overflow:hidden}
  .panel h3{
    font-size:14px;padding:12px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px;
    background:#FBFBFF;color:var(--purple-dark)
  }
  .panel h3 .n{background:var(--purple);color:#fff;border-radius:8px;padding:1px 8px;font-size:12px;margin-left:auto}
  #viewer{position:relative;flex:1;background:radial-gradient(circle at 50% 35%,#ffffff,#ECEAFB);min-height:400px}
  #viewer canvas{display:block}
  .viewer-hint{
    position:absolute;left:50%;bottom:14px;transform:translateX(-50%);
    background:rgba(30,27,75,.75);color:#fff;font-size:12px;border-radius:20px;padding:6px 14px;pointer-events:none;white-space:nowrap
  }
  .toolbar{position:absolute;top:12px;right:12px;display:flex;gap:6px;z-index:5}
  .toolbar .tool-wrap .btn{padding:7px 12px;font-size:13px;border-radius:10px;background:var(--card);color:var(--text);border:1px solid var(--line)}
  .part-list,.joint-list{flex:1;overflow-y:auto;padding:8px}
  .part-item{
    display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;cursor:pointer;
    transition:background .12s;border:1px solid transparent;margin-bottom:4px;user-select:none;
  }
  .part-item:hover{background:var(--purple-light)}
  .part-item.sel{background:var(--purple-light);border-color:var(--purple)}
  .part-item .sw{width:14px;height:14px;border-radius:4px;flex-shrink:0;border:1px solid rgba(0,0,0,.1)}
  .part-item .nm{font-size:14px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .part-item .st{font-size:11px;color:var(--text2)}
  .part-item .st.j{color:var(--ok)}
  .joint-item{padding:8px 10px;border-radius:10px;background:#FBFBFF;border:1px solid var(--line);margin-bottom:6px;font-size:13px}
  .joint-item .jp{font-weight:600;margin-bottom:3px}
  .joint-item .jd{color:var(--text2);font-size:12px}
  .joint-item .rm{float:right;color:#EF4444;cursor:pointer;font-size:12px;border:none;background:none}
  /* LINK/JOINT 工作台 */
  .link-tree{padding:12px;max-height:440px;overflow:auto}
  .link-tree .empty{text-align:center;color:var(--text2);font-size:13px;line-height:1.9;padding:18px 8px}
  .lt-node{display:flex;align-items:center;gap:7px;padding:8px 9px;border-radius:9px;font-size:13px;margin-bottom:5px}
  .lt-node:hover{background:#F5F3FF}
  .lt-badge{font-size:11px;font-weight:700;padding:3px 7px;border-radius:6px;background:#EEF2FF;color:#6366F1;flex-shrink:0}
  .lt-badge.base{background:#FDF4FF;color:#C026D3}
  .lt-name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}
  .lt-parts{color:var(--text2);font-size:11px;margin-left:auto;flex-shrink:0}
  .lt-parent{color:var(--text2);font-size:11px;background:#F3F4F6;border-radius:6px;padding:2px 6px;flex-shrink:0;white-space:nowrap}
  .lt-del{border:none;background:none;color:#EF4444;cursor:pointer;font-size:13px;flex-shrink:0}
  .lt-joint{font-size:11px;color:var(--purple-dark);background:var(--purple-light);border-radius:6px;padding:2px 6px;flex-shrink:0}
  .lt-jbtn{border:1px solid var(--purple);color:var(--purple-dark);background:none;border-radius:6px;cursor:pointer;font-size:12px;padding:3px 8px;flex-shrink:0}
  .lt-jbtn:hover{background:var(--purple-light)}
  .lt-slider-row{display:flex;align-items:center;gap:8px;padding:2px 10px 10px;font-size:12px}
  .lt-slider{flex:1;accent-color:var(--purple);height:20px;cursor:pointer}
  .lt-slider-val{color:var(--purple-dark);font-weight:700;font-size:13px;width:46px;text-align:right;flex-shrink:0}
  /* 关节设置面板（右侧，导出按钮上方） */
  .lj-panel{border-top:1px solid var(--line);padding:12px;background:#FDFBF7}
  .lj-head{font-weight:700;font-size:14px;margin-bottom:4px}
  .lj-head span{color:var(--purple-dark);font-weight:600}
  .lj-desc{font-size:12px;color:var(--text2);margin-bottom:10px;line-height:1.7}
  .lj-axis-info{display:flex;align-items:center;gap:8px;margin-top:8px;background:#EEF2FF;border-radius:8px;padding:6px 10px;font-size:12px;color:var(--purple-dark)}
  .lj-axis-info span{flex:1;word-break:break-all}
  .lj-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
  .link-hint{font-size:11px;color:var(--text2);padding:4px 12px 10px}
  .empty{color:var(--text2);font-size:13px;text-align:center;padding:30px 10px;line-height:1.8}
  /* 弹窗 */
  .modal-mask{
    position:fixed;inset:0;background:rgba(30,27,75,.45);display:none;align-items:center;justify-content:center;z-index:100;padding:16px;
  }
  .modal-mask.show{display:flex}
  .modal{
    background:#fff;border-radius:20px;padding:24px;width:100%;max-width:420px;
    box-shadow:0 24px 60px rgba(30,27,75,.25);animation:pop .18s ease;
  }
  @keyframes pop{from{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}
  .modal h4{font-size:17px;margin-bottom:6px}
  .modal .ms{font-size:13px;color:var(--text2);margin-bottom:16px;line-height:1.6}
  .field{margin-bottom:14px}
  .field label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--text)}
  .field .hint{font-size:12px;color:var(--text2);margin-top:4px;line-height:1.5}
  .axis-row{display:flex;gap:8px}
  .axis-row .tool-wrap .btn{flex:1;padding:12px;font-size:15px;background:#F3F4F8;color:var(--text);border-radius:12px;font-weight:600}
  .axis-row .tool-wrap .btn.on{background:var(--purple);color:#fff}
  .limits{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .field .tool-wrap input[type=number]{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-size:15px;background:#FBFBFF}
  .field .tool-wrap input[type=number]:focus{outline:2px solid var(--purple);border-color:transparent}
  .modal-actions{display:flex;gap:10px;margin-top:18px}
  .modal-actions .tool-wrap .btn{flex:1;padding:12px}
  .chip{display:inline-block;background:var(--purple-light);color:var(--purple-dark);border-radius:8px;padding:2px 8px;font-size:12px;margin-left:6px}
  .toast{
    position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:rgba(30,27,75,.9);color:#fff;
    padding:12px 22px;border-radius:30px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .25s;z-index:200;max-width:90vw;text-align:center
  }
  .toast.show{opacity:1}
  .tabs{display:flex;gap:4px;padding:10px 12px 0}
  .tabs button{flex:1;border:none;background:none;padding:10px;font-size:14px;font-weight:600;color:var(--text2);border-bottom:2px solid transparent;cursor:pointer}
  .tabs button.on{color:var(--purple-dark);border-color:var(--purple)}
  .tab-body{display:none;flex:1;overflow-y:auto;padding:10px 12px}
  .tab-body.show{display:block}
  .help-item{padding:10px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.7}
  .help-item b{color:var(--purple-dark)}
  .tool-wrap footer{padding:10px 20px;text-align:center;font-size:12px;color:var(--text2);border-top:1px solid var(--line);background:var(--card)}
  @media (max-width:900px){
    .tool-wrap main{padding:12px}
    .workspace{grid-template-columns:1fr;min-height:0}
    #viewer{min-height:380px;order:-1}
    .part-list{max-height:180px}
  }

.tool-wrap header{display:none!important}

/* ===== 左栏上传区（紧凑扁版，给零件列表腾空间） ===== */
.tool-wrap .panel .upload-zone{padding:7px 10px;border-radius:10px;margin:0}
.tool-wrap .upload-zone .big{font-size:12.5px;margin-bottom:2px}
.tool-wrap .upload-zone .sub{font-size:11px;line-height:1.5}
/* ===== 右栏快捷操作区 ===== */
.tool-wrap .quick-ops{display:flex;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line);background:#FBFBFF;flex-wrap:wrap}
.tool-wrap .quick-ops .btn{padding:7px 14px;font-size:13px;border-radius:10px}
/* ===== 容器宽度（2026-10-30 起全宽自适应，见下一条） ===== */
.tool-wrap main{max-width:100%}

/* ===== 桌面端一屏布局：整页不滚动，各面板内部滚动（2026-10-29） ===== */
@media (min-width:901px){
  html,body{height:100%}
  body{display:flex;flex-direction:column;overflow:hidden}
  .site-head,.site-foot{flex:0 0 auto}
  .mobile-nav{display:none}
  .tool-wrap{height:auto;flex:1 1 auto;min-height:0}
  .tool-wrap main{flex:1 1 auto;min-height:0}
  .workspace{min-height:0}
  .panel{min-height:0}
  #viewer{min-height:0}
  .link-tree{max-height:none;flex:1 1 auto;min-height:0;overflow:auto}
  .tab-body{min-height:0}
}

/* ===== 样式就绪后恢复显示（配合 header.php 内联的关键样式防打闪） ===== */
@media (min-width:901px){body{visibility:visible;overflow:hidden}}

/* ===== 桌面上页脚固定定位 + 工作区预留位置：页脚元素迟到也不会挤动布局（2026-10-29） ===== */
@media (min-width:901px){
  .site-foot{position:fixed;left:0;right:0;bottom:0;height:var(--footer-h);margin:0;box-sizing:border-box;
    display:flex;align-items:center;justify-content:center;z-index:40}
  .tool-wrap{padding-bottom:calc(var(--footer-h) + var(--footer-gap))}
}

/* ===== SEO 层级修正（2026-10-29）：面板标题 h3→h2，样式与原 h3 一致 ===== */
.panel h2{
  font-size:14px;padding:12px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px;
  background:#FBFBFF;color:var(--purple-dark)
}
.panel h2 .n{background:var(--purple);color:#fff;border-radius:8px;padding:1px 8px;font-size:12px;margin-left:auto}
/* 读屏专用（视觉隐藏但保留语义，不参与布局） */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ===== 2026-10-29 v3：三栏各带头部，上传与零件列表 / 按钮与工作台各成一体 ===== */

/* 页面标题条：一行文字，不再抢占三栏视觉 */
.tool-title{
  display:flex; align-items:center; gap:10px; flex:0 0 auto;
  padding:0 2px; flex-wrap:wrap;
}
.tool-title .tt-tag{
  font-size:11px; padding:2px 9px; border-radius:999px;
  background:var(--purple-light); color:var(--purple-dark);
  letter-spacing:.3px; white-space:nowrap;
}
.tool-title .tt-h{margin:0; font-size:17px; font-weight:800; color:var(--text); white-space:nowrap}
.tool-title .tt-note{font-size:11.5px; color:var(--text2); margin-left:auto}

/* 三栏统一头部：48px，颜色/分隔线与面板标题一致，横向连成一条线 */
.panel-head{
  display:flex; align-items:center; gap:8px;
  height:48px; flex:0 0 48px; padding:0 12px; box-sizing:border-box;
  background:#FBFBFF; border-bottom:1px solid var(--line);
}

/* —— 左栏头：上传模型（占满 230px，与下方零件列表一体） —— */
.panel-head--upload{padding:6px 8px; background:#F5F3FF}
.panel-head--upload .upload-zone{
  position:relative; z-index:1;
  display:flex; align-items:center; gap:8px;
  width:100%; height:100%; margin:0; padding:0 10px;
  border:2px dashed #B49BFB; border-radius:10px;
  background:#fff; text-align:left; overflow:hidden;
  animation:uzBreath 2.6s ease-in-out infinite;
}
.panel-head--upload .uz-icon{
  display:flex; align-items:center; justify-content:center;
  width:24px; height:24px; border-radius:50%; flex:0 0 auto;
  background:var(--purple); color:#fff; font-size:13px; font-weight:700;
  animation:uzBob 2.6s ease-in-out infinite;
}
.panel-head--upload .uz-txt{display:flex; flex-direction:column; line-height:1.22; min-width:0}
.panel-head--upload .uz-txt b{font-size:13px; color:var(--purple-dark); font-weight:800}
.panel-head--upload .uz-txt i{font-style:normal; font-size:10.5px; color:var(--text2); white-space:nowrap}

/* 光扫 */
.panel-head--upload .upload-zone::before{
  content:""; position:absolute; top:-10%; bottom:-10%; left:-70%; width:52%;
  background:linear-gradient(100deg,transparent,rgba(124,58,237,.16),transparent);
  transform:skewX(-18deg); pointer-events:none;
  animation:uzSheen 3.4s ease-in-out infinite;
}
@keyframes uzBreath{
  0%,100%{ border-color:#B49BFB; box-shadow:0 0 0 0 rgba(124,58,237,0) }
  50%{ border-color:#6D28D9; box-shadow:0 0 0 3px rgba(124,58,237,.13) }
}
@keyframes uzBob{
  0%,100%{ transform:translateY(0) }
  50%{ transform:translateY(-3px) }
}
@keyframes uzSheen{
  0%{ left:-70% }
  55%,100%{ left:130% }
}
.panel-head--upload .upload-zone:hover,
.panel-head--upload .upload-zone.drag{
  animation:none; border-style:solid; border-color:var(--purple); background:#F5F3FF;
  box-shadow:0 0 0 3px rgba(124,58,237,.16);
}

/* —— 中栏头：3D 预览标题 + 工具按钮（工具条从画布上移） —— */
.panel-head--viewer .ph-title{font-size:14px; font-weight:600; color:var(--purple-dark); white-space:nowrap}
.panel-head--viewer .ph-sub{font-size:11px; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.panel-head--viewer .toolbar{
  position:static; display:flex; gap:6px; margin-left:auto; flex:0 0 auto;
}
.panel-head--viewer .toolbar .btn{
  padding:6px 11px; font-size:12px; border-radius:9px;
  background:#fff; color:var(--text); border:1px solid var(--line);
}
.panel-head--viewer .toolbar .btn:hover{border-color:var(--purple); color:var(--purple-dark)}

/* —— 右栏头：载入示例 / 怎么用 / 清空 三等分 —— */
.panel-head--acts{padding:0 10px; gap:6px}
.panel-head--acts .btn{
  flex:1 1 0; min-width:0; padding:8px 0; font-size:12.5px; border-radius:10px;
  text-align:center; white-space:nowrap;
}
.panel-head--acts .btn-hero{background:var(--purple); color:#fff}
.panel-head--acts .btn-hero:hover{box-shadow:0 4px 12px rgba(124,58,237,.32)}
.panel-head--acts .btn-hero-ghost{background:var(--purple-light); color:var(--purple-dark)}
.panel-head--acts .btn-hero-ghost:hover{background:#EDE9FE}
.panel-head--acts .btn-hero-danger{background:#fff; color:#DC2626; border:1px solid #FCA5A5}
.panel-head--acts .btn-hero-danger:hover{background:#FEF2F2}

/* 移动端：取消 viewer 置顶（上传是入口，必须先看到），头部尺寸适配 */
@media (max-width:900px){
  .workspace #viewer{order:0}
  .tool-title{gap:7px 8px}
  .tool-title .tt-h{font-size:15.5px; white-space:normal}
  .tool-title .tt-note{display:none}
  .panel-head{height:46px; flex:0 0 46px; padding:0 10px}
  .panel-head--upload{padding:5px 8px}
  .panel-head--viewer .ph-sub{display:none}
  .panel-head--viewer .toolbar .btn{padding:5px 8px; font-size:11.5px}
  .panel-head--acts .btn{font-size:12px; padding:7px 0}
}

@media (prefers-reduced-motion: reduce){
  .panel-head--upload .upload-zone,
  .panel-head--upload .uz-icon,
  .panel-head--upload .upload-zone::before{animation:none}
  .panel-head--upload .upload-zone::before{display:none}
}

/* ===== 2026-10-29 v4：三栏头部加高（48→84px）+ 标题并入中栏头部 ===== */
.panel-head{
  height:84px; flex:0 0 84px;
  padding:0 12px;
}

/* 左栏：上传框随头部撑大，仍是整块满宽 */
.panel-head--upload{padding:8px}
.panel-head--upload .uz-icon{width:28px; height:28px; font-size:15px}
.panel-head--upload .uz-txt b{font-size:13.5px}
.panel-head--upload .uz-txt i{font-size:11px}

/* 右栏：三个按钮高度翻倍（约 32 → 64px），三等分仍保持不变 */
.panel-head--acts{padding:0 10px; gap:8px}
.panel-head--acts .btn{
  flex:1 1 0; min-width:0; height:64px; padding:0;
  display:flex; align-items:center; justify-content:center;
  font-size:13.5px; border-radius:13px;
}

/* 中栏：左侧两行（标签+标题 / 3D 预览副标题），右侧工具按钮 */
.panel-head--viewer{gap:12px}
.panel-head--viewer .ph-main{
  display:flex; flex-direction:column; justify-content:center; gap:4px;
  flex:1 1 auto; min-width:0;
}
.panel-head--viewer .ph-line1{display:flex; align-items:center; gap:8px; min-width:0}
.panel-head--viewer .tt-h{
  margin:0; font-size:17.5px; font-weight:800; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.panel-head--viewer .tt-tag{
  flex:0 0 auto; font-size:11px; padding:2px 9px; border-radius:999px;
  background:var(--purple-light); color:var(--purple-dark);
  letter-spacing:.3px; white-space:nowrap;
}
.panel-head--viewer .ph-line2{
  font-size:11.5px; color:var(--text2);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.panel-head--viewer .toolbar{position:static; display:flex; gap:6px; margin-left:auto; flex:0 0 auto}
.panel-head--viewer .toolbar .btn{
  padding:9px 12px; font-size:12px; border-radius:9px;
  background:#fff; color:var(--text); border:1px solid var(--line);
}
.panel-head--viewer .toolbar .btn:hover{border-color:var(--purple); color:var(--purple-dark)}

/* 移动端：标题与工具按钮分两行，头部自适应 */
@media (max-width:900px){
  .panel-head{height:auto; min-height:78px; flex:0 0 auto; padding:10px}
  .panel-head--upload{height:78px; min-height:0; flex:0 0 78px; padding:7px 8px}
  .panel-head--acts{height:78px; min-height:0; flex:0 0 78px; padding:0 10px; gap:7px}
  .panel-head--acts .btn{height:58px; font-size:12.5px}
  .panel-head--viewer{flex-wrap:wrap; gap:8px}
  .panel-head--viewer .ph-main{flex:1 1 100%}
  .panel-head--viewer .tt-h{font-size:15.5px; white-space:normal; line-height:1.3}
  .panel-head--viewer .ph-line2{display:none}
  .panel-head--viewer .toolbar{width:100%; margin-left:0; justify-content:flex-start}
  .panel-head--viewer .toolbar .btn{padding:8px 10px; font-size:11.5px}
}

@media (prefers-reduced-motion: reduce){
  .panel-head--upload .upload-zone,
  .panel-head--upload .uz-icon,
  .panel-head--upload .upload-zone::before{animation:none}
}

/* ===== 2026-10-29 t2：中栏标题防截断（缩标题字号 + 工具按钮内距） ===== */
.panel-head--viewer .tt-h{font-size:16px; font-weight:800}
.panel-head--viewer .tt-tag{font-size:10.5px; padding:2px 7px}
.panel-head--viewer .toolbar{gap:5px}
.panel-head--viewer .toolbar .btn{padding:8px 9px; font-size:11.5px}
@media (max-width:900px){
  .panel-head--viewer .tt-h{font-size:15.5px}
}

/* ===== 2026-10-29 v5：标题单独一条置于 3D 预览之上，同框成一体 ===== */
/* 中栏现在两行头：① 标题条 84px（白底）② 「3D 预览」h3 46px（浅紫底），
   与左栏「上传 / 零件列表」、右栏「按钮 / LINK JOINT」完全同构，三条横线全部对齐。 */
.panel-head--title{
  height:84px; flex:0 0 84px; padding:0 14px; gap:10px;
  background:#fff;
}
.panel-head--title .tt-tag{
  flex:0 0 auto; font-size:11px; padding:2px 9px; border-radius:999px;
  background:var(--purple-light); color:var(--purple-dark);
  letter-spacing:.3px; white-space:nowrap;
}
.panel-head--title .tt-h{
  margin:0; font-size:18px; font-weight:800; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0;
}

/* 「3D 预览」标题行：与左右两栏 h3 同高，右侧放工具按钮 */
.panel h3 .ph-title-wrap{display:flex; align-items:baseline; gap:8px; min-width:0}
.panel h3 .ph-sub{font-size:11px; color:var(--text2); font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.panel h3 .toolbar{
  position:static; display:flex; gap:6px; margin-left:auto; flex:0 0 auto;
}
.panel h3 .toolbar .btn{
  padding:6px 10px; font-size:11.5px; border-radius:8px; font-weight:500;
  background:#fff; color:var(--text); border:1px solid var(--line);
}
.panel h3 .toolbar .btn:hover{border-color:var(--purple); color:var(--purple-dark)}

/* 移动端：标题条自适应两行，3D 预览行只留按钮 */
@media (max-width:900px){
  .panel-head--title{height:auto; min-height:76px; flex:0 0 auto; padding:12px; gap:8px; flex-wrap:wrap}
  .panel-head--title .tt-h{font-size:16px; white-space:normal; line-height:1.32}
  .panel h3 .ph-sub{display:none}
  .panel h3 .toolbar .btn{padding:5px 7px; font-size:11px}
}

/* ===== 2026-10-29 v5b：标题行选择器改走 .viewer-head（运行时 h3 会被换成 h2，标签名不可靠） ===== */
.viewer-head{justify-content:space-between}
.viewer-head .ph-title-wrap{display:flex; align-items:baseline; gap:8px; min-width:0}
.viewer-head .ph-sub{font-size:11px; color:var(--text2); font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.viewer-head .toolbar{
  position:static; display:flex; gap:6px; margin-left:auto; flex:0 0 auto;
}
.viewer-head .toolbar .btn{
  padding:6px 10px; font-size:11.5px; border-radius:8px; font-weight:500;
  background:#fff; color:var(--text); border:1px solid var(--line);
}
.viewer-head .toolbar .btn:hover{border-color:var(--purple); color:var(--purple-dark)}
@media (max-width:900px){
  .viewer-head .ph-sub{display:none}
  .viewer-head .toolbar .btn{padding:5px 7px; font-size:11px}
}

/* ===== 2026-10-29 v6：中栏标题条——去标签、纯文字居中、流光渐变特效 ===== */
.panel-head--title{
  justify-content:center; padding:0 14px;
  /* 白底 + 左上紫光晕 + 右下橙光晕，让标题条本身有质感 */
  background:
    radial-gradient(120% 150% at 16% 0%, rgba(168,85,247,.10), transparent 62%),
    radial-gradient(120% 150% at 84% 100%, rgba(249,115,22,.10), transparent 62%),
    #fff;
}
/* 标题容器：整行占满，水平垂直居中，去掉 .panel h2 的底色/下边线/内距 */
.panel-head--title .tt-h{
  width:100%; margin:0; padding:0; gap:0;
  border-bottom:0; background:transparent;
  display:flex; align-items:center; justify-content:center;
  font-size:28px; line-height:1.12; white-space:nowrap;
}
/* 两侧对称渐变小竖条：让居中更稳，也给标题一点“装饰性重量” */
.panel-head--title .tt-h::before,
.panel-head--title .tt-h::after{
  content:""; flex:0 0 auto; width:26px; height:3px; border-radius:2px;
  animation:ttBar 5.5s ease-in-out infinite;
}
.panel-head--title .tt-h::before{
  margin-right:16px;
  background:linear-gradient(90deg, rgba(124,58,237,0), #A855F7);
}
.panel-head--title .tt-h::after{
  margin-left:16px;
  background:linear-gradient(90deg, #F97316, rgba(249,115,22,0));
}
/* 文字本体：紫 → 品红 → 橙 三段渐变横向流动，外加呼吸光晕 */
.panel-head--title .tt-txt{
  font-weight:900; letter-spacing:.6px;
  background:linear-gradient(92deg,#7C3AED 0%,#A21CAF 24%,#F97316 50%,#A21CAF 76%,#7C3AED 100%);
  background-size:220% 100%;
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  animation:ttFlow 5.5s linear infinite, ttGlow 3.4s ease-in-out infinite;
}
@keyframes ttFlow{
  0%{background-position:0% 50%}
  100%{background-position:200% 50%}
}
@keyframes ttGlow{
  0%,100%{filter:drop-shadow(0 2px 5px rgba(168,85,247,.18))}
  50%{filter:drop-shadow(0 3px 13px rgba(236,72,153,.42))}
}
@keyframes ttBar{
  0%,100%{opacity:.55}
  50%{opacity:1}
}
/* 移动端：字号降一档，两侧小条缩短，保证不换行 */
@media (max-width:900px){
  .panel-head--title{padding:0 10px}
  .panel-head--title .tt-h{font-size:22px; white-space:normal; line-height:1.22}
  .panel-head--title .tt-h::before,
  .panel-head--title .tt-h::after{width:18px}
  .panel-head--title .tt-h::before{margin-right:11px}
  .panel-head--title .tt-h::after{margin-left:11px}
}
/* 减少动态：关掉流动与呼吸，保留静态渐变字 */
@media (prefers-reduced-motion: reduce){
  .panel-head--title .tt-txt,
  .panel-head--title .tt-h::before,
  .panel-head--title .tt-h::after{animation:none}
  .panel-head--title .tt-txt{filter:drop-shadow(0 2px 6px rgba(168,85,247,.2))}
}