:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --content-max: 93.75rem;
  --sidebar-width: 13.875rem;
  --topbar-height: 4.875rem;
  --mobile-nav-height: 4.25rem;
  --touch-min: 2.75rem;
  --font-ui: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-display: Bahnschrift, "Segoe UI", var(--font-ui);
  --font-mono: "Cascadia Mono", Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-md: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-hero: clamp(2rem, 4vw, 3rem);
  --line-compact: 1.25;
  --line-normal: 1.6;
  --transition-fast: 140ms ease;
  --transition-normal: 180ms ease;
  --z-content: 0;
  --z-sticky: 5;
  --z-mobile-nav: 10;
  --z-popover: 30;
  --z-modal: 50;
  --z-toast: 60;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 20rem; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--font-ui); line-height: var(--line-normal); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
