/* 基础与移动端适配 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* 状态栏占位（适配刘海屏/安全区） */
.status-bar {
  height: env(safe-area-inset-top, 20px);
  background: #fff;
}

/* 导航栏 */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  background: #fff;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-close {
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.nav-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

.nav-more {
  font-size: 20px;
  letter-spacing: 2px;
}



.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.banner-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-icon {
  font-size: 22px;
}

.search-text {
  font-size: 18px;
  font-weight: 600;
  color: #c41e3a;
}

.banner-stamp {
  width: 56px;
  height: 56px;
  border: 2px solid #c41e3a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #c41e3a;
  font-weight: 600;
}

/* 服务入口网格 */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  align-items: start;
  gap: 1px;
  padding: 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  padding-bottom: max(20px, env(safe-area-inset-bottom));

}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  background: #fff;
  text-decoration: none;
  color: #333;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.service-item:active {
  background: #f8f8f8;
}

.service-icon {
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}



.service-name {
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  color: #333;
}

/* 大屏适配：限制最大宽度并居中 */
@media (min-width: 481px) {
  body {
    background: #e0e0e0;
  }

  .page {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  }
}

/* 小屏字体微调 */
@media (max-width: 360px) {
  .service-name {
    font-size: 12px;
  }

  .service-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}
