/* ═══════════════════════════════════════════════════════════
   铀核造物台（AIUGOOE 铀核引擎）— studio.css  v3 「柔光工业」重构
   骨架：Unreal / Unity 编辑器 ｜ 材质：低对比 + 圆润 + 柔光
   Mobile-first ｜ 手机：视口铺满 + 底部可折叠面板坞
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── 表面：带蓝紫倾向的中性暗，逐层抬升（不再是纯黑白） ── */
  --bg-0: #0a0b10;
  --bg-1: #10121a;
  --bg-2: #161925;
  --bg-3: #1d2130;
  --bg-4: #262b3d;

  /* ── 发丝边：用 alpha 代替实色，边缘自带回光 ── */
  --line:   rgba(255, 255, 255, .055);
  --line-2: rgba(255, 255, 255, .095);
  --line-3: rgba(255, 255, 255, .16);

  /* ── 文字：降低对比，抬高灰阶 ── */
  --tx-0: #e8eaf1;
  --tx-1: #9ba0b1;
  --tx-2: #82889b;   /* 原 #6d7283 对比度仅 4.1，达不到 AA */

  /* ── 主色：青，降饱和、加柔光 ── */
  --ac:      #2ed3d4;
  --ac-2:    #1a8f91;
  --ac-soft: rgba(46, 211, 212, .11);
  --ac-line: rgba(46, 211, 212, .30);
  --ac-glow: rgba(46, 211, 212, .20);

  --wn: #e9b166;
  --dg: #e8776f;

  /* ── 圆角 / 阴影 ── */
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-p: 999px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .34);
  --sh-2: 0 4px 18px rgba(0, 0, 0, .34);
  --sh-3: 0 16px 44px rgba(0, 0, 0, .46);
  --in-hi: inset 0 1px 0 rgba(255, 255, 255, .045);

  --top-h: 52px; --dock-h: 54px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --font: -apple-system, "SF Pro Text", "Inter", "PingFang SC",
          "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Roboto Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--tx-0);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  letter-spacing: 0;
  overscroll-behavior: none;
}

/* 全局柔化所有线性图标：圆头圆角 →「硬」的一半来自这里 */
svg { stroke-linecap: round; stroke-linejoin: round; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.spacer { flex: 1; }

/* ═══════════════ 手机基础布局 ═══════════════ */
.app {
  display: grid;
  grid-template-rows: calc(var(--top-h) + var(--safe-t)) minmax(0, 1fr);
  height: 100vh; height: 100dvh;
}
.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto auto;  /* 视口 / 面板 / 坞 / 状态栏 */
  overflow: hidden;
  min-height: 0;
}

/* ═══════════════ 顶栏 ═══════════════ */
.topbar {
  display: flex; align-items: center; gap: 8px; overflow: hidden;
  padding: var(--safe-t) 12px 0;
  background:
    linear-gradient(180deg, rgba(46, 211, 212, .045), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .5), var(--in-hi);
  position: relative; z-index: 30;
  height: calc(var(--top-h) + var(--safe-t));
}
.topbar::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ac-glow), transparent);
}

.brand { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.brand-mark {
  width: 21px; height: 21px;
  filter: drop-shadow(0 0 8px var(--ac-glow));
  stroke-width: 1.4;
}
.brand-name {
  font-size: 14px; font-weight: 600;
  letter-spacing: -.005em; white-space: nowrap; overflow: hidden;
  background: linear-gradient(180deg, #fff, #b9c2cf);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  display: none; font-size: 11.5px; font-weight: 400; color: var(--tx-2);
  padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line-2);
  letter-spacing: .01em;
}

.toolbar { display: none; }

/* 连接状态胶囊 */
.conn {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--tx-1);
  padding: 0 11px; height: 28px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--line-2); border-radius: var(--r-p);
  box-shadow: var(--in-hi);
  white-space: nowrap; max-width: 40vw; overflow: hidden; flex: 0 1 auto; min-width: 0;
}
.conn i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tx-2); flex-shrink: 0; transition: background .2s;
}
.conn.ok   i { background: var(--ac); box-shadow: 0 0 0 3px rgba(46,211,212,.14), 0 0 8px var(--ac); animation: breathe 2.6s ease-in-out infinite; }
.conn.busy i { background: var(--wn); box-shadow: 0 0 0 3px rgba(233,177,102,.14), 0 0 8px var(--wn); animation: breathe .9s ease-in-out infinite; }
.conn.err  i { background: var(--dg); box-shadow: 0 0 0 3px rgba(232,119,111,.14); }
@keyframes breathe { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ═══════════════ 按钮 ═══════════════ */
.btn {
  min-height: 40px; padding: 0 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.012));
  color: var(--tx-0);
  border: 1px solid var(--line-2);
  border-radius: var(--r-m);
  font-family: inherit; font-size: 13px; font-weight: 500;
  letter-spacing: .005em;
  cursor: pointer; white-space: nowrap;
  box-shadow: var(--sh-1), var(--in-hi);
  transition: background .15s, border-color .15s, opacity .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.975); }
