/* =====================================================================
   base.css — 重置 + 基础排版
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }


button { font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

input, textarea, select { font-family: inherit; }

input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--accent-soft); }

/* —— 页面进入：轻微淡入上移，让切页不生硬 —— */
@keyframes page-in {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: none; }
}
.app-content { animation: page-in .18s ease-out both; }

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