/* =============================================================
   Birch AI · 全站样式
   暗色工作台 + 白桦蓝强调；模型广场独立深蓝皮肤
   ============================================================= */

:root {
  color-scheme: dark;
  --bg: #06080c;
  --bg-2: #080b11;
  --panel: #0c1017;
  --panel-2: #0a0e14;
  --panel-3: #171e29;
  --line: #1d2634;
  --line-2: #27354a;
  --text: #e8eef6;
  --text-2: #b9c5d4;
  --muted: #8593a6;
  --muted-2: #a9b6c7;
  --accent: #4fa8ff;
  --accent-2: #6db8ff;
  --accent-ink: #04121f;
  --accent-dim: rgba(79, 168, 255, 0.12);
  --accent-line: rgba(79, 168, 255, 0.32);
  --danger: #ff6b6b;
  --warn: #ffc861;
  --purple: #4fa8ff;
  --accent-soft: #7cc4ff;
  --paper: #f5f8fc;
  --paper-2: #e9eef6;
  --paper-ink: #111823;
  --paper-muted: #64748b;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --sidebar: 224px;
  --topbar: 72px;
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;
}

html { scrollbar-color: #2a3646 #0a0e14; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0e14; }
::-webkit-scrollbar-thumb { background: #2a3646; border-radius: 8px; border: 2px solid #0a0e14; }
::-webkit-scrollbar-thumb:hover { background: #3a4a5f; }

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(79, 168, 255, 0.35); color: #fff; }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: #2a2f2c transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #2a2f2c; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #3a403c; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #4b86ff, #2b7bd6);
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 107, 240, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); color: var(--text-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.btn-dark { background: #16202c; color: var(--text); border: 1px solid var(--line-2); }
.btn-dark:hover { background: #1d2938; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 12px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  transition: 0.16s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.07); }
.icon-btn svg { width: 16px; height: 16px; }

.text-btn {
  font-size: 11.5px;
  color: var(--muted-2);
  transition: color 0.16s;
}
.text-btn:hover { color: var(--accent-2); }

.muted { color: var(--muted); }

/* ---------- 品牌 ---------- */
.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(79, 168, 255, 0.5));
}
.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: #fff;
  text-shadow: 0 0 22px rgba(79, 168, 255, 0.45), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.brand-name i { font-style: normal; font-weight: 800; color: #fff; letter-spacing: -0.02em; }

/* =============================================================
   欢迎页
   ============================================================= */
.screen { min-height: 100vh; }
.screen.welcome {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.welcome-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../img/hero.jpg") center 38% / cover no-repeat;
  filter: saturate(0.92) brightness(1.02);
  transform: scale(1.02);
}
.welcome-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 44%, rgba(6, 8, 7, 0.28) 0%, rgba(6, 8, 7, 0.72) 58%, #060807 100%),
    linear-gradient(180deg, rgba(5, 7, 6, 0.86) 0%, rgba(5, 7, 6, 0.18) 26%, rgba(5, 7, 6, 0.55) 74%, #050706 100%);
}
.welcome-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 22px clamp(20px, 4vw, 46px);
  position: relative;
  z-index: 5;
}
.welcome-nav .brand-name { color: #fff; }
.runway-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}
.runway-links button {
  font-size: 12.5px;
  color: rgba(242, 244, 236, 0.66);
  letter-spacing: 0.02em;
  transition: color 0.16s;
}
.runway-links button:hover { color: #fff; }
.welcome-login {
  height: 38px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  transition: 0.18s;
}
.welcome-login:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }

.welcome-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px 40px;
  gap: 0;
}
.hero-mark {
  width: auto;
  height: clamp(86px, 9.5vw, 118px);
  margin-bottom: 20px;
  filter:
    drop-shadow(0 0 14px rgba(96, 178, 255, 0.55))
    drop-shadow(0 10px 48px rgba(48, 130, 255, 0.4));
  animation: leafFloat 7s ease-in-out infinite;
}
@keyframes leafFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark { animation: none; }
}

.welcome-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 26px;
}
.welcome-kicker::before { content: "✦"; font-size: 9px; }
.welcome-main h1 {
  margin: 0;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}
.welcome-main h1 em {
  display: block;
  font-style: normal;
  color: var(--accent);
  font-weight: 800;
}
.welcome-sub {
  margin: 26px 0 0;
  font-size: 14px;
  color: rgba(242, 244, 236, 0.72);
  letter-spacing: 0.01em;
}
.welcome-actions { display: flex; align-items: center; gap: 12px; margin-top: 34px; }
.welcome-cta {
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4b86ff, #2b7bd6);
  color: #fff;
  box-shadow: 0 10px 30px rgba(47, 107, 240, 0.4);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: 0.18s;
}
.welcome-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.welcome-cta.ghost {
  background: rgba(12, 14, 10, 0.42);
  color: #e8eade;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}
.welcome-cta.ghost:hover { background: rgba(20, 24, 16, 0.7); border-color: rgba(255, 255, 255, 0.4); }

.welcome-foot {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 6vw, 76px);
  padding: 0 24px 30px;
  font-size: 11px;
  color: rgba(242, 244, 236, 0.46);
  letter-spacing: 0.04em;
}
.welcome-foot span { display: inline-flex; align-items: center; gap: 7px; }
.welcome-foot span::before { content: "·"; color: var(--accent); }