.btn svg { width: 16px; height: 16px; stroke-width: 1.6; }
.btn:disabled { opacity: .34; }
.btn.wide { width: 100%; }
.btn.ghost {
  background: transparent; border-color: var(--line); color: var(--tx-1);
  box-shadow: none;
}
.btn.ghost:active { background: rgba(255,255,255,.035); }
.btn.tall { min-height: 46px; font-size: 13.5px; }

.btn-primary {
  background: linear-gradient(180deg, #45ded9, #19a5a7 62%, #168f91);
  border-color: rgba(89, 236, 232, .5);
  color: #032425; font-weight: 600;
  box-shadow: 0 2px 14px rgba(46, 211, 212, .26),
              inset 0 1px 0 rgba(255, 255, 255, .38),
              inset 0 -1px 0 rgba(0, 0, 0, .18);
}
.btn-primary:active { box-shadow: 0 1px 8px rgba(46,211,212,.3), inset 0 1px 0 rgba(255,255,255,.3); }

/* 统一图标按钮 */
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--r-m); cursor: pointer;
  color: var(--tx-1);
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.icon-btn svg { width: 20px; height: 20px; stroke-width: 1.55; }
.icon-btn:active { transform: scale(.94); background: rgba(255,255,255,.05); }
.icon-btn.on, .icon-btn:hover {
  background: var(--ac-soft); color: var(--ac); border-color: var(--ac-line);
}
.top-set { position: relative; }
.top-set.has-cfg::after {
  content: ""; position: absolute; top: 9px; right: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ac); box-shadow: 0 0 0 3px rgba(46,211,212,.16), 0 0 8px var(--ac);
}
#btnGen { min-height: 44px; padding: 0 17px; font-size: 13.5px; border-radius: var(--r-m); flex: 0 0 auto; }
#btnGen svg { width: 17px; height: 17px; }

/* ═══════════════ 视口 ═══════════════ */
.viewport {
  grid-column: 1; grid-row: 1;
  position: relative; overflow: hidden; min-height: 0;
  background:
    radial-gradient(110% 80% at 50% 0%, rgba(46,211,212,.05), transparent 62%),
    var(--bg-0);
}
.viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }
/* 柔和暗角：把画面「收」进去，削弱硬边界感 */
.viewport::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(130% 110% at 50% 42%, transparent 52%, rgba(0,0,0,.42) 100%);
}

.vp-hud { position: absolute; display: flex; gap: 6px; pointer-events: none; z-index: 5; }
.vp-tl { top: 10px; left: 10px; }
.vp-tr { top: 10px; right: 10px; }
.vp-bl { bottom: 10px; left: 10px; }
.vp-br { bottom: 10px; right: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 10px;
  background: rgba(16, 18, 26, .68);
  border: 1px solid var(--line-2);
  border-radius: var(--r-p);
  font-size: 11px; color: var(--tx-1);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: var(--in-hi);
  white-space: nowrap;
}
.chip b { color: var(--ac); font-weight: 600; }
.chip.mono { font-family: var(--mono); font-size: 10.5px; }
.chip.st-err { color: var(--dg); border-color: rgba(232,119,111,.28); }
.chip.st-busy { color: var(--wn); border-color: rgba(233,177,102,.28); }
.vp-br { display: none; }

