/* Web 工作台 · 对齐 neon 色，PC 侧栏 / 手机抽屉（非小程序底 Tab） */
:root {
  --bg: #0a0a12;
  --sidebar: #0b0b14;
  --panel: #12121c;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef0f6;
  --muted: #9aa3b5;
  --accent: #ff4d88;
  --grad: linear-gradient(135deg, #8b5cf6, #d946ef);
  --ok: #3ecf8e;
  --err: #f07178;
  --sidebar-w: 240px;
  --font: "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: #06060a;
}
.hidden { display: none !important; }
.msg { margin-top: 10px; font-size: 0.88rem; color: var(--muted); white-space: pre-wrap; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }

/* ===== 进站登录门 ===== */
.login-gate {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139, 92, 246, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(217, 70, 239, 0.12), transparent 50%),
    #06060a;
}
body.auth-locked .login-gate { display: flex; }
body.auth-locked .pc,
body.auth-locked .mobile { display: none !important; }
.login-card {
  width: min(100%, 400px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.login-brand {
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.login-brand em {
  font-style: normal;
  color: var(--accent);
  font-size: 0.72rem;
  margin-left: 6px;
  vertical-align: middle;
}
.login-desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}
.login-card .field { margin-bottom: 14px; }
.login-card .field label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.login-card .field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0a12;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.login-card .field input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.55);
}

