/* ==========================================================================
   基础重置与排版
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-ink);
    background: var(--color-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

svg {
    display: inline-block;
    vertical-align: middle;
}

/* 安全区适配 */
body {
    padding-bottom: calc(56px + var(--safe-area-bottom));
}

.has-action-bar body {
    padding-bottom: calc(56px + 60px + var(--safe-area-bottom));
}

/* 选中文字颜色 */
::selection {
    background: var(--color-primary);
    color: white;
}
