/**
 * 视口自适应（布局样式见 ref-uni-clone.css，对齐参考站）
 */
:root {
  --h5-width: 23.4375rem;
  --h5-bg: linear-gradient(180deg, #ff6b35 0%, #f7451d 32%, #ffb87a 55%);
  --h5-side: #ff6b35;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--h5-side);
  -webkit-text-size-adjust: 100%;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

/* uni-app 根字号：与参考站一致 */
@media (max-width: 480px) {
  html {
    font-size: calc(100vw / 23.4375);
  }
}

@media (min-width: 481px) {
  html {
    font-size: 16px;
  }
}

/* 覆盖主包里的渐变/错位，以参考站为准 */
.page .content {
  background-color: transparent !important;
  min-height: 78.375rem !important;
}

.page .content.is-bg-ready {
  background-image: url(/images/bg.jpg) !important;
}

.page .title {
  margin-top: 17.65625rem !important;
  max-width: 21.9375rem !important;
  min-height: 34.375rem !important;
  height: 34.375rem !important;
}

.page .foot {
  position: absolute !important;
  top: 52.625rem !important;
  margin-top: 0 !important;
}

/* ========== 手机：铺满屏幕 ========== */
@media (max-width: 480px) {
  html,
  body,
  #app {
    background: var(--h5-side);
  }

  .page,
  .pay-page,
  .refund-page {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: stretch !important;
    background: var(--h5-side) !important;
  }

  .page .content,
  .pay-page .pay-cashier,
  .refund-page .refund-shell,
  .user-page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .page .content {
    height: auto !important;
    min-height: 78.375rem !important;
  }

  .pay-page .pay-cashier-head {
    width: 100% !important;
    max-width: 100% !important;
  }

  .page .title,
  .page .desc {
    width: calc(100% - 1.5rem) !important;
    max-width: 21.9375rem !important;
  }

  .page .foot {
    width: calc(100% - 2rem) !important;
    max-width: 16.375rem !important;
    left: 50%;
    transform: translateX(-50%);
  }

  .page .title-one,
  .page .steps-icons {
    width: 100%;
    max-width: 16.9375rem;
  }

  .page .form,
  .page .form-skeleton {
    width: calc(100% - 2rem) !important;
    max-width: 17rem;
  }
}

/* ========== 平板 / 电脑：居中手机宽度 ========== */
@media (min-width: 481px) {
  html,
  body,
  #app {
    background: var(--h5-bg);
    background-attachment: fixed;
  }

  .page,
  .pay-page,
  .refund-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center !important;
    align-items: stretch;
    background: transparent !important;
    padding: 0;
  }

  .page .content,
  .pay-page .pay-cashier,
  .refund-page .refund-shell {
    width: var(--h5-width) !important;
    max-width: var(--h5-width) !important;
    margin: 0 auto;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.15);
  }

  .pay-page .pay-cashier-head {
    width: var(--h5-width) !important;
    max-width: var(--h5-width) !important;
  }

  .user-page {
    width: var(--h5-width) !important;
    max-width: var(--h5-width) !important;
    margin: 0 auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.12);
  }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .pay-page {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}
