/* =========================================================================
   QuantNova Home 首页 — iPhone Safari 响应式修复 (2026-08-23)
   仅作用域 Home 首页 (.home-*) 相关 class，不触碰交易逻辑/其它页面。
   本文件为 <head> 注入的全局 override：uni-app 会在运行时把页面 scoped
   样式后置注入到 <head>，因此凡需覆盖的冲突属性一律加 !important。
   原则：% / flex / grid / clamp / aspect-ratio / env(safe-area)。
   容器基准统一使用应用原生 .padding-w-30 (30rpx)，随屏自适应。
   ========================================================================= */

/* ---- 1. 容器基准线：首页各 section 用同一个左右 padding，两侧对称。
   原生 .padding-w-30 = 30rpx，随屏自适应；仅保证 header 用同一基准，
   避免与下方卡片左右错位。 ---- */
.home-header-bar[data-v-29475212] {
  padding-left: 30rpx !important;
  padding-right: 30rpx !important;
}

/* ---- 2. 顶部 Search 区：垂直居中 + 统一间距 + 不挤压 Search ----
   [Logo] [ Search ][Scan][Lang][User] */
.home-header-right[data-v-29475212] {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.6vw, 11px) !important;
  margin-left: clamp(6px, 1.6vw, 11px) !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
}
.home-searchbox[data-v-29475212] {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-right: clamp(4px, 1vw, 7px) !important;
  flex-shrink: 1 !important;
  flex-grow: 1 !important;
}
.home-header-search-input[data-v-29475212] {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
}
.home-header-actions[data-v-29475212] {
  flex: 0 0 auto !important;
  gap: clamp(6px, 1.6vw, 11px) !important;
  margin-left: 0 !important;
}
.home-header-avatar[data-v-29475212],
.home-lang-yuyan[data-v-29475212] {
  width: clamp(26px, 7vw, 30px) !important;
  height: clamp(26px, 7vw, 30px) !important;
  min-width: 22px !important;
  min-height: 22px !important;
  flex-shrink: 0 !important;
}
.home-header-logo[data-v-29475212] {
  width: clamp(40px, 13.5vw, 58px) !important;
  height: auto !important;
  aspect-ratio: 1 !important;
  flex-shrink: 0 !important;
}

/* ---- 3. Hero 区：左≈50% 右≈50%，固定 gap，右侧三卡统一高度 ----
   高度由 flex / min-height 自适应，不用固定 px 撑布局。 */
.home-hero-row[data-v-29475212] {
  display: flex !important;
  align-items: stretch !important;
  gap: clamp(6px, 2vw, 14px) !important;
}
.home-hero-left[data-v-29475212],
.home-hero-right[data-v-29475212] {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  height: auto !important;
}
.home-hero-right[data-v-29475212] {
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(4px, 1.6vw, 10px) !important;
  position: relative !important;
}
.home-ai-card[data-v-29475212] {
  position: static !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
}
.home-fastbuy-bottom[data-v-29475212] {
  position: static !important;
  flex: 0 0 auto !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(4px, 1.6vw, 10px) !important;
}
.home-fastbuy-item[data-v-29475212] {
  flex: 1 1 0 !important;
  min-height: clamp(44px, 12vw, 60px) !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
}
.home-fastbuy-text[data-v-29475212],
.home-fastbuy-title[data-v-29475212],
.home-fastbuy-subtitle[data-v-29475212] {
  min-width: 0 !important;
}

/* ---- 4. Welcome/公告跑马灯：正常显示不撑坏容器 ---- */
.home-notice-text[data-v-29475212] {
  overflow: hidden !important;
  min-width: 0 !important;
}
.home-notice-text .u-notice-content[data-v-29475212] {
  white-space: nowrap !important;
}
.home-notice-text .u-notice-box[data-v-29475212] {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* ---- 5. 行情 BTC/ETH/LTC 三列：严格均分 + 内部居中 + 同一基线 ---- */
.home-hot-row[data-v-29475212] {
  display: flex !important;
  justify-content: space-between !important;
}
.home-hot-item[data-v-29475212] {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
.home-hot-item[data-v-29475212] * {
  text-align: center !important;
}
.home-hot-pair[data-v-29475212],
.home-hot-price[data-v-29475212],
.home-hot-change[data-v-29475212] {
  width: 100% !important;
  white-space: nowrap !important;
  text-align: center !important;
}

/* ---- 6. 五宫格功能入口：统一 icon 容器/尺寸/文字间距 ---- */
.home-func-icons-card[data-v-29475212] {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: clamp(4px, 2vw, 12px) clamp(2px, 1vw, 6px) !important;
  align-items: start !important;
}
.home-func-icon-cell[data-v-29475212] {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 0 !important;
  width: 100% !important;
  padding: 4px 2px 0 !important;
  box-sizing: border-box !important;
}
.home-func-icon-wrap[data-v-29475212] {
  width: clamp(38px, 11.8vw, 46px) !important;
  height: clamp(38px, 11.8vw, 46px) !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}
.home-func-icon-img[data-v-29475212] {
  width: clamp(24px, 7.6vw, 28px) !important;
  height: clamp(24px, 7.6vw, 28px) !important;
  display: block !important;
}
.home-func-label[data-v-29475212] {
  width: 100% !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
  margin-top: clamp(4px, 1.4vw, 10px) !important;
  font-size: clamp(12px, 3.4vw, 13px) !important;
  /* 统一文案大小写：delivery -> Delivery (仅作用于首页五宫格, 不改数据) */
  text-transform: capitalize;
}

/* ---- 7. 行情 Tab (Crypto/Forex/Commodities/Top Volume)：均分 ---- */
.home-market-tabs-card[data-v-29475212] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.home-market-tabs-card .market-tabs-pill--compact[data-v-29475212] {
  width: 100% !important;
  display: flex !important;
  flex-wrap: nowrap !important;
}
.home-market-tabs-card .market-tab-pill-item[data-v-29475212] {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}
.home-market-tabs-card .market-tab-pill-text[data-v-29475212] {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: clamp(12px, 3.4vw, 13px) !important;
}

/* ---- 8. Market List 表头 + 行：单行不换行 ----
   Name | Latest Price | 24h Turnover */
.home-sort-col .font-22[data-v-29475212],
.home-rank-list-row .font-22[data-v-29475212] {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: clamp(11px, 3vw, 13px) !important;
  max-width: 100% !important;
}
.home-rank-list-row[data-v-29475212] {
  box-sizing: border-box !important;
}

/* ---- 10. Safari 动态地址栏/工具栏：优先 100dvh, fallback 100vh ---- */
@supports (height: 100dvh) {
  .uni-app--showtabbar,
  uni-page-body {
    min-height: 100dvh;
  }
}

/* ---- 9+12. 底部安全区：避免 tabBar/content 被遮挡，内容不跳动 ---- */
.z-paging-content[data-v-29475212] {
  padding-bottom: env(safe-area-inset-bottom) !important;
}
uni-tabbar .uni-tabbar {
  padding-bottom: env(safe-area-inset-bottom) !important;
}


/* ---- 11. 空白 uni-modal (白雾白框) 消除: 仅当内容区为空时隐藏, 正常弹窗(有内容)不受影响 ---- */
uni-modal .uni-modal:has(.uni-modal__bd:empty) {
  display: none !important;
}
