/* =========================================================
   页面样式 · Part 1：启动页 / 首页 / 我的
   ========================================================= */

/* ---------------- 启动页 ---------------- */
/* 品牌区与页脚均为设计稿原图切图（390 宽），纵向用三段弹性留白按设计稿比例
   1 : 1.993 : 0.486 分配，屏高变化时只伸缩留白，图形本身不缩放变形。 */
.splash {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.splash .statusbar { width: 100%; flex: none; color: #111; padding-left: 28px; padding-right: 22px; }
.splash-gap-a { flex: 157 1 0; }
.splash-gap-b { flex: 313 1 0; }
.splash-gap-c { flex: 76 1 0; }
/* 屏高不足（如横屏、超矮屏）时允许两段切图等比收缩，object-fit 保证不变形 */
.splash-mark,
.splash-foot {
  display: block;
  width: 100%;
  flex: 0 1 auto;
  min-height: 0;
  object-fit: contain;
}

/* ---------------- 首页 ---------------- */
.home {
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.home .screen-body { flex: 1; min-height: 0; }
.home-scroll { padding-bottom: 86px; }

.home-hero {
  background: linear-gradient(175deg, #00896E 0%, #00856A 46%, #0A9C7E 100%);
  /* 207px 为设计稿高度，真机再叠一层刘海安全区，避免内部被 overflow 裁掉 */
  height: calc(207px + env(safe-area-inset-top, 0px));
  padding: 0 16px;
  position: relative;
  overflow: hidden;
}
.home-hero .statusbar { margin: 0 -16px; position: relative; z-index: 3; }
.home-hero::before {
  content: "";
  position: absolute;
  right: -70px; top: -90px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.1), rgba(255,255,255,0) 66%);
}
.home-hero::after {
  content: "";
  position: absolute;
  left: -60px; top: 60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.06), rgba(255,255,255,0) 70%);
}

