/* ============================================================
   元健康悦 · 手机端基线（m-reset）
   目标：手机上的排印与触控基线。不做「把电脑端压扁」那类自适应，
        只管手机站自身的盒模型、视口、安全区与触控习惯。
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;   /* 横屏不放大字号 */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

body {
  min-height: 100vh;
  overflow-x: hidden;               /* 双保险：任何宽度下都不出横向滚动条 */
  background: var(--page-bg);
  color: var(--page-fg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}

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

a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
em, i { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* 键盘焦点必须可见（触控不显示，键盘一定显示） */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 跳转到主要内容（无障碍） */
.m-skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: 12px 18px; background: var(--cream); color: var(--red-600);
  font-size: var(--fs-sm); font-weight: 600;
}
.m-skip:focus { left: 8px; top: 8px; }

/* 仅提供给读屏的文本 */
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 尊重系统「减弱动态效果」 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
