:root {
  --page-max-width: 425px;
  --tap-scale: 0.96;
  --page-bg: #21174d;
}

html {
  background:
    radial-gradient(circle at top, rgba(75, 214, 255, 0.2), transparent 28rem),
    var(--page-bg);
}

body {
  min-width: 320px;
  color: #ffffff;
  background: var(--page-bg);
  overflow-x: hidden;
}

.page-shell {
  width: min(100%, var(--page-max-width));
  min-height: 100vh;
  margin: 0 auto;
  background: #21174d;
  box-shadow: 0 0 42px rgba(3, 2, 18, 0.45);
  overflow: visible;
}

.image-button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

.image-button > img {
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.image-button:active {
  filter: brightness(1.05);
  transform: scale(var(--tap-scale));
}

.top-bar {
  /* 保持页面顶部 CTA 在滚动时贴住视口顶部；父容器不能使用 overflow hidden，否则 sticky 会失效。 */
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  /* iOS 14 Safari 不支持 aspect-ratio，按设计稿比例计算高度，并限制在 425px 页面宽度对应的高度内。 */
  height: 16.862745vw;
  max-height: 71.666667px;
  background: #21174d;
}

/* 支持 aspect-ratio 的浏览器继续使用原生比例计算，避免回退值的浮点精度影响。 */
@supports (aspect-ratio: 1275 / 215) {
  .top-bar {
    height: auto;
    max-height: none;
    aspect-ratio: 1275 / 215;
  }
}

.top-bar__bg,
.top-bar__logo,
.top-bar__button {
  position: absolute;
}

.top-bar__bg {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-bar__logo {
  top: 11%;
  left: 6%;
  width: 22.5%;
  height: auto;
}

.top-bar__button {
  top: 18%;
  right: 5%;
  width: 26.4%;
}

.hero-section {
  position: relative;
  z-index: 3;
  width: 100%;
  /* iOS 14 Safari 使用设计稿比例高度；最大值对应 425px 页面宽度。 */
  height: 173.411765vw;
  max-height: 737px;
  margin-top: -14%;
  overflow: hidden;
}

/* 新版浏览器优先使用原生宽高比，避免回退值的浮点精度影响。 */
@supports (aspect-ratio: 1275 / 2211) {
  .hero-section {
    height: auto;
    max-height: none;
    aspect-ratio: 1275 / 2211;
  }
}

.hero-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-section__prizes {
  position: absolute;
  top: 46.8%;
  left: 50%;
  width: 94.5%;
  height: auto;
  transform: translateX(-50%);
}

.hero-section__button {
  position: absolute;
  top: 77.4%;
  left: 50%;
  width: 51.3%;
  transform: translateX(-50%);
}

.hero-section__button:active {
  transform: translateX(-50%) scale(var(--tap-scale));
}

.steps-section {
  position: relative;
  z-index: 2;
  width: 100%;
  /* iOS 14 Safari 使用设计稿比例高度；最大值对应 425px 页面宽度。 */
  height: 304.235294vw;
  max-height: 1293px;
  margin-top: -14.5%;
  overflow: hidden;
}

/* 新版浏览器优先使用原生宽高比，避免回退值的浮点精度影响。 */
@supports (aspect-ratio: 1275 / 3879) {
  .steps-section {
    height: auto;
    max-height: none;
    aspect-ratio: 1275 / 3879;
  }
}

.steps-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.steps-section__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6.2%;
  padding: 20.5% 4.8% 0;
}

.task-card {
  display: grid;
  justify-items: center;
}

.section-title {
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.section-title--step01,
.section-title--step02 {
  width: 54.2%;
  margin-bottom: 4.2%;
}

.task-card__frame {
  position: relative;
  width: 91.8%;
}

.task-card__frame > img,
.facebook-card > img {
  width: 100%;
  height: auto;
}

.task-card__claim {
  position: absolute;
  left: 50%;
  bottom: 11.2%;
  width: 56.9%;
  transform: translateX(-50%);
}

.task-card__claim:active {
  transform: translateX(-50%) scale(var(--tap-scale));
}

.facebook-card {
  width: 91.8%;
}

.rewards-section {
  position: relative;
  z-index: 1;
  width: 100%;
  /* iOS 14 Safari 使用设计稿比例高度；最大值对应 425px 页面宽度。 */
  height: 181.254902vw;
  max-height: 770.333333px;
  overflow: hidden;
  margin-top: -19%;
}

/* 新版浏览器优先使用原生宽高比，避免回退值的浮点精度影响。 */
@supports (aspect-ratio: 1275 / 2311) {
  .rewards-section {
    height: auto;
    max-height: none;
    aspect-ratio: 1275 / 2311;
  }
}

.rewards-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
}

.rewards-section__content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  padding-top: 30.4%;
}

.section-title--rewards {
  width: 68.5%;
  margin-bottom: 4.2%;
}

.rewards-section__list {
  width: 97.5%;
  height: auto;
  margin-left: 1.5%;
}

.rewards-section__button {
  width: 51%;
  margin-top: 2.4%;
}

.game-section {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: 100%;
  /* iOS 14 Safari 使用设计稿比例高度；最大值对应 425px 页面宽度。 */
  height: 162.745098vw;
  max-height: 691.666667px;
  margin-top: -1px;
  padding: 2.8% 0 0;
  overflow: hidden;
}

/* 新版浏览器优先使用原生宽高比，避免回退值的浮点精度影响。 */
@supports (aspect-ratio: 1275 / 2075) {
  .game-section {
    height: auto;
    max-height: none;
    aspect-ratio: 1275 / 2075;
  }
}

.game-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.section-title--game {
  position: relative;
  z-index: 1;
  width: 56%;
}

.game-section__slider {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0;
  margin-top: -7%;
}

.game-section__screen {
  width: 70.3%;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 8px 0 rgba(67, 59, 37, 0.22));
}

.game-section__arrow {
  position: absolute;
  top: 46%;
  z-index: 2;
  width: 8.9%;
  transform: translateY(-50%);
}

.game-section__arrow:active {
  transform: translateY(-50%) scale(var(--tap-scale));
}

.game-section__arrow--left {
  left: 5.4%;
}

.game-section__arrow--right {
  right: 5.4%;
}

@media (min-width: 426px) {
  body {
    background:
      linear-gradient(
        90deg,
        rgba(4, 3, 22, 0.78),
        transparent 18%,
        transparent 82%,
        rgba(4, 3, 22, 0.78)
      ),
      var(--page-bg);
  }
}

@media (max-width: 360px) {
  .top-bar__logo {
    width: 21%;
  }

  .top-bar__button {
    width: 25.5%;
  }
}