.hero-tools {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 2px;
}
.hero-tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  letter-spacing: .3px;
  opacity: .96;
  position: relative;
}
.hero-tool-item svg { display: block; }
.hero-tool-right { display: flex; gap: 18px; }
.hero-badge {
  position: absolute;
  top: -3px; right: -10px;
  min-width: 24px; height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  background: #E8402A;
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.hero-locate {
  position: relative;
  z-index: 2;
  margin-top: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 12.5px;
  opacity: .95;
}
.hero-locate .loc-left { display: flex; align-items: center; gap: 3px; }
.hero-locate .lunar { font-size: 11.5px; opacity: .92; letter-spacing: .5px; }

/* 未登录卡片：原图上浮 71px 叠压绿头，宽 348、高 158 */
.login-card {
  position: relative;
  z-index: 3;
  margin: -71px 21px 0;
  background: #fff;
  border-radius: 14px;
  padding: 17px 18px 11px;
  box-shadow: 0 4px 14px rgba(0, 60, 48, .10);
}
.login-card .bank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #333;
}
.login-card .bank-logo { width: 26px; height: 26px; }
.login-card .slogan-big {
  margin: 15px 0 21px;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  line-height: 23px;
  letter-spacing: 2px;
  color: #111;
}
.login-card .login-btn {
  display: block;
  width: 114px;
  height: 41px;
  margin: 0 auto;
  border-radius: 21px;
  background: linear-gradient(180deg, #0F9A7E, #00856A);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0, 133, 106, .22);
}

/* 已登录银行卡卡片 */
.card-widget {
  position: relative;
  z-index: 3;
  margin-top: 14px;
  background: #fff;
  border-radius: 12px;
  padding: 15px 16px 14px;
  box-shadow: 0 6px 18px rgba(0, 60, 48, .13);
}
.cw-top { display: flex; align-items: center; justify-content: space-between; }
.cw-no {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px;
  letter-spacing: .6px;
  color: #222;
  font-variant-numeric: tabular-nums;
}
.cw-logo {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
}
.cw-tag {
  font-size: 11px;
  color: #fff;
  background: #37A391;
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: .5px;
}
.cw-balance {
  margin-top: 20px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.cw-amount {
  font-size: 31px;
  font-weight: 600;
  color: #1b1b1b;
  line-height: 1;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.cw-refresh {
  font-size: 10.5px;
  color: var(--green);
  border: 1px solid rgba(0, 133, 106, .45);
  border-radius: 3px;
  padding: 1px 5px;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.cw-refresh svg { width: 9px; height: 9px; }
.cw-bottom {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #666;
}
.cw-dots { display: flex; justify-content: center; gap: 5px; margin-top: 12px; }
.cw-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.45);
  display: block;
}
.cw-dots i.on { background: #fff; opacity: .95; }

/* 宫格 */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 20px;
  padding: 58px 0 18px;
}
.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  line-height: 19px;
  letter-spacing: -.2px;
  color: #1A1A1A;
  white-space: nowrap;
}
.grid-icon {
  width: 53px; height: 53px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.1);
}
.grid-icon svg { width: 28px; height: 28px; }
.grid-icon.c-green { background: linear-gradient(160deg, #4FB9A6, #2A9E87); }
.grid-icon.c-red { background: linear-gradient(160deg, #F4654C, #E33F2A); }
.grid-icon.c-orange { background: linear-gradient(160deg, #F7AE55, #F0922B); }
.grid-icon.c-gray { background: linear-gradient(160deg, #CFCFCF, #B9B9B9); }

/* 双卡快捷（原图实测：卡片 y666~730 h64，x14~187 / x203~376，文字 ink h18）*/
.quick-row {
  display: flex;
  gap: 12px;
  padding: 0 14px 14px;
}
.quick-card {
  flex: 1;
  height: 64px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
  line-height: 22px;
  color: #1A1A1A;
}
.quick-card .qc-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.quick-card .qc-icon svg { width: 28px; height: 28px; }
.qc-orange { color: #F0922B; }
.qc-red { color: #E23B26; }

/* 首页下半部分（滚动后） */
.home-sec { padding: 0 16px; }
.home-sec-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 12px;
}
.home-sec-title h3 { font-size: 16px; font-weight: 600; letter-spacing: .3px; }
.home-sec-title .more { font-size: 11.5px; color: #999; }

.mobile-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 18px;
}
.mini-card {
  height: 62px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  font-size: 12.5px;
}
.mini-card .mc-ic {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.mini-card .mc-ic svg { width: 19px; height: 19px; }
.mc-green { background: linear-gradient(160deg, #22AE8E, #0A8F73); }
.mc-orange { background: linear-gradient(160deg, #F8B25C, #F0922B); }

/* 关爱服务 */
.care-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 78px 78px;
  gap: 10px;
  margin-bottom: 20px;
}
.care-card {
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}
.care-card h4 { font-size: 14px; font-weight: 600; color: #232323; }
.care-card p { margin-top: 4px; font-size: 11px; color: #7d7d7d; }
.care-card .care-art {
  position: absolute;
  right: 8px; bottom: 6px;
  width: 62px; height: 52px;
  opacity: .95;
}
.care-blue { background: linear-gradient(135deg, #E7F2FD, #F5FAFF); grid-row: span 2; }
.care-pink { background: linear-gradient(135deg, #FDECEC, #FFF6F4); }
.care-pink2 { background: linear-gradient(135deg, #FDECF3, #FFF6FA); }

/* 小豆兑换 */
.goods-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 12px;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.goods-img {
  width: 84px; height: 84px;
  border-radius: 8px;
  background: #FAFAFA;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex: none;
}
.goods-info { flex: 1; display: flex; flex-direction: column; }
.goods-name { font-size: 13.5px; color: #333; line-height: 1.35; }
.goods-price { margin-top: 6px; font-size: 12px; color: #333; }
.goods-price em { font-style: normal; color: var(--orange-2); font-weight: 600; }
.goods-btn {
  align-self: flex-start;
  margin-top: 9px;
  height: 26px;
  padding: 0 14px;
  border-radius: 13px;
  background: linear-gradient(180deg, #FF9A3C, #F5811B);
  color: #fff;
  font-size: 11.5px;
}

/* 附近网点 banner */
.nearby-banner {
  margin: 4px 16px 18px;
  height: 78px;
  border-radius: 10px;
  background: linear-gradient(100deg, #FFF3DC, #FFE7BF);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.nearby-banner h4 { font-size: 14px; color: #7A4B14; font-weight: 600; }
.nearby-banner p { margin-top: 4px; font-size: 11px; color: #9A6A31; }
.nearby-banner .nb-art {
  position: absolute; right: 12px; top: 12px;
  width: 92px; height: 56px;
}

/* ---------------- 我的 ---------------- */
.mine {
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.mine .screen-body { flex: 1; min-height: 0; background: #fff; }
.mine-scroll { padding-bottom: 90px; }

.mine-top {
  background: #fff;
  padding: 0 21px 18px;
  position: relative;
}
.mine-top .statusbar { margin: 0 -21px; }
.mine-tools {
  display: flex;
  justify-content: space-between;
  padding-top: 2px;
}
.mine-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: #555;
  position: relative;
}
.mine-tool svg { width: 21px; height: 21px; }
.mine-tool .reddot {
  position: absolute;
  top: 0; right: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #E8402A;
}
.mine-tools-right { display: flex; gap: 22px; }

/* 原图：头像 88px 左侧，用户名与右侧「S1 星级」胶囊同行，登录信息在头像下方左对齐 */
.mine-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 21px;
}
.mine-avatar {
  width: 59px; height: 59px;
  border-radius: 50%;
  overflow: hidden;
  background: #E8EFEC;
  flex: none;
}
.mine-avatar svg { display: block; width: 100%; height: 100%; }
.mine-name { font-size: 19px; font-weight: 600; letter-spacing: .5px; color: #1A1A1A; }
.star-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  background: linear-gradient(100deg, #D2B76C 0%, #ECD79E 100%);
  color: #7A5A14;
  font-size: 12px;
  font-weight: 500;
}
.star-tag svg { width: 12px; height: 12px; }
.star-tag svg:last-child { width: 11px; height: 11px; color: #B79A5C; }
.mine-login { margin-top: 18px; font-size: 15px; color: #A0A0A0; line-height: 25px; }

/* 原图黑卡：横向渐变（左 #3A3B3B → 右 #02080F），右侧带斜纹光斑 */
.mine-darkcard {
  margin: 19px 0 0;
  background: linear-gradient(95deg, #3A3B3B 0%, #343536 22%, #26282B 50%, #131A20 76%, #030A10 100%);
  border-radius: 12px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* 右下角：斜向小方块阵列光斑（原图 x306~368 / y316~350，逐格变暗） */
.mine-darkcard::after {
  content: "";
  position: absolute;
  right: 6px; bottom: 0;
  width: 68px; height: 40px;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 5px, transparent 5px 10px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.5) 0 5px, transparent 5px 10px);
  -webkit-mask-image: linear-gradient(135deg, #000 6%, transparent 78%);
  mask-image: linear-gradient(135deg, #000 6%, transparent 78%);
  opacity: .5;
}
.mine-dc-item { text-align: center; position: relative; z-index: 2; }
.mine-dc-item .num {
  font-size: 23px;
  font-weight: 600;
  color: #DDBB6A;
  font-variant-numeric: tabular-nums;
}
.mine-dc-item .lbl { margin-top: 5px; font-size: 11.5px; color: #CFCFCF; }

.mine-cards { padding: 22px 21px 0; display: flex; flex-direction: column; gap: 10px; }
.asset-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 17px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.045);
}
.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.asset-head .ah-left { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; line-height: 22px; }
.asset-head .ah-right { display: flex; align-items: center; gap: 8px; color: #333; }
/* 原图：标签在上、金额在下，左对齐堆叠 */
.asset-line { margin-top: 26px; }
.asset-line + .asset-line { margin-top: 30px; }
.asset-line .al-lbl { display: block; font-size: 13.5px; line-height: 18px; color: #666; }
.asset-line .al-val {
  display: block;
  margin-top: 17px;
  font-size: 26px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}

.setting-row {
  background: #fff;
  border-radius: 12px;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  font-size: 14px;
}
.setting-row .sr-left { display: flex; align-items: center; gap: 10px; }
.setting-row .sr-icon {
  width: 22px; height: 22px; color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.setting-row .sr-icon svg { width: 21px; height: 21px; }

/* 网点卡片 */
.branch-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.branch-head { display: flex; align-items: center; justify-content: space-between; }
.branch-head .bh-left { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.branch-head .bh-left .refresh { color: #9c9c9c; display: flex; }
.branch-main { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.branch-logo {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.branch-logo svg { width: 15px; height: 15px; }
.branch-name { font-size: 13.5px; color: #222; flex: 1; }
.branch-tag {
  font-size: 11px;
  color: #9A9A9A;
  border: 1px solid #DCDCDC;
  border-radius: 3px;
  padding: 1px 5px;
}
.branch-meta { display: flex; align-items: center; gap: 4px; font-size: 11.5px; margin-top: 9px; }
.branch-meta.orange { color: #F0922B; }
.branch-meta.gray { color: #9E9E9E; }
.branch-meta svg { width: 13px; height: 13px; }
.branch-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.branch-btn {
  height: 32px;
  padding: 0 22px;
  border-radius: 16px;
  font-size: 12.5px;
}
.branch-btn.ghost { border: 1px solid #F0922B; color: #F0922B; background: #fff; }
.branch-btn.solid { background: #F0922B; color: #fff; }

/* 我的 · 更多弹层 */
.more-menu {
  position: absolute;
  top: 92px; right: 12px;
  width: 124px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  padding: 6px 0;
  z-index: 90;
  animation: pop .16s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.more-menu .mm-item {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  font-size: 13px;
  color: #333;
  position: relative;
}
.more-menu .mm-item svg { width: 17px; height: 17px; color: #555; }
.more-menu .mm-dot {
  position: absolute;
  left: 25px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #E8402A;
}
.mask-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: transparent;
}

/* ============ H5 安全区补偿 ============ */
/* 带底部 TabBar 的页面，滚动区需让出 Home 条高度，否则最后一屏内容被遮住。
   env() 在桌面与不支持机型上为 0，不影响设计稿的 1:1 排版。 */
.home-scroll { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.mine-scroll { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }

/* ============ 窄屏可读性（≤ 360px，如 360 宽安卓 / Fold 外屏 / 老机型） ============ */
/* 内部排版宽度固定 390，360 宽屏等比例缩到 0.92 倍，9~11px 的标签会掉到 9px 以下。
   这里适度提升小字号，保证真机上能看清；仅作用于窄屏，不影响 1:1 校准基准。 */
@media (max-width: 360px) {
  /* 未读角标：原是 9px/14px 高，缩小后只有 7px，放大到可辨识 */
  .hero-badge { font-size: 11.5px; min-width: 27px; height: 16px; line-height: 16px; }
  .hero-tool-item,
  .cw-tag,
  .mine-tool,
  .branch-tag,
  .care-card p { font-size: 12.5px; }
  .hero-locate .lunar,
  .home-sec-title .more,
  .goods-btn,
  .branch-meta,
  .mine-dc-item .lbl,
  .cw-bottom,
  .nearby-banner p { font-size: 13px; }
  .nearby-banner h4 { font-size: 14.5px; }
  .splash-foot .ipv6 { font-size: 10.5px; }
  /* 余额 / 金额类数字：避免小屏下数字缩得过小看不清 */
  .cw-no { font-size: 15px; }
  .cw-refresh { font-size: 12px; }
  .mc-text b { font-size: 14px; }
  .mc-text p { font-size: 12px; }
  .mc-switch { font-size: 12.5px; }
}