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

html {
  -webkit-text-size-adjust: 100%;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
  font-family: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--like);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 手机优先：桌面环境下把内容居中成一条竖屏栏 */
.app {
  position: relative;
  width: 100%;
  max-width: var(--app-w);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: calc(var(--bottombar-h) + 18px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 620px) {
  body {
    background: #e9e7ee;
  }
  .app {
    box-shadow: 0 0 0 1px rgba(23, 23, 31, 0.05), 0 24px 60px -30px rgba(23, 23, 31, 0.35);
  }
}

.pad {
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
