/* public mirror stamp 20260801025008 */
/**
 * H5 关键样式（全局 class，不依赖 CSS Modules）
 * 用途：iOS Safari 若 module 哈希样式异常/未挂上，布局仍可用。
 * 与 modules 并存：同属性 modules 可覆盖增强。
 *
 * 约定：
 * - 居中用 grid，禁止 absolute+translate+scale 叠放
 * - 余额 glass + rest/hover/press 全保留
 * - 触屏无 catFill 蓝墨
 */

[data-ui='h5'].h5-root,
.h5-root[data-ui='h5'] {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: #eef4ff;
  color: #1a2744;
  overflow: hidden;
  font-family: 'Oxanium', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  /* 禁缩放辅助：双击不放大；禁长按选中/复制/呼出菜单 */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* 整壳内默认不可选；输入框若以后有再开 text */
[data-ui='h5'] *,
[data-ui='h5'] *::before,
[data-ui='h5'] *::after {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

[data-ui='h5'] input,
[data-ui='h5'] textarea,
[data-ui='h5'] [contenteditable='true'] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

[data-ui='h5'] img,
[data-ui='h5'] a {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* —— 顶栏 grid —— */
.h5-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 8px;
  height: calc(52px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: 12px;
  padding-right: 12px;
  background: #eef4ff;
}

.h5-topbar-left {
  justify-self: start;
  min-width: 0;
  display: flex;
  align-items: center;
}

.h5-topbar-center {
  justify-self: center;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h5-topbar-right {
  justify-self: end;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.h5-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.h5-logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: 112px;
  object-fit: contain;
}

/* —— 余额胶囊：玻璃 + scale 动效（仅 scale，无 translate） —— */
.h5-balance {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  height: 40px;
  max-width: 72vw;
  margin: 0;
  padding: 3px 3px 3px 5px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 6px 16px rgba(100, 140, 200, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transform: scale(0.926);
  -webkit-transform: scale(0.926);
  transform-origin: center center;
  transition:
    transform 416ms cubic-bezier(0.34, 1.4, 0.64, 1),
    background-color 416ms cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 416ms cubic-bezier(0.34, 1.4, 0.64, 1);
  -webkit-transition:
    -webkit-transform 416ms cubic-bezier(0.34, 1.4, 0.64, 1),
    background-color 416ms cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 416ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

.h5-balance::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(120, 175, 255, 0.2) 0%,
    rgba(160, 200, 255, 0.08) 32%,
    transparent 58%
  );
  z-index: 0;
}

.h5-balance > * {
  position: relative;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .h5-balance:hover {
    transform: scale(1);
    -webkit-transform: scale(1);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
      0 10px 22px rgba(80, 130, 220, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 1);
  }
}

.h5-balance:active,
.h5-balance.is-pressed {
  transform: scale(0.9);
  -webkit-transform: scale(0.9);
  transition-duration: 224ms;
  -webkit-transition-duration: 224ms;
  transition-timing-function: linear;
  -webkit-transition-timing-function: linear;
  box-shadow:
    0 4px 12px rgba(100, 140, 200, 0.14),
    inset 0 2px 6px rgba(80, 120, 180, 0.1);
}

.h5-balance.is-spring {
  transition-duration: 416ms;
  -webkit-transition-duration: 416ms;
  transition-timing-function: cubic-bezier(0.34, 1.4, 0.64, 1);
  -webkit-transition-timing-function: cubic-bezier(0.34, 1.4, 0.64, 1);
}

.h5-balance-btn {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  margin: 0;
  padding: 0 8px 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #0a0a0a;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.h5-balance-amount {
  font-family: 'Oxanium', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  color: #0a0a0a;
  white-space: nowrap;
}

.h5-balance-deposit {
  height: 34px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #2f7bff;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

/* —— 主区 —— */
.h5-main {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding-top: calc(52px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #eef4ff;
}

.h5-main-inner {
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.h5-promo {
  box-sizing: border-box;
  width: 100%;
  padding: 4px 12px 8px;
}

/* —— 入口双卡 —— */
.h5-entry {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 8px 12px 20px;
}

/* wrap 定宽高；card 铺满（与 module 一致） */
.h5-entry-wrap {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  aspect-ratio: 1.12 / 1;
  min-height: 0;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.h5-entry-card {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 4px 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.95);
  /* 无外阴影 / 内阴影（含长按） */
  box-shadow: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transform: none;
  transition: transform 0.35s ease;
}

.h5-entry-card.is-pressed {
  transform: scale(0.97);
  -webkit-transform: scale(0.97);
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .h5-entry-wrap:hover .h5-entry-card:not(.is-pressed) {
    transform: scale(1.06);
    -webkit-transform: scale(1.06);
  }
}

.h5-entry-icon-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h5-entry-icon {
  display: block;
  width: 96%;
  height: auto;
  max-height: 92%;
  object-fit: contain;
}

.h5-entry-label {
  flex-shrink: 0;
  margin: 0;
  padding: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  color: #1a2744;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

/* —— 底栏（无 module 时仍是胶囊） —— */
.h5-bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  box-sizing: border-box;
  width: 100%;
  max-width: 460px;
  min-width: 0;
  padding: 0 16px calc(10px + env(safe-area-inset-bottom, 0px));
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  pointer-events: none;
}

.h5-bottom.is-hidden {
  -webkit-transform: translateX(-50%) translateY(100%);
  transform: translateX(-50%) translateY(100%);
  transition: transform 300ms ease-out;
}

.h5-bottom-nav {
  pointer-events: auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 58px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.h5-bottom-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  color: rgba(26, 39, 68, 0.48);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.h5-bottom-item.is-active {
  color: #2f7bff;
  font-weight: 650;
}

.h5-bottom-item:active {
  transform: scale(0.92);
  -webkit-transform: scale(0.92);
}

/* iOS critical rebuild stamp: 20260801c */
[data-ui='h5']{--h5-crit:'20260801c';}

