/* === 手撕机 — 基础样式 === */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-primary);
  background-color: var(--paper-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 安全区 */
body {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

/* 锁定竖屏 */
html {
  width: 100vw;
  height: 100vh;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

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

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

/* 图片 */
img {
  display: block;
  max-width: 100%;
}

/* 选择禁用（撕纸交互需要） */
.no-select {
  user-select: none;
  -webkit-user-select: none;
}

/* 滚动条隐藏 */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* 通用过渡 */
.transition-default {
  transition: all var(--dur-fast) var(--ease-smooth);
}

/* 页面容器 */
#app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--bottomnav-height) + var(--safe-bottom));
}

/* 页面内容区 */
.page {
  padding: var(--space-12) var(--space-6) var(--space-8);
}

/* 底部导航占位 */
.page-with-nav {
  padding-bottom: calc(var(--bottomnav-height) + var(--safe-bottom) + var(--space-8));
}