/* 热榜浮窗 */
.heat-card {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 248px;
  background: rgba(12, 14, 13, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 12px 12px 10px;
  z-index: 40;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.heat-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.heat-head strong { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; }
.heat-head button { font-size: 10px; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.heat-head button:hover { color: var(--accent-2); background: rgba(255, 255, 255, 0.06); }
.heat-body { display: grid; gap: 9px; }
.heat-row { display: flex; align-items: flex-start; gap: 8px; }
.heat-rank {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
}
.heat-rank.top { color: #0b1118; background: linear-gradient(135deg, #7cc4ff, #2b7bd6); }
.heat-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.heat-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.heat-name {
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.5;
  word-break: break-all;
  color: #dbe6f5;
}
.heat-score { flex: none; color: var(--accent-2); font-family: var(--mono); font-size: 9.5px; }
.heat-bar { height: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; }
.heat-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2b7bd6, #7cc4ff); border-radius: 2px; }

/* =============================================================
   登录 / 注册
   ============================================================= */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 7, 6, 0.72);
  backdrop-filter: blur(10px) saturate(0.8);
  animation: fadeIn 0.24s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
.auth-card {
  width: 100%;
  max-width: 424px;
  background: #0b1118;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 26px 26px 20px;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  animation: pop 0.26s ease;
}
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  border-radius: 6px;
}
.auth-close:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.auth-card h2 {
  margin: 4px 0 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}
.auth-card .auth-mark {
  display: block;
  height: 46px;
  width: auto;
  margin: 0 auto 10px;
  filter: drop-shadow(0 0 12px rgba(96, 178, 255, 0.5));
}

.auth-note { text-align: center; font-size: 11.5px; color: var(--muted); margin-bottom: 18px; }
.auth-biz { font-size: 11px; color: var(--muted); text-align: right; margin: -14px 0 10px; }
.auth-biz a { color: var(--muted-2); border-bottom: 1px dashed var(--line-2); }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #131b26;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 18px;
}
.auth-tabs button {
  height: 34px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted-2);
  transition: 0.16s;
}
.auth-tabs button.active { background: #1c2634; color: #fff; }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-bottom: 14px; }
.field > label, .field-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.input, .textarea, .select {
  width: 100%;
  background: #090d13;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px;
  padding: 0 12px;
  height: 42px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.input::placeholder, .textarea::placeholder { color: #5b6879; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(79, 168, 255, 0.08);
}
.textarea { height: auto; min-height: 96px; padding: 11px 12px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, #7f92ab 50%), linear-gradient(135deg, #7f92ab 50%, transparent 50%);
  background-position: calc(100% - 15px) 51%, calc(100% - 10px) 51%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg { position: absolute; left: 11px; width: 15px; height: 15px; color: #6b7a8e; pointer-events: none; }
.input-wrap .input { padding-left: 34px; }
.input-wrap .code-button {
  position: absolute;
  right: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-2);
  font-size: 11px;
}
.input-wrap .code-button:disabled { opacity: 0.5; }

.agree-note {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: rgba(79, 168, 255, 0.04);
  margin: 16px 0 14px;
}
.agree-note label {
  display: flex;
  gap: 9px;
  font-size: 10.5px;
  line-height: 1.6;
  color: #a3b2c6;
  cursor: pointer;
}
.agree-note input { width: 13px; height: 13px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.agree-note label > span { min-width: 0; }
.agree-note a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.auth-submit { height: 44px; font-size: 13.5px; }
.auth-alt { text-align: center; margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.auth-alt button { color: var(--accent-2); font-size: 11.5px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #4d5b6e; font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.auth-forgot { text-align: center; font-size: 11px; color: var(--muted); margin: -6px 0 12px; }

/* =============================================================
   工作台外壳
   ============================================================= */
.screen.app { display: flex; min-height: 100vh; background: var(--bg); }

.sidebar {
  width: var(--sidebar);
  flex: none;
  padding: 20px 14px 14px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 18px;
}
.new-btn {
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(180deg, #4b86ff, #2b7bd6);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 107, 240, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.16s;
}
.new-btn:hover { filter: brightness(1.08); }
.nav-list { margin-top: 16px; display: grid; gap: 2px; }
.nav-item {
  height: 40px;
  border-radius: 8px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8b9cb3;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: 0.15s;
}
.nav-item:hover { color: var(--text-2); background: rgba(255, 255, 255, 0.04); }
.nav-item.active { color: var(--accent); background: rgba(79, 168, 255, 0.09); }
.nav-item .nav-icon { width: 16px; text-align: center; font-size: 13px; opacity: 0.9; }
.nav-item em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: linear-gradient(180deg, #4b86ff, #2b7bd6);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.nav-group { display: grid; gap: 2px; }
.nav-sub { padding-left: 27px; height: 34px; font-size: 12px; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 4px; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.sidebar-user b { font-size: 12px; font-weight: 650; display: block; }
.sidebar-user small { font-size: 10px; color: var(--muted); }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(140deg, #7cc4ff, #2b7bd6);
  color: #04121f;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex: none;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar);
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 10, 0.76);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.page-head { min-width: 0; }
.page-head h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.page-head p { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.balance-btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  background: rgba(79, 168, 255, 0.07);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.balance-btn:hover { background: rgba(79, 168, 255, 0.13); }
.balance-btn b { font-weight: 800; }
.balance-btn .plus {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(79, 168, 255, 0.16);
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

.content { padding: 18px 26px 26px; flex: 1; min-width: 0; }
.mobile-switch-wrap { display: none; }

/* ---------- 三列工作区 ---------- */
.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 356px) minmax(0, 1fr) 246px;
  gap: 14px;
  align-items: stretch;
  height: calc(100vh - var(--topbar) - 44px);
  min-height: 560px;
}
.workspace > .panel { height: 100%; }
.workspace.two-col { grid-template-columns: minmax(320px, 356px) minmax(0, 1fr); }

.panel {
  background: var(--panel);
  border: 1px solid #1d2634;
  border-radius: var(--r-lg);
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
}
.panel-head h2, .panel-head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.panel-head .sub { font-size: 10.5px; color: var(--muted); }
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 0 16px 14px; }

/* 生成面板（可滚动） */
.composer {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.composer-scroll {
  overflow-y: auto;
  padding: 0 16px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* 防子元素最小宽度撑破面板 */
  gap: 15px;
  min-height: 0;
}
.composer-scroll > * { min-width: 0; max-width: 100%; }
.composer-foot {
  border-top: 1px solid var(--line);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.model-pick {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: #090d13;
  text-align: left;
  transition: 0.16s;
}
.model-pick:hover { border-color: var(--accent-line); }
.model-pick .mp-main { min-width: 0; flex: 1; }
.model-pick strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-pick small { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.model-pick .caret { color: var(--muted); font-size: 10px; }

.notice {
  border: 1px solid var(--accent-line);
  background: rgba(79, 168, 255, 0.05);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 10.5px;
  line-height: 1.65;
  color: #a7c2de;
}
.notice b { color: var(--accent-2); font-weight: 700; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-chip {
  height: 26px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-2);
  font-size: 11px;
  transition: 0.15s;
}
.preset-chip:hover { color: var(--text); border-color: var(--accent-line); background: rgba(79, 168, 255, 0.07); }

.uploader {
  border: 1px dashed #2e3532;
  border-radius: 10px;
  background: #090d13;
  min-height: 84px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 12px;
  cursor: pointer;
  transition: 0.16s;
  text-align: center;
}
.uploader:hover { border-color: var(--accent-line); background: rgba(79, 168, 255, 0.03); }
.uploader .plus { font-size: 20px; color: var(--muted-2); line-height: 1; }
.uploader span { font-size: 10.5px; color: var(--muted); }
.asset-thumbs { display: flex; flex-wrap: wrap; gap: 7px; }
.thumb {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #090d13;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
}
.thumb.add {
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 18px;
  cursor: pointer;
  border-style: dashed;
}

.param-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.param-grid .field { margin: 0; gap: 5px; }
.param-grid .field-label { font-size: 10.5px; color: var(--muted-2); }
.param-grid .select { height: 38px; font-size: 12px; }

.cost-line { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.cost-line b { font-weight: 800; color: var(--text); }
.generate-btn {
  margin-left: auto;
  height: 42px;
  padding: 0 22px;
  border-radius: 10px;
  background: linear-gradient(180deg, #4b86ff, #2b7bd6);
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 107, 240, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: 0.16s;
}
.generate-btn:hover { filter: brightness(1.08); box-shadow: 0 0 0 4px rgba(79, 168, 255, 0.14); }
.generate-btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- 预览 ---------- */
.preview { display: flex; flex-direction: column; }
.preview-stage {
  position: relative;
  display: flex;
  isolation: isolate;
  margin: 0 16px 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: url("../img/preview.jpg") center / cover no-repeat, #060807;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}
.workspace .preview-stage { aspect-ratio: auto; min-height: 300px; flex: 1; }
.preview-stage .stage-empty {
  position: relative;
  z-index: 2;
  text-align: center;
  color: rgba(242, 244, 236, 0.55);
  font-size: 11.5px;
  line-height: 1.9;
}
.preview-stage .stage-empty b { display: block; color: rgba(242, 244, 236, 0.82); font-size: 12.5px; font-weight: 650; }
.preview-stage img, .preview-stage video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.preview-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 8, 12, 0.18) 0%, rgba(5, 8, 12, 0.04) 42%, rgba(5, 8, 12, 0.78) 100%);
  pointer-events: none;
}
.stage-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.stage-tag b { display: block; font-family: var(--font); font-size: 15px; font-weight: 750; letter-spacing: -0.01em; color: #fff; margin-top: 2px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65); }
.stage-tag small { display: block; font-family: var(--font); font-size: 10px; color: rgba(255, 255, 255, 0.5); margin-top: 2px; }
.progress-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(6, 8, 7, 0.68);
  backdrop-filter: blur(2px);
}
.progress-overlay .ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(79, 168, 255, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-text { text-align: center; margin-top: 14px; font-size: 11.5px; color: #cfe0f3; }
.progress-text b { color: #9fd0ff; font-family: var(--mono); }
.preview-actions { display: flex; gap: 8px; padding: 0 16px 14px; }

/* ---------- 任务侧栏 ---------- */
.task-side { display: flex; flex-direction: column; min-height: 0; }
.task-side-list { padding: 0 12px 10px; overflow-y: auto; display: grid; gap: 8px; flex: 1; min-height: 0; align-content: start; }
.side-task {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a0e14;
  padding: 8px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: 0.15s;
  align-self: start;
  width: 100%;
}
.side-task:hover { border-color: var(--line-2); background: #111823; }
.side-task .st-top { display: flex; align-items: center; gap: 6px; }
.side-task .st-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  background: #090d13;
}
.side-task p {
  margin: 0;
  font-size: 10.5px;
  color: var(--muted-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-task time { font-size: 9.5px; color: #6b7a8e; font-family: var(--mono); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--muted); }
.status-dot.running { background: var(--accent); animation: pulse 1.4s infinite; }
.status-dot.succeeded { background: #4ade80; }
.status-dot.failed { background: var(--danger); }
.status-dot.queued { background: var(--warn); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.side-task-all {
  margin: 0 12px 12px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}
.side-task-all:hover { border-color: var(--accent-line); color: var(--accent-2); }
.empty-hint {
  text-align: center;
  color: #6b7a8e;
  font-size: 11.5px;
  padding: 40px 12px;
  line-height: 1.9;
}
.empty-hint b { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; font-weight: 650; }
.empty-hint span { display: block; }
.empty-hint .btn { margin-top: 14px; }
.assets-count { font-size: 11px; white-space: nowrap; padding-bottom: 10px; justify-self: end; }

.adv-summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  transition: color 0.15s;
}
.adv-summary::-webkit-details-marker { display: none; }
.adv-summary:hover { color: var(--accent); }
.adv-summary i { font-style: normal; font-size: 9px; transition: transform 0.18s; display: inline-block; }
details[open] > .adv-summary i { transform: rotate(90deg); }
details[open] > .adv-summary { color: var(--accent); }

/* =============================================================
   生成记录
   ============================================================= */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .btn { height: 34px; font-size: 12px; padding: 0 14px; }
.filters {
  border: 1px solid #1d2634;
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 0.8fr)) auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}
.filters .field { margin: 0; }
.filters .field-label { font-size: 10px; color: var(--muted); }
.filters .input, .filters .select { height: 34px; font-size: 11.5px; }
.filter-count { font-size: 11px; color: var(--muted); padding-top: 6px; }

.task-list { display: grid; gap: 10px; }
.task-row {
  border: 1px solid #1d2634;
  background: var(--panel);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  transition: 0.16s;
}
.task-row:hover { border-color: #303734; background: #0e141c; }
.task-row .tr-thumb {
  width: 88px;
  height: 56px;
  border-radius: 7px;
  object-fit: cover;
  background: #090d13;
  border: 1px solid var(--line);
}
.task-row .tr-main { min-width: 0; }
.task-row .tr-main p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tr-title { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; }
.tr-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 10px; color: #6b7a8e; }
.tr-actions { display: flex; align-items: center; gap: 6px; }
.pill {
  height: 19px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line-2);
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.03);
}
.pill.video { color: #8ec5ff; border-color: rgba(125, 196, 255, 0.3); background: rgba(79, 168, 255, 0.1); }
.pill.image { color: #7fe3c0; border-color: rgba(45, 212, 191, 0.28); background: rgba(45, 212, 191, 0.08); }
.pill.ok { color: #86efac; border-color: rgba(74, 222, 128, 0.28); background: rgba(74, 222, 128, 0.08); }
.pill.run { color: var(--accent); border-color: var(--accent-line); background: rgba(79, 168, 255, 0.08); }
.pill.fail { color: #ffa3a3; border-color: rgba(255, 107, 107, 0.3); background: rgba(255, 107, 107, 0.08); }

/* =============================================================
   资产库
   ============================================================= */
.assets-bar {
  border: 1px solid #1d2634;
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.assets-bar .field { margin: 0; }
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.asset-card {
  border: 1px solid #1d2634;
  background: var(--panel);
  border-radius: 11px;
  overflow: hidden;
  transition: 0.16s;
}
.asset-card:hover { border-color: #333b36; transform: translateY(-1px); }
.asset-card .ac-img { aspect-ratio: 4 / 3; background: #090d13; overflow: hidden; }
.asset-card .ac-img img { width: 100%; height: 100%; object-fit: cover; }
.asset-card .ac-body { padding: 8px 10px 10px; }
.asset-card b { font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card small { font-size: 9.5px; color: var(--muted); }

/* =============================================================
   API 管理
   ============================================================= */
.api-section {
  border: 1px solid #1d2634;
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 14px;
}
.api-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.api-section-head h2 { margin: 0; font-size: 15px; font-weight: 750; }
.api-section-head p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.api-section-head .right { margin-left: auto; }
.api-key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a0e14;
  margin-bottom: 8px;
}
.api-key-row strong { font-size: 12px; display: block; }
.api-key-row code { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.api-key-row .state { font-size: 10px; color: var(--muted); }
.api-key-row .state.on { color: #86efac; }
.api-key-row button { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.api-key-row button:hover { color: var(--danger); }
.secret-panel {
  border: 1px solid var(--accent-line);
  background: rgba(79, 168, 255, 0.06);
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
}
.secret-panel code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-2);
  word-break: break-all;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: 6px;
}
.api-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.api-card {
  border: 1px solid #1d2634;
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.api-card small { font-size: 10px; color: var(--muted); }
.api-card strong { display: block; font-size: 18px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -0.02em; }
.api-card p { margin: 0; font-size: 10.5px; color: var(--muted); }

/* =============================================================
   无限画布
   ============================================================= */
.canvas-wrap { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 14px; }
.canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.toggle-pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.toggle-pill.on { color: var(--accent); border-color: var(--accent-line); background: rgba(79, 168, 255, 0.08); }
.zoom-group { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.zoom-group .icon-btn { width: 30px; height: 30px; }
.zoom-label { font-size: 11px; font-family: var(--mono); color: var(--muted-2); width: 44px; text-align: center; }
.inspector { padding: 14px; display: grid; gap: 12px; align-content: start; }
.inspector h3 { margin: 0; font-size: 13.5px; font-weight: 750; }
.inspector input:disabled, .inspector select:disabled, .inspector textarea:disabled { opacity: .45; }
.inspector .desc { font-size: 10.5px; color: var(--muted); line-height: 1.7; margin: 0; }
.stage {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid #1d2634;
  overflow: hidden;
  height: calc(100vh - var(--topbar) - 96px);
  background-color: #080c12;
  background-image: radial-gradient(rgba(120, 150, 190, 0.22) 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: grab;
}
.stage.dragging { cursor: grabbing; }
.canvas-layer { position: absolute; inset: 0; }
.c-node {
  position: absolute;
  width: 210px;
  background: #0f1620;
  border: 1px solid #1d2634;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  padding: 10px;
  cursor: move;
  user-select: none;
}
.c-node.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 168, 255, 0.28), 0 8px 20px rgba(0, 0, 0, 0.5); }
.c-node .cn-tag {
  font-size: 8.5px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: #6d7d92;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.c-node .cn-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-node b { display: block; font-size: 12px; color: #e8eef6; margin-top: 5px; }
.c-node p {
  margin: 4px 0 0;
  font-size: 10px;
  color: #7d8b9e;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.c-node .cn-thumb { margin-top: 7px; border-radius: 5px; overflow: hidden; aspect-ratio: 16/10; background: #0a0e14; }
.c-node .cn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-node .cn-port {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0f1620;
  border: 1.5px solid #3a5d86;
  right: -5px;
  top: 50%;
  margin-top: -4px;
}
.canvas-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: #5d6b7e;
  font-size: 12px;
  pointer-events: none;
}
.canvas-empty b { display: block; color: #8b9cb0; font-size: 13px; margin-bottom: 4px; font-weight: 650; }
.canvas-hint {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 10px;
  color: #4e5b6b;
  pointer-events: none;
}
.create-menu {
  position: absolute;
  z-index: 20;
  background: #101823;
  border: 1px solid #24303f;
  border-radius: 9px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  padding: 5px;
  display: none;
  min-width: 150px;
}
.create-menu.open { display: block; }
.create-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #cfdae8;
}
.create-menu button:hover { background: rgba(79, 168, 255, 0.1); }

/* =============================================================
   模型广场（深蓝皮肤）
   ============================================================= */
.screen.plaza {
  background:
    radial-gradient(90% 60% at 10% 0%, rgba(47, 107, 240, 0.26) 0%, transparent 62%),
    radial-gradient(66% 48% at 92% 4%, rgba(79, 168, 255, 0.16) 0%, transparent 58%),
    #07060c;
  min-height: 100vh;
}
.plaza-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.plaza-nav .brand-name { color: #fff; }
.plaza-nav .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.plaza-link { font-size: 12px; color: rgba(255, 255, 255, 0.6); padding: 0 8px; }
.plaza-link:hover { color: #fff; }
.plaza-primary {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4b86ff, #2b7bd6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(47, 107, 240, 0.35);
}
.plaza-primary:hover { filter: brightness(1.08); }
.plaza-main { max-width: 1340px; margin: 0 auto; padding: clamp(26px, 5vh, 44px) clamp(18px, 4vw, 44px) 60px; }
.plaza-hero { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin-bottom: 26px; }
.plaza-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--accent-soft);
  text-transform: uppercase;
}
.plaza-hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.plaza-hero p { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.52); max-width: 460px; }
.plaza-stats {
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(66px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}
.plaza-stat { background: rgba(10, 14, 22, 0.75); padding: 11px 14px; }
.plaza-stat strong { display: block; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.plaza-stat span { font-size: 9.5px; color: rgba(255, 255, 255, 0.45); }

.plaza-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 17, 26, 0.7);
  border-radius: 12px;
  padding: 9px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.plaza-search {
  flex: 1;
  min-width: 200px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  padding: 0 12px 0 32px;
  font-size: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23716f85' stroke-width='1.8'><circle cx='6' cy='6' r='4.2'/><path d='M9.2 9.2 12.5 12.5'/></svg>");
  background-repeat: no-repeat;
  background-position: 11px center;
}
.plaza-search::placeholder { color: #5f5d75; }
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.seg button {
  height: 27px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  transition: 0.15s;
}
.seg button.active { background: rgba(79, 168, 255, 0.9); color: #fff; font-weight: 650; }
.plaza-select {
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.72);
  padding: 0 28px 0 11px;
  font-size: 11.5px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7a7890 50%), linear-gradient(135deg, #7a7890 50%, transparent 50%);
  background-position: calc(100% - 14px) 51%, calc(100% - 9px) 51%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.view-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.07); }
.view-toggle button { width: 28px; height: 27px; border-radius: 6px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.5); font-size: 12px; }
.view-toggle button.active { background: rgba(255, 255, 255, 0.13); color: #fff; }

.plaza-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: rgba(255, 255, 255, 0.45); margin: 0 0 12px; }
.plaza-meta button { color: var(--accent-soft); font-size: 11px; margin-left: auto; }
.group-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(255, 255, 255, 0.7); margin: 16px 0 10px; font-weight: 600; }
.group-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-soft); }
.group-label span { color: rgba(255, 255, 255, 0.35); font-weight: 400; }

.plaza-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.m-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(79, 168, 255, 0.15) 0%, transparent 55%),
    linear-gradient(180deg, rgba(15, 21, 32, 0.92), rgba(8, 11, 17, 0.94));
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: 0.18s;
  overflow: hidden;
}
.m-card:hover { border-color: rgba(125, 196, 255, 0.4); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.m-card .mc-code {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.22);
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-card .mc-tags { display: flex; align-items: center; gap: 5px; }
.tag {
  height: 18px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
}
.tag.video { color: #a5d4ff; border-color: rgba(125, 196, 255, 0.35); background: rgba(79, 168, 255, 0.14); }
.tag.image { color: #7fe3d6; border-color: rgba(45, 212, 191, 0.32); background: rgba(45, 212, 191, 0.1); }
.tag.ok { color: #86efac; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.1); }
.tag.maint { color: #fdba74; border-color: rgba(251, 146, 60, 0.3); background: rgba(251, 146, 60, 0.1); }
.m-card h3 { margin: 2px 0 0; font-size: 15px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.35; }
.m-card .mc-desc { margin: 0; font-size: 10.5px; color: rgba(255, 255, 255, 0.42); line-height: 1.6; }
.m-card .mc-price { display: flex; align-items: baseline; gap: 7px; margin-top: auto; padding-top: 4px; }
.m-card .mc-price b { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.m-card .mc-price small { font-size: 10px; color: rgba(255, 255, 255, 0.4); }
.m-card .mc-rows { display: grid; gap: 3px; font-size: 9.5px; color: rgba(255, 255, 255, 0.36); }
.m-card .mc-rows div { display: flex; justify-content: space-between; gap: 8px; min-width: 0; align-items: flex-start; }
.m-card .mc-rows span { flex: 0 0 auto; }
.m-card .mc-rows b {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  min-width: 0;
  text-align: right;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-card .mc-foot { display: flex; gap: 7px; margin-top: 4px; }
.m-card .mc-foot .btn { height: 30px; font-size: 11px; border-radius: 7px; flex: 1; }
.m-plaza-btn { background: linear-gradient(180deg, #4b86ff, #2b7bd6); color: #fff; box-shadow: 0 4px 12px rgba(47, 107, 240, 0.3), inset 0 1px 0 rgba(255,255,255,.16); }
.m-plaza-btn:hover { filter: brightness(1.1); }

.plaza-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(15, 21, 32, 0.92), rgba(8, 11, 17, 0.94));
  padding: 16px;
  margin-bottom: 10px;
  transition: 0.16s;
}
.plaza-row:hover { border-color: rgba(125, 196, 255, 0.35); }
.plaza-row h3 { margin: 6px 0 0; font-size: 16px; font-weight: 750; letter-spacing: -0.02em; }
.plaza-row .price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.plaza-row .price b { font-size: 18px; font-weight: 800; }
.plaza-row .price small { font-size: 10px; color: rgba(255, 255, 255, 0.4); }
.plaza-row .rows { display: grid; gap: 3px; font-size: 10px; color: rgba(255, 255, 255, 0.4); }
.plaza-row .rows b { color: rgba(255, 255, 255, 0.62); font-weight: 500; }

/* 详情弹窗 */
.detail-card {
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow: auto;
  background: #080d14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 22px 24px 18px;
  position: relative;
  animation: pop 0.24s ease;
}
.detail-card .dk {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--accent-soft);
  text-transform: uppercase;
}
.detail-card h2 { margin: 8px 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.detail-card .code { font-family: var(--mono); font-size: 10.5px; color: rgba(255, 255, 255, 0.3); }
.detail-card .desc { font-size: 12px; color: rgba(255, 255, 255, 0.5); margin: 8px 0 18px; }
.detail-card h4 { margin: 18px 0 8px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.detail-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.detail-table th {
  text-align: left;
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.detail-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.75); }
.detail-table tr:last-child td { border-bottom: 0; }
.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}
.cap-cell { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.cap-cell:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, 0.06); }
.cap-cell small { display: block; font-size: 9.5px; color: rgba(255, 255, 255, 0.38); }
.cap-cell b { display: block; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, 0.82); margin-top: 2px; }
.detail-actions { display: flex; gap: 8px; margin-top: 20px; }
.detail-actions .btn { flex: 1; }
.detail-actions .btn-ghost { flex: 0 0 auto; }

/* =============================================================
   浅色弹窗（账户 / 充值 / 设置）
   ============================================================= */
.paper-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(160deg, #f7f9fd 0%, #eef2f9 100%);
  border-radius: 18px;
  padding: 24px 26px 20px;
  color: var(--paper-ink);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  animation: pop 0.24s ease;
}
.paper-dialog.recharge { background: linear-gradient(150deg, #f2f8ff 0%, #edf3fd 55%, #e9f0fe 100%); }
.paper-dialog h2 { margin: 0 0 3px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.paper-dialog .pd-sub { margin: 0 0 16px; font-size: 11.5px; color: var(--paper-muted); }
.pd-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1.5px solid #a9c2e6;
  color: #2b5c8f;
  font-size: 14px;
  background: #fff;
}
.pd-close:hover { background: #eef5ff; border-color: #7fa9de; }
.paper-dialog .field-label { color: #4f5548; }
.paper-dialog .input, .paper-dialog .select {
  background: #fff;
  border: 1px solid #dcddd0;
  color: #16180f;
}
.paper-dialog .input::placeholder { color: #9ea294; }
.paper-dialog .input:focus { border-color: #a9c25b; box-shadow: 0 0 0 3px rgba(169, 194, 91, 0.16); }

.balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e2e3d6;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.balance-row span { font-size: 11.5px; color: #6b7063; }
.balance-row b { margin-left: auto; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.balance-row b i { font-style: normal; font-size: 11px; font-weight: 600; color: #6b7063; margin-left: 3px; }

.dialog-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-card {
  background: #fff;
  border: 1px solid #dde5f0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pay-card .pc-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1b1e13;
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.pay-card h4 { margin: 0; font-size: 13px; font-weight: 750; }
.pay-card p { margin: 0; font-size: 10.5px; line-height: 1.7; color: #6b7063; flex: 1; }
.pay-card .btn-dark { height: 38px; font-size: 12px; }
.tag-row { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-tag { font-size: 9px; padding: 2px 6px; border-radius: 4px; background: #eef0e2; color: #5f6549; }
.history-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 6px; }
.history-table th { text-align: left; font-size: 9.5px; color: #6b7a90; font-weight: 600; padding: 6px 4px; border-bottom: 1px solid #dde5f0; }
.history-table td { padding: 8px 4px; border-bottom: 1px solid #ececdf; color: #454a37; }
.pd-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.pd-foot .note { font-size: 10px; color: #6b7a90; }
.pd-foot .btn-dark { margin-left: auto; height: 36px; font-size: 12px; }
.panel-title { font-size: 12.5px; font-weight: 750; margin: 16px 0 6px; color: #23261a; }

.account-hero {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border: 1px solid #dde5f0;
  border-radius: 11px;
  padding: 12px;
  margin-bottom: 10px;
}
.account-hero .avatar { width: 34px; height: 34px; border-radius: 50%; font-size: 15px; background: linear-gradient(140deg, #7cc4ff, #2b7bd6); color: #04121f; }
.account-hero b { display: block; font-size: 13px; }
.account-hero small { font-size: 10.5px; color: #6b7a90; }
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acct-cell { background: #fff; border: 1px solid #dde5f0; border-radius: 10px; padding: 10px 12px; }
.acct-cell small { font-size: 9.5px; color: #6b7a90; }
.acct-cell b { display: block; font-size: 12.5px; margin-top: 2px; }

/* =============================================================
   Toast / 提示
   ============================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 16px);
  z-index: 200;
  background: #f2f5fa;
  color: #0b1220;
  font-size: 12.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: min(86vw, 420px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #ffe8e8; color: #8b1f1f; }

/* =============================================================
   响应式
   ============================================================= */
@media (max-width: 1380px) {
  .workspace { grid-template-columns: minmax(300px, 330px) minmax(0, 1fr) 220px; }
  .task-side { max-height: none; }
}
@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: auto; min-height: 0; }
  .workspace > .panel { height: auto; }
  .task-side { grid-column: 1 / -1; }
  .task-side-list { grid-auto-flow: column; grid-auto-columns: 168px; overflow-x: auto; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .workspace, .workspace.two-col { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 14px 16px 86px; }
  .topbar { padding: 0 16px; }
  .mobile-tabs { display: flex; }
  .composer { max-height: none; }
  .composer-scroll { overflow: visible; }
  .workspace { height: auto; }
  .workspace .preview-stage { min-height: 300px; }
  .canvas-wrap { grid-template-columns: minmax(0, 1fr); }
  .inspector { order: 2; }
  .stage { height: 62vh; }
  .plaza-stats { margin-left: 0; width: 100%; }
  .plaza-row { grid-template-columns: minmax(0, 1fr); }
  .detail-card { padding: 18px; }
  .runway-links { display: none; }
  .welcome-nav { padding: 16px 18px; }
  .heat-card { display: none; }
  .welcome-main { padding-bottom: 8px; }
  /* 移动端保留一行卖点，避免 CTA 下方出现大片空白 */
  .welcome-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 0 20px 26px;
    justify-content: center;
    font-size: 10.5px;
    line-height: 1.6;
  }
  .auth-card { padding: 22px 18px 16px; }
  .dialog-cols { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .plaza-toolbar { gap: 6px; }
  .plaza-search { min-width: 100%; }
  .seg { flex: 1; justify-content: center; }
  .seg button { padding: 0 8px; flex: 1; }
}

/* 移动端底部导航 */
.mobile-tabs {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 80;
  padding: 5px;
  gap: 2px;
  background: rgba(14, 16, 15, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.mobile-tabs button {
  width: 58px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  gap: 1px;
  color: #8b9cb3;
  font-size: 9px;
}
.mobile-tabs button svg { width: 17px; height: 17px; }
.mobile-tabs button.active { background: rgba(79, 168, 255, 0.14); color: var(--accent); }

/* 移动端分段切换（编辑 / 预览 / 任务） */
.mobile-switch { display: none; }
@media (max-width: 900px) {
  .mobile-switch-wrap { display: block; padding: 12px 16px 0; }
  .mobile-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
  }
  .mobile-switch button {
    height: 38px;
    border-radius: 9px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 650;
  }
  .mobile-switch button.active { border-color: var(--accent-line); color: var(--accent); background: rgba(79, 168, 255, 0.08); }
  .m-hidden { display: none !important; }
}

/* =============================================================
   补充组件：模型选择列表 / 充值套餐
   ============================================================= */
.model-picker-list { display: grid; gap: 6px; max-height: 56vh; overflow: auto; }
.model-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: 0.15s;
}
.model-row:hover { border-color: var(--accent-line); background: rgba(79, 168, 255, 0.06); }
.model-row strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); }
.model-row small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.model-row b { font-size: 12px; color: var(--accent-2); font-weight: 700; }

.topup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 7px; }
.topup-chip {
  border: 1px solid #dcded0;
  background: #fff;
  border-radius: 9px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 750;
  color: var(--paper-ink);
  display: grid;
  gap: 1px;
  transition: 0.15s;
}
.topup-chip i { font-style: normal; font-size: 9.5px; font-weight: 500; color: #6b7a90; }
.topup-chip:hover { border-color: #a9c2e6; background: #f5faff; }
.topup-chip.active { border-color: #4b86ff; background: #eef5ff; box-shadow: 0 0 0 2px rgba(75, 134, 255, 0.15); }

/* 广场列表卡片补 */
.plaza-row .rows div { display: flex; justify-content: space-between; gap: 10px; }
.plaza-row .rows span { color: rgba(255, 255, 255, 0.34); }

/* 顶栏头像按钮 */
button.avatar { border: 0; }
button.avatar:hover { filter: brightness(1.08); }

/* 日志表格（记录页） */
.filter-count { margin: 0 0 10px; font-size: 11px; color: var(--muted); }

/* =============================================================
   移动端细节覆盖（放在最后，确保生效）
   ============================================================= */
@media (max-width: 900px) {
  .mobile-tabs { display: flex; }
  .topbar { gap: 8px; padding: 0 12px; height: 62px; }
  .page-head h1 { font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-head p { display: none; }
  .page-head { flex: 1; min-width: 0; }
  .topbar-actions { gap: 6px; flex: none; }
  .topbar-actions .icon-btn { width: 32px; height: 32px; }
  .balance-btn { height: 32px; padding: 0 10px; font-size: 11px; gap: 5px; }
  .bal-label { display: none; }
  .avatar { width: 30px; height: 30px; }
  #homeBtn { display: none; }
  .mobile-switch button { height: 36px; font-size: 11.5px; }
  .workspace { gap: 12px; }
  .composer-foot { padding: 10px 14px; }
  .generate-btn { padding: 0 16px; font-size: 13px; }
}
@media (max-width: 380px) {
  .bal-unit { display: none; }
}

/* 移动端：广场筛选与预览高度 */
@media (max-width: 900px) {
  .seg { flex: 1 1 100%; }
  .seg button { white-space: nowrap; }
  .plaza-select { flex: 1 1 calc(50% - 4px); min-width: 0; }
  #plazaViewToggle { flex: none; margin-left: auto; }
  .workspace .preview-stage { min-height: 62vh; }
  .content { padding-bottom: 100px; }
  .task-side-list { grid-auto-flow: row; grid-auto-columns: auto; }
}

/* =============================================================
   无限画布增强：小地图 / 节点状态 / 参考图计数
   ============================================================= */
.canvas-mini {
  position: absolute;
  right: 14px;
  bottom: 40px;
  width: 180px;
  height: 120px;
  border: 1px solid #223047;
  border-radius: 9px;
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
  z-index: 6;
}
.c-node .cn-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 9.5px;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.6;
}
.c-node .cn-status.run { color: #7fb4ff; background: rgba(79, 168, 255, 0.12); }
.c-node .cn-status.bad { color: #ff8b8b; background: rgba(255, 107, 107, 0.12); }
.c-node .cn-refs {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 9px;
  color: #9ec7f5;
  background: rgba(79, 168, 255, 0.12);
  border: 1px solid rgba(79, 168, 255, 0.25);
  border-radius: 20px;
  padding: 1px 7px;
  pointer-events: none;
}
.c-node .cn-thumb video { width: 100%; height: 100%; object-fit: cover; }

/* 移动端微调：消除创建面板 3px 溢出 */
@media (max-width: 760px) {
  #appView .field { max-width: 100%; grid-template-columns: minmax(0, 1fr); }
  .composer-scroll { grid-template-columns: minmax(0, 1fr); }
  .composer-scroll > * { min-width: 0; }
  #promptClear { right: 8px; }
}

/* =============================================================
   无限画布 v2（对标白桦AI · 视频画布）
   ============================================================= */
.content-flush { padding: 0 !important; display: flex; flex-direction: column; overflow: hidden; }

.cv2-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 16px;
  border-bottom: 1px solid #1a2332;
  background: rgba(10, 14, 21, 0.92);
  flex: none; z-index: 5;
}
.cv2-project { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cv2-project > svg { width: 16px; height: 16px; color: #5f9bff; flex: none; }
.cv2-project input {
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  color: #eaf1fa; font: 600 13px/1 var(--font); padding: 5px 9px; width: 180px;
  transition: border-color 0.18s, background 0.18s;
}
.cv2-project input:hover { border-color: #223047; }
.cv2-project input:focus { border-color: #3b6db8; background: rgba(79, 168, 255, 0.06); outline: none; }
.cv2-savestate { font-size: 10.5px; color: #5f7d94; white-space: nowrap; transition: color 0.2s; }
.cv2-savestate.saving { color: #7fb4ff; }
.cv2-savestate.warn { color: #ffb454; }

.cv2-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cv2-ratio { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #7d93a8; }
.cv2-ratio .select { height: 30px; width: 84px; font-size: 11.5px; }
.cv2-sep { width: 1px; height: 18px; background: #1e2a3c; margin: 0 3px; }
.cv2-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px;
  border: 1px solid #223047; border-radius: 8px;
  background: rgba(79, 168, 255, 0.05); color: #cfe0f2;
  font: 600 11.5px/1 var(--font); cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
}
.cv2-btn:hover { background: rgba(79, 168, 255, 0.13); border-color: #33507a; }
.cv2-btn:active { transform: scale(0.97); }
.cv2-btn svg { width: 13px; height: 13px; }
.cv2-btn em { font-style: normal; color: #7fb4ff; font-weight: 800; }
.cv2-btn.ghost { background: transparent; color: #8ba0b5; }
.cv2-btn.ghost:hover { color: #cfe0f2; }
.cv2-btn.ghost.danger:hover { color: #ff8b8b; border-color: rgba(255, 107, 107, 0.4); }
.cv2-btn.primary { background: linear-gradient(180deg, #4b86ff, #2b7bd6); border-color: transparent; color: #fff; }
.cv2-btn.primary:hover { filter: brightness(1.1); }
.cv2-zoom { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }
.cv2-zoom span { font: 700 10.5px/1 var(--mono, monospace); color: #7d93a8; min-width: 38px; text-align: center; }
.cv2-icon {
  width: 26px; height: 26px; display: inline-grid; place-items: center;
  border: 1px solid #223047; border-radius: 7px; background: transparent;
  color: #9db2c6; font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.cv2-icon:hover { background: rgba(79, 168, 255, 0.1); color: #cfe0f2; }

.cv2-stage {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 30% -10%, rgba(46, 84, 144, 0.14), transparent 60%),
    linear-gradient(rgba(29, 38, 52, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 38, 52, 0.55) 1px, transparent 1px),
    #070b12;
  background-size: auto, 32px 32px, 32px 32px, auto;
  cursor: default;
}
.cv2-stage.dragging { cursor: grabbing; }

.cv2-empty {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; z-index: 2;
}
.cv2-empty[hidden] { display: none; }
.cv2-empty img { width: 44px; opacity: 0.5; filter: drop-shadow(0 0 18px rgba(79, 168, 255, 0.4)); }
.cv2-empty b { display: block; margin-top: 10px; font-size: 14.5px; color: #93a9c0; font-weight: 650; }
.cv2-empty p { margin: 7px 0 14px; font-size: 11px; color: #54677c; }
.cv2-empty kbd {
  font: 700 10px/1 var(--mono, monospace); color: #7fb4ff;
  border: 1px solid #2b4258; border-bottom-width: 2px; border-radius: 4px; padding: 1.5px 5px;
}
.cv2-empty .cv2-btn { pointer-events: auto; }

.cv2-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  font-size: 10px; color: #43566b; white-space: nowrap; pointer-events: none; z-index: 2;
  background: rgba(7, 11, 18, 0.6); padding: 4px 12px; border-radius: 20px;
}

/* ---------- 节点 ---------- */
.c-node {
  position: absolute;
  border-radius: 12px;
  border: 1px solid #223047;
  background: linear-gradient(165deg, rgba(20, 28, 41, 0.96), rgba(13, 19, 29, 0.97));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column;
  user-select: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.c-node:hover { border-color: #35507a; }
.c-node.active { border-color: #4fa8ff; box-shadow: 0 0 0 2px rgba(79, 168, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.55); }
.c-node.t-image { border-style: dashed; border-color: #2a4a3c; }
.c-node.t-image.active { border-color: #3ddc97; box-shadow: 0 0 0 2px rgba(61, 220, 151, 0.22), 0 10px 30px rgba(0, 0, 0, 0.55); }

.cn-head {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px 6px; flex: none;
}
.cn-kind { font-size: 9px; color: #7fb4ff; font-weight: 800; letter-spacing: 0.04em; flex: none; }
.t-image .cn-kind { color: #3ddc97; }
.cn-name {
  font-size: 11px; font-weight: 700; color: #eaf1fa;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.cn-ratio { font-size: 9px; color: #54677c; flex: none; font-family: var(--mono, monospace); }

.cn-view {
  position: relative; margin: 0 8px; border-radius: 7px; overflow: hidden;
  background: rgba(7, 11, 18, 0.75); flex: none; min-height: 0;
}
.cn-view img, .cn-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; color: #3c4d61; letter-spacing: 0.1em;
}
.cn-running {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; color: #7fb4ff;
  background: rgba(7, 11, 18, 0.8); border: 1px solid rgba(79, 168, 255, 0.3);
  border-radius: 20px; padding: 2.5px 9px;
}
.cn-running i {
  width: 7px; height: 7px; border-radius: 50%; background: #4fa8ff;
  animation: cv2-pulse 1.1s ease-in-out infinite;
}
@keyframes cv2-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
.cn-err {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  font-size: 9.5px; color: #ff8b8b;
  background: rgba(7, 11, 18, 0.85); border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 6px; padding: 3px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cn-prompt {
  margin: 7px 10px 9px; font-size: 10px; line-height: 1.55; color: #7d93a8;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1; min-height: 0;
}
.cn-refs {
  position: absolute; right: 12px; top: 34px;
  font-size: 9px; color: #7fb4ff;
  background: rgba(79, 168, 255, 0.14); border: 1px solid rgba(79, 168, 255, 0.3);
  border-radius: 20px; padding: 1px 7px; pointer-events: none;
}
.cn-port {
  position: absolute; right: -7px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: #16202f; border: 2px solid #3b6db8;
  cursor: crosshair; z-index: 3; transition: transform 0.14s, background 0.14s;
}
.cn-port:hover { transform: translateY(-50%) scale(1.4); background: #4fa8ff; }
.cn-acts {
  position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px;
  opacity: 0; transition: opacity 0.16s; z-index: 4;
}
.c-node:hover .cn-acts { opacity: 1; }
.cn-acts button {
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 1px solid #2a3a52; border-radius: 7px;
  background: rgba(7, 11, 18, 0.88); color: #cfe0f2;
  font-size: 10.5px; cursor: pointer; transition: all 0.14s;
}
.cn-acts button:hover { background: rgba(79, 168, 255, 0.2); border-color: #3b6db8; }
.cn-acts button[data-act="del"]:hover { background: rgba(255, 107, 107, 0.18); border-color: #a04040; color: #ffb0b0; }

/* ---------- 连线 ---------- */
.link-g .hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; }
.link-g .line {
  fill: none; stroke: rgba(79, 168, 255, 0.55); stroke-width: 1.6;
  stroke-dasharray: 5 5; animation: cv2-flow 1.2s linear infinite;
  cursor: pointer; transition: stroke 0.15s, stroke-width 0.15s;
}
.link-g:hover .line { stroke: rgba(79, 168, 255, 0.95); stroke-width: 2.2; }
.link-g.active .line { stroke: #ffb454; stroke-width: 2.4; stroke-dasharray: none; }
@keyframes cv2-flow { to { stroke-dashoffset: -10; } }
#canvasSvg .temp { fill: none; stroke: #4b86ff; stroke-width: 2; stroke-dasharray: 6 4; }

/* ---------- @ 素材菜单 ---------- */
.cv2-atmenu {
  position: absolute; z-index: 30;
  min-width: 220px; max-height: 220px; overflow: auto;
  background: #101826; border: 1px solid #2a3a52; border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6); padding: 5px;
}
.at-empty { font-size: 11px; color: #54677c; padding: 9px 11px; }
.cv2-atmenu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 6px 8px; border: 0; border-radius: 7px; background: transparent;
  color: #cfe0f2; font-size: 11.5px; cursor: pointer; text-align: left;
}
.cv2-atmenu button:hover { background: rgba(79, 168, 255, 0.12); }
.cv2-atmenu button img { width: 46px; height: 30px; object-fit: cover; border-radius: 5px; flex: none; background: #0a0e14; }

/* ---------- 检查器（浮动） ---------- */
.cv2-inspector {
  position: absolute; right: 14px; top: 14px; bottom: 44px; z-index: 20;
  width: 268px;
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(13, 19, 29, 0.94); backdrop-filter: blur(10px);
  border: 1px solid #223047; border-radius: 13px;
  padding: 13px; overflow: auto;
}
.cv2-inspector[hidden] { display: none; }
.cv2-ins-head { display: flex; align-items: center; justify-content: space-between; }
.cv2-ins-head b { font-size: 12.5px; color: #eaf1fa; }
.cv2-refchips { display: flex; flex-wrap: wrap; gap: 5px; }
.cv2-refchips .chip {
  font-size: 10px; padding: 3px 9px; border-radius: 20px;
  background: rgba(79, 168, 255, 0.1); border: 1px solid rgba(79, 168, 255, 0.25); color: #9ec7f5;
}
.cv2-refchips .chip.ok { background: rgba(61, 220, 151, 0.1); border-color: rgba(61, 220, 151, 0.3); color: #6fe0ac; }
.cv2-refchips .chip.dim { background: transparent; border-color: #223047; color: #54677c; }
.cv2-ins-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cv2-ins-foot .cost-line { font-size: 11px; color: #7d93a8; }
.cv2-ins-foot .cost-line b { color: #eaf1fa; }
.cv2-inspector .param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv2-inspector .field { margin: 0; }

/* ---------- 小地图 ---------- */
.canvas-mini {
  position: absolute; right: 14px; bottom: 40px;
  border: 1px solid #223047; border-radius: 9px;
  background: rgba(10, 14, 20, 0.82); backdrop-filter: blur(6px);
  cursor: pointer; z-index: 10;
}
/* 有检查器时小地图左移避让 */
.cv2-inspector:not([hidden]) ~ .canvas-mini { right: 296px; }

/* ---------- 全站优化 ---------- */
:root { --tr: 0.18s cubic-bezier(0.4, 0, 0.2, 1); }
button, .btn, .nav-item, .card, .m-card { transition: background var(--tr), border-color var(--tr), box-shadow var(--tr), transform var(--tr), color var(--tr), filter var(--tr); }
.btn:focus-visible, .input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 2px solid rgba(79, 168, 255, 0.5); outline-offset: 1px;
}
.m-card:hover, .p-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4); border-color: #2c3d55; }
.welcome-cta:active { transform: scale(0.98); }
::selection { background: rgba(79, 168, 255, 0.32); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #26344a; border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #33507a; background-clip: content-box; }

@media (max-width: 900px) {
  .cv2-topbar { flex-wrap: wrap; }
  .cv2-inspector { width: min(268px, calc(100vw - 28px)); }
  .cv2-inspector:not([hidden]) ~ .canvas-mini { right: 14px; bottom: 130px; }
  .cv2-project input { width: 110px; }
}

/* =============================================================
   无限画布 v3 —— 复刻白桦AI 画布（stage/world/edges/nodes + 浮动提示条）
   ============================================================= */
#viewCanvas.cv3-root { position: relative; overflow: hidden; }

.cv3-stage {
  position: absolute; inset: 0; overflow: hidden; cursor: default;
  background-color: #06080c;
  background-image:
    radial-gradient(900px 620px at 50% -10%, rgba(79, 168, 255, 0.07), transparent 70%),
    radial-gradient(circle, rgba(140, 190, 255, 0.09) 1px, transparent 1px);
  background-size: auto, 26px 26px;
  background-position: 0 0, 0 0;
}
.cv3-stage.dragging { cursor: grabbing; }
.cv3-stage.dragging .cv3-node { pointer-events: none; }

.cv3-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.cv3-nodes { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.cv3-edges {
  position: absolute; left: 0; top: 0; width: 1px; height: 1px;
  overflow: visible; pointer-events: none;
}
.cv3-edges g { pointer-events: auto; }

/* ---------- 节点 ---------- */
.cv3-node {
  position: absolute; left: 0; top: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #131a24, #0f151d);
  border: 1px solid #222e3d;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(190, 225, 255, 0.05);
  will-change: transform;
  transition: border-color 0.14s, box-shadow 0.14s;
  user-select: none;
}
.cv3-node:hover { border-color: #3a4c62; }
.cv3-node.sel {
  border-color: rgba(79, 168, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(79, 168, 255, 0.45), 0 0 30px rgba(79, 168, 255, 0.22),
    0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(190, 225, 255, 0.08);
}
.cv3-node.dragging { box-shadow: 0 22px 60px rgba(0, 0, 0, 0.62); z-index: 5; }
.cv3-node--img { border-style: solid; border-color: #26343f; }

.bh-n-head {
  position: absolute; left: 2px; top: -25px; height: 20px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #8496ab; white-space: nowrap;
  max-width: calc(100% + 120px); overflow: hidden;
}
.cv3-node.sel .bh-n-head { color: #b8d5f2; }
.bh-n-head svg { width: 13px; height: 13px; opacity: 0.85; flex: none; }
.bh-n-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.bh-rename {
  width: 120px; height: 20px; font-size: 12px; color: #dfe9f5;
  background: #101720; border: 1px solid rgba(79, 168, 255, 0.5); border-radius: 5px;
  outline: none; padding: 0 5px;
}

.bh-n-tools {
  position: absolute; right: 6px; top: -30px; display: none; gap: 2px;
  background: rgba(16, 22, 30, 0.95); border: 1px solid #2a3a4c; border-radius: 8px; padding: 2px;
}
.cv3-node:hover .bh-n-tools, .cv3-node.sel .bh-n-tools { display: flex; }
.bh-n-tools button {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #93a5ba;
}
.bh-n-tools button:hover { background: rgba(120, 180, 255, 0.14); color: #fff; }
.bh-n-tools button.del:hover { background: rgba(255, 107, 107, 0.18); color: #ff8b8b; }
.bh-n-tools svg { width: 13px; height: 13px; }

.bh-n-body { position: absolute; inset: 0; overflow: hidden; border-radius: 15px; background: #0a0f16; }
.bh-img, .bh-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.bh-img { transition: transform 0.2s; }
.cv3-node--img:hover .bh-img { transform: scale(1.035); }

.bh-n-ph {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px;
  color: #46586c;
}
.bh-n-ph svg { width: 26px; height: 26px; }
.bh-ph-txt { font-size: 11px; color: #44566a; letter-spacing: 0.02em; }

.bh-n-meta {
  position: absolute; right: 8px; bottom: 7px; z-index: 2;
  font-size: 10px; color: rgba(255, 255, 255, 0.6); letter-spacing: 0.2px;
  background: rgba(0, 0, 0, 0.42); padding: 2px 6px; border-radius: 5px;
  backdrop-filter: blur(6px); pointer-events: none;
}
.bh-n-alias {
  position: absolute; left: 8px; bottom: 7px; z-index: 2;
  font-size: 10.5px; color: #b7c8ff;
  background: rgba(79, 168, 255, 0.16); border: 1px solid rgba(79, 168, 255, 0.3);
  padding: 1px 7px; border-radius: 5px; backdrop-filter: blur(6px); pointer-events: none;
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.bh-n-run {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(8, 12, 18, 0.55); backdrop-filter: blur(2px);
}
.bh-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(79, 168, 255, 0.18);
  border-top-color: rgba(120, 205, 255, 0.95);
  animation: cv3-rot 0.9s linear infinite;
  filter: drop-shadow(0 0 8px rgba(79, 168, 255, 0.4));
}
@keyframes cv3-rot { to { transform: rotate(360deg); } }
.bh-run-txt { font-size: 11.5px; color: #9fd2ff; }
.bh-run-cancel {
  height: 24px; padding: 0 12px; font-size: 11px; border-radius: 7px;
  background: rgba(18, 24, 33, 0.85); border: 1px solid #35455c; color: #9aa8bc;
}
.bh-run-cancel:hover { color: #ffb4b4; border-color: rgba(255, 107, 107, 0.5); }

.bh-n-err {
  position: absolute; inset: 0; padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  background: rgba(255, 107, 107, 0.06); color: #ffb4b4; font-size: 11px; line-height: 1.6;
  text-align: center;
}
.bh-err-txt { word-break: break-word; overflow: auto; }
.bh-err-acts { margin-top: auto; }
.bh-mini {
  height: 26px; padding: 0 14px; border-radius: 8px; font-size: 11.5px;
  background: rgba(79, 168, 255, 0.16); border: 1px solid rgba(79, 168, 255, 0.35); color: #bfe0ff;
}
.bh-mini:hover { filter: brightness(1.15); }

.bh-n-resize {
  position: absolute; right: -5px; bottom: -5px; width: 12px; height: 12px;
  border-radius: 3px; background: #1c2634; border: 1px solid #3a4c62;
  opacity: 0; cursor: nwse-resize; z-index: 3; transition: opacity 0.14s;
}
.cv3-node.sel .bh-n-resize, .cv3-node:hover .bh-n-resize { opacity: 1; }
.bh-n-resize:hover { background: #4fa8ff; border-color: #4fa8ff; }

.bh-n-cap {
  position: absolute; left: 2px; top: calc(100% + 7px); width: 100%;
  font-size: 11.5px; line-height: 1.55; color: #6b7c92;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  pointer-events: none; user-select: none;
}
.cv3-node.sel .bh-n-cap { color: #8b9eb5; }

/* ---------- 连线 ---------- */
.cv3-edge { fill: none; stroke: #3a3c45; stroke-width: 1.5; transition: stroke 0.14s; }
.cv3-edge-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.cv3-link:hover .cv3-edge { stroke: #5b8ec9; stroke-width: 2; }
.cv3-link.on .cv3-edge {
  stroke: #3d7eff; stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(61, 126, 255, 0.55));
}
#cv3TmpEdge { fill: none; stroke: #3d7eff; stroke-width: 2; stroke-dasharray: 5 4; opacity: 0.9; }

/* ---------- 顶栏 ---------- */
.cv3-topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 48px; z-index: 20;
  display: flex; align-items: center; gap: 9px; padding: 0 14px;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.92), rgba(6, 8, 12, 0));
  pointer-events: none;
}
.cv3-topbar > * { pointer-events: auto; }
.cv3-brand { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 2px; }
.cv3-brand-mark { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 0 7px rgba(79, 168, 255, 0.45)); }
.cv3-brand-name {
  font-size: 13.5px; font-weight: 650; letter-spacing: 0.3px; white-space: nowrap;
  background: linear-gradient(100deg, #ffffff 10%, #a9d9ff 60%, #6cc6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cv3-sep { width: 1px; height: 16px; background: rgba(120, 170, 235, 0.14); margin: 0 2px; flex: none; }
.cv3-spacer { flex: 1; }
.cv3-meta { font-size: 12px; color: #5b6879; white-space: nowrap; }
.cv3-meta b { color: #9fb6cf; font-weight: 650; }
.cv3-save { color: #46566a; }
.cv3-save.saving { color: #7fb4ff; }
.cv3-save.stale { color: #ffa96b; }

.cv3-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px;
  border-radius: 8px; font-size: 12px;
  background: #131a22; border: 1px solid #223042; color: #b9c6d4;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.cv3-btn:hover { background: #1b2533; color: #eaf2fb; border-color: #2c3d51; }
.cv3-btn svg { flex: none; }
.cv3-btn.cv3-shop {
  background: linear-gradient(180deg, #4fa8ff, #2b7bd6); border-color: transparent;
  color: #fff; font-weight: 600;
  box-shadow: 0 3px 14px rgba(43, 123, 214, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cv3-btn.cv3-shop:hover { filter: brightness(1.08); background: linear-gradient(180deg, #61b4ff, #2f86e0); }

.cv3-credits {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px;
  border-radius: 999px; background: rgba(79, 168, 255, 0.1);
  border: 1px solid rgba(79, 168, 255, 0.26); color: #9fd2ff; font-size: 12px;
}
.cv3-credits svg { color: #6fb6ff; }
.cv3-credits.low { background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.3); color: #ff9d9d; }
.cv3-credits.low svg { color: #ff8b8b; }

.cv3-user {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px 0 4px;
  border-radius: 999px; background: #10161e; border: 1px solid #223042; font-size: 12px; color: #c2cdd9;
  max-width: 160px;
}
.cv3-user:hover { background: #1b2533; }
.cv3-user-av {
  width: 21px; height: 21px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #0b1220;
  background: linear-gradient(135deg, #7fc0ff, #4f8dff);
}
#cv3UserName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cv3-proj {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px;
  border-radius: 9px; font-size: 13px; font-weight: 550; color: #d8dfe8;
}
.cv3-proj:hover { background: rgba(79, 168, 255, 0.08); }
.cv3-proj svg { opacity: 0.6; }

/* ---------- 左侧工具栏 ---------- */
.cv3-toolbar {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: rgba(13, 18, 26, 0.88); backdrop-filter: blur(18px);
  border: 1px solid rgba(120, 170, 235, 0.14); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(190, 225, 255, 0.07);
}
.cv3-tool {
  display: flex; align-items: center; gap: 8px; height: 31px;
  padding: 0 11px 0 8px; border-radius: 9px;
  font-size: 12px; color: #9aa9bd; white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}
.cv3-tool:hover { background: rgba(120, 180, 255, 0.1); color: #eaf2fb; }
.cv3-tool svg { width: 17px; height: 17px; flex: none; }
.cv3-tool-primary {
  color: #eaf1ff;
  background: linear-gradient(180deg, rgba(79, 168, 255, 0.3), rgba(79, 168, 255, 0.15));
  border: 1px solid rgba(79, 168, 255, 0.46);
  box-shadow: 0 4px 14px rgba(40, 80, 190, 0.24);
}
.cv3-tool-primary svg { color: #7fb0ff; }
.cv3-tool-accent { color: #6ea0ff; }
.cv3-tool-accent:hover { background: rgba(79, 168, 255, 0.16); color: #bfe6ff; }
.cv3-tool-div { height: 1px; margin: 4px 6px; background: rgba(120, 170, 235, 0.14); }

/* ---------- 缩放条 ---------- */
.cv3-zoombar {
  position: absolute; left: 14px; bottom: 16px; z-index: 20;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(13, 18, 26, 0.86); backdrop-filter: blur(18px);
  border: 1px solid rgba(120, 170, 235, 0.14); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(190, 225, 255, 0.07);
}
.cv3-zoombar button {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px;
  font-size: 12.5px; color: #9aa9bd; display: grid; place-items: center;
}
.cv3-zoombar button:hover { background: rgba(120, 180, 255, 0.12); color: #fff; }
.cv3-zb-div { width: 1px; height: 13px; background: rgba(120, 170, 235, 0.16); margin: 0 2px; }

/* ---------- 浮动提示条 ---------- */
.cv3-pb {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30;
  width: min(660px, calc(100% - 40px));
  background: rgba(10, 14, 20, 0.92); backdrop-filter: blur(26px) saturate(1.25);
  border: 1px solid rgba(120, 170, 235, 0.14); border-radius: 22px;
  padding: 11px 13px 12px;
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(6, 10, 15, 0.6), inset 0 1px 0 rgba(190, 225, 255, 0.07);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cv3-pb:focus-within {
  border-color: rgba(79, 168, 255, 0.45);
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.75), 0 0 0 3px rgba(79, 168, 255, 0.1);
}
.cv3-pb.float { bottom: auto; transform: none; transition: border-color 0.2s, box-shadow 0.2s, left 0.14s ease, top 0.14s ease; }
.cv3-pb.float::after {
  content: ''; position: absolute; left: 50%; bottom: -7px;
  width: 13px; height: 13px; transform: translateX(-50%) rotate(45deg);
  background: rgba(10, 14, 20, 0.96);
  border-right: 1px solid rgba(120, 170, 235, 0.14);
  border-bottom: 1px solid rgba(120, 170, 235, 0.14);
  border-radius: 0 0 4px 0; pointer-events: none;
}
.cv3-pb.float.below::after {
  bottom: auto; top: -7px; border: 0;
  border-left: 1px solid rgba(120, 170, 235, 0.14);
  border-top: 1px solid rgba(120, 170, 235, 0.14);
  border-radius: 4px 0 0 0;
}
.cv3-pb-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.cv3-pb-model-wrap {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px;
  border-radius: 8px; background: rgba(23, 31, 43, 0.9); border: 1px solid #263447;
}
.cv3-pb-dot { width: 6px; height: 6px; border-radius: 50%; background: #58b6ff; box-shadow: 0 0 9px #58b6ff; }
.cv3-pb-model { font-size: 12px; color: #b4cde6; white-space: nowrap; }
.cv3-pb-plus {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(23, 31, 43, 0.9); border: 1px solid #263447; color: #9fb2c7;
}
.cv3-pb-plus:hover { background: #1f2937; color: #fff; }
.cv3-pb-len { font-size: 11px; color: #566a80; }
.cv3-pb-head .cv3-pb-len:first-of-type { margin-left: auto; }

.cv3-pb textarea {
  width: 100%; min-height: 24px; max-height: 168px; padding: 2px 2px 4px;
  background: transparent; border: 0; outline: none; resize: none;
  font-size: 13.5px; line-height: 1.62; color: #e6eef8; caret-color: #6cc6ff;
  font-family: inherit;
}
.cv3-pb textarea::placeholder { color: #52647a; }
.cv3-pb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.cv3-pb-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.cv3-opt select {
  height: 26px; padding: 0 6px; border-radius: 7px; font-size: 11.5px;
  background: #141d28; border: 1px solid #23303f; color: #98acc2; outline: none;
  cursor: pointer; max-width: 150px;
}
.cv3-opt select:hover { color: #e6eef8; }

.cv3-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 18px; border-radius: 10px; flex: none;
  background: linear-gradient(180deg, #4fa8ff, #2b7bd6); color: #fff;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 5px 18px rgba(43, 123, 214, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: filter 0.15s, transform 0.1s;
}
.cv3-btn-primary:hover { filter: brightness(1.08); }
.cv3-btn-primary:active { transform: translateY(1px); }

.cv3-pb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.cv3-pb-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 4px 0 5px;
  border-radius: 7px; background: #16202c; border: 1px solid #263447; color: #c2d1e2; font-size: 11px;
}
.cv3-chip-thumb { width: 24px; height: 17px; border-radius: 4px; overflow: hidden; flex: none; background: #0a0e14; }
.cv3-chip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv3-chip-x {
  width: 15px; height: 15px; border-radius: 4px; color: #767c8a; font-size: 12px;
  display: grid; place-items: center;
}
.cv3-chip-x:hover { color: #ff8b8b; background: rgba(255, 107, 107, 0.14); }

/* ---------- 弹层 ---------- */
.cv3-pop {
  position: absolute; z-index: 60; min-width: 168px;
  background: #0e131b; border: 1px solid #22303f; border-radius: 13px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72); overflow: hidden;
  animation: cv3-popin 0.13s ease; padding: 5px;
}
@keyframes cv3-popin { from { opacity: 0; transform: translateY(5px); } }
.cv3-pop[hidden] { display: none !important; }
.cv3-pop button {
  display: block; width: 100%; text-align: left; height: 32px; padding: 0 10px;
  border-radius: 8px; font-size: 12.5px; color: #c2d1e2;
}
.cv3-pop button:hover { background: rgba(79, 168, 255, 0.12); color: #fff; }
.cv3-proj-info { padding: 8px 10px 9px; border-bottom: 1px solid #1a2634; margin-bottom: 5px; }
.cv3-proj-info b { display: block; font-size: 12.5px; color: #e6eef8; }
.cv3-proj-info small { font-size: 10.5px; color: #566a80; }

.cv3-atmenu {
  width: min(344px, calc(100% - 24px)); max-height: 300px; overflow: auto;
}
.cv3-at-item { display: flex !important; align-items: center; gap: 9px; height: auto !important; padding: 5px 8px !important; }
.cv3-at-thumb { width: 52px; height: 34px; border-radius: 6px; overflow: hidden; flex: none; background: #0a0e14; }
.cv3-at-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv3-at-thumb.broken { background: linear-gradient(135deg, #1d2733, #131a24); position: relative; }
.cv3-at-thumb.broken::after { content: "图"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #44586d; }
.cv3-at-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cv3-at-name { font-size: 12px; color: #e6eef8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv3-at-meta { font-size: 10.5px; color: #566a80; }
.cv3-at-empty { padding: 14px 10px; font-size: 11.5px; color: #66788d; text-align: center; }

/* ---------- 空态引导 ---------- */
.cv3-empty {
  position: absolute; inset: 0; z-index: 12;
  display: grid; place-items: center; pointer-events: none;
}
.cv3-empty[hidden] { display: none !important; }
.cv3-eg-card {
  pointer-events: auto; width: 372px; max-width: calc(100% - 40px);
  padding: 26px 26px 22px; text-align: center;
  background: rgba(12, 16, 23, 0.88); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.cv3-eg-ic {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 13px;
  display: grid; place-items: center;
  color: #8ab4ff; background: var(--accent-dim); border: 1px solid var(--accent-line);
}
.cv3-eg-ic svg { width: 22px; height: 22px; }
.cv3-eg-card b { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.cv3-eg-card p { font-size: 11.5px; line-height: 1.65; color: var(--muted); margin-bottom: 14px; }
.cv3-eg-card kbd {
  padding: 0 5px; border-radius: 4px; font-size: 11px;
  color: #b9c8e8; background: #16202c; border: 1px solid #263447;
}
.cv3-eg-btn {
  height: 34px; padding: 0 16px; border-radius: var(--r-md); font-size: 12.5px;
  background: linear-gradient(180deg, #4b86ff, #2b7bd6); color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(47, 107, 240, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.cv3-eg-btn:hover { filter: brightness(1.08); }
.cv3-eg-ghost { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); color: var(--text-2); box-shadow: none; margin-left: 8px; }
.cv3-eg-ghost:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }

/* ---------- 拖放遮罩 / 提示 ---------- */
.cv3-dropmask {
  position: absolute; inset: 0; z-index: 150; display: none; place-items: center;
  background: rgba(6, 9, 14, 0.72); backdrop-filter: blur(4px);
}
.cv3-dropmask > div {
  padding: 26px 44px; border: 1.5px dashed rgba(79, 168, 255, 0.6); border-radius: 18px;
  color: #a9c4ff; font-size: 14px; background: rgba(79, 168, 255, 0.06);
}
.cv3-hint {
  position: absolute; right: 16px; bottom: 16px; z-index: 10;
  font-size: 10.5px; color: #3c4c60; white-space: nowrap; pointer-events: none;
  background: rgba(8, 12, 18, 0.55); padding: 4px 12px; border-radius: 20px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .cv3-pb { width: calc(100% - 24px); bottom: 14px; }
  .cv3-toolbar { left: 8px; padding: 4px; }
  .cv3-tool span { display: none; }
  .cv3-tool { width: 34px; justify-content: center; padding: 0; }
  .cv3-zoombar { left: 8px; bottom: 12px; }
  .cv3-hint { display: none; }
  .cv3-btn.cv3-gallery span, #cv3UserName { display: none; }
  .cv3-user { padding: 0 4px; }
  .cv3-meta { display: none; }
}

/* =========================================================
   画布页去重：工作台框架（侧边栏/顶栏）保留，
   仅画布内部不重复显示充值/点数/账号按钮
   ========================================================= */

/* 我的创作 · 画布内作品墙 */
.cv3-works-mask {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(6, 9, 14, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: cv3FadeIn 0.18s ease;
}
.cv3-works {
  width: min(860px, calc(100vw - 40px));
  max-height: min(620px, 82vh);
  display: flex; flex-direction: column;
  background: var(--panel, #131922);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.cv3-works-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}
.cv3-works-head b { font-size: 15px; }
.cv3-works-head span { font-size: 12px; color: var(--muted-2, #8b96a5); }
.cv3-works-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px;
  border: none; background: rgba(255, 255, 255, 0.06); color: inherit;
  cursor: pointer; font-size: 13px; transition: background 0.15s;
}
.cv3-works-close:hover { background: rgba(255, 255, 255, 0.12); }
.cv3-works-grid {
  padding: 16px 18px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; align-content: start;
}
.cv3-works-empty {
  grid-column: 1 / -1; text-align: center; padding: 48px 12px;
  color: var(--muted-2, #8b96a5); font-size: 13px;
}
.cv3-wk {
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
  overflow: hidden; background: rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.cv3-wk:hover { transform: translateY(-2px); border-color: rgba(90, 160, 255, 0.45); }
.cv3-wk-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  background: linear-gradient(135deg, #1a2230, #0d1219);
}
.cv3-wk-body { padding: 10px 12px 12px; }
.cv3-wk-prompt { margin: 0 0 6px; font-size: 12px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv3-wk-meta { font-size: 11px; color: var(--muted-2, #8b96a5); margin-bottom: 10px; }
.cv3-wk-actions { display: flex; gap: 8px; }
.cv3-wk-btn {
  flex: 1; height: 30px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05);
  color: inherit; font-size: 12px; transition: background 0.15s, border-color 0.15s;
}
.cv3-wk-btn:hover { background: rgba(255, 255, 255, 0.1); }
.cv3-wk-btn.primary {
  border: none; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
}
.cv3-wk-btn.primary:hover { filter: brightness(1.1); }

@media (max-width: 720px) {
  .cv3-works { width: calc(100vw - 24px); max-height: 80vh; border-radius: 14px; }
  .cv3-works-grid { grid-template-columns: 1fr; }
}
@keyframes cv3FadeIn { from { opacity: 0; } }

/* ---------- 画布 UI 优化（去顶栏后） ---------- */
/* 左侧工具栏：更舒展的间距与层次 */
.cv3-toolbar { padding: 7px; gap: 3px; border-radius: 18px; }
.cv3-tool { height: 33px; padding: 0 12px 0 9px; font-size: 12.5px; border-radius: 10px; }
.cv3-tool:hover { background: rgba(120, 180, 255, 0.12); color: #f2f7ff; }
.cv3-tool:active { transform: scale(0.97); }
.cv3-tool-div { margin: 4px 6px; }
.cv3-tool-danger { color: #c98490; }
.cv3-tool-danger:hover { background: rgba(255, 99, 132, 0.13); color: #ffb3c0; }

/* 底部提示行：右侧带 节点数 · 保存状态 徽标 */
.cv3-hint { display: flex; align-items: center; gap: 12px; }
.cv3-hint-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding-left: 12px; border-left: 1px solid rgba(120, 170, 235, 0.18);
  color: #6b7d92;
}
.cv3-hint-status b { color: #aebdd0; font-weight: 600; }
#cv2SaveState.saving { color: #6cc6ff; }

/* 浮动提示条：贴合节点（修复上下同时定位导致的纵向拉伸） */
.cv3-pb.float { max-height: none; }
.cv3-pb[hidden] { display: none !important; }