.axis-mini {
  width: 52px; height: 52px; position: relative;
  background: rgba(16, 18, 26, .58);
  border: 1px solid var(--line-2); border-radius: 50%;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--in-hi);
}
.axis-mini i {
  position: absolute; left: 50%; top: 50%; font-style: normal;
  font-size: 9.5px; font-weight: 700; transform: translate(-50%, -50%);
  font-family: var(--mono); opacity: .9;
}
.axis-mini .ax-x { color: #ef7b74; margin-left: 15px; margin-top: 3px; }
.axis-mini .ax-y { color: #74c98a; margin-top: -15px; }
.axis-mini .ax-z { color: #6fa6e6; margin-left: -15px; margin-top: 6px; }
.axis-mini .dot { width: 4px; height: 4px; background: var(--tx-1); border-radius: 50%; }

.vp-empty {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  pointer-events: none; transition: opacity .4s ease;
  padding: 0 30px; text-align: center;
}
.vp-empty.hide { opacity: 0; }
.vp-empty svg {
  width: 54px; height: 54px; stroke-width: .9;
  color: rgba(46, 211, 212, .22);
  filter: drop-shadow(0 0 22px rgba(46,211,212,.14));
  margin-bottom: 2px;
}
.vp-empty p { font-size: 14px; color: var(--tx-1); font-weight: 500; letter-spacing: .01em; }
.vp-empty small { font-size: 12px; color: var(--tx-2); line-height: 1.7; }

.vp-prog {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6;
  background: rgba(16, 18, 26, .88);
  border: 1px solid var(--line-2);
  border-radius: var(--r-m); padding: 13px 15px;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--sh-2), var(--in-hi);
  display: none;
}
.vp-prog.on { display: block; animation: riseIn .28s cubic-bezier(.25,.9,.3,1); }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.vp-prog-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; }
.vp-prog-top span { font-size: 12px; color: var(--tx-1); }
.vp-prog-top b { font-family: var(--mono); font-size: 12px; color: var(--ac); }
.bar { height: 5px; background: rgba(255,255,255,.06); border-radius: var(--r-p); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0%; border-radius: var(--r-p);
  background: linear-gradient(90deg, var(--ac-2), var(--ac));
  box-shadow: 0 0 12px var(--ac-glow);
  transition: width .45s cubic-bezier(.2,.8,.3,1);
}
.vp-prog-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.vp-prog-step { flex: 1; min-width: 0; font-size: 11px; color: var(--tx-2); font-family: var(--mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-cancel {
  flex: 0 0 auto; height: 32px; padding: 0 13px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-2);
  border-radius: var(--r-p); color: var(--tx-1);
  font-family: inherit; font-size: 11.5px; cursor: pointer;
  transition: background .15s, color .15s;
}
.prog-cancel:active { background: rgba(255,255,255,.1); color: var(--tx-0); }

/* ═══════════════ 面板（手机：坞上方抽屉） ═══════════════ */
.col {
  grid-column: 1; grid-row: 2;
  display: none;                        /* 手机默认折叠：视口独占 */
  background: var(--bg-1);
  border-top: 1px solid var(--line-2);
  height: 36vh; min-height: 170px; max-height: 52vh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--in-hi), 0 -18px 40px rgba(0, 0, 0, .48);
  animation: sheetUp .26s cubic-bezier(.25,.9,.3,1);
}
@keyframes sheetUp { from { transform: translateY(16px); opacity: .6 } to { transform: none; opacity: 1 } }
.body.dock-open .col.on { display: block; }

/* 抽屉顶部抓手（点击收起） */
.col-grab {
  display: block; width: 100%; height: 30px;
  background: transparent; border: none; cursor: pointer;
  position: sticky; top: 0; z-index: 3;
}
.col-grab::before {
  content: ""; position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  width: 44px; height: 4px; border-radius: var(--r-p);
  background: rgba(255, 255, 255, .14); transition: background .15s;
}
.col-grab:active::before { background: rgba(255, 255, 255, .26); }

.pane-body { padding: 14px; }
.pane-head {
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--tx-0);
  position: sticky; top: 30px; z-index: 2;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pane-head::before {
  content: ""; width: 3px; height: 12px; border-radius: var(--r-p);
  background: linear-gradient(180deg, var(--ac), var(--ac-2));
  box-shadow: 0 0 8px var(--ac-glow);
  flex-shrink: 0;
}
.pane-head .badge {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  color: var(--tx-1); background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: var(--r-p);
  padding: 0 7px; line-height: 16px; letter-spacing: 0; font-weight: 500;
}

/* ── 上传 ── */
.drop {
  border: 1px dashed var(--line-3); border-radius: var(--r-l);
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(46,211,212,.07), transparent 66%),
    var(--bg-2);
  padding: 28px 18px; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s, transform .14s;
  min-height: 140px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.drop:active { transform: scale(.99); }
.drop.over { border-color: var(--ac); border-style: solid; background-color: rgba(46,211,212,.09); }
.drop svg { width: 32px; height: 32px; stroke-width: 1.25; color: var(--tx-2); margin-bottom: 10px; transition: color .18s; }
.drop.over svg { color: var(--ac); }
.drop p { font-size: 13.5px; color: var(--tx-1); margin-bottom: 5px; }
.drop small { font-size: 11.5px; color: var(--tx-2); }

.thumb {
  margin-top: 13px; display: flex; gap: 11px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 10px;
  box-shadow: var(--in-hi);
}
.thumb img {
  width: 54px; height: 54px; object-fit: cover; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--bg-0); flex-shrink: 0;
}
.thumb-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.thumb-meta span:first-child {
  font-size: 12.5px; color: var(--tx-0);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thumb-meta span:last-child { font-size: 11px; color: var(--tx-2); font-family: var(--mono); }
.thumb .x {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: none; color: var(--tx-2);
  border-radius: var(--r-s); cursor: pointer; flex-shrink: 0;
}
.thumb .x:active { background: rgba(255,255,255,.06); color: var(--tx-0); }

/* ── 记录 ── */
.hitem {
  display: flex; align-items: center; gap: 11px; padding: 10px 10px;
  border-radius: var(--r-m); cursor: pointer; border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.hitem:active { background: rgba(255,255,255,.04); }
.hitem.on { background: var(--ac-soft); border-color: var(--ac-line); }
.hitem .thumb-mini {
  width: 40px; height: 40px; border-radius: var(--r-s);
  background: var(--bg-3) center/cover no-repeat; border: 1px solid var(--line);
  flex-shrink: 0; display: grid; place-items: center; color: var(--tx-2);
}
.hitem .thumb-mini svg { width: 16px; height: 16px; }
.hitem-meta { min-width: 0; flex: 1; }
.hitem-meta b {
  display: block; font-size: 12.5px; font-weight: 500; color: var(--tx-0);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hitem-meta span { font-size: 11px; color: var(--tx-2); font-family: var(--mono); }
.empty-hint { padding: 30px 12px; text-align: center; font-size: 12.5px; color: var(--tx-2); }

/* ── 属性 ── */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 11px 14px; align-items: baseline; }
.kv dt { font-size: 12.5px; color: var(--tx-1); }
.kv dd { font-size: 12.5px; color: var(--tx-0); text-align: right; overflow-wrap: anywhere; }

.sect-title {
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--tx-1); margin: 18px 0 9px;
  display: flex; align-items: center; gap: 8px;
}
.sect-title:first-child { margin-top: 0; }
.sect-title::before {
  content: ""; width: 3px; height: 11px; border-radius: var(--r-p);
  background: linear-gradient(180deg, var(--ac), var(--ac-2));
}

.vecrow { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; margin-bottom: 9px; }
.vecrow label { font-size: 11.5px; font-family: var(--mono); font-weight: 700; text-align: center; }
.vecrow.x label { color: #ef7b74; }
.vecrow.y label { color: #74c98a; }
.vecrow.z label { color: #6fa6e6; }
.vecrow input {
  height: 42px; padding: 0 13px; width: 100%;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-m); color: var(--tx-0);
  font-family: var(--mono); font-size: 13px;
  box-shadow: var(--in-hi);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.vecrow input:focus {
  outline: none; border-color: var(--ac-line); background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(46,211,212,.1);
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg {
  display: flex; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 3px; gap: 3px;
  box-shadow: var(--in-hi);
}
.seg button {
  flex: 1; min-height: 42px; border: none; border-radius: 9px;
  background: transparent; color: var(--tx-1);
  font-family: inherit; font-size: 12.5px; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button.on {
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  color: var(--tx-0); box-shadow: var(--sh-1), var(--in-hi);
}

.hint {
  display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px;
  color: var(--tx-2); line-height: 1.65;
  background: rgba(255,255,255,.022);
  border: 1px solid var(--line); border-radius: var(--r-m); padding: 11px;
}
.hint svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; stroke-width: 1.6; color: var(--tx-2); }
.hint b { color: var(--tx-1); font-weight: 500; }

/* ═══════════════ 底部折叠坞（手机） ═══════════════ */
.dock {
  grid-column: 1; grid-row: 3;
  display: flex; align-items: stretch; gap: 6px;
  padding: 5px 8px calc(5px + var(--safe-b));
  background: linear-gradient(180deg, rgba(16, 18, 26, .9), rgba(16, 18, 26, .99));
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .42);
}

.sheet-tabs { display: flex; flex: 1; gap: 4px; }
.sheet-tabs button {
  flex: 1; min-height: 44px; border: none; border-radius: 11px;
  background: transparent; color: var(--tx-2);
  font-family: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  position: relative;
  transition: background .15s, color .15s;
}
.sheet-tabs button svg { width: 17px; height: 17px; stroke-width: 1.6; }
.sheet-tabs button span { white-space: nowrap; }
.sheet-tabs button.on {
  background: linear-gradient(180deg, rgba(46,211,212,.16), rgba(46,211,212,.07));
  color: var(--ac);
  box-shadow: inset 0 0 0 1px var(--ac-line);
}
.sheet-tabs button:active { background: rgba(255,255,255,.05); }
.sheet-tabs button.has-new::after {
  content: ""; position: absolute; top: 7px; right: 12px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ac); box-shadow: 0 0 8px var(--ac);
  animation: breathe 1.6s ease-in-out infinite;
}
.sheet-tabs .badge {
  font-family: var(--mono); font-size: 9.5px; color: var(--tx-2);
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: var(--r-p); padding: 0 5px; line-height: 14px;
}
.sheet-tabs button.on .badge { color: var(--ac); border-color: var(--ac-line); }

.dock-toggle {
  flex: 0 0 auto; width: 46px; min-height: 44px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 11px;
  color: var(--tx-1); cursor: pointer;
  transition: background .15s, color .15s, transform .16s;
}
.dock-toggle svg { width: 18px; height: 18px; stroke-width: 1.7; transition: transform .24s cubic-bezier(.25,.9,.3,1); }
.dock-toggle.open svg { transform: rotate(180deg); }
.dock-toggle:active { background: rgba(255,255,255,.08); }
.dock-toggle.open { color: var(--ac); border-color: var(--ac-line); background: var(--ac-soft); }

/* ═══════════════ 底栏（桌面） ═══════════════ */
.statusbar {
  grid-column: 1 / -1; grid-row: 4;
  display: none; align-items: center; gap: 14px;
  padding: 0 4px calc(var(--safe-b));
  background: transparent; border-top: none;
  font-size: 11px; color: var(--tx-2);
}
.statusbar .sb-item { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.statusbar .sb-item b { color: var(--tx-1); font-weight: 500; }
.statusbar .mono { color: var(--tx-1); }
.statusbar .sb-hide-m { display: none; }

/* ═══════════════ 滚动条 ═══════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.09); border-radius: var(--r-p); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.16); }

/* ═══════════════ 弹层 ═══════════════ */
.modal {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: flex-end; justify-content: center;
  visibility: hidden; opacity: 0;
  transition: opacity .22s, visibility .22s;
}
.modal.on { visibility: visible; opacity: 1; }
.modal-mask {
  position: absolute; inset: 0;
  background: rgba(6, 7, 11, .7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  position: relative; width: 100%; max-height: 92vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,.028), transparent 140px), var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, .66), var(--in-hi);
  transform: translateY(16px);
  transition: transform .28s cubic-bezier(.25,.9,.3,1);
  padding-bottom: var(--safe-b);
}
.modal.on .modal-card { transform: translateY(0); }

.modal-head {
  display: flex; align-items: center; gap: 11px;
  padding: 17px 17px 15px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.modal-dot {
  width: 3px; height: 16px; border-radius: var(--r-p);
  background: linear-gradient(180deg, var(--ac), var(--ac-2)); flex: 0 0 auto;
  box-shadow: 0 0 10px var(--ac-glow);
}
.modal-head h2 {
  font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  flex: 1; color: var(--tx-0);
}
.modal-body { padding: 17px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.modal-foot {
  display: flex; gap: 10px; padding: 14px 17px;
  border-top: 1px solid var(--line); flex: 0 0 auto;
}
.modal-foot .btn { flex: 1; min-height: 48px; font-size: 14px; }

/* ═══════════════ 表单 ═══════════════ */
.fld { margin-bottom: 16px; }
.fld:last-child { margin-bottom: 0; }
.fld-label {
  display: block; margin-bottom: 8px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .01em; color: var(--tx-1);
}
.fld-hint { margin-top: 8px; font-size: 11.5px; line-height: 1.6; color: var(--tx-2); }
.fld-hint.ok { color: #4ade9a; }
.fld-hint.err { color: #f08b84; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.inp {
  width: 100%; min-height: 46px; padding: 0 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-m); color: var(--tx-0);
  font-family: inherit; font-size: 13.5px;
  box-shadow: var(--in-hi);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.inp.mono { font-family: var(--mono); font-size: 13px; }
.inp::placeholder { color: #4e5364; }
.inp:focus {
  outline: none; border-color: var(--ac-line); background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(46,211,212,.1);
}

.sel-wrap { position: relative; }
.sel-wrap select {
  width: 100%; min-height: 46px; padding: 0 40px 0 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-m); color: var(--tx-0);
  font-family: inherit; font-size: 13.5px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  box-shadow: var(--in-hi);
  transition: border-color .15s, background .15s;
}
.sel-wrap select:focus { outline: none; border-color: var(--ac-line); background: var(--bg-3); }
.sel-arrow {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--tx-2); pointer-events: none;
}

.chk { display: flex; align-items: center; gap: 11px; cursor: pointer; min-height: 42px; user-select: none; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk-box {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px;
  border: 1.5px solid var(--line-3); background: var(--bg-2);
  position: relative; transition: background .15s, border-color .15s;
}
.chk-box::after {
  content: ""; position: absolute; left: 7px; top: 3px;
  width: 5px; height: 10px; border: solid #032425; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform .15s;
}
.chk input:checked + .chk-box { background: var(--ac); border-color: var(--ac); }
.chk input:checked + .chk-box::after { transform: rotate(45deg) scale(1); }
.chk span:last-child { font-size: 13px; color: var(--tx-1); }

/* 引擎选项卡 */
.opt {
  display: flex; align-items: center; gap: 13px;
  padding: 14px; margin-bottom: 10px;
  background: var(--bg-2); border: 1.5px solid var(--line);
  border-radius: var(--r-l); cursor: pointer;
  box-shadow: var(--in-hi);
  transition: border-color .16s, background .16s, transform .1s;
}
.opt:active { transform: scale(.99); }
.opt.on { border-color: var(--ac-line); background: rgba(46,211,212,.055); }
.opt-ico {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 12px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--tx-1); transition: color .16s, background .16s, border-color .16s;
}
.opt-ico svg { width: 20px; height: 20px; }
.opt.on .opt-ico { color: var(--ac); background: rgba(46,211,212,.13); border-color: var(--ac-line); }
.opt-main { min-width: 0; flex: 1; }
.opt-main b {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--tx-0); margin-bottom: 3px; letter-spacing: -.005em;
}
.opt-main b em {
  font-style: normal; font-size: 10.5px; font-weight: 600;
  padding: 2px 7px; border-radius: var(--r-p); margin-left: 7px;
  background: rgba(46,211,212,.14); color: var(--ac);
  letter-spacing: .02em; vertical-align: 1px;
}
.opt-main b em.em-gold { background: rgba(233,177,102,.14); color: var(--wn); }
.opt-main span { display: block; font-size: 12px; color: var(--tx-2); line-height: 1.55; }
.opt-check {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%;
  border: 1.5px solid var(--line-3); position: relative;
  transition: border-color .16s, background .16s;
}
.opt.on .opt-check { border-color: var(--ac); background: var(--ac); box-shadow: 0 0 0 4px rgba(46,211,212,.12); }
.opt.on .opt-check::after {
  content: ""; position: absolute; left: 7.5px; top: 3.5px;
  width: 5px; height: 10px; border: solid #032425; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 高级参数 */
.adv {
  border: 1px solid var(--line); border-radius: var(--r-l);
  background: var(--bg-2); overflow: hidden; box-shadow: var(--in-hi);
}
.adv summary {
  padding: 13px 14px; cursor: pointer; list-style: none;
  font-size: 12.5px; font-weight: 500; color: var(--tx-1);
  display: flex; align-items: center; gap: 9px; min-height: 46px;
}
.adv summary::-webkit-details-marker { display: none; }
.adv summary::before {
  content: ""; width: 0; height: 0; flex: 0 0 auto;
  border-left: 5px solid var(--tx-2);
  border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
  transition: transform .18s cubic-bezier(.25,.9,.3,1);
}
.adv[open] summary::before { transform: rotate(90deg); }
.adv-body { padding: 14px; border-top: 1px solid var(--line); }

#btnTest { min-height: 48px; font-size: 13.5px; }

/* ── 分享链接卡片 ── */
.share-card {
  padding: 15px;
  border: 1px solid var(--ac-line);
  border-radius: var(--r-l);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(46,211,212,.09), transparent 62%),
    var(--bg-2);
  box-shadow: var(--in-hi);
}
.share-lead { margin-bottom: 14px; }
.share-lead b {
  display: block; font-size: 14px; font-weight: 600; color: var(--tx-0);
  letter-spacing: -.005em; margin-bottom: 3px;
}
.share-lead span { display: block; font-size: 11.5px; color: var(--tx-2); line-height: 1.55; }
.share-card #btnShare { margin-top: 12px; }

.share-link {
  margin-top: 11px; padding: 2px;
  background: var(--bg-0);
  border: 1px solid var(--line-2);
  border-radius: var(--r-m);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.share-link input {
  width: 100%; height: 44px; padding: 0 12px;
  background: transparent; border: 0; outline: none;
  color: var(--ac); font-family: var(--mono); font-size: 12.5px;
  text-overflow: ellipsis;
}
.share-link input::selection { background: rgba(46,211,212,.3); }
#shareBox .row2 { margin-top: 9px; }
#shareBox .fld-hint { margin-top: 9px; margin-bottom: 0; }
.share-note { margin-top: 14px; }

/* ═══════════════════════════════════════════════════════════
   桌面适配（≥ 900px）—— 浮板式三栏编辑器
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  :root { --top-h: 48px; }
  html, body { font-size: 12.5px; line-height: 1.5; }

  .app { grid-template-rows: var(--top-h) minmax(0, 1fr); }

  .body {
    grid-template-columns: 268px minmax(0, 1fr) 300px;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px; padding: 10px;
    background:
      radial-gradient(90% 70% at 50% -10%, rgba(46,211,212,.045), transparent 62%),
      var(--bg-0);
  }

  /* 三块浮板 */
  .viewport, .col {
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    box-shadow: var(--sh-2), var(--in-hi);
    overflow: hidden;
  }
  .viewport { grid-column: 2; grid-row: 1; }
  .col-left  { grid-column: 1; grid-row: 1; }
  .col-right { grid-column: 3; grid-row: 1; }

  .col {
    display: block !important;             /* 桌面常显，不受折叠坞控制 */
    height: auto; min-height: 0; max-height: none;
    border-top: 1px solid var(--line);
    overflow-y: auto;
    background: var(--bg-1);
    animation: none;
    box-shadow: var(--sh-2), var(--in-hi);
  }
  .col-grab { display: none; }
  .body.dock-open .col.on { display: block; }

  .brand-sub { display: inline; }
  .brand-name { font-size: 13px; }

  /* 顶栏工具条 */
  .toolbar {
    display: flex; align-items: center; gap: 2px;
    padding-left: 10px; margin-left: 6px;
    border-left: 1px solid var(--line); height: 26px;
  }
  .tool {
    width: 30px; height: 26px; display: grid; place-items: center;
    background: transparent; border: 1px solid transparent; border-radius: var(--r-s);
    cursor: pointer; color: var(--tx-1);
    transition: background .15s, color .15s, border-color .15s;
  }
  .tool svg { width: 15px; height: 15px; stroke-width: 1.55; }
  .tool:hover { background: rgba(255,255,255,.06); color: var(--tx-0); }
  .tool.on { background: var(--ac-soft); color: var(--ac); border-color: var(--ac-line); }

  .btn { min-height: 30px; padding: 0 14px; font-size: 12px; border-radius: var(--r-s); }
  .btn.tall { min-height: 36px; font-size: 12.5px; }
  .conn { height: 26px; font-size: 11.5px; max-width: none; }
  .icon-btn { width: 30px; height: 30px; border-radius: var(--r-s); }
  .icon-btn svg { width: 16px; height: 16px; }
  .top-set.has-cfg::after { top: 5px; right: 5px; width: 5px; height: 5px; }
  #btnGen { min-height: 30px; padding: 0 14px; font-size: 12px; border-radius: var(--r-s); }
  #btnGen svg { width: 15px; height: 15px; }

  .vp-br { display: flex; }
  .chip { height: 24px; font-size: 11px; }
  .axis-mini { width: 50px; height: 50px; }
  .vp-empty svg { width: 46px; height: 46px; }

  /* 折叠坞在桌面彻底退场 */
  .dock { display: none !important; }

  /* 状态栏回到底部整行 */
  .statusbar {
    display: flex; grid-column: 1 / -1; grid-row: 2;
    padding: 0 4px 0;
  }
  .statusbar .sb-hide-m { display: flex; }

  .pane-body { padding: 11px; }
  .pane-head {
    height: 31px; padding: 0 12px;
    top: 0;
    font-size: 11.5px; letter-spacing: .02em;
    background: linear-gradient(180deg, var(--bg-2), rgba(22,25,37,.72));
  }
  .pane-head::before { height: 11px; }
  .pane-head .badge { font-size: 10px; padding: 0 6px; line-height: 15px; }

  .drop { padding: 18px 12px; min-height: 0; border-radius: var(--r-m); }
  .drop svg { width: 26px; height: 26px; margin-bottom: 8px; }
  .drop p { font-size: 12px; }
  .drop small { font-size: 10.5px; }
  .thumb { padding: 8px; gap: 9px; }
  .thumb img { width: 42px; height: 42px; }
  .thumb .x { width: 24px; height: 24px; }
  .hitem { padding: 7px 8px; gap: 9px; }
  .hitem .thumb-mini { width: 32px; height: 32px; }
  .hitem-meta b { font-size: 12px; }
  .kv dt, .kv dd { font-size: 11.5px; }
  .vecrow { grid-template-columns: 18px 1fr; gap: 8px; margin-bottom: 7px; }
  .vecrow input { height: 30px; font-size: 11.5px; border-radius: var(--r-s); }
  .seg { border-radius: var(--r-s); padding: 2px; }
  .seg button { min-height: 26px; font-size: 11.5px; border-radius: 6px; }
  .hint { font-size: 11px; padding: 9px; border-radius: var(--r-s); }
  .sect-title { font-size: 11px; }

  .modal { align-items: center; }
  .modal-card {
    width: 500px; max-height: 86vh;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .72), var(--in-hi);
  }
  .modal-head { padding: 15px 18px 13px; }
  .modal-body { padding: 18px; }
  .modal-foot { padding: 13px 18px; }
  .modal-foot .btn { min-height: 36px; font-size: 12.5px; }
  .inp, .sel-wrap select { min-height: 36px; font-size: 12.5px; border-radius: var(--r-s); }
  .opt { padding: 12px; border-radius: var(--r-m); }
  .opt-ico { width: 34px; height: 34px; border-radius: 10px; }
  .opt-main b { font-size: 12.5px; }
  .opt-main span { font-size: 11.5px; }
  .fld-label { font-size: 11px; }
  .adv summary { min-height: 38px; font-size: 12px; }
  #btnTest { min-height: 36px; font-size: 12.5px; }
  .chk { min-height: 34px; }
}

/* 大屏微调 */
@media (min-width: 1500px) {
  .body { grid-template-columns: 300px minmax(0, 1fr) 330px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}


/* ══ 上传入口：照片 / 视频 双卡片（2026-10-07）══ */
.pick-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.pick-card{display:flex;align-items:center;gap:11px;width:100%;padding:12px 14px;
  border-radius:12px;cursor:pointer;text-align:left;font-family:inherit;
  border:1px solid rgba(122,200,255,.20);
  background:linear-gradient(180deg,rgba(122,200,255,.075),rgba(122,200,255,.015));
  color:#cfe4f5;
  transition:border-color .22s,background .22s,transform .18s,box-shadow .22s}
.pick-card:hover{border-color:rgba(122,200,255,.5);
  background:linear-gradient(180deg,rgba(122,200,255,.14),rgba(122,200,255,.04));
  transform:translateY(-1px);box-shadow:0 6px 18px -8px rgba(122,200,255,.55)}
.pick-card:active{transform:translateY(0) scale(.985)}
.pick-ico{flex:0 0 34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;
  background:rgba(122,200,255,.10);color:#7ac8ff}
.pick-ico svg{width:19px;height:19px}
.pick-txt{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.pick-txt b{font-size:13.5px;font-weight:600;letter-spacing:.1px}
.pick-txt small{font-size:11px;color:#6d8199;margin-top:2px}
.pick-card-vid{border-color:rgba(1,194,195,.22);
  background:linear-gradient(180deg,rgba(1,194,195,.075),rgba(1,194,195,.015))}
.pick-card-vid:hover{border-color:rgba(1,194,195,.55);
  background:linear-gradient(180deg,rgba(1,194,195,.14),rgba(1,194,195,.04));
  box-shadow:0 6px 18px -8px rgba(1,194,195,.6)}
.pick-card-vid .pick-ico{background:rgba(1,194,195,.12);color:#01c2c3}
.pick-note{margin-top:9px;font-size:11.5px;color:#5c6f85;text-align:center;line-height:1.6}
@media (max-width:520px){ .pick-row{grid-template-columns:1fr} }


/* ══ 微信选视频引导浮层（2026-10-07）══ */
.wx-tip-mask{position:fixed;inset:0;z-index:200;display:none;align-items:center;justify-content:center;
  padding:22px;background:rgba(4,7,12,.82);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.wx-tip-mask.on{display:flex}
.wx-tip-box{position:relative;width:100%;max-width:352px;padding:26px 22px 22px;border-radius:18px;
  background:linear-gradient(180deg,#141a24,#0e1219);border:1px solid rgba(122,200,255,.20);
  box-shadow:0 24px 60px -20px rgba(0,0,0,.9);text-align:center;
  animation:wxTipIn .26s cubic-bezier(.2,.8,.3,1)}
@keyframes wxTipIn{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
.wx-tip-x{position:absolute;top:12px;right:12px;width:30px;height:30px;border:none;border-radius:9px;
  background:transparent;color:#5b6b80;font-size:15px;line-height:1;cursor:pointer}
.wx-tip-x:hover{background:rgba(255,255,255,.06);color:#cfe4f5}
.wx-tip-ico{width:52px;height:52px;margin:2px auto 14px;border-radius:15px;display:flex;align-items:center;justify-content:center;
  background:rgba(1,194,195,.10);color:#01c2c3}
.wx-tip-ico svg{width:26px;height:26px}
.wx-tip-title{display:block;font-size:16.5px;font-weight:650;color:#e8f2fb;letter-spacing:.15px;margin-bottom:9px}
.wx-tip-desc{font-size:12.8px;line-height:1.75;color:#7f93a8;margin-bottom:16px}
.wx-tip-steps{display:flex;flex-direction:column;gap:7px;margin-bottom:15px;text-align:left}
.wx-tip-steps span{font-size:13px;color:#b6c8da;background:rgba(122,200,255,.055);
  border:1px solid rgba(122,200,255,.12);border-radius:9px;padding:8px 12px}
.wx-tip-steps b{color:#7ac8ff}
.wx-tip-url{font:11.5px/1.5 ui-monospace,Menlo,monospace;color:#5f7391;word-break:break-all;
  background:rgba(0,0,0,.28);border:1px solid rgba(122,200,255,.10);border-radius:8px;padding:8px 10px;margin-bottom:13px}
.wx-tip-btn{width:100%;padding:11px;border:none;border-radius:11px;cursor:pointer;font-family:inherit;
  font-size:14px;font-weight:600;color:#04181a;background:linear-gradient(135deg,#01c2c3,#0aa8b8);transition:.2s}
.wx-tip-btn:hover{filter:brightness(1.09)}
.wx-tip-alt{margin-top:13px;font-size:11.5px;color:#5c6f85;line-height:1.65}
.wx-tip-alt b{color:#8fa6bd}
