/* 厦门XMX H5 — 公共样式 */
:root {
  --brand: #ff7a00;
  --brand-2: #ff5a1f;
  --brand-grad: linear-gradient(135deg, #ffa21f, #ff5a1f);
  --brand-soft: #fff1df;
  --red: #ff3b30;
  --green: #22b573;
  --blue: #3a8bff;
  --cyan: #29c7c9;
  --yellow: #ffd54a;
  --text: #1f2a55;
  --text-2: #6f7891;
  --text-3: #9aa1b3;
  --bg: #fff7ec;
  --bg-2: #fffaf3;
  --card: #ffffff;
  --line: #f1e4d3;
  --radius-s: 0.06rem;
  --radius-m: 0.09rem;
  --radius-l: 0.12rem;
  --radius-xl: 0.16rem;
  --shadow: 0 0.04rem 0.12rem rgba(180, 110, 40, .08);
  --shadow-strong: 0 0.07rem 0.2rem rgba(180, 90, 20, .18);
  --nav-h: calc(0.43rem + env(safe-area-inset-top));
  --tab-h: calc(0.52rem + env(safe-area-inset-bottom));
  --z-nav: 100;
  --z-tab: 110;
  --z-modal: 300;
  --z-toast: 400;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 根字号：以 440 逻辑宽为基准（1rem ≈ 100px），字号与间距整体收紧，和设计稿密度一致 */
html { font-size: calc(min(100vw, 750px) / 4.4); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.14rem;
  line-height: 1.5;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; border: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea { outline: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app-shell {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #fff3e4 0%, #fffaf3 38%, #fff7ec 100%);
}
@supports not (height: 100dvh) {
  .app-shell { height: var(--app-vh, 100vh); min-height: var(--app-vh, 100vh); }
}
.app-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: 0.12rem;
}
.app-main.with-tab { padding-bottom: calc(var(--tab-h) + 0.12rem); }
.app-main.with-bottom { padding-bottom: calc(0.7rem + env(safe-area-inset-bottom)); }
.page-pad { padding: 0.12rem 0.14rem; }
.page-pad-b { padding-bottom: 0.2rem; }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* 导航栏 */
.app-navbar {
  flex: 0 0 auto;
  height: var(--nav-h);
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  gap: 0.06rem;
  padding-left: 0.09rem;
  padding-right: 0.09rem;
  position: relative;
  z-index: var(--z-nav);
  background: linear-gradient(180deg, #ffe9cc 0%, #fff3e4 100%);
}
.app-navbar.is-fixed { position: sticky; top: 0; }
.app-navbar .nav-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 60%;
  font-size: 0.16rem;
  font-weight: 700;
  color: #1f2a55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-btn {
  width: 0.36rem;
  height: 0.36rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -0.06rem;
  border-radius: 50%;
}
.nav-btn:active { background: rgba(255,255,255,.5); }
.nav-btn svg { width: 0.2rem; height: 0.2rem; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.05rem; font-size: 0.12rem; color: var(--text-2); }
.nav-tabs { display: flex; align-items: center; gap: 0.15rem; height: 100%; padding-top: env(safe-area-inset-top); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab { flex: 0 0 auto; font-size: 0.15rem; color: #48506b; position: relative; padding: 0.04rem 0; font-weight: 500; white-space: nowrap; }
.nav-tab.active { color: var(--brand); font-weight: 700; }
.nav-tab.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 0.22rem; height: 0.028rem;
  transform: translateX(-50%); border-radius: 4.995rem; background: var(--brand-grad);
}

/* 底部导航 */
.app-tabbar {
  flex: 0 0 auto;
  position: relative;
  z-index: var(--z-tab);
  height: var(--tab-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  flex-wrap: nowrap;
  background: rgba(255,255,255,.97);
  border-top: 1px solid #f4e1cc;
  box-shadow: 0 -0.03rem 0.1rem rgba(180, 110, 40, .06);
}
.tabbar-item {
  flex: 0 0 20%;
  width: 20%;
  max-width: 20%;
  min-width: 0;
  height: 0.52rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.025rem;
  color: #7d8499;
  font-size: 0.125rem;
  line-height: 1.2;
  white-space: nowrap;
}
.tabbar-item.active { color: var(--brand); font-weight: 600; }
.tabbar-item svg { width: 0.24rem; height: 0.24rem; flex: 0 0 auto; }
.tabbar-center { position: relative; }
.tabbar-center .center-bubble {
  width: 0.56rem; height: 0.56rem; border-radius: 50%;
  background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 0.115rem; line-height: 1.15; font-weight: 700;
  box-shadow: 0 0.04rem 0.1rem rgba(255,100,20,.35);
  margin-top: -0.2rem;
  border: 0.025rem solid #fff6ea;
}
.tabbar-center .center-label { margin-top: 0.02rem; white-space: nowrap; font-size: 0.115rem; }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.04rem;
  height: 0.44rem; padding: 0 0.17rem; border-radius: 4.995rem;
  font-size: 0.15rem; font-weight: 600; color: #fff; white-space: nowrap;
  background: var(--brand-grad); box-shadow: 0 0.04rem 0.09rem rgba(255,100,20,.2);
}
.btn:active { transform: translateY(1px); opacity: .92; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-ghost { background: #fff; color: var(--brand); border: 0.01rem solid #ffcf9f; box-shadow: none; }
.btn-gray { background: #f2f2f2; color: #777; box-shadow: none; }
.btn-red { background: linear-gradient(135deg, #ff7a5c, #ff3b30); }
.btn-sm { height: 0.31rem; padding: 0 0.12rem; font-size: 0.12rem; white-space: nowrap; }
.btn-block { width: 100%; }
.btn-link { color: var(--brand); font-size: 0.13rem; }
.icon-btn { width: 0.32rem; height: 0.32rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; }

/* 卡片/布局 */
.card {
  background: var(--card);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: 0.14rem;
}
.card + .card { margin-top: 0.1rem; }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; justify-content: center; }
.col { display: flex; flex-direction: column; }
.gap-8 { gap: 0.04rem; } .gap-12 { gap: 0.06rem; } .gap-16 { gap: 0.08rem; } .gap-20 { gap: 0.1rem; }
.mt-8 { margin-top: 0.04rem; } .mt-12 { margin-top: 0.06rem; } .mt-16 { margin-top: 0.08rem; } .mt-20 { margin-top: 0.1rem; } .mt-28 { margin-top: 0.14rem; }
.mb-8 { margin-bottom: 0.04rem; } .mb-12 { margin-bottom: 0.06rem; } .mb-16 { margin-bottom: 0.08rem; } .mb-20 { margin-bottom: 0.1rem; }
.w-full { width: 100%; }
.ellipsis-1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ellipsis-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.muted { color: var(--text-2); }
.small { font-size: 0.115rem; }
.tiny { font-size: 0.11rem; }
.price { color: var(--red); font-weight: 700; font-size: 0.16rem; line-height: 1.1; white-space: nowrap; }
.price small { font-size: 0.1rem; font-weight: 500; }
.badge { display: inline-flex; align-items: center; padding: 0.01rem 0.06rem; border-radius: 4.995rem; font-size: 0.1rem; background: var(--brand-soft); color: var(--brand); }
.badge-green { background: #e9f9f1; color: var(--green); }
.badge-gray { background: #f2f2f2; color: #888; }
.badge-red { background: #ffecea; color: var(--red); }
.divider { height: 1px; background: var(--line); margin: 0.1rem 0; }

/* 顶部 tab / 横向滚动 */
.scroll-x { display: flex; gap: 0.08rem; overflow-x: auto; overflow-y: hidden; padding: 0.02rem 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { flex: 0 0 auto; }
.chips { display: flex; gap: 0.07rem; overflow-x: auto; padding: 0.08rem 0.14rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; height: 0.32rem; padding: 0 0.15rem; border-radius: 4.995rem;
  background: #fff; color: #5b647d; font-size: 0.13rem; display: inline-flex; align-items: center;
  border: 1px solid #f0e2d0; white-space: nowrap;
}
.chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 600; }
.segmented { display: inline-flex; flex: 0 0 auto; background: #fff4e8; border-radius: 4.995rem; padding: 0.025rem; }
.segmented button { flex: 0 0 auto; height: 0.3rem; padding: 0 0.12rem; border-radius: 4.995rem; font-size: 0.125rem; color: #7b6a5a; white-space: nowrap; }
.segmented button.active { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 0.01rem 0.04rem rgba(180,90,20,.08); }

/* 商品卡 */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.09rem; padding: 0 0.1rem; }
.product-card { background: #fff; border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow); }
.product-card .cover { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #f5eadb; }
.product-card .info { padding: 0.09rem 0.09rem 0.1rem; }
.product-card .title { font-size: 0.135rem; line-height: 1.35; font-weight: 700; min-height: 0.36rem; }
.product-card .desc { margin-top: 0.04rem; color: var(--text-2); font-size: 0.11rem; line-height: 1.4; min-height: 0.3rem; }
.product-card .bottom { margin-top: 0.06rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.03rem; }
.product-card .sales { color: var(--text-3); font-size: 0.105rem; white-space: nowrap; }

/* 导师卡 */
.mentor-card { display: flex; gap: 0.1rem; background: #fff; border-radius: var(--radius-m); padding: 0.1rem; box-shadow: var(--shadow); position: relative; }
.mentor-card + .mentor-card { margin-top: 0.08rem; }
.mentor-card .avatar { width: 0.9rem; height: 0.9rem; border-radius: 0.08rem; object-fit: cover; flex: 0 0 auto; background: #f5eadb; }
.mentor-card .body { flex: 1; min-width: 0; }
.mentor-card .name { font-size: 0.155rem; font-weight: 700; }
.mentor-card .tags { display: flex; flex-wrap: wrap; gap: 0.04rem; margin-top: 0.04rem; }
.mentor-card .intro { color: var(--text-2); font-size: 0.11rem; margin-top: 0.04rem; min-height: 0.3rem; }
.mentor-card .price { font-size: 0.15rem; }
.mentor-card .online { color: var(--green); font-size: 0.105rem; }
.mentor-card .offline { color: var(--text-3); font-size: 0.105rem; }

/* 表单 */
.form-group { margin-bottom: 0.12rem; }
.form-label { display: flex; align-items: center; gap: 0.03rem; font-size: 0.13rem; color: var(--text-2); margin-bottom: 0.06rem; }
.form-label .req { color: var(--red); }
.input, .textarea, .select {
  width: 100%; border: 1px solid #efdfca; background: #fffdf9;
  border-radius: 0.08rem; padding: 0.1rem 0.11rem; font-size: 0.14rem; color: var(--text);
}
.textarea { min-height: 0.9rem; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #b8bdc9; }
.input:focus, .textarea:focus, .select:focus { border-color: #ffb36b; box-shadow: 0 0 0 0.02rem rgba(255,150,60,.12); }
.input-row { display: flex; align-items: center; gap: 0.07rem; }
.input-row .input { flex: 1; }
.form-error { color: var(--red); font-size: 0.105rem; margin-top: 0.03rem; }
.switch { width: 0.37rem; height: 0.21rem; border-radius: 4.995rem; background: #e6e6e6; position: relative; transition: .2s; }
.switch::after { content: ""; position: absolute; width: 0.17rem; height: 0.17rem; border-radius: 50%; background: #fff; top: 0.02rem; left: 0.02rem; transition: .2s; box-shadow: 0 0.01rem 0.02rem rgba(0,0,0,.12); }
.switch.on { background: var(--green); }
.switch.on::after { left: 0.18rem; }

/* 列表/流水 */
.list { padding: 0 0.12rem; }
.list-item {
  display: flex; align-items: center; gap: 0.09rem; background: #fff;
  border-radius: var(--radius-m); padding: 0.11rem; box-shadow: var(--shadow);
}
.list-item + .list-item { margin-top: 0.07rem; }
.list-item .avatar { width: 0.42rem; height: 0.42rem; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-size: 0.135rem; font-weight: 600; }
.list-item .sub { font-size: 0.105rem; color: var(--text-2); margin-top: 0.02rem; }
.list-item .right { text-align: right; flex: 0 0 auto; }
.record { display: flex; justify-content: space-between; gap: 0.1rem; padding: 0.12rem 0; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: 0; }
.record .amount { font-size: 0.15rem; font-weight: 700; }
.record .amount.plus { color: var(--green); }
.record .amount.minus { color: var(--red); }
.stat-card { background: linear-gradient(135deg, #fff4e4, #fffdf9); border-radius: var(--radius-l); padding: 0.13rem; border: 1px solid #f6e5d0; }
.stat-num { font-size: 0.23rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat-label { color: var(--text-2); font-size: 0.115rem; }
.home-section { margin-top: 0.09rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0.04rem 0.14rem 0.06rem; }
.section-title { font-size: 0.155rem; font-weight: 700; }
.section-more { color: var(--text-2); font-size: 0.11rem; }

/* 空态/加载 */
.empty { padding: 0.4rem 0.15rem; text-align: center; color: var(--text-3); }
.empty img { width: 1.3rem; margin: 0 auto 0.09rem; opacity: .9; }
.empty .empty-text { font-size: 0.125rem; }
.empty .empty-sub { font-size: 0.105rem; margin-top: 0.03rem; color: #bbb; }
.skeleton { background: linear-gradient(90deg, #f8eee2 25%, #fff8ef 37%, #f8eee2 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; border-radius: 0.06rem; }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.loading-more { text-align: center; color: var(--text-3); font-size: 0.11rem; padding: 0.12rem; }
.spinner { width: 0.17rem; height: 0.17rem; border: 0.015rem solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 底部操作栏 */
.bottom-bar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 750px; z-index: 200;
  background: rgba(255,255,255,.98); border-top: 1px solid #f2e2d0;
  padding: 0.08rem 0.12rem calc(0.08rem + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 0.08rem;
  box-shadow: 0 -0.04rem 0.12rem rgba(180,110,40,.08);
}
.bottom-bar .total { flex: 1; min-width: 0; font-size: 0.12rem; color: var(--text-2); }
.bottom-bar .total strong { color: var(--red); font-size: 0.18rem; }
.bottom-bar .btn { flex: 0 0 auto; min-width: 0; padding-left: 0.1rem; padding-right: 0.1rem; }
.bottom-bar .btn-sm { padding-left: 0.08rem; padding-right: 0.08rem; }

/* 弹层 */
.overlay {
  position: fixed; inset: 0; background: rgba(20,20,30,.45); z-index: var(--z-modal);
  display: flex; align-items: flex-end; justify-content: center;
}
.overlay.center-overlay { align-items: center; }
.modal {
  width: 100%; max-width: 750px; background: #fff; border-radius: 0.15rem 0.15rem 0 0;
  padding: 0.15rem 0.14rem calc(0.12rem + env(safe-area-inset-bottom));
  animation: slideUp .22s ease-out;
}
.modal.round { border-radius: 0.15rem; width: 86%; padding: 0.15rem; animation: pop .18s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-handle { width: 0.4rem; height: 0.04rem; border-radius: 4.995rem; background: #eee; margin: -0.05rem auto 0.09rem; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.1rem; }
.modal-title { font-size: 0.16rem; font-weight: 700; }
.modal-close { width: 0.28rem; height: 0.28rem; display: flex; align-items: center; justify-content: center; color: #999; font-size: 0.21rem; }
.action-item { height: 0.5rem; display: flex; align-items: center; justify-content: center; font-size: 0.15rem; border-bottom: 1px solid var(--line); }
.action-item:last-child { border-bottom: 0; }
.action-item.danger { color: var(--red); }
.action-item.cancel { color: var(--text-2); margin-top: 0.06rem; border-top: 0.04rem solid #f7f2ec; }

/* 通用分页 */
.pager-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.06rem; padding: 0.1rem 0.12rem calc(0.1rem + env(safe-area-inset-bottom)); color: var(--text-2); font-size: 0.11rem; }
.pager-bar .pager-total { color: var(--text-3); }
.pager-bar .pager-size { height: 0.29rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 0.08rem; background: #fff; font-size: 0.11rem; color: var(--text); }
.pager-btn { height: 0.29rem; padding: 0 0.11rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 0.11rem; }
.pager-btn:disabled { color: #c5c8d2; background: #f7f7f9; }
.pager-num { min-width: 0.29rem; height: 0.29rem; padding: 0 0.05rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 0.11rem; }
.pager-num.active { background: var(--brand, #ff7a00); border-color: var(--brand, #ff7a00); color: #fff; }
.pager-count { color: var(--text-3); }

/* Toast */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: 18%; z-index: var(--z-toast); display: flex; flex-direction: column; align-items: center; gap: 0.05rem; pointer-events: none; }
.toast {
  max-width: 80%; background: rgba(30,30,40,.86); color: #fff; font-size: 0.125rem;
  padding: 0.08rem 0.13rem; border-radius: 4.995rem; animation: toastIn .18s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(0.05rem); } to { opacity: 1; transform: translateY(0); } }

/* 悬浮客服（可拖动） */
.service-fab {
  position: fixed; right: 0.05rem; top: 58%; z-index: 150;
  width: 0.7rem; padding: 0.05rem 0.03rem; border-radius: 0.09rem;
  background: linear-gradient(135deg, #ff6a4d, #e62117); color: #fff; text-align: center;
  box-shadow: 0 0.04rem 0.1rem rgba(220,50,30,.3); font-size: 0.1rem; line-height: 1.25;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  cursor: grab; transition: left .2s ease, top .2s ease;
}
.service-fab.dragging { transition: none; cursor: grabbing; opacity: .94; }
.service-fab strong { display: block; font-size: 0.105rem; white-space: nowrap; }
.service-fab span { display: block; background: #fff; color: #e62117; border-radius: 4.995rem; margin-top: 0.02rem; padding: 0.012rem 0.02rem; font-size: 0.1rem; white-space: nowrap; }

/* 聊天 */
.chat-list { padding: 0.1rem 0.12rem calc(0.75rem + env(safe-area-inset-bottom)); }
.chat-time { text-align: center; color: var(--text-3); font-size: 0.105rem; margin: 0.09rem 0; }
.chat-row { display: flex; gap: 0.06rem; margin-bottom: 0.09rem; align-items: flex-start; }
.chat-row.mine { flex-direction: row-reverse; }
.chat-avatar { width: 0.38rem; height: 0.38rem; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.chat-content { display: flex; flex-direction: column; align-items: flex-start; flex: 0 1 auto; min-width: 0; max-width: 72%; }
.chat-row.mine .chat-content { align-items: flex-end; }
.chat-bubble { width: fit-content; max-width: 100%; padding: 0.09rem 0.11rem; border-radius: 0.1rem; background: #fff; font-size: 0.135rem; line-height: 1.45; box-shadow: var(--shadow); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.chat-row.mine .chat-bubble { background: var(--brand-grad); color: #fff; }
.chat-time-inline { font-size: 0.1rem; color: var(--text-3); margin-top: 0.02rem; text-align: right; }
.chat-row:not(.mine) .chat-time-inline { text-align: left; }
.chat-input {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 750px; z-index: 200;
  display: flex; gap: 0.06rem; align-items: center;
  padding: 0.07rem 0.1rem calc(0.07rem + env(safe-area-inset-bottom));
  background: #f7f7f7; border-top: 1px solid #eee;
}
.chat-input .input { background: #fff; border-radius: 4.995rem; padding: 0.07rem 0.1rem; font-size: 0.13rem; }
.chat-input .send { width: 0.44rem; height: 0.32rem; border-radius: 4.995rem; background: #d8d8d8; color: #fff; font-size: 0.12rem; }
.chat-input .send.on { background: var(--brand-grad); }

/* 个人中心 */
.profile-hero { padding: 0.13rem 0.14rem 0.3rem; background: linear-gradient(180deg, #ffe5c2, #fff3e2); }
.profile-user { display: flex; align-items: center; gap: 0.12rem; }
.profile-user .avatar { width: 0.75rem; height: 0.75rem; border-radius: 50%; object-fit: cover; border: 0.025rem solid rgba(255,255,255,.7); }
.profile-user .name { font-size: 0.19rem; font-weight: 700; }
.profile-user .member { display: inline-flex; align-items: center; gap: 0.05rem; margin-top: 0.04rem; background: #fff; border-radius: 4.995rem; padding: 0.03rem 0.08rem; font-size: 0.11rem; color: var(--brand); }
.profile-user .copy { background: var(--brand-grad); color: #fff; border-radius: 4.995rem; padding: 0.02rem 0.07rem; font-size: 0.1rem; }
.asset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.08rem; margin: -0.17rem 0.12rem 0; }
.asset-card { background: #fff; border-radius: var(--radius-l); padding: 0.12rem; box-shadow: var(--shadow); }
.asset-card .label { color: var(--text-2); font-size: 0.12rem; }
.asset-card .num { font-size: 0.21rem; font-weight: 700; margin: 0.05rem 0 0.08rem; }
.asset-card .actions { display: flex; gap: 0.05rem; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.05rem; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; padding: 0.06rem 0; font-size: 0.115rem; color: #4b536d; }
.quick-item .ico { width: 0.37rem; height: 0.37rem; border-radius: 0.11rem; background: #fff7ef; display: flex; align-items: center; justify-content: center; font-size: 0.19rem; }
.quick-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.setting-row { display: flex; align-items: center; gap: 0.08rem; padding: 0.13rem 0.02rem; border-bottom: 1px solid var(--line); font-size: 0.14rem; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .arrow { margin-left: auto; color: #c4c8d2; font-size: 0.16rem; }
.setting-row .value { margin-left: auto; color: var(--text-2); font-size: 0.125rem; max-width: 55%; text-align: right; }
.setting-row .arrow + .value { margin-left: 0; }

/* 积分/商城 */
.points-hero { margin: 0.1rem 0.12rem; padding: 0.15rem; border-radius: var(--radius-l); background: linear-gradient(135deg, #fff0d5, #fffaf1); border: 1px solid #f8e3c3; position: relative; overflow: hidden; }
.points-hero .num { font-size: 0.29rem; color: var(--brand); font-weight: 800; line-height: 1.1; }
.points-hero .coin { position: absolute; right: 0.1rem; top: 0.1rem; width: 0.65rem; height: 0.65rem; object-fit: contain; }
.tabs { display: flex; gap: 0.15rem; padding: 0.09rem 0.14rem; border-bottom: 1px solid var(--line); background: #fffaf3; }
.tab { font-size: 0.14rem; color: var(--text-2); position: relative; padding: 0.04rem 0; }
.tab.active { color: var(--brand); font-weight: 700; }
.tab.active::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 0.21rem; height: 0.025rem; border-radius: 4.995rem; background: var(--brand-grad); }
.points-product { background: #fff; border-radius: var(--radius-m); overflow: hidden; box-shadow: var(--shadow); }
.points-product .cover { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.points-product .info { padding: 0.09rem; }
.points-product .points { color: var(--red); font-size: 0.17rem; font-weight: 700; }
.points-product .origin { color: var(--text-3); font-size: 0.1rem; }

/* 登录/协议 */
.login-page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 0.5rem 0.23rem 0.2rem; background: linear-gradient(180deg, #fff4e3, #fffaf3 60%); }
.login-logo { width: 1.1rem; height: 1.1rem; border-radius: 50%; object-fit: cover; box-shadow: 0 0.06rem 0.15rem rgba(180,90,20,.18); }
.login-title { margin-top: 0.15rem; font-size: 0.21rem; font-weight: 800; color: var(--brand); }
.login-sub { margin-top: 0.05rem; color: var(--text-2); font-size: 0.12rem; }
.login-actions { width: 100%; margin-top: auto; }
.agree-row { display: flex; align-items: flex-start; gap: 0.06rem; margin-top: 0.13rem; color: var(--text-2); font-size: 0.115rem; line-height: 1.5; }
.agree-box { width: 0.17rem; height: 0.17rem; border-radius: 50%; border: 0.01rem solid #cfd3dc; flex: 0 0 auto; margin-top: 0.01rem; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.11rem; }
.agree-box.on { background: var(--brand); border-color: var(--brand); }
.policy-page { padding: 0.1rem 0.16rem 0.3rem; background: #fffaf3; min-height: 100dvh; }
.policy-page h1 { font-size: 0.2rem; margin: 0.1rem 0 0.12rem; text-align: center; }
.policy-page h2 { font-size: 0.15rem; margin: 0.14rem 0 0.06rem; }
.policy-page h3 { font-size: 0.135rem; margin: 0.1rem 0 0.05rem; }
.policy-page p, .policy-page li { font-size: 0.125rem; line-height: 1.85; color: #3f465c; margin: 0.05rem 0; }
.policy-page ol, .policy-page ul { padding-left: 0.17rem; }

/* 海报/二维码 */
.poster-page { padding: 0.12rem; }
.poster-card { position: relative; border-radius: var(--radius-l); overflow: hidden; background: #fff; box-shadow: var(--shadow-strong); }
.poster-card .bg { width: 100%; display: block; }
.poster-qr { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); background: #fff; padding: 0.09rem; border-radius: 0.09rem; text-align: center; box-shadow: 0 0.03rem 0.1rem rgba(0,0,0,.15); }
.poster-qr canvas { width: 1.5rem; height: 1.5rem; display: block; }
.poster-qr .tip { font-size: 0.11rem; color: var(--text-2); margin-top: 0.04rem; }

/* 工具 */
.rating { color: #ffb400; letter-spacing: 0.01rem; font-size: 0.13rem; }
.status-pill { display: inline-flex; align-items: center; padding: 0.02rem 0.07rem; border-radius: 4.995rem; font-size: 0.1rem; }
.status-pending { background: #fff3e0; color: #ff8a00; }
.status-done { background: #e9f9f1; color: var(--green); }
.status-invalid { background: #f2f2f2; color: #999; }
.top-gap { height: 0.06rem; }
.bottom-space { height: 0.2rem; }
@media (min-width: 750px) {
  html { font-size: calc(750px / 4.4); }
  body { box-shadow: 0 0 0.2rem rgba(0,0,0,.06); }
}