* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: #e9e9ee; font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; }
html { -webkit-text-size-adjust: 100%; }
body { display: flex; justify-content: center; touch-action: manipulation; }

.phone {
  width: 100%; max-width: 480px; min-height: 100vh;
  background: #f7f7fa; position: relative;
  padding-bottom: 70px;
}

/* ---------- 顶部 ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: #fff;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #7b6cf0; }
.live-dot { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: #ff4d4f; border-radius: 50%; border: 2px solid #fff; }
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.title-text { font-size: 16px; font-weight: 700; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-sub { font-size: 11px; color: #999; }
.follow-btn {
  flex-shrink: 0; border: 1.5px solid #ff4d6a; color: #ff4d6a;
  background: #fff; font-size: 14px; font-weight: 600;
  padding: 4px 16px; border-radius: 6px; cursor: pointer;
}
.search-icon { width: 22px; height: 22px; flex-shrink: 0; cursor: pointer; }

/* ---------- 轮播 ---------- */
.banner { position: relative; margin: 10px 12px; border-radius: 14px; overflow: hidden; touch-action: pan-y; }
.banner-track { display: flex; transition: transform .4s ease; }
.banner-slide { flex: 0 0 100%; position: relative; }
.banner-slide img { width: 100%; height: 170px; object-fit: cover; display: block; }
.banner-slide .slogan {
  position: absolute; left: 18px; top: 22px; color: #fff; z-index: 2;
}
.slogan h2 { font-size: 22px; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.slogan p { font-size: 12px; opacity: .95; margin-top: 6px; }
.slogan .tags { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.slogan .tags span {
  font-size: 11px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5);
  padding: 2px 10px; border-radius: 20px; width: fit-content;
}
.banner-badge {
  position: absolute; right: 10px; top: 10px; z-index: 3;
  background: rgba(0,0,0,.4); color: #fff; font-size: 11px;
  padding: 2px 10px; border-radius: 20px;
}

/* ---------- 分类宫格 ---------- */
.cate-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; margin: 0 12px; border-radius: 14px;
  padding: 16px 6px 10px;
}
.cate-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 0; cursor: pointer; }
.cate-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: linear-gradient(135deg, #ece7ff, #d9f0ff);
  box-shadow: 0 3px 8px rgba(123,108,240,.15);
}
.cate-item:active { opacity: .6; }
.cate-name { font-size: 12px; color: #333; }

/* ---------- plus 条 ---------- */
.plus-bar {
  margin: 10px 12px; border-radius: 30px;
  background: linear-gradient(90deg, #3d2f8f, #6a4df4 60%, #8f6bff);
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 8px 8px 18px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(80,60,200,.3);
}
.plus-left { display: flex; align-items: center; gap: 8px; }
.plus-crown { font-size: 22px; }
.plus-text { display: flex; flex-direction: column; color: #ffe9a8; }
.plus-text b { font-size: 14px; }
.plus-text span { font-size: 11px; opacity: .9; }
.plus-go {
  background: linear-gradient(135deg, #ffe9a8, #ffc94d);
  color: #5b3b00; font-weight: 800; font-size: 15px;
  width: 52px; height: 34px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
}

/* ---------- 公告 ---------- */
.notice-bar {
  margin: 10px 12px; background: linear-gradient(90deg, #f4f1ff, #fff);
  border: 1px solid #e5defc; border-radius: 12px;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; cursor: pointer;
}
.notice-avatar { font-size: 20px; }
.notice-text { flex: 1; font-size: 13px; color: #7b6cf0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notice-arrow { color: #b7aef0; font-size: 18px; }

/* ---------- 服务区 ---------- */
.section { margin: 14px 12px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-title { font-size: 17px; font-weight: 700; color: #222; padding-left: 8px; border-left: 4px solid #7b6cf0; }
.section-more { font-size: 13px; color: #999; cursor: pointer; }
.svc-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.svc-cards::-webkit-scrollbar { display: none; }
.svc-card {
  flex: 0 0 130px; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06); cursor: pointer;
}
.svc-card:active { transform: scale(.97); }
.svc-img { width: 130px; height: 100px; object-fit: cover; display: block; background: linear-gradient(135deg,#cfc6ff,#b3e0ff); }
.emoji-cover { display: flex; align-items: center; justify-content: center; font-size: 40px; }
.svc-info { padding: 8px 10px 10px; }
.svc-name { font-size: 13px; font-weight: 600; color: #333; }
.svc-desc { font-size: 11px; color: #999; margin-top: 3px; height: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.svc-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.svc-price { color: #ff4d6a; font-weight: 700; font-size: 14px; }
.svc-price::before { content: "¥"; font-size: 11px; }
.svc-book {
  font-size: 11px; color: #fff; background: linear-gradient(90deg, #7b6cf0, #9f7bff);
  padding: 3px 10px; border-radius: 20px; border: none; cursor: pointer;
}
.svc-sales { font-size: 10px; color: #bbb; }

/* ---------- 保障 ---------- */
.guarantee { background: #fff; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.g-item { font-size: 13px; color: #555; display: flex; align-items: center; gap: 8px; }

.bottom-safe { height: 20px; }

/* ---------- 个人中心 ---------- */
.profile-panel { margin: 0 12px; }
.profile-card {
  background: linear-gradient(135deg, #7b6cf0, #9f7bff);
  border-radius: 16px; padding: 20px;
  display: flex; align-items: center; gap: 14px; color: #fff;
}
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.profile-info { display: flex; flex-direction: column; gap: 4px; }
.profile-info b { font-size: 17px; }
.profile-info span { font-size: 12px; opacity: .85; }
.profile-menu {
  margin-top: 12px; background: #fff; border-radius: 16px;
  padding: 4px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 2px; font-size: 14px; color: #333;
  border-bottom: 1px solid #f4f4f7; cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item span { margin-left: auto; color: #ccc; font-size: 18px; }
.menu-item:active { background: #f8f8fb; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 62px;
  background: #fff; border-top: 1px solid #f0f0f0;
  display: flex; align-items: flex-start; z-index: 60;
  padding-top: 6px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: #999; cursor: pointer;
}
.tab.active { color: #7b6cf0; font-weight: 600; }
.tab-icon { font-size: 20px; }
.tab-center { position: relative; }
.center-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #8f7bff, #6a4df4);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin-top: -26px;
  border: 4px solid #fff; box-shadow: 0 4px 12px rgba(106,77,244,.4);
}
.center-label { font-size: 11px; color: #7b6cf0; font-weight: 600; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 18px 18px 0 0; padding: 18px;
  transform: translateY(30px); transition: transform .25s;
  max-height: 85vh; max-height: 85dvh; overflow-y: auto;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0));
}
.modal-mask.show .modal { transform: translateY(0); }
.modal-title { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 14px; color: #222; }
.modal-body { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; align-items: center; gap: 10px; }
.form-row label { width: 64px; font-size: 13px; color: #666; flex-shrink: 0; }
.form-row input {
  flex: 1; border: 1px solid #e3e3e8; border-radius: 8px;
  padding: 10px 12px; font-size: 16px; outline: none; background: #fafafa;
}
.form-row input:focus { border-color: #7b6cf0; }
.modal-foot { display: flex; gap: 10px; margin-top: 16px; }
.btn-cancel {
  flex: 1; padding: 12px; border: none; border-radius: 24px;
  background: #f2f2f5; color: #666; font-size: 15px; cursor: pointer;
}
.btn-ok {
  flex: 2; padding: 12px; border: none; border-radius: 24px;
  background: linear-gradient(90deg, #7b6cf0, #9f7bff); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-ok.full { flex: 1; }
.btn-ok:active, .btn-cancel:active { opacity: .8; }

/* 底部弹层 */
.sheet {
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 18px 18px 0 0; max-height: 70vh; max-height: 70dvh;
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .25s;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.modal-mask.show .sheet { transform: translateY(0); }
.sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; font-size: 16px; font-weight: 700; color: #222;
  border-bottom: 1px solid #f2f2f5;
}
.sheet-close { color: #999; font-size: 18px; cursor: pointer; padding: 0 4px; }
.sheet-list { overflow-y: auto; padding: 8px 14px 20px; }
.sheet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid #f6f6f8; cursor: pointer;
}
.sheet-item:active { background: #f8f8fb; }
.sheet-emoji { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #ece7ff, #d9f0ff); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sheet-info { flex: 1; min-width: 0; }
.sheet-name { font-size: 14px; font-weight: 600; color: #333; }
.sheet-desc { font-size: 11px; color: #999; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sheet-price { color: #ff4d6a; font-weight: 700; font-size: 14px; flex-shrink: 0; }

/* 公告列表 */
.notice-list { max-height: 50vh; overflow-y: auto; }
.notice-item { padding: 10px 2px; border-bottom: 1px solid #f4f4f7; }
.notice-item h4 { font-size: 14px; color: #333; display: flex; align-items: center; gap: 6px; }
.notice-item p { font-size: 12px; color: #888; margin-top: 4px; line-height: 1.5; }
.notice-item time { font-size: 10px; color: #bbb; }

/* toast */
.toast {
  position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 14px;
  padding: 12px 24px; border-radius: 10px; z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; }
