* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html {
    font-size: calc(100vw / 7.5); /* 750px设计稿: 100vw = 750px, 1rem = 100px */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
    font-size: 0.28rem; /* 28px */
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: 7.5rem;
    margin: 0 auto;
    overflow-x: hidden;
}

/* 标题元素 */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: normal;
}

/* 段落 */
p {
    margin: 0;
    line-height: 1.6;
}

/* 链接 */
a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

a:active {
    opacity: 0.7;
}

/* 图片 */
img {
    display: block;
    max-width: 100%;
    height: auto;
    border: none;
}

/* 表单元素 */
input, select, textarea, button {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: auto;
    appearance: auto;
}

input::-webkit-input-placeholder {
    color: #999;
}

textarea {
    resize: none;
}

/* 列表 */
ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 清除浮动 */
.clear::after {
    content: "";
    display: block;
    clear: both;
}

/* 常用工具类 */
.fl {
    float: left;
}

.fr {
    float: right;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-1 {
    flex: 1;
}

/* 单行省略 */
.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 多行省略 */
.ellipsis2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

.visible {
    visibility: hidden;
}

/* 安全区域适配 */
.safe-area-top {
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 动画优化 */
* {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* 滚动优化 */
body {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}
