/* ============================================================
   reset.css - 最小化 CSS Reset
   
   用途: 统一浏览器默认样式，必须在 tokens.css 之后加载
   依赖: core/tokens.css
   ============================================================ */

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

/* 防止移动端横向溢出 */
html {
  overflow-x: hidden;
  scrollbar-gutter: stable; /* R14: CLS fix - 防止弹窗打开时滚动条变化导致布局偏移 */
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* 默认字体 */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 标题重置 */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

/* 段落重置 */
p {
  margin: 0;
}

/* 列表重置 */
ul, ol {
  margin: 0;
  padding: 0;
}

/* 链接重置 */
a {
  color: inherit;
  text-decoration: none;
}

/* 图片重置 */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 防止内容溢出容器 */
img, video, iframe, embed, object {
  max-width: 100%;
}

/* 长文本自动换行 */
p, h1, h2, h3, h4, h5, h6, li, td, th, a {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* 表格防溢出 */
table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* pre/code 防溢出 */
pre, code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 表单元素继承字体 */
input, button, textarea, select {
  font: inherit;
}

/* 按钮重置 */
button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* 移除文本输入框默认外观 */
input, textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

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

/* 屏幕阅读器专用 */
.pg-sr-only,
.pb-sr-only,
.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;
}
