/* ============================================================
 * base.css — reset + 排版 + 通用工具类
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Helvetica Neue", "Microsoft YaHei", Roboto, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6, p, figure, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; border: 0; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit; color: inherit;
  border: 0; background: none; outline: none;
}
button { cursor: pointer; }

/* 隐藏滚动条但保留滚动 */
::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- 工具类 ---------- */
.u-hide { display: none !important; }
.u-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.u-flex { display: flex; }
.u-center { display: flex; align-items: center; justify-content: center; }
.u-between { display: flex; align-items: center; justify-content: space-between; }

/* 页面容器：底部统一留出导航高度 */
.page {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
}