/* ===== PC ===== */
.pc {
  display: none;
  height: 100vh;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  overflow: hidden;
}
@media (min-width: 900px) and (orientation: landscape), (min-width: 1100px) {
  .pc { display: grid; }
  .mobile { display: none !important; }
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  min-height: 0;
}
.sidebar .brand {
  padding: 8px 12px 18px;
  font-weight: 800;
  font-size: 1.1rem;
}
.sidebar .brand em {
  font-style: normal;
  color: var(--accent);
  font-size: 0.72rem;
  margin-left: 6px;
}
.sidebar .group {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 12px 6px;
}
.sidebar button.nav-item {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 8px;
  padding: 11px 12px;
  margin: 2px 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
.sidebar button.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sidebar button.nav-item.active { color: #fff; background: var(--grad); }
.sidebar .foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.sidebar .foot strong { display: block; color: var(--text); font-size: 1.2rem; margin: 4px 0; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.topbar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-weight: 700; }
.topbar .title span { color: var(--muted); font-weight: 400; font-size: 0.82rem; margin-left: 8px; }
.topbar .right { display: flex; gap: 10px; align-items: center; }
.pill {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--panel);
}
.content { flex: 1; min-height: 0; overflow: auto; padding: 20px 24px 28px; }
.view { display: none; }
.view.active { display: block; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.seg button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.seg button.on { background: rgba(139, 92, 246, 0.35); color: #fff; }

.split {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: calc(100vh - 170px);
}
.split.split-image,
.split.split-video {
  grid-template-columns: minmax(220px, 260px) minmax(280px, 1fr) minmax(260px, 360px);
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.card-config {
  max-height: calc(100vh - 170px);
  overflow: auto;
}
.card-plans {
  max-height: calc(100vh - 170px);
  overflow: hidden;
}
.card-plans .plan-list {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.card-output {
  max-height: calc(100vh - 170px);
  overflow: auto;
}
.card h3 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  font-weight: 600;
  flex-shrink: 0;
}
.field { margin-bottom: 12px; }
.field-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.field textarea,
.field select,
.control {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a0a12;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}
.field input[type="file"] {
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
}
.field textarea { min-height: 56px; resize: vertical; }

/* 追爆等面板里未包 .field 的控件，禁止浏览器默认白底 */
.zb-card input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.zb-card textarea,
.zb-card select,
.card input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.card textarea,
.card select {
  width: 100%;
  border: 1px solid var(--line);
  background: #0a0a12;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  caret-color: var(--text);
}
.zb-card textarea,
.card textarea {
  resize: vertical;
  min-height: 88px;
}
.zb-card input::placeholder,
.zb-card textarea::placeholder,
.card input::placeholder,
.card textarea::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.zb-card input[type="file"],
.card input[type="file"] {
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
}
.zb-card input[type="radio"],
.zb-card input[type="checkbox"],
.card input[type="radio"],
.card input[type="checkbox"],
.field input[type="radio"],
.field input[type="checkbox"] {
  width: auto !important;
  min-width: 16px;
  height: auto;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: #8b5cf6;
  background: transparent;
  border: none;
}
.drop {
  border: 1px dashed rgba(167, 139, 250, 0.4);
  border-radius: 8px;
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); position: relative; background: #0a0a12;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border: none; border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff; cursor: pointer;
}
.result-box {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.9rem;
  color: var(--text);
  min-height: 120px;
  max-height: 360px;
  overflow: auto;
}
.result-empty {
  flex: 1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  gap: 6px;
  text-align: center;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.media-out {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 0;
}
.media-out img,
.media-out video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 240px);
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #0a0a12;
  border: 1px solid var(--line);
}
.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-empty {
  padding: 28px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.5;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #0a0a12;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
}
.plan-card:hover { border-color: rgba(167, 139, 250, 0.45); }
.plan-card.on {
  border-color: rgba(167, 139, 250, 0.85);
  background: rgba(139, 92, 246, 0.14);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.25);
}
.plan-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.plan-card__body {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.steps {
  display: flex;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}
.steps button {
  flex: 1;
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 12px 6px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.zb-steps-gap {
  width: 10px;
  flex: 0 0 10px;
  background: rgba(0, 0, 0, 0.25);
  border-right: 1px solid var(--line);
  align-self: stretch;
}
.steps button.zb-step-custom {
  flex: 0 0 auto;
  min-width: 108px;
}
.steps button:last-child { border-right: none; }
.steps button.on { background: rgba(139, 92, 246, 0.28); color: #fff; font-weight: 700; }
.zb-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.zb-board {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 200px);
}
.zb-panel {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: calc(100vh - 220px);
}
.zb-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.zb-col-ops .zb-card {
  flex: 1;
}
.zb-col-data .zb-card-data {
  flex: 1;
  min-height: calc(100vh - 240px);
  overflow: auto;
}
.zb-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.zb-card h3 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  font-weight: 600;
}
.zb-fee, .zb-source {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}
.zb-empty {
  flex: 1;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.5;
}
.zb-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.zb-footer .btn { width: 100%; }
.zb-footer-dual {
  flex-direction: row;
  flex-wrap: wrap;
}
.zb-footer-dual .btn {
  flex: 1 1 140px;
  width: auto;
}
.zb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.zb-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  line-height: 1.2;
}
.zb-chip:hover {
  border-color: rgba(217, 70, 239, 0.45);
  color: var(--text);
}
.zb-chip.on {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
}
.zb-chips-speed .zb-chip {
  min-width: 3.2em;
  text-align: center;
  justify-content: center;
}
.zb-preview-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 10px 0 6px;
}
.zb-extract-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.zb-media-block video,
.zb-media-block audio,
#zbRenderVideo {
  display: block;
  width: 100%;
  max-height: min(420px, 55vh);
  border-radius: 8px;
  background: #0a0a12;
  border: 1px solid var(--line);
}
.zb-image-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.zb-image-strip img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  cursor: pointer;
}
.zb-script-out {
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  color: var(--text);
  max-height: none;
  overflow: auto;
}
.zb-col-data #zbOriginalText {
  display: block;
  width: 100%;
  min-height: 360px;
  height: calc(100vh - 300px);
  background: #0a0a12;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 12px;
  resize: vertical;
}
.zb-picked {
  color: var(--accent, #a78bfa);
  font-weight: 500;
  margin-left: 6px;
}
.zb-asset-hint {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 12px 4px;
}
.zb-person-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin-top: 6px;
}
.zb-person-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a12;
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
}
.zb-person-item.on {
  border-color: rgba(139, 92, 246, 0.85);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.35);
}
.zb-person-item .cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #12121a;
}
.zb-person-item .ph {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  background: #12121a;
}
.zb-person-item .name {
  display: block;
  padding: 4px 6px;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zb-voice-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin-top: 6px;
}
.zb-voice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #0a0a12;
  cursor: pointer;
}
.zb-voice-row.on {
  border-color: rgba(139, 92, 246, 0.85);
  background: rgba(139, 92, 246, 0.12);
}
.zb-voice-row .vname {
  flex: 1;
  font-size: 0.85rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zb-voice-row .vbtn {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
}
.zb-voice-row .vbtn.on {
  border-color: rgba(139, 92, 246, 0.8);
  color: #c4b5fd;
}
.zb-person-hero {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a12;
  aspect-ratio: 3 / 4;
  position: relative;
}
.zb-person-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zb-person-hero-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.zb-picked-name {
  text-align: center;
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.zb-req {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}
.zb-req-lead {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.zb-req-list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}
.zb-radio-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--text);
  font-size: 0.88rem;
}
.zb-radio-row label,
.zb-radio,
.zb-check {
  display: inline-flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: auto !important;
  max-width: none;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  cursor: pointer;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.3;
}
.zb-radio-row label span,
.zb-radio span,
.zb-check span {
  display: inline;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

/* ===== 定制数字人单页 ===== */
.zb-panel-custom {
  display: block !important;
  min-height: 0;
}
.zb-panel-custom.hidden {
  display: none !important;
}
.zb-custom-page {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  gap: 12px;
  align-items: start;
  max-height: calc(100vh - 200px);
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a4a transparent;
}
.zb-custom-page::-webkit-scrollbar { width: 8px; height: 8px; }
.zb-custom-page::-webkit-scrollbar-track { background: transparent; }
.zb-custom-page::-webkit-scrollbar-thumb {
  background: #3a3a4a;
  border-radius: 8px;
}
.zb-custom-main,
.zb-custom-side {
  min-width: 0;
}
.zb-custom-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.zb-custom-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.zb-custom-title {
  margin: 0 0 4px !important;
  font-size: 1rem !important;
  color: var(--text) !important;
  letter-spacing: 0 !important;
}
.zb-custom-fee { margin: 0; }
.zb-req-toggle {
  width: auto !important;
  flex-shrink: 0;
  padding: 6px 12px !important;
  font-size: 0.78rem !important;
}
.zb-custom-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  align-items: start;
}
.zb-custom-name { grid-column: 1; margin-bottom: 0; }
.zb-custom-video { grid-column: 2; margin-bottom: 0; }
.zb-custom-params {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: flex-end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}
.zb-field-inline {
  margin: 0;
  min-width: 0;
}
.zb-field-inline > label {
  margin-bottom: 4px;
}
.zb-custom-submit {
  grid-column: 1 / -1;
}
.zb-custom-submit .btn { width: 100%; }
.zb-custom-mine .zb-asset-head h3,
.zb-custom-status h3 {
  margin: 0;
}
.zb-custom-mine .btn-ghost,
.zb-custom-status .btn-ghost {
  width: auto;
  padding: 6px 12px;
  font-size: 0.78rem;
}
.zb-person-grid-custom {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  max-height: 220px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3a4a transparent;
}
.zb-person-grid-custom::-webkit-scrollbar { width: 8px; height: 8px; }
.zb-person-grid-custom::-webkit-scrollbar-track { background: transparent; }
.zb-person-grid-custom::-webkit-scrollbar-thumb {
  background: #3a3a4a;
  border-radius: 8px;
}
.zb-empty-sm {
  min-height: 72px;
  padding: 16px 10px;
}
.zb-status-line {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.zb-script-out-sm {
  max-height: 96px;
  overflow: auto;
  font-size: 0.78rem;
  color: var(--muted);
  background: #0a0a12;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: #3a3a4a transparent;
}
@media (max-width: 1100px) {
  .zb-custom-page {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .zb-custom-form {
    grid-template-columns: 1fr;
  }
  .zb-custom-name,
  .zb-custom-video { grid-column: 1; }
}

.zb-asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.zb-asset-head h3 { margin: 0; }
.zb-upload-progress { margin: 10px 0; }
.zb-upload-track {
  height: 8px;
  border-radius: 999px;
  background: #0a0a12;
  border: 1px solid var(--line);
  overflow: hidden;
}
.zb-upload-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  transition: width 0.2s ease;
}

.account-split {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th {
  text-align: left; color: var(--muted); font-weight: 500;
  padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 0.75rem;
}
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr { cursor: pointer; }
.table tr:hover td { background: rgba(255,255,255,0.03); }
.table tr.active td { background: rgba(139, 92, 246, 0.12); }

/* ===== Mobile ===== */
.mobile {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
}
.m-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}
.m-top .menu-btn {
  width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 1.1rem; cursor: pointer;
}
.m-top .m-title { font-weight: 700; flex: 1; }
.m-body { padding: 14px; flex: 1; padding-bottom: 88px; }
.m-primary {
  position: sticky; bottom: 0;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 28%);
}
.m-primary .btn-primary { width: 100%; padding: 14px; }
.drawer { display: none; position: fixed; inset: 0; z-index: 40; }
.drawer.open { display: block; }
.drawer .mask { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.drawer .sheet {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: min(78vw, 280px);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.drawer .sheet button {
  text-align: left; border: none; background: transparent;
  color: var(--muted); padding: 12px; border-radius: 8px; font: inherit; cursor: pointer;
}
.drawer .sheet button.active { background: var(--grad); color: #fff; }

/* 生成历史 · 对齐小程序详情（非 JSON dump） */
.history-detail {
  max-height: calc(100vh - 220px);
  overflow: auto;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}
.hist-meta { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hist-meta__title { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.hist-meta__row {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  color: var(--muted); font-size: 0.8rem;
}
.hist-status--ok { color: #34d399; }
.hist-status--err { color: #f87171; }
.hist-status--muted { color: var(--muted); }
.hist-block { margin-bottom: 16px; }
.hist-block__title {
  font-size: 0.78rem; font-weight: 600; color: var(--muted);
  margin-bottom: 8px; letter-spacing: 0.02em;
}
.hist-pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  background: #0a0a12; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; font: inherit; color: var(--text); max-height: 360px; overflow: auto;
}
.hist-images {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.hist-thumb {
  display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #0a0a12;
}
.hist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hist-media { min-height: 120px; align-items: stretch; }
.hist-media video {
  width: 100%; max-height: 360px; border-radius: 8px;
  background: #0a0a12; border: 1px solid var(--line);
}
.hist-err {
  color: #f87171; background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25); border-radius: 8px; padding: 10px 12px;
}
.hist-list-title { display: flex; align-items: center; gap: 8px; }
.hist-list-thumb {
  width: 36px; height: 36px; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--line); flex-shrink: 0; background: #0a0a12;
}
#historyBody tr.on td { background: rgba(139, 92, 246, 0.12); }

@media (max-width: 1099px) {
  .split, .account-split, .split.split-image, .split.split-video, .zb-panel { grid-template-columns: 1fr; }
}

