/* ===== 设计令牌：Anthropic 暖纸风（复用自 GPT-image2）===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

a, button, input, textarea, select, [role="button"], [tabindex] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, [contenteditable] {
  -webkit-user-select: text; user-select: text;
}

:root {
  /* 暖纸色系 - 浅色（默认） */
  --paper: #f5f1ea;
  --paper-2: #efe9df;
  --card: #fbf9f5;
  --card-2: #f3eee5;
  --ink: #1f1d1a;
  --ink-2: #56524b;
  --ink-3: #8a8479;
  --ink-4: #b3ad9f;
  --line: #e2dccf;
  --line-2: #d3ccbc;
  /* 赤陶橙（Claude 标志色） */
  --clay: #cc6b49;
  --clay-deep: #b8542f;
  --clay-soft: rgba(204, 107, 73, 0.1);
  --clay-line: rgba(204, 107, 73, 0.28);
  --clay-ink: #fdfbf7;
  --ok: #5c8a5c;
  --warn: #b5852f;
  --err: #c0573d;
  --shadow-sm: 0 1px 2px rgba(60, 50, 38, 0.04), 0 2px 8px rgba(60, 50, 38, 0.05);
  --shadow: 0 4px 12px rgba(60, 50, 38, 0.06), 0 12px 32px -8px rgba(60, 50, 38, 0.1);
  --shadow-lg: 0 8px 24px rgba(60, 50, 38, 0.08), 0 24px 60px -12px rgba(60, 50, 38, 0.16);
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 11px;
  --r-xs: 8px;
  /* Apple 式缓动 */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 三栏布局宽度 */
  --sidebar-w: 260px;
  --params-w: 320px;
}

[data-theme="dark"] {
  --paper: #1a1815;
  --paper-2: #211e1a;
  --card: #232019;
  --card-2: #2b2720;
  --ink: #f1ece2;
  --ink-2: #b8b1a3;
  --ink-3: #847d70;
  --ink-4: #5e584d;
  --line: #322e26;
  --line-2: #423d33;
  --clay: #e08a63;
  --clay-deep: #cc6b49;
  --clay-soft: rgba(224, 138, 99, 0.13);
  --clay-line: rgba(224, 138, 99, 0.3);
  --clay-ink: #1a1512;
  --ok: #7aa87a;
  --warn: #d4a64f;
  --err: #d97a5e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.22);
  --shadow: 0 4px 12px rgba(0,0,0,0.25), 0 12px 32px -8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.3), 0 24px 60px -12px rgba(0,0,0,0.5);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  line-height: 1.6;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .6s var(--ease-soft), color .4s var(--ease-soft);
}

/* 衬线大标题 */
.serif { font-family: 'Fraunces', 'Noto Sans SC', Georgia, serif; font-weight: 500; letter-spacing: -0.02em; }

::selection { background: var(--clay-soft); color: var(--clay-deep); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 无障碍 ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
