* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #e8f1fb;
  color: #333;
  overflow: hidden;
}
#stage {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  position: relative;
}
#screen {
  width: 100%;
  height: 100%;
  max-width: 100%;
  background: #eef6ff;
  color: #333;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  --rpx: calc(100vw / 750);
  transform: translateZ(0);
  container-type: inline-size;
}
#screen .h5-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
#screen, #screen * { box-sizing: border-box; }
#screen { font-size: calc(28 * var(--rpx)); }
#screen a { color: inherit; text-decoration: none; }
#screen button { appearance: none; font: inherit; color: inherit; }
#screen img { vertical-align: top; border: 0; }
#screen .mp-scroll-x { overflow-x: auto; white-space: nowrap; }
#screen .mp-scroll-y { overflow-y: auto; }
#screen .mp-swiper { overflow: hidden; position: relative; display: block; }
#screen .mp-swiper > .mp-swiper-item { width: 100%; height: 100%; }
#screen .mp-swiper > .mp-swiper-item + .mp-swiper-item { display: none; }
#screen .mp-swiper.is-vertical .mp-swiper-item { height: 100%; }
#toast {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  background: rgba(15,23,42,.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 200;
  max-width: min(80vw, 340px);
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.h5-loading, .h5-error { padding: 48px 24px; text-align: center; color: #64748b; }
.h5-navbar-inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 12px 8px 8px;
  position: relative;
}
.h5-status { height: 28px; }
.h5-nav-back {
  font-size: 28px;
  line-height: 1;
  width: 32px;
  text-align: center;
  z-index: 2;
  cursor: pointer;
}
.h5-nav-title {
  position: absolute;
  left: 40px;
  right: 40px;
  text-align: center;
  font-size: 16px;
  pointer-events: none;
}
.h5-nav-left { position: relative; z-index: 2; }
.h5-swiper { position: relative; overflow: hidden; background: #f3f4f6; }
.h5-swiper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h5-notice { overflow: hidden; white-space: nowrap; flex: 1; min-width: 0; }
.h5-marquee { display: inline-block; padding-left: 100%; animation: h5-mq 14s linear infinite; }
@keyframes h5-mq { to { transform: translateX(-100%); } }
.h5-search, .h5-field-wrap {
  background: rgba(255,255,255,.96);
  border-radius: 12px;
  padding: 8px 12px;
}
.h5-search input, .h5-field {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}
.h5-check { display: flex; align-items: flex-start; gap: 8px; }
.h5-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fa3534;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  display: inline-block;
}
.h5-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #dbeafe; }
.h5-icon { display: inline-block; line-height: 1; }
[data-h5-nav], [data-h5-patch], [data-h5-call], [data-h5-back] { cursor: pointer; }
#screen .h5-native-nav {
  position: relative;
  z-index: 20;
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}
#screen > .h5-pin-nav {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  width: 100%;
}
#screen > .h5-pin-nav.u-navbar,
#screen > .h5-pin-nav.mine-header {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
  align-self: stretch !important;
  overflow: hidden;
}
#screen > .h5-pin-tab.tabbar_box {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: calc(140 * var(--rpx)) !important;
  padding: calc(18 * var(--rpx)) calc(28 * var(--rpx)) calc(20 * var(--rpx) + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
  z-index: 40 !important;
  background: transparent !important;
  pointer-events: none;
}
#screen > .h5-pin-tab .tabbar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  pointer-events: auto;
}
#screen > .h5-pin-tab .tabbar_sm {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: calc(4 * var(--rpx));
  text-align: center !important;
  pointer-events: auto;
}
#screen > .h5-pin-tab .tab-icon-wrapper {
  width: calc(54 * var(--rpx)) !important;
  height: calc(54 * var(--rpx)) !important;
  margin: 0 auto !important;
  flex: 0 0 auto !important;
}
#screen > .h5-pin-tab .tab-icon-img,
#screen > .h5-pin-tab img.tab-icon-img {
  width: calc(42 * var(--rpx)) !important;
  height: calc(42 * var(--rpx)) !important;
  max-width: calc(42 * var(--rpx)) !important;
  max-height: calc(42 * var(--rpx)) !important;
  object-fit: contain !important;
  display: block !important;
}
#screen .quick-icon img,
#screen .asset-action-icon img,
#screen .row-icon img,
#screen .soft-icon img {
  display: block !important;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}
#screen > .h5-pin-tab .title {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
  line-height: 1.2 !important;
}
#screen .fixed-background,
#screen .fixed-background1 {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
/* 颜色交给页面原 WXSS，不再在 H5 层强行改功能色 */
#screen .h5-native-back {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 30px;
  line-height: 40px;
  cursor: pointer;
}
#screen .h5-native-title {
  position: absolute;
  left: 56px;
  right: 56px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #111;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#screen .u-back-wrap { position: relative; z-index: 2; min-width: 32px; min-height: 32px; }
#screen .uicon-nav-back::before {
  content: "‹";
  font-family: "Segoe UI", "PingFang SC", sans-serif;
  display: block;
  line-height: 1;
}
#screen img[data-mode="aspectFill"] { object-fit: cover; }
#screen img[data-mode="aspectFit"] { object-fit: contain; }

/* 平板：居中卡片，保持接近手机比例 */
@media (min-width: 768px) {
  body {
    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(77, 141, 255, 0.22), transparent 60%),
      linear-gradient(180deg, #dceafc 0%, #eef4fb 45%, #f5f8fc 100%);
  }
  #stage {
    align-items: center;
    padding: 16px;
  }
  #screen {
    width: min(480px, 100%) !important;
    height: min(920px, calc(100dvh - 32px)) !important;
    max-width: min(480px, 100%) !important;
    max-height: calc(100dvh - 32px) !important;
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(36, 74, 140, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.7);
    --rpx: calc(min(480px, 100vw - 32px) / 750);
  }
  #toast {
    bottom: 96px;
    max-width: min(420px, 80vw);
  }
}

/* 电脑：居中竖屏，比例接近手机 */
@media (min-width: 1024px) {
  body {
    background:
      radial-gradient(900px 480px at 50% 0%, rgba(77, 141, 255, 0.22), transparent 62%),
      linear-gradient(180deg, #d7e6f8 0%, #eef4fb 48%, #f6f8fb 100%);
  }
  #stage {
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: transparent;
  }
  #screen {
    width: 390px !important;
    max-width: 390px !important;
    height: min(844px, calc(100dvh - 48px)) !important;
    max-height: calc(100dvh - 48px) !important;
    margin: 0 !important;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 24px 70px rgba(20, 48, 96, 0.22);
    --rpx: calc(390px / 750);
  }
  #toast {
    bottom: max(36px, calc((100dvh - min(844px, 100dvh - 48px)) / 2 + 88px));
    max-width: 320px;
  }
}

@media (min-height: 900px) and (min-width: 1024px) {
  #screen {
    width: 414px !important;
    max-width: 414px !important;
    height: 896px !important;
    max-height: calc(100dvh - 64px) !important;
    --rpx: calc(414px / 750);
  }
}
