/* ============================================
   RESET — Nicolo-Pro
   现代 CSS 重置 · 无障碍 · 中文优化
   ============================================ */

/* ── 盒模型统一 ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── 全局平滑渲染 ── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

/* ── 减少动画偏好 ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 媒体元素 ── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── 表单元素 ── */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── 列表 ── */
ul,
ol {
  list-style: none;
}

/* ── 表格 ── */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ── 无障碍：屏幕阅读器专用 ── */
.sr-only,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── 焦点可见 ── */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ── 基础 Body ── */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ── 选中色 ── */
::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}
