/* ========================================
   荔斛有品商城 - H5端样式
   品牌色：自然绿 + 大地色系
======================================== */

:root {
  --primary: #2d7a4f;
  --primary-light: #4fa877;
  --primary-dark: #1a5c38;
  --primary-bg: #f0f7f2;
  --accent: #d4a553;
  --accent-light: #e8c885;
  --danger: #e74c3c;
  --warning: #e67e22;
  --text-main: #1a1a1a;
  --text-secondary: #666;
  --text-light: #999;
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --border: #ececec;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --nav-height: 50px;          /* PC / 桌面端 */
  --nav-height-mobile: 60px;   /* 移动端(微信内置浏览器)更宽,图标文字才不被压扁 */
  --header-height: 48px;
  --safe-bottom: 0px;          /* iOS 底部安全区兜底，由 JS 动态写入 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* 全局样式重置，完全匹配小程序的样式体系 */
* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-tap-highlight-color: transparent;
  /* 禁用所有字体调整，彻底统一字体渲染 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
  font-size-adjust: 100% !important;
  -webkit-font-size-adjust: 100% !important;
}

/* 全局根字体设置，完全匹配小程序的rpx换算基准 */
html {
  /* 小程序基础字体：26rpx ≈ 13px，统一全局字体基准 */
  font-size: 13px !important;
  /* 适配不同屏幕宽度，保持字体比例一致 */
  font-size: clamp(12px, 3.47vw, 15px) !important;
}

/* 针对微信内置浏览器的专属适配 */
@media screen and (min-width: 320px) and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 0) {
  html {
    font-size: 13px !important;
  }
}

/* 针对原生浏览器的适配 */
@media screen and (min-width: 320px) and (max-width: 480px) {
  html {
    font-size: 13px !important;
  }
}

body {
  font-size: 1rem !important;
  line-height: 1.5 !important;
  color: #1a1a1a !important;
  background: #f5f6f8 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  margin: 0 !important;
  padding: 0 !important;
  /* 彻底禁用页面回弹和滚动动画 */
  overscroll-behavior: none !important;
}

/* 全局文本样式，匹配小程序默认样式 */
p, div, span, button, input, select, textarea, li, td, th, small, strong, em, b, i, u, s, strike, sub, sup, mark, del, ins, cite, q, dfn, abbr, acronym, address, bdo, kbd, samp, var, code, pre, samp {
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

/* 标题类样式，匹配小程序的大标题 */
h1, h2, h3, h4, h5, h6 {
  font-size: 1.38rem !important; /* ≈18px，对应小程序36rpx */
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

/* 商品名称，匹配小程序的商品名称字体 */
.product-card .product-name {
  font-size: 1rem !important; /* ≈13px，对应小程序26rpx */
  font-weight: 600 !important;
}

/* 商品描述，匹配小程序的描述字体 */
.product-card .product-desc {
  font-size: 0.85rem !important; /* ≈11px，对应小程序22rpx */
  color: #999 !important;
}

/* 价格数值，匹配小程序的价格字体 */
.product-card .price-value, .detail-price .price-value {
  font-size: 1.38rem !important; /* ≈18px，对应小程序36rpx */
  font-weight: 700 !important;
  color: #e74c3c !important;
}

/* 价格标签，匹配小程序的徽章字体 */
.product-card .product-tag, .detail-banner .detail-tag {
  font-size: 0.68rem !important; /* ≈9px，对应小程序18rpx */
  font-weight: 600 !important;
  color: #fff !important;
  background: #ff9800 !important;
  padding: 1px 5px !important;
  border-radius: 2px !important;
  white-space: nowrap !important;
  min-width: 56px !important;
  height: 18px !important;
  line-height: 16px !important;
  text-align: center !important;
}

/* 底部导航文字，匹配小程序的tabBar字体 */
.bottom-nav .nav-label {
  font-size: 1rem !important; /* ≈13px，对应小程序26rpx */
}

/* 购物车底部栏文字，匹配小程序的购物车页面字体 */
.cart-bottom-bar .total-label {
  font-size: 0.92rem !important; /* ≈12px，对应小程序24rpx */
}

.cart-bottom-bar .total-price {
  font-size: 1.38rem !important; /* ≈18px，对应小程序36rpx */
  font-weight: 700 !important;
  color: #e74c3c !important;
}

/* 彻底修复滑动黑底问题 */
html, body, #app, .page-view {
  background-color: #f5f6f8 !important;
  background: #f5f6f8 !important;
}


a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
input, button, textarea { font-family: inherit; border: none; outline: none; }

/* App container */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  padding-bottom: calc(var(--nav-height-mobile) + var(--safe-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Header ===== */
.app-header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

.app-header.transparent {
  /* 已废弃：顶栏整体隐藏（display:none） */
}

/* ===== Top Bar (首页顶部 logo + 搜索 + 购物车) ===== */
.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  z-index: 1000;
}

.top-logo {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: pointer;
}

.top-logo-mark, .top-logo-img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}
.top-logo-mark {
  background: linear-gradient(135deg, #1a5c38, #2d7a4f);
  color: #fff;
  font-size: 17px !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-logo-text {
  font-size: 15px !important;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.top-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  background: var(--bg-page);
  border-radius: 17px;
  padding: 0 6px 0 12px;
  cursor: text;
}

.top-search-icon {
  font-size: 13px !important;
  flex-shrink: 0;
}

.top-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 13px !important;
  outline: none;
  color: var(--text);
}

.top-search-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  font-size: 12px !important;
  cursor: pointer;
}

.top-cart {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.top-cart-icon {
  font-size: 22px !important;
  line-height: 1;
}

/* 顶部购物车数量角标（和小程序 nav-cart-badge 保持一致：
   top:-8rpx right:-4rpx → px换算；JS 已有 >99 → '99+' 逻辑） */
.top-cart .cart-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  background: #e74c3c;
  color: #fff;
  font-size: 9px !important;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border-radius: 7px;
  padding: 0 2px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

/* 统一给首页内容让出顶部栏高度 */
#page-home {
  padding-top: 52px;
}

/* 非首页页面有顶部栏被隐藏，统一在 page-view 顶部留出与顶栏等高的占位，避免内容贴顶 */
body.has-top-bar .page-view {
  padding-top: 0;
}

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 480px !important;
  min-height: var(--nav-height-mobile) !important;
  height: auto !important;
  padding: 0 0 var(--safe-bottom) 0 !important;
  background: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  border-top: 1px solid var(--border) !important;
  z-index: 99999 !important;
  -webkit-transform: translate3d(0, 0, 0) !important;
  transform: translate3d(0, 0, 0) !important;
  box-sizing: border-box !important;
  -webkit-overflow-scrolling: touch !important;
  overflow: hidden !important;
  top: auto !important;
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
  cursor: pointer;
  transition: color 0.2s;
  color: var(--text-light);
}

.bottom-nav .nav-item.active {
  color: var(--primary);
}

.bottom-nav .nav-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 1px;
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
/* 彩色 PNG 图标,与小程序原生 tabBar 同一套素材;选中态切 -active 版
   注意:url() 是相对 CSS 文件自身目录(/css/)解析,必须 ../images/,
   否则浏览器会请求 /css/images/tab-*.png(404)。
   为了一次修对、永不复现,这里用绝对根路径 /images/... 摆脱相对路径陷阱。 */
.bottom-nav .nav-item[data-page="home"] .nav-icon { background-image: url(../images/tab-home.png); }
.bottom-nav .nav-item[data-page="home"].active .nav-icon { background-image: url(../images/tab-home-active.png); }
.bottom-nav .nav-item[data-page="products"] .nav-icon { background-image: url(../images/tab-products.png); }
.bottom-nav .nav-item[data-page="products"].active .nav-icon { background-image: url(../images/tab-products-active.png); }
.bottom-nav .nav-item[data-page="cart"] .nav-icon { background-image: url(../images/tab-cart.png); }
.bottom-nav .nav-item[data-page="cart"].active .nav-icon { background-image: url(../images/tab-cart-active.png); }
.bottom-nav .nav-item[data-page="profile"] .nav-icon { background-image: url(../images/tab-profile.png); }
.bottom-nav .nav-item[data-page="profile"].active .nav-icon { background-image: url(../images/tab-profile-active.png); }

.bottom-nav .nav-label {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

/* 微信内置浏览器 / 移动端兼容:
   屏幕宽度 <= 768px 时(几乎所有手机/微信内置浏览器),放大底部 nav 的
   图标/文字/高度,避免被压扁影响可读性。
   PC 端(>= 1024px)不触发,桌面端尺寸保持不变。
   注意:root 变量在某些 Android 微信 webview 里无法通过 var(--x) 引用
   媒体查询里的覆盖值,所以这里同时写死 px 而不是 var()。 */
@media (max-width: 768px) {
  /* 通用移动端样式 */
  .bottom-nav .nav-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 1px;
  }
  /* 微信内置浏览器环境 */
  @media screen and (min-width: 320px) and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 0) {
    .bottom-nav {
      min-height: 60px !important;
      height: auto !important;
      padding-bottom: var(--safe-bottom) !important;
    }
    .bottom-nav .nav-label {
      font-size: 12px !important;
    }
  }
  /* 原生浏览器环境 */
  @media screen and (min-width: 320px) and (max-width: 480px) {
    .bottom-nav {
      min-height: 56px !important;
      height: auto !important;
      padding-bottom: var(--safe-bottom) !important;
    }
    .bottom-nav .nav-label {
      font-size: 11px !important;
    }
  }
  /* 统一修复导航栏内边距 */
  .bottom-nav .nav-item {
    padding-bottom: 0px !important;
  }
  .bottom-nav .nav-label {
    font-size: 13px !important;
    line-height: 1.2;
  }
  /* 全局底部安全区域适配 */
  body {
    padding-bottom: 0 !important;
    margin: 0 !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
  }
  #app {
    min-height: 100vh !important;
    padding-bottom: calc(var(--nav-height-mobile) + var(--safe-bottom)) !important;
  }
  /* iOS专属修复 */
  @supports (-webkit-overflow-scrolling: touch) {
    .bottom-nav {
      padding: 0 0 var(--safe-bottom) 0 !important;
    }
    .bottom-nav .nav-icon {
      width: 32px;
      height: 32px;
      margin-bottom: 1px;
    }
    .bottom-nav .nav-label {
      font-size: 13px !important;
    }
  }
}

.bottom-nav .cart-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(14px);
  background: var(--danger);
  color: #fff;
  font-size: 10px !important;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ===== Page View ===== */
.page-view {
  display: none;
  animation: pageFadeIn 0.3s ease;
}

.page-view.active {
  display: block;
}

/* 页面切换仅做透明度淡入，不使用 transform —— 否则祖先 transform 会成为内部
   position:fixed 元素(如购物车底部结算栏)的包含块，导致切换页面时结算栏位移跳动 */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Home Page ===== */
.home-banner {
  position: relative;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-banner .banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a5c38 0%, #2d7a4f 50%, #4fa877 100%);
}

.home-banner .banner-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.3) 1px, transparent 1px),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 60px 60px;
}

.home-banner .banner-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.home-banner .banner-title {
  color: #fff;
  font-size: 22px !important;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.home-banner .banner-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 13px !important;
  margin-bottom: 16px;
}

.home-banner .banner-btn {
  display: inline-block;
  padding: 8px 24px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  color: #fff;
  font-size: 13px !important;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

/* Banner carousel */
.banner-carousel {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  touch-action: pan-y;       /* 横向手势交给 JS 处理，纵向仍可滚动页面 */
  cursor: grab;
}
.banner-carousel:active { cursor: grabbing; }

.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s;
  overflow: hidden;
  /* 无图时的兜底渐变底色（有图时图片会盖住它） */
  background: linear-gradient(135deg, #1a5c38 0%, #2d7a4f 50%, #4fa877 100%);
  min-height: 180px;
}

.banner-slide.active { opacity: 1; position: relative; }

/* Banner 主图：按原始比例全宽展示，不压缩、不裁切 */
.banner-slide .banner-img {
  display: block;
  width: 100%;
  height: auto;
}

.banner-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 60%, rgba(0,0,0,.55) 100%);
  z-index: 1;
}

.banner-slide .slide-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #fff;
  pointer-events: none;
}

.banner-title-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.banner-sub-text {
  font-size: 12px;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}

.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.banner-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.3s;
  cursor: pointer;            /* 圆点可点击跳转 */
}

.banner-dots .dot.active {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}

/* Kingkong zone (quick entries) */
.kingkong-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px 0;
  background: #fff;
  margin: 12px;
  margin-top: 16px;
  border-radius: var(--radius);
  padding: 14px 4px 8px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 10;
}

.kingkong-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.kingkong-item:active {
  transform: scale(0.92);
}

.kingkong-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px !important;
  margin-bottom: 6px;
  position: relative;
}

.kingkong-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 9px !important;
  font-weight: 600;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 8px;
  border: 1.5px solid #fff;
}

