/* 造物 ZaoWu · 品牌内核 design tokens（原型 v0.1） */
@font-face { font-family: "Inter"; src: local("Inter"), url("fonts/Inter.woff") format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: local("Geist Mono"), url("fonts/GeistMono.woff") format("woff"); font-weight: 100 900; font-display: swap; }
:root {
  /* 字体：Inter 负责拉丁与数字，思源黑体（Noto Sans CJK SC）负责中文 */
  --zw-font: "Inter", "Noto Sans CJK SC", "Source Han Sans SC", "思源黑体", "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --zw-font-serif: "Noto Serif CJK SC", "Source Han Serif SC", "思源宋体", "Songti SC", serif;
  --zw-font-mono: "Geist Mono", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  /* 字号阶梯 */
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-28: 28px; --fs-40: 40px;
  /* 间距：4px 网格 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  /* 圆角：4 级 + 胶囊 */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  /* 动效：苹果式弹性曲线 */
  --ease-spring: cubic-bezier(.32, .72, 0, 1); --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur-fast: 160ms; --dur-base: 280ms; --dur-panel: 560ms;
  /* 浅色（默认） */
  --bg: #F6F6F4; --surface: #FFFFFF; --surface-2: #F0F0EE; --surface-3: #E8E8E5;
  --line: rgba(24, 24, 27, .08); --line-strong: rgba(24, 24, 27, .14);
  --text: #18181B; --text-2: #52525B; --text-3: #8A8A93; --text-on-ink: #FFFFFF;
  --ink: #18181B; --ink-hover: #2A2A2F;
  --accent: #2C6E69; --accent-soft: rgba(44, 110, 105, .10); --accent-ring: rgba(44, 110, 105, .28);
  --warm: #D9774F; /* 公益人文的极微弱细节色：只用于标志圆点、致谢、少量强调 */
  --ok: #2F8F62; --warn: #B7801C; --err: #C2503F;
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, .05);
  --shadow-md: 0 1px 2px rgba(16, 16, 20, .04), 0 8px 24px rgba(16, 16, 20, .06);
  --shadow-lg: 0 2px 6px rgba(16, 16, 20, .05), 0 24px 64px rgba(16, 16, 20, .12);
  /* 画布节点类别色（低饱和） */
  --k-input: #6B7280; --k-data: #4F74A8; --k-llm: #7462B0; --k-image: #B07D45; --k-tts: #93649F; --k-compose: #3F8C62; --k-review: #B8574A;
}
[data-theme="dark"] {
  --bg: #0E0F11; --surface: #16171A; --surface-2: #1D1E22; --surface-3: #26272C;
  --line: rgba(255, 255, 255, .07); --line-strong: rgba(255, 255, 255, .13);
  --text: #EDEDEF; --text-2: #A6A6AE; --text-3: #6E6E78; --text-on-ink: #0E0F11;
  --ink: #EDEDEF; --ink-hover: #FFFFFF;
  --accent: #5FB3AA; --accent-soft: rgba(95, 179, 170, .12); --accent-ring: rgba(95, 179, 170, .3);
  --warm: #E58C66;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 8px 24px rgba(0, 0, 0, .45); --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--zw-font); font-size: var(--fs-14); line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
.i { flex: none; display: inline-block; vertical-align: middle; }
.mono { font-family: var(--zw-font-mono); }
.kbd { font-family: var(--zw-font-mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--surface); }
.sample-tag { font-size: 11px; color: var(--text-3); letter-spacing: .02em; }
/* 原型导航（不属于产品界面） */
.proto-nav { position: fixed; left: 12px; bottom: 12px; z-index: 999; display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(20,20,24,.82); backdrop-filter: blur(12px); font-size: 11px; }
.proto-nav a { color: #ddd; text-decoration: none; padding: 3px 8px; border-radius: 6px; }
.proto-nav a:hover, .proto-nav a.on { background: rgba(255,255,255,.14); color: #fff; }
.proto-nav b { color: #bbb; font-weight: 500; padding: 3px 6px; cursor: default; }
.proto-nav a { display: none; } .proto-nav:hover a { display: inline-block; }
body.clean .proto-nav { display: none; }
/* 画布滑出：苹果式缩放 + 弹性 */
.slot { flex: 0 0 0%; min-width: 0; overflow: hidden; transition: flex-basis var(--dur-panel) var(--ease-spring); position: relative; }
.slot > .panel { position: absolute; top: 0; bottom: 0; width: var(--panel-px, 44vw); opacity: 0; transition: transform var(--dur-panel) var(--ease-spring), opacity 320ms var(--ease-out); }
.slot-l > .panel { left: 0; transform: translateX(-28px) scale(.92); transform-origin: left center; }
.slot-r > .panel { right: 0; transform: translateX(28px) scale(.92); transform-origin: right center; }
body.L-open .slot-l, body.R-open .slot-r { flex-basis: var(--panel-basis, 44%); }
body.L-open .slot-l > .panel, body.R-open .slot-r > .panel { transform: none; opacity: 1; }
body.tri .slot-l, body.tri .slot-r { flex-basis: 31%; }
@media (max-width: 1500px) { body.tri .slot-l, body.tri .slot-r { flex-basis: 28%; } }
body.tri .slot > .panel { transform: none; opacity: 1; width: 100%; }
@media (prefers-reduced-motion: reduce) { .slot, .slot > .panel { transition: none; } }
body.both-open { --panel-basis: 31%; }
@keyframes zw-spin { to { transform: rotate(360deg); } }
.spin { animation: zw-spin 1s linear infinite; }
@keyframes zw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fx-in { animation: zw-in 360ms var(--ease-out) both; }
.fit { position: absolute; inset: 0; overflow: hidden; }
.fit-inner { position: absolute; transform-origin: 0 0; }
.scene { display: block; width: 100%; height: 100%; }
