/* 02-base.css · reset / 全局基础 / 通用工具类 */

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

html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, figure,
ul, ol, li, dl, dt, dd, form, fieldset, legend, button, input, textarea,
section, header, footer, main, article, aside, canvas, svg { margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: var(--lh-base);
  color: var(--c-ink-700);
  background: var(--c-cream-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

/* 触控与选择 */
* { -webkit-tap-highlight-color: transparent; }
button, .btn, .card--tappable, .grid-item, [role="button"] { touch-action: manipulation; }
.interactive { user-select: none; -webkit-user-select: none; touch-action: manipulation; }

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

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px;               /* iOS 聚焦不放大：输入框字号不小于 16px */
  color: var(--c-ink-900);
}

a { color: var(--c-rose-600); text-decoration: none; }

/* 滚动条（移动端几乎不可见，桌面调试好看） */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--c-rose-200); border-radius: var(--radius-pill); }
::-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;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 多行截断（副标题等） */
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.center { margin-left: auto; margin-right: auto; }

/* 减弱动效统一降级 */
[data-reduce-motion="1"] * {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: var(--dur-fast) !important;
}