.kingkong-label {
  font-size: 12px !important;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

/* Stats section */
.stats-section {
  display: flex;
  background: #fff;
  margin: 12px;
  border-radius: var(--radius);
  padding: 16px 8px;
  box-shadow: var(--shadow);
}

.stats-section .stat-item {
  flex: 1;
  text-align: center;
}

.stats-section .stat-value {
  font-size: 20px !important;
  font-weight: 700;
  color: var(--primary);
}

.stats-section .stat-unit {
  font-size: 12px !important;
  color: var(--text-secondary);
}

.stats-section .stat-label {
  font-size: 11px !important;
  color: var(--text-light);
  margin-top: 4px;
}

/* Section title */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.section-title h3 {
  font-size: 16px !important;
  font-weight: 600;
}

.section-title .more {
  font-size: 12px !important;
  color: var(--text-light);
}

/* Values grid */
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.value-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.value-card .value-icon {
  font-size: 28px !important;
  margin-bottom: 6px;
}

.value-card .value-title {
  font-size: 13px !important;
  font-weight: 600;
  margin-bottom: 4px;
}

.value-card .value-desc {
  font-size: 11px !important;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Product card */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.product-card:active {
  transform: scale(0.97);
}

.product-card .product-img {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px !important;
  position: relative;
}

/* 统一的价格标签样式，彻底解决不同环境显示不一致问题 */
.product-card .product-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 1px 5px;
  border-radius: 2px;
  color: #fff;
  font-size: 9px !important;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  background: #ff9800;
  min-width: 56px;
  height: 18px;
  line-height: 16px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  /* 彻底禁用所有字体调整 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

/* 详情页中的价格标签 */
.detail-banner .detail-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px !important;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  background: #ff9800;
  min-width: 80px;
  height: 24px;
  line-height: 18px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  /* 彻底禁用所有字体调整 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

.product-card .product-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.product-card .product-info {
  padding: 10px;
}

.product-card .product-name {
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-desc {
  font-size: 11px !important;
  color: var(--text-light);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.product-card .price-symbol {
  font-size: 12px !important;
  color: var(--danger);
}

.product-card .price-value {
  font-size: 18px !important;
  font-weight: 700;
  color: var(--danger);
}

.product-card .price-original {
  font-size: 11px !important;
  color: var(--text-light);
  text-decoration: line-through;
}

.product-card .product-sales {
  font-size: 10px !important;
  color: var(--text-light);
  margin-top: 2px;
}

/* Category tabs */
.category-tabs {
  display: flex;
  overflow-x: auto;
  background: #fff;
  padding: 8px 12px;
  gap: 8px;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tabs .cat-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px !important;
  color: var(--text-secondary);
  background: var(--bg-page);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.category-tabs .cat-tab.active {
  background: var(--primary);
  color: #fff;
}

/* Product list page */
.product-list-page {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* ===== Product Detail ===== */
.detail-page {
  background: #fff;
  min-height: 100vh;
}

.detail-banner {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px !important;
  position: relative;
}

.detail-banner .detail-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px !important;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  background: #ff9800;
  /* 确保标签完整显示，不会被截断 */
  min-width: 80px;
  height: 24px;
  line-height: 18px;
  box-sizing: border-box;
}

.detail-banner .back-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px !important;
  cursor: pointer;
  z-index: 1000;
}

/* ===== 子页面通用返回栏（二级/三级页）===== */
.sub-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 4px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  box-sizing: border-box;
}
/* 固定页头后，给紧随其后的内容块留出页头高度，避免被遮挡 */
.sub-header + * {
  margin-top: var(--header-height);
}
/* AI 客服整屏布局：页头已 fixed 脱离文档流，聊天区仍要占满剩余视口 */
.sub-header + .ai-chat-page {
  margin-top: 0;
  padding-top: var(--header-height);
  height: calc(100vh - var(--header-height));
}
.sub-header .sub-back {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px !important;
  line-height: 1;
  color: var(--primary);
  cursor: pointer;
}
.sub-header .sub-title {
  flex: 1;
  text-align: center;
  font-size: 16px !important;
  font-weight: 600;
  color: var(--text-primary);
  /* 抵消左侧返回按钮宽度，让标题视觉居中 */
  margin-right: 40px;
}

/* 登录页：返回按钮绝对定位融入全屏渐变（白色箭头） */
.login-back {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 12px;
  z-index: 10;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px !important;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* AI 客服整屏布局：返回栏 + 聊天区占满整屏
   注意：必须加 .active 后缀，否则 #page-aichat 的 display:flex 会覆盖
   .page-view {display:none}，导致 aichat 在所有页面都露出 sub-header/副标题 */
#page-aichat.active { display: flex; flex-direction: column; height: 100vh; }
#page-aichat.active .ai-chat-page { height: auto; flex: 1; min-height: 0; }

.detail-info {
  padding: 16px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  margin-top: -16px;
  position: relative;
  z-index: 2;
}

.detail-name {
  font-size: 18px !important;
  font-weight: 700;
  margin-bottom: 6px;
}

.detail-desc {
  font-size: 13px !important;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.detail-price .price-current {
  color: var(--danger);
  font-weight: 700;
}

.detail-price .price-symbol {
  font-size: 14px !important;
}

.detail-price .price-value {
  font-size: 28px !important;
}

.detail-price .price-original {
  font-size: 13px !important;
  color: var(--text-light);
  text-decoration: line-through;
}

.detail-stats {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.detail-stats .stat {
  font-size: 12px !important;
  color: var(--text-secondary);
}

.detail-stats .stat strong {
  color: var(--text-main);
}

.detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-features .feature-tag {
  padding: 4px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 4px;
  font-size: 11px !important;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section h4 {
  font-size: 14px !important;
  font-weight: 600;
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}

.detail-section p {
  font-size: 13px !important;
  color: var(--text-secondary);
  line-height: 1.8;
}

.detail-specs {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.detail-specs .spec-row {
  display: flex;
  padding: 4px 0;
  font-size: 13px !important;
}

.detail-specs .spec-label {
  width: 80px;
  color: var(--text-light);
}

.detail-specs .spec-value {
  flex: 1;
  color: var(--text-main);
}

/* Detail bottom bar */
.detail-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  min-height: 56px;
  height: auto;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 8px var(--safe-bottom) 8px;
  z-index: 999999 !important;
  gap: 6px;
  box-sizing: border-box;
}

/* 商品详情页单独适配，避免被全局#app的padding-bottom挤出去 */
#app .page-view#page-detail .detail-page {
  padding-bottom: calc(56px + var(--safe-bottom)) !important;
}

.detail-bottom-bar .icon-btn {
  width: 52px;
  min-width: 52px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  gap: 1px;
}

.detail-bottom-bar .icon-btn .icon {
  font-size: 20px !important;
  line-height: 1;
}

.detail-bottom-bar .icon-btn .label {
  font-size: 10px !important;
  color: var(--text-light);
  line-height: 1;
}

.detail-bottom-bar .add-cart-btn {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 14px !important;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.detail-bottom-bar .buy-now-btn {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 14px !important;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* ===== Cart Page ===== */
.cart-page {
  padding-bottom: calc(var(--nav-height-mobile) + 60px + var(--safe-bottom));
  margin: 0;
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
}

.cart-empty {
  text-align: center;
  padding: 80px 20px;
}

.cart-empty .empty-icon {
  font-size: 60px !important;
  margin-bottom: 16px;
}

.cart-empty .empty-text {
  color: var(--text-light);
  margin-bottom: 16px;
}

.cart-empty .empty-btn {
  display: inline-block;
  padding: 8px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 14px !important;
  cursor: pointer;
}

.cart-list {
  padding: 12px;
}

.cart-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
}

.cart-item .check-box {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 12px !important;
  color: #fff;
  transition: all 0.2s;
}

.cart-item .check-box.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.cart-item .cart-product-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px !important;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item .cart-product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cart-item .cart-product-info {
  flex: 1;
}

.cart-item .cart-product-name {
  font-size: 13px !important;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item .cart-product-spec {
  font-size: 11px !important;
  color: var(--text-light);
  margin-bottom: 6px;
}

.cart-item .cart-product-price {
  color: var(--danger);
  font-weight: 700;
  font-size: 15px !important;
}

.cart-item .qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-item .qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px !important;
  color: var(--text-secondary);
}

.cart-item .qty-value {
  min-width: 30px;
  text-align: center;
  font-size: 14px !important;
  font-weight: 600;
}

/* Cart bottom bar */
.cart-bottom-bar {
  position: fixed !important;
  bottom: calc(var(--nav-height-mobile) + var(--safe-bottom)) !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 480px !important;
  min-height: 56px !important;
  height: auto !important;
  background: #ffffff !important;
  border-top: 1px solid #ececec !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 0 var(--safe-bottom) 0 !important;
  z-index: 99999 !important;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08) !important;
  box-sizing: border-box !important;
}

.cart-bottom-bar .select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px !important;
  cursor: pointer;
}

.cart-bottom-bar .total-info {
  flex: 1;
  text-align: right;
  margin-right: 12px;
}

.cart-bottom-bar .total-label {
  font-size: 12px !important;
  color: var(--text-secondary);
}

.cart-bottom-bar .total-price {
  font-size: 18px !important;
  font-weight: 700;
  color: var(--danger);
}

.cart-bottom-bar .checkout-btn {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 14px !important;
  font-weight: 600;
  cursor: pointer;
}

.cart-bottom-bar .checkout-btn:disabled {
  background: #ccc;
}

/* ===== Profile Page ===== */
.profile-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #4a9d6e 100%);
  padding: 18px 20px 22px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.profile-bg-deco {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
  z-index: 0;
}
.profile-bg-deco:not(.profile-bg-deco-2) {
  width: 200px; height: 200px;
  top: -70px; right: -50px;
}
.profile-bg-deco-2 {
  width: 130px; height: 130px;
  bottom: -40px; left: -30px;
  background: rgba(255,255,255,0.08);
}
.profile-main {
  position: relative; z-index: 1;
  display: flex; align-items: center;
}
.profile-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px !important;
  border: 3px solid rgba(255,255,255,0.55);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar.has-img { background: transparent; font-size: 0 !important; }
.profile-divider {
  width: 1px;
  height: 46px;
  background: rgba(255,255,255,0.35);
  margin: 0 16px;
  flex-shrink: 0;
}
.profile-info {
  flex: 1; min-width: 0;
}
.profile-name {
  font-size: 20px !important;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex; align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.3;
}
.profile-sub {
  font-size: 13px !important;
  opacity: 0.85;
}
.profile-action {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  font-size: 17px !important;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, transform .2s;
}
.profile-action:hover { background: rgba(255,255,255,0.32); transform: rotate(30deg); }

/* ===== 我的推荐人卡片 ===== */
.inviter-card {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: 8px;
  background: #fff;
  margin: 12px 12px 0;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.inviter-left { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.inviter-ico {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #e9f7ef, #d4f0e0);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; margin-right: 12px; flex-shrink: 0 !important;
}
.inviter-title { font-size: 14px; font-weight: 600; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; }
.inviter-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; }
.inviter-right { flex-shrink: 0; margin-left: auto; }
.inviter-badge { display: flex; align-items: center; font-size: 13px; color: var(--text-main) !important; }
.inviter-tag {
  margin-left: 6px; font-size: 11px; color: #fff !important;
  background: #34c759; padding: 2px 6px; border-radius: 10px;
}
.inviter-bind { display: flex; align-items: center; flex-wrap: nowrap; flex-shrink: 0; }
.inviter-input {
  width: 82px; height: 30px; border: 1px solid var(--border);
  border-radius: 14px; padding: 0 10px; font-size: 13px; text-transform: uppercase !important;
  outline: none; background: #fafafa; flex-shrink: 0;
}
.inviter-input:focus { border-color: var(--primary); background: #fff; }
.inviter-btn {
  margin-left: 8px; height: 30px; padding: 0 10px;
  border: none; border-radius: 15px; background: var(--primary); color: #fff;
  font-size: 13px; cursor: pointer; flex-shrink: 0 !important;
}
.inviter-btn:active { opacity: .85; }


.profile-orders {
  background: #fff;
  margin: 12px;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* 种树活动广告位：位于「我的订单」模块下方，整图可点 */
.profile-ad {
  margin: 12px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, box-shadow .15s;
}
.profile-ad:active { transform: scale(.985); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.profile-ad-img { display: block; width: 100%; height: auto; }

.profile-orders .orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.profile-orders .orders-header h4 {
  font-size: 15px !important;
  font-weight: 600;
}

.profile-orders .orders-header .more {
  font-size: 12px !important;
  color: var(--text-light);
}

.profile-orders .order-status-grid {
  display: flex;
  gap: 8px;
}

.profile-orders .order-status-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.profile-orders .order-status-item .status-icon {
  font-size: 24px !important;
  margin-bottom: 4px;
}

.profile-orders .order-status-item .status-label {
  font-size: 11px !important;
  color: var(--text-secondary);
}

.profile-menu {
  background: #fff;
  margin: 0 12px 12px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-menu .menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.profile-menu .menu-item:last-child {
  border-bottom: none;
}

.profile-menu .menu-item .menu-icon {
  font-size: 20px !important;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.profile-menu .menu-item .menu-label {
  flex: 1;
  font-size: 14px !important;
}

.profile-menu .menu-item .menu-arrow {
  color: var(--text-light);
  font-size: 12px !important;
}

/* ===== AI 客服 ===== */
/* ===== AI 客服整页 ===== */
.ai-chat-page {
  display: flex; flex-direction: column;
  height: calc(100vh - var(--header-height));
  background: #f6f8f7;
  position: relative;
}
.ai-chat-sub {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; font-size: 12.5px; color: var(--text-light) !important;
  background: #eef5f0; border-bottom: 1px solid var(--border);
}
.ai-chat-sub span { font-size: 14px !important; }
.ai-chat-body { flex: 1; overflow-y: auto; padding: 14px 14px 6px; background: #f6f8f7; }
.ai-msg { display: flex; margin-bottom: 12px; }
.ai-msg-bot { justify-content: flex-start; }
.ai-msg-user { justify-content: flex-end; }
.ai-bubble {
  max-width: 78%; padding: 9px 13px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word !important;
}
.ai-msg-bot .ai-bubble {
  background: #fff; color: #333; border: 1px solid #eef0ee; border-top-left-radius: 4px;
}
.ai-msg-user .ai-bubble {
  background: var(--primary); color: #fff; border-top-right-radius: 4px;
}
.ai-msg-user .ai-bubble.ai-img {
  padding: 4px; background: #fff; border: 1px solid #d6e6dc;
}
.ai-msg-user .ai-bubble.ai-img img {
  display: block; max-width: 200px; max-height: 200px;
  border-radius: 10px; object-fit: cover;
}
.ai-typing { display: flex; gap: 4px; align-items: center; }
.ai-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #c4c9c4;
  animation: ai-blink 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-blink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

/* 底部快捷：图标卡片 + 文本气泡 */
.ai-chat-quick {
  background: #fff; border-top: 1px solid var(--border); padding: 10px 8px 6px;
}
.ai-quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 0 4px 8px;
}
.ai-quick-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 4px 8px; border-radius: 12px;
  background: #f4f8f5; cursor: pointer; user-select: none;
  transition: transform .08s ease;
}
.ai-quick-card:active { transform: scale(0.96); background: #e6f0e9; }
.ai-quick-card .q-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 6px !important;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ai-quick-card .q-ico-order    { background: linear-gradient(135deg,#fff3e0,#ffe0b2); }
.ai-quick-card .q-ico-aftersale{ background: linear-gradient(135deg,#e3f2fd,#bbdefb); }
.ai-quick-card .q-ico-human    { background: linear-gradient(135deg,#ede7f6,#d1c4e9); }
.ai-quick-card .q-label {
  font-size: 12px; color: #444; font-weight: 500 !important;
}
.ai-quick-bubbles {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px;
  border-top: 1px dashed #eee; padding-top: 8px;
}
.ai-quick-item {
  font-size: 12px; color: var(--primary); background: #eef7f1 !important;
  padding: 5px 10px; border-radius: 14px; cursor: pointer;
}
.ai-quick-item:active { background: #dcefe2; }

/* 输入栏：+ / 输入 / 发送 */
.ai-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border); background: #fff;
}
.ai-plus-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: #f4f8f5;
  color: var(--primary); font-size: 22px; line-height: 1 !important;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; padding: 0;
}
.ai-plus-btn:active { background: #e6f0e9; }
.ai-input-bar input {
  flex: 1; height: 36px; border: 1px solid var(--border); border-radius: 18px;
  padding: 0 14px; font-size: 13.5px; outline: none; background: #fff !important;
}
.ai-input-bar input:focus { border-color: var(--primary); }
.ai-send-btn {
  height: 36px; padding: 0 16px; border: none;
  background: var(--primary); color: #fff; border-radius: 18px;
  font-size: 13.5px; cursor: pointer; flex-shrink: 0 !important;
}
.ai-send-btn:active { opacity: .85; }

/* "+" 弹层 */
.ai-plus-popover {
  position: absolute; left: 12px; bottom: 60px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  min-width: 150px; z-index: 5; overflow: hidden;
  animation: aiPopIn .15s ease-out;
}
@keyframes aiPopIn { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ai-plus-item {
  padding: 11px 14px; font-size: 13.5px; color: #333 !important;
  border-bottom: 1px solid #f1f3f1; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.ai-plus-item:last-child { border-bottom: none; }
.ai-plus-item:active { background: #f4f8f5; }
.ai-plus-cancel { color: #999; justify-content: center; background: #f8faf8; }

/* 表情面板 */
.ai-emoji-panel {
  background: #fff; border-top: 1px solid var(--border);
  padding: 10px 8px 6px; max-height: 200px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.ai-emoji-item {
  font-size: 22px; text-align: center; padding: 6px 0 !important;
  border-radius: 8px; cursor: pointer; user-select: none;
}
.ai-emoji-item:active { background: #f0f5f1; }

/* ===== Base Page ===== */
.base-hero {
  height: 220px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.base-hero .hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a5c38, #2d7a4f, #4fa877);
}

.base-hero .hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 2px, transparent 2px, transparent 20px);
}

.base-hero .hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 0 24px;
}

.base-hero .hero-label {
  font-size: 11px !important;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.base-hero .hero-title {
  font-size: 20px !important;
  font-weight: 700;
  margin-bottom: 8px;
}

.base-hero .hero-sub {
  font-size: 13px !important;
  opacity: 0.8;
  line-height: 1.6;
}

.base-content {
  padding: 20px 16px;
}

.base-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.base-section h3 {
  font-size: 16px !important;
  font-weight: 700;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.base-section p {
  font-size: 13px !important;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.base-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.base-features .feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px !important;
  color: var(--text-secondary);
}

.base-features .feature-item::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.base-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.base-zones .zone-card {
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.base-zones .zone-card .zone-name {
  font-size: 13px !important;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.base-zones .zone-card .zone-desc {
  font-size: 11px !important;
  color: var(--text-secondary);
}

.calendar-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.calendar-item {
  display: flex;
  gap: 12px;
  padding-bottom: 20px;
  position: relative;
}

.calendar-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.calendar-item .season-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px !important;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  z-index: 1;
}

.calendar-item .cal-content h4 {
  font-size: 14px !important;
  font-weight: 600;
  margin-bottom: 4px;
}

.calendar-item .cal-content p {
  font-size: 12px !important;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== Checkout Page ===== */
.checkout-page {
  padding: 12px;
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

.checkout-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.checkout-section h4 {
  font-size: 14px !important;
  font-weight: 600;
  margin-bottom: 12px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}

.ship-warning {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 13px !important;
  line-height: 1.5;
  color: #a4321f;
  background: #fdecea;
  border: 1px solid #f5c6c0;
  border-radius: 8px;
}

.address-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.address-card .addr-icon {
  font-size: 24px !important;
}

.address-card .addr-info {
  flex: 1;
}

.address-card .addr-name {
  font-size: 14px !important;
  font-weight: 600;
  margin-bottom: 4px;
}

.address-card .addr-detail {
  font-size: 12px !important;
  color: var(--text-secondary);
}

.checkout-product {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-product:last-child {
  border-bottom: none;
}

.checkout-product .cp-img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px !important;
  flex-shrink: 0;
  overflow: hidden;
}
/* 商品图铺满容器，不留品类色背景 */
.checkout-product .cp-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checkout-product .cp-info {
  flex: 1;
}

.checkout-product .cp-name {
  font-size: 13px !important;
  font-weight: 600;
}

.checkout-product .cp-spec {
  font-size: 11px !important;
  color: var(--text-light);
}

.checkout-product .cp-price {
  text-align: right;
}

.checkout-product .cp-price .price {
  font-size: 14px !important;
  font-weight: 700;
  color: var(--danger);
}

.checkout-product .cp-price .qty {
  font-size: 11px !important;
  color: var(--text-light);
}

.checkout-summary {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px !important;
}

.checkout-summary .total {
  font-weight: 700;
}

.checkout-summary .total .price {
  color: var(--danger);
  font-size: 18px !important;
}

.payment-methods {
  display: flex;
  gap: 12px;
}

.payment-methods .pay-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px !important;
  transition: all 0.2s;
}

.payment-methods .pay-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.payment-methods .pay-icon {
  font-size: 20px !important;
}

.checkout-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  min-height: 56px;
  height: auto;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px var(--safe-bottom) 16px;
  z-index: 999999;
}

/* 非 Tab 页面（结算/订单详情/地址等）必须隐藏底部导航，防止其盖住底部操作栏 */
#app.no-bottom-nav .bottom-nav {
  display: none !important;
}

.checkout-bottom-bar .pay-amount {
  font-size: 12px !important;
  color: var(--text-secondary);
}

.checkout-bottom-bar .pay-amount .amount {
  font-size: 20px !important;
  font-weight: 700;
  color: var(--danger);
}

.checkout-bottom-bar .pay-btn {
  padding: 10px 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 15px !important;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Address List Page ===== */
.address-list-page {
  padding: 12px;
  padding-bottom: 100px;
}

.address-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  position: relative;
}

.address-item .ai-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.address-item .ai-name {
  font-size: 15px !important;
  font-weight: 600;
  color: var(--text-main);
}

.address-item .ai-phone {
  font-size: 13px !important;
  color: var(--text-secondary);
}

.address-item .ai-tag {
  font-size: 10px !important;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--primary);
  color: #fff;
}

.address-item .ai-detail {
  font-size: 13px !important;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.address-item .ai-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.address-item .ai-action {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px !important;
  color: var(--text-secondary);
  cursor: pointer;
}

.address-item .ai-action.set-default {
  color: var(--primary);
}

.address-item .ai-action.is-default {
  color: var(--text-light);
}

/* 自定义间距样式 - 适配用户需求 */
/* 全局间距变量 */
:root {
  --spacing-xs: 4px;
  --spacing-sm: 8px;
    --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 24px;
  /* 强制全局字体大小 */
  --font-size-base: 11px;
}

/* 页面容器自定义间距 */
.page-custom-spacing {
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

/* 区块上下间距 */
.section-custom-spacing {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* 元素内部间距 */
.content-custom-padding {
  padding: var(--spacing-md);
}

/* 卡片间距优化 */
.product-card, .value-card, .stats-section {
  margin-bottom: var(--spacing-md);
}

/* 修复滑动页面黑底闪动补充 */
html, body, #app, .page-view {
  background-color: var(--bg-page) !important;
  background: var(--bg-page) !important;
}

/* 强制全局字体大小统一 */
html {
  font-size: var(--font-size-base) !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  text-size-adjust: none !important;
  -webkit-text-size-adjust: none !important;
  font-size-adjust: 100% !important;
  -webkit-font-size-adjust: 100% !important;
}

body {
  font-size: var(--font-size-base) !important;
  line-height: 1.5 !important;
}

/* 强制所有元素使用基础字体大小 */
* {
  font-size: inherit !important;
  font-size-adjust: none !important;
  -webkit-font-size-adjust: none !important;
}

/* 针对所有文本元素强制设置字体大小 */
p, span, div, a, button, input, select, textarea, li, td, th, small, strong, em, b, i, u, s, strike, sub, sup, mark, del, ins, cite, q, dfn, abbr, acronym, address, bdo, dir, kbd, samp, var, code, pre, samp, h1, h2, h3, h4, h5, h6 {
  font-size: var(--font-size-base) !important;
  line-height: 1.5 !important;
}

/* 特别修复导航栏和按钮文字 */
.bottom-nav .nav-label, .top-bar .top-search-input, .top-bar .top-search-btn, .detail-bottom-bar .add-cart-btn, .detail-bottom-bar .buy-now-btn, .cart-bottom-bar .checkout-btn, .checkout-bottom-bar .pay-btn, .profile-menu .menu-label, .section-title .more {
  font-size: var(--font-size-base) !important;
}


/* 修复小字体元素 */
.product-card .product-desc, .product-card .product-sales, .cart-item .cart-product-spec, .profile-orders .order-status-item .status-label, .section-title .more {
  font-size: calc(var(--font-size-base) * 0.9) !important;
}

.address-item .ai-action.delete {
  margin-left: auto;
  color: var(--danger);
}

.address-item .ai-edit {
  color: var(--text-secondary);
  font-size: 12px !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.address-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.address-empty .ae-icon {
  font-size: 48px !important;
  margin-bottom: 12px;
}

.address-empty .ae-text {
  font-size: 14px !important;
  margin-bottom: 20px;
}

.address-add-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 456px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px !important;
  font-weight: 600;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(45,122,79,0.3);
}

/* ===== Address Edit Page ===== */
.address-edit-page {
  padding: 12px;
}

.address-edit-page .form-group {
  background: #fff;
  border-radius: var(--radius);
  padding: 0 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.address-edit-page .form-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.address-edit-page .form-row:last-child {
  border-bottom: none;
}

.address-edit-page .form-label {
  width: 80px;
  font-size: 14px !important;
  color: var(--text-main);
  flex-shrink: 0;
}

.address-edit-page .form-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px !important;
  color: var(--text-main);
  background: transparent;
}

.address-edit-page .form-input::placeholder {
  color: var(--text-light);
}

.address-edit-page .form-textarea {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px !important;
  color: var(--text-main);
  background: transparent;
  resize: none;
  min-height: 60px;
  font-family: inherit;
}

.address-edit-page .form-region {
  display: flex;
  gap: 8px;
  width: 100%;
}

.address-edit-page .form-region select {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  font-size: 13px !important;
  color: var(--text-main);
  background: #fff;
  outline: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.address-edit-page .default-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.address-edit-page .default-row .label {
  font-size: 14px !important;
  color: var(--text-main);
}

.address-edit-page .toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #ddd;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.address-edit-page .toggle-switch.on {
  background: var(--primary);
}

.address-edit-page .toggle-switch::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}

.address-edit-page .toggle-switch.on::after {
  left: 22px;
}

.address-edit-page .save-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  z-index: 200;
  box-sizing: border-box;
}

.save-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  z-index: 200;
  box-sizing: border-box;
}

.save-btn {
  flex: 1;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px !important;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Checkout address selector ===== */
.address-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.address-selector.empty {
  justify-content: center;
  padding: 20px;
}

.address-selector .as-add {
  text-align: center;
  color: var(--primary);
  font-size: 14px !important;
}

/* ===== Order Page ===== */
.order-tabs {
  display: flex;
  background: #fff;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
}

.order-tabs .order-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 13px !important;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
}

.order-tabs .order-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.order-tabs .order-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
}

.order-list {
  padding: 12px;
}

.order-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.order-card .order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-card .order-no {
  font-size: 11px !important;
  color: var(--text-light);
}

.order-card .order-status {
  font-size: 12px !important;
  font-weight: 600;
}

.order-card .order-status.pending { color: var(--warning); }
.order-card .order-status.paid { color: var(--primary); }
.order-card .order-status.shipped { color: #2980b9; }
.order-card .order-status.completed { color: var(--text-light); }

.order-card .order-product {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}

.order-card .order-product .op-img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px !important;
  flex-shrink: 0;
  overflow: hidden;
}
/* 商品图铺满 50×50 容器，不留品类色背景 */
.order-card .order-product .op-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.order-card .order-product .op-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.order-card .order-product .op-info {
  flex: 1;
}

.order-card .order-product .op-name {
  font-size: 13px !important;
  font-weight: 600;
}

.order-card .order-product .op-spec {
  font-size: 11px !important;
  color: var(--text-light);
}

.order-card .order-product .op-price {
  text-align: right;
  font-size: 13px !important;
  font-weight: 700;
  color: var(--danger);
}

.order-card .order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.order-card .order-total {
  font-size: 13px !important;
}

.order-card .order-total .total-price {
  font-weight: 700;
  color: var(--danger);
}

.order-card .order-actions {
  display: flex;
  gap: 8px;
}

.order-card .order-actions .action-btn {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 12px !important;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
}

.order-card .order-actions .action-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px !important;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  pointer-events: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999999;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-content .modal-title {
  font-size: 16px !important;
  font-weight: 600;
}

.modal-content .modal-close {
  font-size: 20px !important;
  color: var(--text-light);
  cursor: pointer;
}

/* ===== Order Detail (fullpage modal) ===== */
.modal-content.fullpage {
  max-width: 480px;
  max-height: 92vh;
  padding: 0;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-content.fullpage .modal-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 0;
}
.modal-content.fullpage .modal-title { font-size: 16px !important; }
.order-detail {
  padding: 14px 16px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.od-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  border-radius: 12px;
  color: #fff;
  margin-bottom: 14px;
}
.od-banner-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px !important;
  flex-shrink: 0;
}
.od-banner-title { font-size: 17px; font-weight: 600 !important; }
.od-banner-sub { font-size: 12px; opacity: 0.85; margin-top: 4px !important; }
.od-banner.status-pending  { background: linear-gradient(135deg,#f59e0b,#d97706); }
.od-banner.status-paid     { background: linear-gradient(135deg,#2d7a4f,#4fa877); }
.od-banner.status-shipped  { background: linear-gradient(135deg,#2980b9,#3498db); }
.od-banner.status-completed{ background: linear-gradient(135deg,#6b7280,#9ca3af); }
.od-banner.status-cancelled{ background: linear-gradient(135deg,#9ca3af,#d1d5db); }

.od-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.od-block-title {
  font-size: 13px !important;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.od-block-meta { font-size: 11px; color: var(--text-light); font-weight: 400 !important; }
.od-empty { color: var(--text-light); font-size: 12px; padding: 8px 0 !important; }
.od-block.od-ship { background: #f0f7f2; border-left: 3px solid var(--primary); }
.od-block.od-ship .od-block-title { color: var(--primary-dark); font-weight: 600; }

.od-addr-row { display: flex; align-items: center; gap: 12px; font-size: 14px; margin-bottom: 4px !important; }
.od-addr-name { font-weight: 600; }
.od-addr-phone { color: var(--text-secondary); font-size: 13px !important; }
.od-addr-detail { font-size: 12px; color: var(--text-secondary); line-height: 1.5 !important; }

.od-items { display: flex; flex-direction: column; gap: 12px; }
.od-item {
  display: flex; gap: 10px; align-items: flex-start;
  /* 订单详情里整行可点击跳商品详情：可点击 + 微弱高亮给反馈 */
  cursor: pointer;
  margin: 0 -8px; padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.od-item:active { background: var(--bg); }
.od-item-img {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff !important;
  overflow: hidden;
}
.od-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.od-item-info { flex: 1; min-width: 0; }
.od-item-name {
  font-size: 13px; font-weight: 500 !important;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.od-item-spec { font-size: 11px; color: var(--text-light); margin-top: 4px !important; }
.od-item-price { text-align: right; flex-shrink: 0; }
.od-item-unit { font-size: 13px; font-weight: 600 !important; }
.od-item-sub  { font-size: 11px; color: var(--text-light); margin-top: 4px !important; }
.od-item-money { color: var(--text); font-weight: 500; }

.od-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 6px 0 !important;
  color: var(--text-secondary);
}
.od-row-total {
  border-top: 1px solid var(--border);
  margin-top: 6px; padding-top: 10px;
  font-size: 14px; color: var(--text) !important;
}
.od-total { color: var(--danger); font-size: 17px; font-weight: 700 !important; }
.od-discount { color: var(--danger); }
.od-id {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px !important;
  color: var(--primary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f0f7f3;
}
.od-id:active { background: #e3f0e9; }

.od-actions {
  display: flex; gap: 10px;
  padding-top: 6px;
}
.od-btn {
  flex: 1;
  text-align: center;
  padding: 11px 0;
  border: 1px solid var(--border);
  border-radius: 22px;
  font-size: 13px !important;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
}
.od-btn:active { transform: scale(0.97); }
.od-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.od-btn-primary:active { background: var(--primary-dark); }

/* 订单列表卡片可点击反馈 */
.order-card { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.order-card:active { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.order-more-items {
  text-align: center;
  font-size: 12px !important;
  color: var(--text-light);
  padding: 8px 0 4px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}

/* ===== Search Bar ===== */
.search-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  gap: 8px;
}

.search-bar .search-input {
  flex: 1;
  height: 36px;
  background: var(--bg-page);
  border-radius: 18px;
  padding: 0 16px;
  font-size: 13px !important;
}

.search-bar .search-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 18px;
  font-size: 13px !important;
  cursor: pointer;
}

/* ===== Loading ===== */
.loading-more {
  text-align: center;
  padding: 16px;
  color: var(--text-light);
  font-size: 12px !important;
}

.no-more {
  text-align: center;
  padding: 16px;
  color: var(--text-light);
  font-size: 12px !important;
}

.no-more::before, .no-more::after {
  content: '—';
  margin: 0 8px;
  opacity: 0.5;
}

/* ===== Brand Banner ===== */
.brand-banner {
  background: linear-gradient(135deg, var(--primary-bg) 0%, #fff 100%);
  margin: 12px;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.brand-banner .brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.brand-banner .brand-text h4 {
  font-size: 14px !important;
  font-weight: 600;
  color: var(--primary-dark);
}

.brand-banner .brand-text p {
  font-size: 11px !important;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Safe area */
.safe-bottom { height: env(safe-area-inset-bottom, 0px); }

/* ===== Login / Register Page ===== */
/* ===================== 登录/注册页背景重做 ===================== */
.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 0%, #3a9560 0%, transparent 60%),
    linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 35%, #f0f7f2 62%, #f8fbf5 100%);
  color: var(--text-main);
}

/* 装饰层：浮在背景上的光斑 + 远山 + 叶脉 */
.login-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}
.login-blob-1 {
  width: 320px; height: 320px;
  top: -80px; left: -90px;
  background: radial-gradient(circle, rgba(255,255,255,0.35), rgba(255,255,255,0) 70%);
}
.login-blob-2 {
  width: 260px; height: 260px;
  top: 60px; right: -80px;
  background: radial-gradient(circle, rgba(212,165,83,0.45), rgba(212,165,83,0) 70%);
}
.login-blob-3 {
  width: 380px; height: 380px;
  top: 280px; left: 30%;
  background: radial-gradient(circle, rgba(255,255,255,0.18), rgba(255,255,255,0) 70%);
}
.login-leaves,
.login-mountains {
  position: absolute;
  left: 0; width: 100%;
  pointer-events: none;
}
.login-leaves { top: 60px; height: 200px; opacity: 0.9; }
.login-mountains { bottom: 56%; height: 220px; }

/* Hero 区 */
.login-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 56px 20px 36px;
  color: #fff;
}
.login-logo-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
}
.login-logo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow:
    0 0 0 8px rgba(255,255,255,0.08),
    0 8px 30px rgba(26,92,56,0.35);
  animation: loginRing 3.6s ease-in-out infinite;
}
@keyframes loginRing {
  0%,100% { transform: scale(1); opacity: 0.85; }
  50%     { transform: scale(1.06); opacity: 1; }
}
.login-logo {
  position: relative;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #e8f3ec 100%);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px !important;
  font-weight: 800;
  box-shadow:
    inset 0 -4px 12px rgba(26,92,56,0.18),
    0 12px 30px rgba(26,92,56,0.35);
  letter-spacing: -1px;
}
.login-brand {
  font-size: 24px !important;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.login-slogan {
  font-size: 12px !important;
  opacity: 0.92;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.login-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 6px;
}
.login-tag {
  display: inline-block;
  padding: 5px 10px;
  font-size: 11px !important;
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 表单区 */
.login-form-wrap {
  position: relative;
  z-index: 1;
  padding: 8px 20px 28px;
}
/* 浮在背景上的表单卡片 */
.login-form-wrap .form-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 22px 18px 18px;
  box-shadow:
    0 10px 30px rgba(26,92,56,0.10),
    0 2px 6px rgba(0,0,0,0.04);
  position: relative;
}
.login-form-wrap .form-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 18px; right: 18px;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, transparent, var(--primary-light) 30%, var(--accent) 50%, var(--primary-light) 70%, transparent);
  opacity: 0.7;
}
/* 表单项阴影更柔和 */
.login-form-wrap .form-item {
  background: #fafdfb;
  border: 1px solid #e6efe9;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-form-wrap .form-item:focus-within {
  border-color: var(--primary-light);
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 0 0 3px rgba(79,168,119,0.12);
}
/* 注册页底部安全承诺带 */
.login-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 11px !important;
  color: var(--text-light);
  letter-spacing: 0.5px;
}
.login-trust-dot {
  color: var(--primary-light);
  font-weight: 700;
}

.form-title {
  font-size: 18px !important;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  text-align: center;
}

.form-item {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 24px;
  padding: 0 16px;
  margin-bottom: 14px;
  height: 48px;
  box-shadow: var(--shadow);
  gap: 10px;
}

.form-icon {
  font-size: 18px !important;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
  height: 100%;
  background: transparent;
  font-size: 14px !important;
  color: var(--text-main);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-item-code {
  gap: 8px;
}

.form-item-code .form-input {
  flex: 1;
}

.code-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 16px;
  font-size: 12px !important;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.code-btn:active {
  opacity: 0.7;
}

.code-btn.disabled {
  color: var(--text-light);
  background: var(--border);
  pointer-events: none;
}

.reg-identity-hint {
  font-size: 12px !important;
  color: var(--text-light);
  background: var(--primary-bg);
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.6;
}

.profile-identity-badge {
  display: inline-block;
  font-size: 11px !important;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 600;
}

.profile-identity-badge.agent {
  background: linear-gradient(135deg, #ff9d3c, #e67e22);
  color: #fff;
}

.profile-identity-badge.normal {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

.agent-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px !important;
  line-height: 1.5;
  color: #fff;
  background: linear-gradient(135deg, #e67e22, #d35400);
  border-radius: 4px;
  vertical-align: middle;
}

.agent-tag-lg {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 12px !important;
}

.form-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-radius: 24px;
  font-size: 16px !important;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 4px 16px rgba(45,122,79,0.3);
  transition: transform 0.2s;
}

.form-btn:active {
  transform: scale(0.97);
}

.form-link {
  text-align: center;
  font-size: 13px !important;
  color: var(--primary);
  margin-top: 16px;
  cursor: pointer;
}

.form-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 16px;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-divider span {
  padding: 0 12px;
  font-size: 12px !important;
  color: var(--text-light);
}

.social-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 6px;
  padding: 8px;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px !important;
}

.social-icon.wechat {
  background: #07c160;
}

.social-text {
  font-size: 12px !important;
  color: var(--text-light);
}

/* 商品详情图片画廊（单图占满 + 自动轮播） */
.detail-gallery { position: relative; width: 100%; height: 100%; overflow: hidden; }
.detail-gallery-track { display: flex; width: 100%; height: 100%; transition: transform .4s ease; }
.detail-gallery-img { flex: 0 0 100%; width: 100%; height: 100%; max-width: 100%; border-radius: 0; box-shadow: none; object-fit: cover; display: block; }
.detail-gallery-dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; }
.detail-gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); transition: all .25s ease; }
.detail-gallery-dot.active { width: 18px; border-radius: 3px; background: #fff; }

/* 多规格选择 */
.sku-list { display: flex; flex-wrap: wrap; gap: 10px; }
.sku-item {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 100px;
  transition: all .18s ease;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.sku-item:active { transform: scale(.96); }
.sku-item .sku-name { font-size: 14px; font-weight: 600; color: var(--text-main) !important; }
.sku-item .sku-price { font-size: 13px; font-weight: 600; color: #e2574c !important; }
.sku-item.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 2px 10px rgba(45,122,79,.18);
}
.sku-item.active .sku-name { color: var(--primary-dark); }
.sku-item.active .sku-price { color: var(--primary); }
.sku-item.active::after {
  content: '✓';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 18px;
  height: 18px;
  border-radius: 0 11px 0 10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px !important;
  line-height: 18px;
  text-align: center;
}

/* 详情页"已选规格"提示条（点击唤起弹层） */
.spec-pick-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
}
.spec-pick-hint:active { transform: scale(.98); }
.spec-pick-hint .sph-label {
  font-size: 12px !important;
  color: var(--text-light);
  flex: 0 0 auto;
}
.spec-pick-hint .sph-value {
  font-size: 13px !important;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spec-pick-hint .sph-arrow { color: var(--text-light); font-size: 16px !important; }

/* 规格选择弹层 */
.sku-modal { position: relative; padding-top: 6px; }
.sku-modal .modal-close { position: absolute; top: 0; right: 0; }
.sku-modal-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.sku-modal-head .smh-img {
  width: 72px; height: 72px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.sku-modal-head .smh-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sku-modal-head .smh-img span { font-size: 36px !important; }
.sku-modal-head .smh-price { font-size: 20px; font-weight: 700; color: #e2574c !important; }
.sku-modal-head .smh-price .sym { font-size: 13px; margin-right: 1px !important; }
.sku-modal-head .smh-stock { font-size: 12px; color: var(--text-light); margin-top: 4px !important; }
.sku-modal-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary) !important;
  margin-bottom: 10px; padding-left: 8px; border-left: 3px solid var(--primary);
}
.sku-modal-confirm {
  width: 100%; height: 44px; margin-top: 18px; border: none; border-radius: 22px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer !important;
}
.sku-modal-confirm:active { opacity: .85; }

/* SKU 弹窗：已选摘要 + 数量步进器 */
.sku-modal .smh-picked {
  font-size: 12px; color: var(--text-secondary); margin-top: 6px !important;
}
.sku-modal-qty {
  display: flex; align-items: center; gap: 8px;
  height: 36px; margin-top: 4px;
}
.sku-modal-qty .smq-btn {
  width: 32px; height: 32px;
  border-radius: 8px; background: var(--bg-page);
  font-size: 18px; font-weight: 600; color: var(--text-secondary) !important;
  cursor: pointer; user-select: none; box-sizing: border-box;
  border: 1px solid var(--border, #eee);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; vertical-align: middle;
}
.sku-modal-qty .smq-btn.disabled {
  color: #ccc; background: #fafafa; cursor: not-allowed;
  border-color: #f0f0f0;
}
.sku-modal-qty .smq-input {
  width: 64px; height: 32px; border-radius: 8px; border: 1px solid var(--border, #eee);
  text-align: center; font-size: 15px; font-weight: 600; color: var(--text-main) !important;
  background: #fff; outline: none; box-sizing: border-box;
  -moz-appearance: textfield;
}
.sku-modal-qty .smq-input::-webkit-outer-spin-button,
.sku-modal-qty .smq-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sku-modal-qty .smq-input:focus { border-color: var(--primary); }
.sku-modal-qty .smq-stock {
  margin-left: 8px; font-size: 12px; color: var(--text-light) !important;
}

/* 商品详情富文本 */
.detail-rich { font-size: 14px; line-height: 1.9; color: var(--text); word-break: break-word !important; }
.detail-rich img { max-width: 100%; height: auto; border-radius: 0; margin: 0; display: block; }
.detail-rich h1, .detail-rich h2, .detail-rich h3 { font-size: 16px; margin: 14px 0 8px; color: var(--text) !important; }
.detail-rich p { margin: 8px 0; }
.detail-rich ul, .detail-rich ol { padding-left: 22px; margin: 8px 0; }
.detail-rich a { color: var(--primary); text-decoration: underline; }

/* 产品详情懒加载占位（首屏快读时 detail 区显示，等 /api/products/:id/full 回来再二次渲染） */
.detail-rich-loading { padding: 28px 16px; text-align: center; color: var(--text-secondary, #888); font-size: 13px !important; }
.detail-rich-loading .loading-spin { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 8px; border: 2px solid rgba(45,122,79,0.2); border-top-color: var(--primary, #2d7a4f); border-radius: 50%; animation: detail-spin 0.8s linear infinite; }
@keyframes detail-spin { to { transform: rotate(360deg); } }

/* ===== 分享海报 ===== */
.share-page { padding: 14px 14px 30px; }
.share-card { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(15, 78, 45, 0.16); margin-bottom: 16px; }
.share-card-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #1a5c38 0%, #2d7a4f 50%, #4fa877 100%); }
.share-card-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.18), transparent 50%), radial-gradient(circle at 10% 90%, rgba(255,255,255,0.12), transparent 50%); }
.share-card-body { position: relative; padding: 18px 16px 22px; color: #fff; }
.share-card-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.share-logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #2d7a4f; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; box-shadow: 0 4px 10px rgba(0,0,0,0.18) !important; }
.share-brand-text { font-size: 16px; font-weight: 600 !important; }
.share-card-title { font-size: 13px; opacity: 0.92; margin-bottom: 12px !important; }
.share-card-poster {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
  background: #fff;
  color: var(--text);
}
.poster-inner { padding: 16px 14px 12px; background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 60%); }
.poster-top { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; }
.poster-brand { font-size: 14px; font-weight: 700; color: #1f2937 !important; }
.poster-tag { font-size: 11px; color: #6b7280 !important; }
.poster-mid { display: flex; align-items: center; gap: 12px; padding: 14px 0 12px; }
.poster-info { flex: 1; min-width: 0; }
.poster-name { font-size: 15px; font-weight: 700; color: #1f2937; line-height: 1.3 !important; }
.poster-code-label { font-size: 11px; color: #6b7280; margin-top: 6px !important; }
.poster-code { font-size: 26px; font-weight: 700; color: #2d7a4f; letter-spacing: 2px; font-family: 'SFMono-Regular', Consolas, monospace; line-height: 1.2; margin: 4px 0 6px !important; }
.poster-tip { font-size: 11px; color: #9ca3af; line-height: 1.5 !important; }
.poster-qr-wrap { width: 96px; height: 96px; flex-shrink: 0; background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.poster-qr { width: 100%; height: 100%; object-fit: contain; }
.poster-qr-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #6b7280; text-align: center; padding: 6px; word-break: break-all !important; }
.poster-bottom { padding-top: 10px; border-top: 1px solid #e5e7eb; text-align: center; }
.poster-slogan { font-size: 12px; color: #2d7a4f; font-weight: 600 !important; }

.share-section { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.share-section-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px !important; }
.share-code-row { display: flex; align-items: center; gap: 10px; }
.share-code-big { flex: 1; font-size: 24px; font-weight: 700; color: #2d7a4f; letter-spacing: 3px; font-family: 'SFMono-Regular', Consolas, monospace; background: #f0fdf4; padding: 10px 14px; border-radius: 10px; text-align: center; border: 1px solid #d1fadf !important; }
.share-link-row { display: flex; align-items: center; gap: 10px; }
.share-link-input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--text-secondary); background: #f9fafb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; }
.share-copy-btn { background: var(--primary); color: #fff; border: none; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0 !important; }
.share-copy-btn:active { transform: scale(.96); }
.share-tip { font-size: 11px; color: var(--text-light); margin-top: 8px; line-height: 1.5 !important; }
.share-actions { margin: 14px 0; }
.share-action-btn { width: 100%; padding: 13px 0; border-radius: 12px; font-size: 15px; font-weight: 600; border: none; cursor: pointer !important; }
.share-action-btn.primary { background: linear-gradient(135deg, #2d7a4f, #4fa877); color: #fff; box-shadow: 0 8px 16px rgba(45,122,79,0.25); }
.share-action-btn:active { transform: scale(.98); }
.share-stats { background: #fff; border-radius: 14px; padding: 16px; display: flex; align-items: center; justify-content: space-around; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.share-stat-item { text-align: center; }
.share-stat-value { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1.2 !important; }
.share-stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px !important; }
.share-stat-line { width: 1px; height: 32px; background: var(--border); }

/* ===== 编辑资料（头像 + 昵称）===== */
.ep-preview {
  width: 88px; height: 88px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 50px !important;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  overflow: hidden;
}
.ep-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-upload-btn {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 18px;
  font-size: 13px !important;
  cursor: pointer;
  margin-right: 6px;
}
.ep-upload-btn:hover { background: var(--primary); color: #fff; }
.ep-clear-btn {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--border);
  color: var(--text-light);
  border-radius: 18px;
  font-size: 13px !important;
  cursor: pointer;
  background: #fff;
}
.ep-clear-btn:hover { color: var(--danger); border-color: var(--danger); }
.ep-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.ep-emoji-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px !important;
  background: #f7f7f7;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .12s;
}
.ep-emoji-btn:hover { transform: translateY(-1px); }
.ep-emoji-btn.active {
  background: #fff5ec;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(212,98,45,0.18);
}

/* ===== 商品/分类首屏骨架（"正在加载商品…"） =====
   之前 init 同步阶段直接渲染了 data.js 默认商品（占位），被后端真实数据替换时形成肉眼可见的闪烁。
   现在 init 先 await 后端数据再 render，首屏过渡用一个 loading 骨架（不在显位置扰动用户感知）。 */
.grid-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
  color: var(--text-light, #888);
  font-size: 13px !important;
  position: relative;
}
.grid-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(45,122,79,.18);
  border-top-color: var(--primary, #2d7a4f);
  border-radius: 50%;
  vertical-align: -2px;
  animation: grid-loading-spin .8s linear infinite;
}
@keyframes grid-loading-spin {
  to { transform: rotate(360deg); }
}

.cat-tabs-loading {
  padding: 12px 16px;
  color: var(--text-light, #888);
  font-size: 13px !important;
}

.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 16px;
  color: var(--text-light, #888);
  font-size: 14px !important;
}

/* ===== APP 版本更新提示弹窗 ===== */
.app-update-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
}
.app-update-modal {
  width: 100%; max-width: 320px;
  background: #fff; border-radius: 16px;
  padding: 24px 22px 20px; box-sizing: border-box;
  text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.aum-title { font-size: 18px; font-weight: 700; color: #1f2d27; margin-bottom: 6px !important; }
.aum-sub { font-size: 13px; color: var(--text-light, #888); margin-bottom: 14px !important; }
.aum-notes {
  text-align: left; font-size: 13px; line-height: 1.7; color: #445 !important;
  background: #f6f8f7; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px;
  max-height: 160px; overflow: auto; white-space: pre-wrap;
}
.aum-actions { display: flex; gap: 12px; }
.aum-btn {
  flex: 1; height: 44px; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer !important;
}
.aum-now { background: var(--primary, #2d7a4f); color: #fff; }
.aum-later { background: #eef1f0; color: #556; }
.aum-force-tip { margin-top: 12px; font-size: 12px; color: #c0392b !important; }

/* ===== 下拉刷新指示器（Pull-to-Refresh）===== */
.ptr-indicator {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 46px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(45,122,79,0.06);
  color: var(--primary, #2d7a4f);
  font-size: 13px;
  z-index: 99998;            /* 盖在 top-bar(1000) 之上；低于 modal-overlay(9999999) */
  transform: translateY(-100%);
  transition: transform .25s ease;
  pointer-events: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.ptr-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(45,122,79,0.3);
  border-top-color: var(--primary, #2d7a4f);
  border-radius: 50%;
  transition: transform .2s ease;
}
.ptr-indicator.ptr-ready .ptr-spinner { transform: rotate(180deg); }
.ptr-indicator.ptr-loading .ptr-spinner {
  animation: ptr-spin .8s linear infinite;
}
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ===== 荔斛种树 · 1:1 复刻 prototype/index.html ===== */
/* 「我要种树」已从菜单项改为订单下方的广告位，菜单高亮样式随之移除 */

/* ===== 品牌顶栏===== */
.tb-brandbar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 12px;
  background: linear-gradient(135deg, #1d4a34, #2e7d54); color: #fff;
  box-shadow: 0 6px 18px rgba(29, 74, 52, .25); position: relative; overflow: hidden;
}
.tb-brandbar::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
}
.tb-brandbar .tb-back {
  width: 40px; height: 40px; flex: none; cursor: pointer; position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  margin-left: -6px; color: rgba(255,255,255,.95);
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s;
}
.tb-brandbar .tb-back:active { opacity: .55; }
/* 原型 chevron 图标朝右，返回键需水平翻转成朝左 */
.tb-brandbar .tb-back .tb-back-ico { transform: scaleX(-1); stroke-width: 2.4; }
/* 顶栏已移除 logo 方块（原 .tb-logo 样式随之删除） */
.tb-brandbar .tb-info { flex: 1; min-width: 0; position: relative; z-index: 2; }
.tb-brandbar .tb-name { font-size: 17px; font-weight: 800; letter-spacing: 1.5px; }
.tb-brandbar .tb-sub { font-size: 11px; opacity: .82; margin-top: 1px; }
.tb-brandbar .tb-lvl {
  font-size: 12px; background: linear-gradient(135deg, #c9a45c, #b9883a); color: #2a1c08;
  padding: 5px 12px; border-radius: 999px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 4px 10px rgba(180,140,60,.35); position: relative; z-index: 2;
}

/* ===== 滚动容器 + 子页 ===== */
.tb-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; background: #fbfdfb; }
.tb-scroll::-webkit-scrollbar { display: none; }
.tp-page { display: none; padding-bottom: 18px; }
.tp-page.active { display: block; animation: tpPageIn .34s cubic-bezier(.22,.61,.36,1); }
@keyframes tpPageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== 下拉刷新 =====
   指示器是 .tb-scroll 的第一个子元素、position:sticky; top:0，
   靠 JS 改 height 让它「长出来」，下方内容自然被顶下去。
   z-index 要高于 .tp-page，但低于弹层（t-sheet-mask）。
   ⚠️ 曾踩两个坑：
   1) .tp-pull-txt 不能用绝对定位（top:46px）：容器高 68px 且父级 overflow:hidden，
      位移一大文案就被裁掉，只露上半截。现在用 flex 列随高度居中。
   2) sticky 定位在 .tb-scroll 里会出现「同一个指示器渲染两份」的视觉：
      顶部残留一份被裁切的、下面又一份完整的。改用 relative（普通流内首元素），
      内容整体下移的效果一样，但只有一份、不会重复。 */
.tb-scroll .tp-pull {
  position: relative; top: auto; left: auto; width: 100%;
  height: 0; overflow: hidden; opacity: 0;
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 8; pointer-events: none;
  flex: 0 0 auto;
}
.tb-scroll .tp-pull-in {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; padding-bottom: 8px;
  height: 68px; flex: 0 0 auto;
}
.tb-scroll .tp-pull-ring { position: relative; width: 36px; height: 36px; flex: 0 0 36px; }
/* 下拉过程中圆环匀速转，暗示"正在加载" */
.tb-scroll .tp-pull-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: tpPullSpin 1s linear infinite; }
@keyframes tpPullSpin { to { transform: rotate(360deg); } }
.tb-scroll .tp-pull-track { fill: none; stroke: #dce8e0; stroke-width: 3; }
.tb-scroll .tp-pull-arc {
  fill: none; stroke: #2e7d54; stroke-width: 3; stroke-linecap: round;
  /* r=14 → 周长 ≈ 87.96 */
  stroke-dasharray: 87.96; stroke-dashoffset: 87.96;
}
.tb-scroll .tp-pull-txt {
  font-size: 11px; color: #8a958d; white-space: nowrap; font-weight: 600;
  margin-top: 4px; line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tb-scroll .tp-pull-ring svg { animation: none; }
}

/* ===== Hero ===== */
/* ===== Hero 卡片：与实拍图融合 =====
   设计要点：阶段图是「自然风景实拍」，天空偏蓝、草地偏黄绿。
   原方案用冷调深绿 (#163d2b, 色相 152°) 纯色块，与草地(色相 65°) 差 87°，
   上下都是硬边，看起来像贴纸。
   现在改成：图片铺满整卡做背景 + 上下羽化蒙版，
   底部过渡色取「偏黄绿 → 品牌深绿」，让底色从画面里自然长出来。 */
.t-hero {
  position: relative; margin: 12px; border-radius: 26px; padding: 18px 18px 20px;
  overflow: hidden; background: #162e1c;   /* 兜底色，仅图片未加载时可见 */
  box-shadow: 0 16px 34px rgba(22,46,28,.30);
  min-height: 430px;
}
/* 顶栏光晕（保留，但减弱，避免与图片争抢） */
.t-hero::before {
  content: ''; position: absolute; left: -50px; top: -60px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
  pointer-events: none;
}
/* 顶部羽化：深绿由浓到淡盖住天空，保证等级环/连击徽章的白字可读 */
.t-hero::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 190px; z-index: 2;
  background: linear-gradient(180deg, rgba(28,52,34,.80) 0%, rgba(28,52,34,.34) 46%, rgba(28,52,34,0) 100%);
  pointer-events: none;
}
.t-hero-top { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.t-ring { position: relative; width: 62px; height: 62px; }
.t-ring svg { transform: rotate(-90deg); }
.t-ring .ring-track { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 6; }
.t-ring .ring-fill { fill: none; stroke: url(#ringGrad); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.t-ring .rl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.t-ring .rl b { font-size: 17px; font-weight: 800; line-height: 1; }
.t-ring .rl span { font-size: 9px; opacity: .8; margin-top: 2px; letter-spacing: 1px; }
.t-streak {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: #ffe7b0; background: rgba(0,0,0,.20); padding: 6px 12px; border-radius: 999px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.t-streak svg { color: #ffb347; }
/* 阶段实拍图：铺满整张卡片做背景。
   - 负外边距顶掉 .t-hero 的 padding 实现「真正的通栏」（左右顶到卡片圆角）
   - position:absolute 让它能超出 .t-hero-top 的排版流，顶栏浮在图片之上 */
.t-tree-wrap {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 1;
  overflow: hidden;
}
.t-tree {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%;   /* 焦点略偏上，让树干+草地都进画面 */
  border-radius: 0;
}
/* 底部过渡：从偏黄绿（贴近画面草地）渐隐到品牌深绿，消除图片与底色的硬边 */
.t-tree-wrap::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 178px; z-index: 2;
  background: linear-gradient(180deg,
    rgba(92,104,46,0) 0%,
    rgba(72,86,42,.34) 42%,
    rgba(48,64,32,.72) 74%,
    rgba(22,44,27,1) 100%);
  pointer-events: none;
}
.t-progress {
  position: absolute; left: 18px; right: 18px; bottom: 20px; z-index: 5;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.28); border-radius: 16px;
  padding: 13px 15px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
/* 进度条浮在图片上，轨道加深并加投影，保证在草地/天空两种背景上都可读 */
.tp-bar { height: 9px; background: rgba(12,28,18,.45); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.30); }
.tp-fill {
  height: 100%; width: 0; background: linear-gradient(90deg, #ffd28a, #c9a45c);
  border-radius: 999px; transition: width .55s ease; box-shadow: 0 0 8px rgba(255,210,138,.6);
}
.tp-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.tp-meta b { font-size: 14px; font-weight: 800; }

/* ===== 浇水 ===== */
.t-water-zone { padding: 18px 18px 4px; display: flex; flex-direction: column; align-items: center; gap: 11px; position: relative; }

/* 浇水按钮：从「一整块死板的绿色药丸」改成「水滴 + 今日进度环 + 文案」的结构。
   进度环直接表达「今天浇了多少 / 上限多少」，按钮本身就携带信息，
   不用再低头看下面那行小字。 */
.t-water-btn {
  position: relative; width: 100%; max-width: 344px; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 13px; text-align: left;
  padding: 13px 20px 13px 14px; border-radius: 22px;
  background:
    radial-gradient(120% 160% at 8% 0%, rgba(255,255,255,.22), transparent 55%),
    linear-gradient(135deg, #34895c, #1d4a34);
  color: #fff; font-family: inherit;
  box-shadow:
    0 14px 30px rgba(29,74,52,.30),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -2px 6px rgba(0,0,0,.16);
  overflow: hidden;
  transition: transform .16s cubic-bezier(.3,1.4,.5,1), box-shadow .16s;
  -webkit-tap-highlight-color: transparent;
}
/* 缓慢的高光掠过，让静止时也有呼吸感（比原来固定的斜切光更柔和） */
.t-water-btn::after {
  content: ''; position: absolute; top: -40%; left: -70%; width: 45%; height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  transform: skewX(-18deg); animation: tpSheen 4.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tpSheen { 0%, 65% { left: -70%; } 100% { left: 140%; } }

/* 水滴图标 + 今日进度环 */
.t-water-btn .wb-ring { position: relative; width: 44px; height: 44px; flex: 0 0 44px; }
.t-water-btn .wb-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.t-water-btn .wb-track { fill: none; stroke: rgba(255,255,255,.26); stroke-width: 3; }
.t-water-btn .wb-prog {
  fill: none; stroke: #bff0d4; stroke-width: 3; stroke-linecap: round;
  /* r=19 → 周长 ≈ 119.38，用 dasharray 做进度；JS 按今日占比改 dashoffset */
  stroke-dasharray: 119.38; stroke-dashoffset: 119.38;
  transition: stroke-dashoffset .6s cubic-bezier(.4,0,.2,1);
}
.t-water-btn .wb-drop {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  animation: wbBob 2.6s ease-in-out infinite;
}
.t-water-btn .wb-drop svg { width: 20px; height: 20px; }
@keyframes wbBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

.t-water-btn .wb-txt { position: relative; min-width: 0; display: flex; flex-direction: column; }
#treeWaterMain { font-size: 18px; font-weight: 800; letter-spacing: 3px; line-height: 1.15; }
.t-water-btn .sub {
  display: block; font-size: 11px; font-weight: 500; opacity: .82; letter-spacing: 0; margin-top: 3px;
}

/* 点击涟漪：从按下的位置扩散 */
.t-water-btn .wb-ripple {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.42); transform: translate(-50%, -50%) scale(0);
  animation: wbRipple .62s cubic-bezier(.2,.7,.3,1) forwards; pointer-events: none;
}
@keyframes wbRipple { to { transform: translate(-50%, -50%) scale(26); opacity: 0; } }

/* 按压：轻微下沉 + 阴影收紧，比原来的纯 scale 更有"压下去"的实感 */
.t-water-btn:active:not(:disabled) {
  transform: translateY(2px) scale(.985);
  box-shadow: 0 6px 14px rgba(29,74,52,.30), inset 0 2px 6px rgba(0,0,0,.22);
}
.t-water-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.t-water-btn:disabled::after { animation: none; }
.t-water-btn:disabled .wb-drop { animation: none; }

/* 不可用时整体降饱和，暗示"点了也没用"，而不是单纯变淡 */
.t-water-btn.is-off { background: linear-gradient(135deg, #6f8479, #55665d); box-shadow: 0 6px 16px rgba(40,60,50,.18); }

.t-water-tip { font-size: 13px; color: #5c6b63; text-align: center; }
.t-water-tip b { color: #2e7d54; font-weight: 800; }
.water-drop {
  position: absolute; width: 13px; height: 17px;
  background: radial-gradient(circle at 32% 28%, #eafaff, #56b6f7);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  left: 50%; top: -6px; transform: translateX(-50%); pointer-events: none;
  animation: tpFall .95s cubic-bezier(.5,0,.9,.4) forwards; z-index: 5;
}
@keyframes tpFall {
  0% { opacity: 0; transform: translate(-50%,0) scale(.4); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx,0px)), 300px) scale(1.05); }
}
.float-num {
  position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-size: 15px;
  font-weight: 800; color: #3aa7d8; text-shadow: 0 1px 3px rgba(255,255,255,.8);
  pointer-events: none; animation: tpFloatUp 1.1s ease-out forwards; z-index: 6;
}
@keyframes tpFloatUp {
  0% { opacity: 0; transform: translate(-50%,6px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-40px); }
}

/* 提示条（浇水/升级反馈） */
.t-tip { min-height: 20px; text-align: center; font-size: 13px; font-weight: 700; color: #2e7d54; padding: 12px 18px 0; }

/* ===== 我的树 ===== */
.t-card {
  margin: 16px; background: linear-gradient(160deg, #ffffff, #f4faf5); border-radius: 20px;
  box-shadow: 0 6px 24px rgba(29,74,52,.08); padding: 18px; border: 1px solid #e3ede6;
}
.t-card h3 { font-size: 17px; color: #1d4a34; margin: 0 0 5px; font-weight: 800; }
.t-card p { font-size: 13px; color: #5c6b63; margin: 0; }
.t-timeline { position: relative; margin: 6px 16px 16px; padding-left: 28px; border-left: 2px solid #e8f4ec; }
.t-timeline .step { position: relative; padding: 0 0 22px 24px; }
.t-timeline .step:last-child { padding-bottom: 0; }
.t-timeline .step .dot {
  position: absolute; left: -37px; top: 3px; width: 15px; height: 15px; border-radius: 50%;
  background: #cfe0d4; z-index: 2; border: 3px solid #fff; box-shadow: 0 0 0 2px #e8f4ec;
}
.t-timeline .step.done .dot { background: #2e7d54; }
.t-timeline .step.current .dot { background: #c9a45c; box-shadow: 0 0 0 4px #f5eddc; animation: tpPulse 2s ease-in-out infinite; }
@keyframes tpPulse { 0%,100% { box-shadow: 0 0 0 4px #f5eddc; } 50% { box-shadow: 0 0 0 7px rgba(201,164,92,.18); } }
.t-timeline .step .line { position: absolute; left: -29px; top: 18px; bottom: -22px; width: 2px; background: #e8f4ec; }
.t-timeline .step:last-child .line { display: none; }
.t-timeline .step .title { font-size: 15px; font-weight: 800; color: #22302a; }
.t-timeline .step.done .title { color: #2e7d54; }
.t-timeline .step .desc { font-size: 12px; color: #5c6b63; margin-top: 2px; }
.t-timeline .step .reward {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #8a6a28;
  background: linear-gradient(135deg, #f5eddc, #efe0c2); padding: 3px 9px; border-radius: 8px;
  margin-top: 6px; font-weight: 700;
}
.t-streak-box {
  margin: 16px; background: #fff; border-radius: 20px; box-shadow: 0 6px 24px rgba(29,74,52,.08);
  padding: 17px; border: 1px solid #e3ede6;
}
.t-streak-box h4 { font-size: 15px; color: #1d4a34; margin: 0 0 13px; display: flex; justify-content: space-between; font-weight: 800; }
.t-streak-box h4 span { font-size: 12px; color: #c9a45c; font-weight: 700; }
.t-streak-box .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.t-streak-box .day {
  aspect-ratio: 1; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #5c6b63; background: #f2f5f2; font-weight: 600;
}
.t-streak-box .day.on { background: linear-gradient(160deg, #2e7d54, #1d4a34); color: #fff; font-weight: 800; box-shadow: 0 4px 10px rgba(46,125,84,.28); }
.t-streak-box .day.today { outline: 2px dashed #4caf82; outline-offset: -3px; color: #2e7d54; font-weight: 800; background: #fff; }

/* ===== 任务中心 ===== */
.t-task-tabs { display: flex; gap: 9px; padding: 16px 18px 6px; }
.t-task-tabs .tt {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 999px; background: #fff;
  border: 1px solid #e8f4ec; font-size: 13px; color: #1d4a34; cursor: pointer;
  transition: .2s; font-weight: 600; box-shadow: 0 6px 24px rgba(29,74,52,.08);
}
.t-task-tabs .tt.active { background: linear-gradient(135deg, #2e7d54, #1d4a34); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(46,125,84,.28); font-weight: 800; }
.task-card {
  display: flex; align-items: center; gap: 13px; background: #fff; border-radius: 14px;
  padding: 14px; margin: 11px 16px 0; box-shadow: 0 6px 24px rgba(29,74,52,.08);
  border: 1px solid #e3ede6; transition: transform .14s;
}
.task-card:active { transform: scale(.99); }
.task-card .ico {
  width: 44px; height: 44px; border-radius: 13px;
  background: linear-gradient(160deg, #e8f4ec, #d6ecdd);
  display: flex; align-items: center; justify-content: center; color: #2e7d54; flex: none;
}
.task-card .info { flex: 1; min-width: 0; }
.task-card .info .t { font-size: 14px; font-weight: 700; color: #22302a; }
.task-card .info .desc { font-size: 12px; color: #5c6b63; margin-top: 2px; }
.task-card .right { text-align: center; flex: none; }
.task-card .right .rw { font-size: 13px; color: #8a6a28; font-weight: 800; display: flex; align-items: center; gap: 3px; justify-content: center; margin-bottom: 7px; }
.task-card .btn {
  border: none; border-radius: 999px; padding: 8px 15px; font-size: 12px; cursor: pointer;
  font-weight: 700; white-space: nowrap; transition: transform .12s; font-family: inherit;
}
.task-card .btn:active { transform: scale(.95); }
.task-card .btn.go { background: #fff; border: 1.5px solid #2e7d54; color: #2e7d54; }
.task-card .btn.claim { background: linear-gradient(135deg, #c9a45c, #b9883a); color: #fff; box-shadow: 0 5px 12px rgba(180,140,60,.34); }
.task-card .btn.done { background: #f2f5f2; color: #9aa39a; cursor: default; }

/* ===== 邀请 ===== */
.t-invite-card {
  margin: 16px; position: relative; overflow: hidden; border-radius: 20px;
  background: linear-gradient(150deg, #ffe0b0, #ffb06a); color: #5c3a14; padding: 20px;
  box-shadow: 0 16px 34px rgba(190,140,60,.32);
}
.t-invite-card::before { content: ''; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; background: rgba(255,255,255,.28); border-radius: 50%; }
.t-invite-card::after { content: ''; position: absolute; left: -40px; bottom: -50px; width: 140px; height: 140px; background: rgba(255,255,255,.16); border-radius: 50%; }
.t-invite-card .user { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; position: relative; z-index: 2; }
.t-invite-card .avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #fff8ed;
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: #b56a1f; font-size: 18px;
}
.t-invite-card .user .nm { font-size: 15px; font-weight: 800; }
.t-invite-card .user .sub { font-size: 12px; opacity: .85; margin-top: 1px; }
.t-invite-card .code-label { font-size: 12px; opacity: .9; position: relative; z-index: 2; }
.t-invite-card .code {
  background: #fff; color: #5c3a14; padding: 13px 15px; border-radius: 13px;
  display: flex; justify-content: space-between; align-items: center; font-size: 13px;
  margin-top: 8px; position: relative; z-index: 2;
}
.t-invite-card .code b { font-family: "SF Mono", monospace; font-size: 18px; letter-spacing: 3px; font-weight: 800; }
.t-invite-card .copy { font-size: 12px; background: #5c3a14; color: #ffd9a8; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-weight: 700; }
.t-invite-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 16px; }
.t-invite-stats .cell {
  background: #fff; border-radius: 14px; padding: 15px 8px; text-align: center;
  box-shadow: 0 6px 24px rgba(29,74,52,.08); border: 1px solid #e3ede6;
}
.t-invite-stats .cell .v { font-size: 21px; font-weight: 800; color: #2e7d54; }
.t-invite-stats .cell .l { font-size: 11px; color: #5c6b63; margin-top: 4px; }
.t-rank {
  margin: 16px; background: #fff; border-radius: 20px; box-shadow: 0 6px 24px rgba(29,74,52,.08);
  padding: 17px; border: 1px solid #e3ede6;
}
.t-rank h4 { font-size: 15px; color: #1d4a34; margin: 0 0 12px; font-weight: 800; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e3ede6; }
.rank-row:last-child { border-bottom: 0; }
.rank-row .rk { width: 24px; font-weight: 800; color: #5c6b63; text-align: center; font-size: 14px; }
.rank-row .rk.top { color: #c9a45c; }
.rank-row .av {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(160deg, #e8f4ec, #d6ecdd);
  color: #2e7d54; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.rank-row .nm { flex: 1; font-size: 13px; color: #22302a; font-weight: 600; }
.rank-row .ct { font-size: 13px; color: #2e7d54; font-weight: 800; }

/* ===== 分类Tab + 商品网格 ===== */
.t-cat-tabs { display: flex; gap: 9px; padding: 16px 16px 6px; overflow-x: auto; }
.t-cat-tabs::-webkit-scrollbar { display: none; }
.t-cat-tabs .ct {
  white-space: nowrap; padding: 8px 16px; border-radius: 999px; background: #fff;
  border: 1px solid #e8f4ec; font-size: 13px; color: #1d4a34; cursor: pointer;
  transition: .2s; font-weight: 600; box-shadow: 0 6px 24px rgba(29,74,52,.08);
}
.t-cat-tabs .ct.active { background: linear-gradient(135deg, #2e7d54, #1d4a34); color: #fff; border-color: transparent; font-weight: 800; }
.t-goods { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 13px 16px; }
.t-goods .card {
  background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(29,74,52,.08);
  overflow: hidden; display: flex; flex-direction: column; border: 1px solid #e3ede6;
  transition: transform .15s;
}
.t-goods .card:active { transform: translateY(2px); }
.t-goods .card .img { height: 108px; display: flex; align-items: center; justify-content: center; position: relative; }
.t-goods .card .img svg { width: 42px; height: 42px; color: rgba(255,255,255,.92); }
/* 后台配了商品图：铺满封面区，分类底色仅作为加载中的底 */
/* 后台配了商品图：完整显示不裁切。
   object-fit:contain 而非 cover —— cover 会为铺满容器而裁掉图片两侧，
   商品主图（包装盒+文字）被切掉就失去了展示意义。
   配合白底，避免 contain 留白时透出分类底色。 */
.t-goods .card .img .goods-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
  background: #fff;
}
/* 配了图时底色改白（原来是分类渐变，contain 会在图片上下留白）。
   用 JS 给容器加 .has-img 类，不依赖 :has() —— 微信内置浏览器老版本不支持。 */
/* 未配图 / 配图加载失败：保留原分类图标占位 */
.t-goods .card .img .goods-ico { display: flex; align-items: center; justify-content: center; }
/* 配了商品图的卡片：封面底色改白（contain 上下留白时不该透出分类渐变） */
/* 配了商品图：封面改为正方形。
   商品主图多为 1:1（实测后台已上传图为 1254x1254），而默认封面是约 3.19:1 的横向条，
   object-fit:contain 下会按高缩放、两侧各留约 1/3 空白。
   改成 aspect-ratio:1/1 后，图片既完整显示又刚好铺满，无浪费。 */
.t-goods .card .img.has-img {
  background: #fff;
  height: auto;
  aspect-ratio: 1 / 1;
}
.t-goods .card .img .cat-tag {
  position: absolute; top: 9px; left: 9px; font-size: 10px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.18); padding: 3px 9px; border-radius: 999px;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.t-goods .card.product .img { background: linear-gradient(150deg, #7fce9f, #3f9e6e); }
.t-goods .card.ticket .img { background: linear-gradient(150deg, #7fc3e8, #2f7fb0); }
.t-goods .card.hotel .img { background: linear-gradient(150deg, #ffb877, #e07c3a); }
.t-goods .card .info { padding: 12px 13px; flex: 1; display: flex; flex-direction: column; }
.t-goods .card .info .t { font-size: 13px; font-weight: 700; line-height: 1.45; color: #22302a; }
.t-goods .card .info .pt { font-size: 11px; color: #5c6b63; margin-top: 4px; }
.t-goods .card .info .price { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; gap: 4px; }
.t-goods .card .info .price .pt-num { color: #8a6a28; font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 3px; }
.t-goods .card .info .price .cash { font-size: 11px; color: #5c6b63; }
.t-goods .card .info .btn {
  margin-top: 11px; border: none; border-radius: 11px; padding: 9px 0; font-size: 12px;
  color: #fff; background: linear-gradient(135deg, #2e7d54, #1d4a34); cursor: pointer;
  font-weight: 800; transition: transform .12s; font-family: inherit;
}
.t-goods .card .info .btn:active { transform: scale(.97); }
.t-goods .card .info .btn:disabled { background: #e3e9e5; color: #9aa39a; cursor: not-allowed; }
.t-empty { grid-column: 1 / -1; font-size: 12px; color: #9aa39a; text-align: center; padding: 18px 0; }

/* ===== 我的兑换（兑换记录）===== */
#page-tree #treeOrdersBox { padding: 12px; }
#page-tree .o-card {
  background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 11px;
  border: 1px solid #e3ede6; box-shadow: 0 6px 24px rgba(29,74,52,.07);
}
#page-tree .o-head { display: flex; justify-content: space-between; align-items: center; }
#page-tree .o-no { font-size: 11px; color: #9aa39a; font-weight: 600; }
/* 「去掉」小字按钮：放在状态标签左侧，与状态标签同属右侧操作区。
   做成低干扰的文字按钮而不是图标叉，避免误触且不与「继续支付」主按钮抢视觉。 */
#page-tree .o-acts { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#page-tree .o-del {
  font-size: 11px; font-weight: 600; color: #9aa39a; cursor: pointer;
  padding: 3px 4px; border: none; background: none; line-height: 1;
}
#page-tree .o-del:active { color: #c0392b; }
#page-tree .o-st {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: #eef2ef; color: #5c6b63;
}
#page-tree .o-st.pending_cash { background: #fff3e8; color: #c46a23; }
#page-tree .o-st.done { background: #e8f4ec; color: #1d4a34; }
#page-tree .o-st.cancelled { background: #f1f3f2; color: #96a09a; }
/* 已取消的整张卡做降饱和 + 去饱和灰度，让「历史记录」和「进行中」一眼分得开 */
#page-tree .o-card.is-cancelled { opacity: .72; }
#page-tree .o-card.is-cancelled .o-name { color: #7b877f; text-decoration: line-through; text-decoration-color: #c4cdc7; }
#page-tree .o-name {
  margin-top: 8px; font-size: 15px; font-weight: 800; color: #22302a;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
#page-tree .o-meta { margin-top: 6px; display: flex; flex-wrap: wrap; }
#page-tree .o-meta .m { font-size: 11px; color: #6b7a72; margin-right: 12px; font-weight: 600; }
#page-tree .o-addr { margin-top: 9px; padding: 9px 10px; border-radius: 10px; background: #f7faf8; }
#page-tree .o-addr .a-l { font-size: 10px; color: #9aa39a; margin-right: 6px; }
#page-tree .o-addr .a-v { font-size: 12px; color: #22302a; font-weight: 700; }
#page-tree .o-addr .a-d { display: block; margin-top: 3px; font-size: 11px; color: #6b7a72; line-height: 1.5; }
#page-tree .o-pay {
  width: 100%; margin-top: 11px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, #2e7d54, #1d4a34);
  color: #fff; font-size: 13px; font-weight: 800; padding: 11px 0; cursor: pointer;
}
#page-tree .o-tip { margin-top: 9px; font-size: 11px; color: #2e7d54; font-weight: 600; text-align: center; }
#page-tree .t-empty .e-t { font-size: 14px; color: #5c6b63; font-weight: 700; }
#page-tree .t-empty .e-d { margin-top: 5px; font-size: 12px; color: #9aa39a; }
#page-tree .t-empty .e-btn {
  display: block; margin: 18px auto 0; width: 140px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, #2e7d54, #1d4a34);
  color: #fff; font-size: 13px; font-weight: 800; padding: 12px 0; cursor: pointer;
}

/* 明细入口：单位旁边的小字链接。
   早先把它做成绝对定位压在卡片右下角，会和「兑换 ›」主操作重叠、且溢出卡片边界。 */
#page-tree .t-profile .asset .unit { display: flex; align-items: center; }
#page-tree .t-profile .asset .detail-link {
  margin-left: 6px; font-size: 11px; font-weight: 600; color: #6b7a72;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
#page-tree .t-profile .asset .detail-link:active { color: #1d4a34; }

/* 资产明细列表（复用兑换弹层） */
.t-sheet .asset-log-box {
  max-height: 46vh; overflow-y: auto; margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}
.t-sheet .al-empty { text-align: center; font-size: 13px; color: #9aa39a; padding: 30px 0; }
.t-sheet .al-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px dashed #eef3f0;
}
.t-sheet .al-l { min-width: 0; }
.t-sheet .al-t {
  font-size: 13px; color: #22302a; font-weight: 600;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.t-sheet .al-d { font-size: 11px; color: #9aa39a; margin-top: 3px; }
.t-sheet .al-r { flex: none; text-align: right; padding-left: 10px; }
.t-sheet .al-delta { font-size: 16px; font-weight: 800; }
.t-sheet .al-delta.up { color: #1d7a4c; }
.t-sheet .al-delta.down { color: #c46a23; }
.t-sheet .al-bal { display: block; font-size: 11px; color: #9aa39a; margin-top: 2px; }

/* ===== 我的 ===== */
/* 与小程序 tree.wxss 的 .t-profile 保持一致：
   - 左右/顶部 14px ≈ 小程序 24rpx（750rpx=屏宽，24rpx≈12px，H5 另有 2px 视口差异，取 14px 视觉等价）
   - 底部 10px ≈ 小程序 20rpx：早先这里只有 4px，导致绿底比小程序明显矮一截、卡片贴边
   - 渐变第 3 个色标 = 页面底色 #fbfdfb，让绿底平滑过渡到下方白灰区，避免生硬的横向截断 */
.t-profile {
  padding: 14px 14px 10px;
  background: linear-gradient(165deg, #2e7d54 0%, #47a374 62%, #fbfdfb 100%);
}
/* 等级横幅：与小程序 tree.wxss 的 .t-me-hero 保持一致。
   ⚠️ 两个徽章字号必须一致，否则并排时胶囊高度不齐、看着歪；
   连击徽章用「白色半透明 + 细描边」而不是黑色半透明 —— 黑半透明叠在浅绿底上会显脏。 */
.t-me-hero { padding: 3px 5px 11px; }
.t-me-hero .mh-row { display: flex; align-items: center; }
.t-me-hero .mh-badge {
  flex: none;
  font-size: 12px; font-weight: 800; color: #173d2a; line-height: 1.3;
  background: linear-gradient(135deg, #ffe0ab, #f7c777);
  padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}
.t-me-hero .mh-streak {
  flex: none; margin-left: 7px;
  display: none; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 700; color: #fff; line-height: 1.3;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.42);
  padding: 5px 11px; border-radius: 999px;
}
/* treeIcon 的 SVG 用 stroke="currentColor"，这里强制把「我的」页的火焰描边改成白色，
   否则默认橙色叠在白半透明底上看不清（首页 Hero 是深底，仍用橙色，不受影响） */
.t-me-hero .mh-streak svg { flex: none; stroke: #fff; }
/* 进度文案并入徽章行：flex:1 + min-width:0 保证徽章不被压缩、长文案截断 */
.t-me-hero .mh-sub {
  flex: 1; min-width: 0; margin-left: 7px;
  font-size: 12px; color: rgba(255,255,255,.92); font-weight: 600;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.t-profile-card { background: #fff; border-radius: 20px; padding: 12px; box-shadow: 0 14px 40px rgba(29,74,52,.16); }
.t-profile .asset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.t-profile .asset { position: relative; border-radius: 15px; padding: 11px 10px; display: flex; align-items: center; cursor: pointer; transition: transform .12s; overflow: hidden; }
.t-profile .asset:active { transform: scale(.98); }
.t-profile .asset.fruit { background: linear-gradient(150deg, #fff3e8, #ffe2c6); border: 1px solid rgba(255,138,61,.28); }
.t-profile .asset.water { background: linear-gradient(150deg, #e8f6fc, #cfeaf8); border: 1px solid rgba(58,167,216,.28); }
.t-profile .asset .icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.07); }
.t-profile .asset.fruit .icon { color: #ff8a3d; }
.t-profile .asset.water .icon { color: #3aa7d8; }
/* 数字与单位上下两行：不用 baseline，避免数字位数不同导致单位上下飘 */
.t-profile .asset .txt { flex: 1; min-width: 0; margin-left: 8px; }
.t-profile .asset .num { font-size: 21px; font-weight: 800; color: #22302a; line-height: 1.1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.t-profile .asset .unit { font-size: 11px; color: #6b7a72; font-weight: 600; margin-top: 1px; }
.t-profile .asset .go { flex: none; margin-left: 4px; display: flex; align-items: center; gap: 1px; font-size: 11px; font-weight: 700; }
.t-profile .asset.fruit .go { color: #c46a23; }
.t-profile .asset.water .go { color: #2b87b3; }

/* 成长进度条：白卡下半部分，撑起页面高度并说明「还要浇多少」 */
.t-me-grow { margin-top: 11px; padding-top: 11px; border-top: 1px solid #eef3f0; }
.t-me-grow .g-top { display: flex; justify-content: space-between; align-items: baseline; }
.t-me-grow .g-l { font-size: 12px; font-weight: 700; color: #5c6b63; }
.t-me-grow .g-r { font-size: 11px; font-weight: 700; color: #c9a45c; }
.t-me-grow .g-bar { margin-top: 6px; height: 7px; border-radius: 999px; background: #eef2ef; overflow: hidden; }
.t-me-grow .g-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #7fc3e8, #2e7d54); transition: width .3s; }

/* 今日浇水：左侧文案 + 右侧按钮 */
.t-me-today { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.t-me-today .td-t { font-size: 12px; font-weight: 700; color: #5c6b63; }
.t-me-today .td-s { font-size: 11px; color: #9aa39a; margin-left: 6px; font-weight: 600; }
.t-me-today .td-btn {
  flex: none; font-size: 12px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #2e7d54, #1d4a34); padding: 6px 15px; border-radius: 999px;
}
.t-menu {
  background: #fff; margin: 14px; border-radius: 16px; box-shadow: 0 6px 24px rgba(29,74,52,.08);
  overflow: hidden; border: 1px solid #e3ede6;
}
.t-menu .item {
  padding: 15px 16px; border-bottom: 1px solid #e3ede6; display: flex; justify-content: space-between;
  align-items: center; cursor: pointer; font-size: 14px; color: #22302a; font-weight: 600;
  transition: background .15s;
}
.t-menu .item:last-child { border-bottom: 0; }
.t-menu .item:active { background: #e8f4ec; }
.t-menu .item .l { display: flex; align-items: center; gap: 11px; min-width: 0; }
/* 菜单项改为「图标 + 标题/副标题」两行，与小程序一致 */
.t-menu .item .l .txt { min-width: 0; }
.t-menu .item .l .txt .t { font-size: 14px; font-weight: 700; color: #22302a; }
.t-menu .item .l .txt .d {
  margin-top: 3px; font-size: 11px; font-weight: 500; color: #8a968f;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.t-menu .item .ico {
  width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(160deg, #e8f4ec, #d6ecdd);
  display: flex; align-items: center; justify-content: center; color: #2e7d54;
}
.t-menu .item .r { color: #c2ccc5; font-size: 18px; }

/* ===== 底部 5tab ===== */
.t-tabbar {
  flex: none; display: flex; align-items: stretch; background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid #e3ede6; height: 52px;
  box-shadow: 0 -6px 20px rgba(29,74,52,.08); position: relative; z-index: 50;
}
.t-tabbar .ttab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  font-size: 10px; color: #5c6b63; cursor: pointer; padding-bottom: 4px;
  transition: color .2s; position: relative;
}
.t-tabbar .ttab .ti {
  width: 29px; height: 29px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; color: #5c6b63; transition: .2s;
}
/* 选中态：仅图标变绿 + 文字加粗，去掉图标底色块（原为绿色渐变圆角背景） */
.t-tabbar .ttab.active { color: #2e7d54; font-weight: 800; }
.t-tabbar .ttab.active .ti { background: transparent; color: #2e7d54; }
.t-tabbar .ttab.center { flex: none; width: 62px; padding-bottom: 3px; position: relative; }
.t-tabbar .ttab.center::before {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 68px; height: 64px;
  transform: translateX(-50%); background: rgba(255,255,255,.92);
  border-top-left-radius: 50% 100%; border-top-right-radius: 50% 100%; z-index: 1;
}
.t-tabbar .ttab.center .ti {
  width: 36px; height: 36px; border-radius: 50%; color: #fff;
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -6px); z-index: 2;
}
.t-tabbar .ttab.center .ti::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(145deg, #4caf82, #2e7d54); z-index: 0;
  box-shadow: 0 6px 14px rgba(46,125,84,.35);
}
.t-tabbar .ttab.center .ti svg { position: relative; z-index: 1; }
.t-tabbar .ttab.center { color: #2e7d54; font-weight: 800; }
.t-tabbar .ttab .lbl { position: relative; z-index: 3; }
.t-tabbar .ttab.center.active .ti::after { background: linear-gradient(145deg, #2e7d54, #1d4a34); box-shadow: 0 8px 20px rgba(29,74,52,.46); }

/* ===== 兑换弹层 ===== */
.t-sheet-mask {
  position: fixed; inset: 0; background: rgba(20,40,30,.45); z-index: 900;
  display: none; align-items: flex-end; justify-content: center;
}
.t-sheet-mask.show { display: flex; }
.t-sheet {
  width: 100%; max-width: 480px; background: #fff; border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: tpSheetUp .28s cubic-bezier(.22,.61,.36,1);
}
@keyframes tpSheetUp { from { transform: translateY(100%); } to { transform: none; } }
.t-sheet .sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.t-sheet .sheet-head h4 { font-size: 17px; color: #1d4a34; margin: 0; font-weight: 800; }
.t-sheet .close-x { font-size: 20px; color: #9aa39a; cursor: pointer; line-height: 1; }
.t-sheet .desc { font-size: 12px; color: #5c6b63; margin: 8px 0 14px; }
.t-sheet .row {
  display: flex; justify-content: space-between; align-items: center; padding: 11px 0;
  font-size: 13px; color: #5c6b63; border-bottom: 1px dashed #e3ede6;
}
.t-sheet .row b { color: #c46a23; }
.t-sheet .row .cash { color: #ff8a3d; font-weight: 800; }
.t-sheet .row .muted { color: #5c6b63; }

/* ===== 兑换弹层：收货地址选择 ===== */
.t-sheet .addr-box {
  margin: 12px 0 4px; border: 1px solid #e3ede6; border-radius: 12px;
  overflow: hidden; background: #fbfdfb;
}
.t-sheet .addr-hd {
  padding: 9px 12px; font-size: 12px; font-weight: 700; color: #2e7d54;
  background: #eef6f1; cursor: pointer;
}
.t-sheet .addr-item {
  padding: 10px 12px; border-top: 1px solid #eef3f0;
  cursor: pointer; position: relative; transition: background .12s;
}
.t-sheet .addr-item.on { background: #eef6f1; }
.t-sheet .addr-item .l { display: flex; align-items: baseline; gap: 8px; }
.t-sheet .addr-item .l b { font-size: 13px; color: #22302a; }
.t-sheet .addr-item .l span { font-size: 12px; color: #6b7a72; }
.t-sheet .addr-item .d {
  margin-top: 3px; font-size: 11px; color: #8a968f;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: 20px;
}
.t-sheet .addr-item .tick {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #2e7d54; font-weight: 800; font-size: 14px;
}
.t-sheet .addr-none { color: #c46a23; font-weight: 700; cursor: pointer; }

/* ===== 兑换弹层：支付方式 ===== */
.t-sheet .pay-row { border-bottom: none; }
.t-sheet .pays { display: flex; gap: 8px; }
.t-sheet .pay {
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #f2f5f2; color: #5c6b63; border: 1px solid #e3ede6; cursor: pointer;
}
.t-sheet .pay.on { background: #eef6f1; color: #1d4a34; border-color: #2e7d54; font-weight: 800; }

.t-sheet .btn {
  width: 100%; margin-top: 18px; border: none; border-radius: 999px; padding: 14px 0;
  background: linear-gradient(135deg, #2e7d54, #1d4a34); color: #fff; font-weight: 800;
  font-size: 16px; cursor: pointer; box-shadow: 0 10px 24px rgba(29,74,52,.30);
  transition: transform .12s; font-family: inherit;
}
.t-sheet .btn:active { transform: scale(.98); }
.t-sheet .cancel { margin-top: 12px; text-align: center; font-size: 13px; color: #5c6b63; cursor: pointer; font-weight: 600; }

/* 种树页：脱离 #app 的 min-height 流，用 100dvh 自成纵向 flex，底部 tabbar 固定吸底 */
#page-tree.active {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  max-width: 480px; margin: 0 auto;
  background: #fbfdfb;
  overflow: hidden;
}
/* tree 页自带 tabbar，需清掉 #app 给全局底栏留的 padding。
   注意：CSS 里 #app{padding-bottom:...!important} 会压过 JS 的内联样式，
   所以这里必须用同等!important 的类选择器，不能只靠 JS 设 style.paddingBottom。 */
#app.tree-fullscreen { padding-bottom: 0 !important; }
/* 滚动区吃掉剩余高度，tabbar 自然落到最底 */
#page-tree .tb-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* iPhone 底部home 条适配：给 tabbar 加安全区内边距，内容不被压住 */
#page-tree .t-tabbar { flex: none; height: auto; padding-bottom: env(safe-area-inset-bottom, 0px); }

@media (prefers-reduced-motion: reduce) {
  .t-water-btn::after, .water-drop, .float-num, .tp-page.active,
  .t-water-btn .wb-drop, .t-water-btn .wb-ripple { animation: none !important; }
}
