/* 元空间共享界面色阶：中性表面、橙色操作，模型承载视觉细节。 */

/* 首页与工作台共用的浅色主题（默认）。 */
:root {
  color-scheme: light;
  --ui-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --bg-base: #f4f5f7;
  --bg-card: #ffffff;
  --bg-float: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-input: #f4f5f7;
  --bg-input-focus: #ffffff;
  --bg-btn: #f4f5f7;
  --range-track: #d9dce2;

  --line: rgba(0, 0, 0, 0.06);
  --line-strong: rgba(0, 0, 0, 0.10);

  --text-1: #1d1d1f;
  --text-2: #575b64;
  --text-3: #696d76;
  --text-inv: #ffffff;

  --accent: #fd8633;
  --accent-ink: #24170d;
  --accent-text: #9b430b;
  --accent-soft: #fde6d3;
  --status-error: #b42318;
  --status-success: #267044;
  --ui-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --accent-warm: #d4a574;
  --accent-cool: #a8c5d6;
  --accent-pink: #d4a8b8;
  --accent-green: #a8c4a2;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 12px 40px rgba(0, 0, 0, 0.10);

  --glass-blur: none;

  /* Three.js 场景颜色 */
  --scene-bg: 0xf5f5f7;
  --scene-grid-major: 0xd0d3d8;
  --scene-grid-minor: 0xe8eaed;

  /* human-atlas 风格创意展示（浅色） */
  --creative-primary: var(--text-1);
  --creative-accent: var(--accent-text);
  --creative-muted: var(--text-2);
  --creative-glass-bg: rgba(255, 255, 255, 0.92);
  --creative-glass-border: rgba(37, 56, 74, 0.09);
  --creative-glass-shadow: 0 16px 48px rgba(36, 51, 68, 0.04);
  --creative-glass-blur: blur(20px);
}

/* 首页与工作台共用的深色主题。 */
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg-base: #161719;
  --bg-card: #1e2023;
  --bg-float: #25272b;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-input: #292b30;
  --bg-input-focus: #303238;
  --bg-btn: #292b30;
  --range-track: #474b54;

  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.10);

  --text-1: #f0f0f2;
  --text-2: #b8b8bc;
  --text-3: #92949e;
  --text-inv: #121318;

  --accent: #ff9d4a;
  --accent-text: #ff9d4a;
  --accent-soft: #3a2418;
  --status-error: #ffb4ab;
  --status-success: #86cea4;
  --accent-warm: #d4a574;
  --accent-cool: #7da3bf;
  --accent-pink: #d4a8b8;
  --accent-green: #a8c4a2;

  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 12px 40px rgba(0, 0, 0, 0.5);

  --scene-bg: 0x1a1b1e;
  --scene-grid-major: 0x3a3a48;
  --scene-grid-minor: 0x252530;

  /* human-atlas 风格创意展示（深色） */
  --creative-primary: var(--text-1);
  --creative-accent: var(--accent-text);
  --creative-muted: var(--text-2);
  --creative-glass-bg: rgba(28, 30, 36, 0.78);
  --creative-glass-border: rgba(255, 255, 255, 0.08);
  --creative-glass-shadow: 0 16px 48px rgba(0, 0, 0, 0.30);
  --creative-glass-blur: blur(20px);
}

/* 中英文字标随主题切换，保持静态纯色。 */
:root .brand-wordmark {
  display: inline-block;
  white-space: nowrap;
  color: #111;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}
:root[data-theme='dark'] .brand-wordmark { color: #fff; }

/* 页面展示内容不选中；输入框、可编辑内容保留正常编辑与复制。 */
body, body * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none;
}
body :is(input, textarea, select), body :read-write {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default;
}
img, video { -webkit-user-drag: none; }
/* Shared signed-in identity button for the homepage and workspace. */
.home-account.is-signed-in,.account-tools .account-entry.is-signed-in { display:inline-flex; align-items:center; justify-content:flex-start; gap:8px; min-height:36px; padding:4px 12px 4px 4px; border:1px solid var(--line-strong); border-radius:8px; color:var(--text-1); background:var(--bg-card); font-weight:600; transition:background .16s ease,border-color .16s ease; }
.home-account.is-signed-in:hover,.account-tools .account-entry.is-signed-in:hover { background:var(--bg-input-focus); border-color:var(--text-3); color:var(--text-1); }
.home-account.is-signed-in:active,.account-tools .account-entry.is-signed-in:active { background:var(--bg-hover); }
.account-button-avatar { display:grid; place-items:center; width:30px; height:30px; flex:none; overflow:hidden; border-radius:6px; background:var(--bg-btn); color:var(--text-1); font:600 14px/1 var(--ui-font-family); }
.account-button-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.account-button-avatar [hidden] { display:none; }
.account-button-chevron { width:16px; height:16px; flex:none; fill:none; stroke:var(--text-2); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.account-button-avatar[hidden],.account-button-chevron[hidden] { display:none; }
.account-entry-label { max-width:144px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-entry-copy { display:flex; flex-direction:column; align-items:flex-start; min-width:0; max-width:160px; text-align:left; line-height:1.3; }
.account-entry-subscription { display:block; max-width:100%; margin-top:2px; font-size:11px; font-weight:500; line-height:1.3; color:var(--text-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-entry-subscription.active { color:var(--status-success); }
.account-entry-subscription.attention { color:var(--accent-text); }
.account-entry-subscription[hidden] { display:none; }
@media(prefers-reduced-motion:reduce) { .home-account.is-signed-in,.account-tools .account-entry.is-signed-in { transition:none; } }
