:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "SF Pro Display", "PingFang SC", "Avenir Next", "Helvetica Neue",
    sans-serif;
  background: #000935;
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  width: min(100%, 470px);
  margin: 0 auto;
  padding-bottom: 100px;
}

.header-wrap {
  position: relative;
}

.banner-img,
.game-section img,
.spin-wrap img,
.trust-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.service-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(255, 225, 148, 0.72);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(11, 42, 105, 0.9) 0%, rgba(6, 20, 58, 0.92) 100%);
  box-shadow:
    0 8px 18px rgba(4, 18, 58, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #ffe7a4;
  backdrop-filter: blur(8px);
}

.service-btn-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe89c 0%, #cf8f1a 100%);
  color: #4a2a03;
  font-size: 12px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(207, 143, 26, 0.35);
}

.service-btn-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.btn-wrap {
  position: absolute;
  bottom: 12%;
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-wrap .btn {
  width: 35%;
  min-height: 35px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}

.btn-wrap .btn-primary {
  background-image: url("../images/btn-join.png");
}

.btn-wrap .btn-secondary {
  position: relative;
  margin-left: 15px;
  background-image: url("../images/btn-down.png");
}

.btn-wrap.is-download-only .btn-secondary {
  width: 42%;
  margin-left: 0;
  position: relative;
  background-image: none;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 239, 184, 0.3), transparent 42%),
    linear-gradient(180deg, #61d4ff 0%, #178cff 32%, #0052de 74%, #0a3eb7 100%);
  box-shadow:
    0 12px 24px rgba(2, 18, 74, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -8px 18px rgba(6, 47, 153, 0.24);
}

.header-wrap .btn-wrap.is-download-only {
  display: none;
}

.btn-wrap.is-download-only .btn-primary {
  display: none;
}

.download-activity-badge {
  display: none;
}

.download-btn-label {
  display: none;
}

.btn-wrap.is-download-only .download-activity-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  display: inline-flex;
  height: 30px;
  padding: 0 12px 10px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  background-image: url("../images/tip.png");
  background-size: 100% 30px;
  color: #fff715;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 10px;
  white-space: nowrap;
}

.btn-wrap.is-download-only .download-btn-label {
  display: inline-block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(6, 32, 104, 0.32);
}

.page {
  margin-top: -6px;
}

.spin-wrap {
  width: 100%;
}

.faq-wrap {
  width: 100%;
}

.faq-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.trust-support-link {
  display: block;
}

.is-disabled-link {
  cursor: default;
}

.download-notice-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 12, 34, 0.58);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.download-notice-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.download-notice-panel {
  width: min(100%, 420px);
  max-height: min(82vh, 760px);
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  box-shadow:
    0 24px 48px rgba(1, 18, 54, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.download-notice-head {
  padding: 22px 20px 16px;
  color: #1f2a44;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.download-notice-content {
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: 0 12px;
  border-top: 1px solid rgba(22, 58, 125, 0.08);
  border-bottom: 1px solid rgba(22, 58, 125, 0.08);
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.download-notice-content img {
  display: block;
  width: 100%;
  height: auto;
}

.download-notice-foot {
  padding: 16px 12px 14px;
}

.download-notice-action {
  width: 100%;
  min-height: 66px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f1d590 0%, #d7ac4c 58%, #b88423 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 20px rgba(126, 82, 18, 0.18);
  color: #5d3a09;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    filter 220ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.download-notice-action:disabled {
  cursor: default;
  color: rgba(93, 58, 9, 0.72);
  opacity: 0.88;
  filter: saturate(0.72) brightness(0.94);
}

.download-notice-action.is-ready {
  background: linear-gradient(180deg, #ffe89b 0%, #dfa22a 58%, #b97810 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 12px 24px rgba(184, 120, 16, 0.28);
  color: #4e2b05;
  filter: saturate(1) brightness(1);
}

.download-notice-action.is-ready:hover,
.download-notice-action.is-ready:focus-visible {
  transform: translateY(-1px);
}

.floating-support {
  position: fixed;
  right: max(
    calc(12px + var(--safe-right)),
    calc((100vw - min(100vw, 470px)) / 2 + 12px)
  );
  bottom: calc(106px + var(--safe-bottom));
  z-index: 19;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  width: 64px;
  min-height: 76px;
  padding: 6px 6px 8px;
  border: 1px solid rgba(133, 221, 255, 0.55);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(111, 227, 255, 0.34), transparent 40%),
    linear-gradient(180deg, rgba(29, 122, 255, 0.96) 0%, rgba(5, 50, 148, 0.96) 100%);
  box-shadow:
    0 16px 30px rgba(5, 46, 132, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.floating-support.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-support-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 243, 203, 0.4);
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe99f 0%, #cf8e17 100%);
  color: #4d2a04;
  font-size: 16px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 6px 14px rgba(23, 75, 182, 0.22);
}

.floating-support-text {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0.04em;
  color: #eef8ff;
  text-shadow: 0 1px 3px rgba(1, 14, 46, 0.4);
}

.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: var(--safe-bottom);
  z-index: 20;
  display: flex;
  width: min(calc(100% - var(--safe-left) - var(--safe-right)), 438px);
  height: 84px;
  padding: 15px 15px 8px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  background-image: url("../images/bottom-bg.png");
  background-size: 100% 84px;
}

.sticky-cta .btn {
  flex: 1;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 39px;
  font-size: 18px;
  font-weight: 800;
}

.sticky-cta .btn-primary {
  position: relative;
  margin-right: 10px;
  overflow: visible;
  background: linear-gradient(180deg, #ffe99e 9.46%, #c9800a 78.94%, #dba44a 99.82%);
  color: rgba(78, 41, 5, 1);
}

.sticky-cta.is-download-only {
  justify-content: center;
}

.sticky-cta.is-download-only .btn-primary {
  display: none;
}

.sticky-cta.is-download-only .btn-secondary {
  flex: none;
  width: min(78vw, 280px);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 239, 184, 0.28), transparent 42%),
    linear-gradient(180deg, #5cd2ff 0%, #1989ff 34%, #004ddd 72%, #0b40b9 100%);
  border: 1px solid rgba(138, 217, 255, 0.35);
  box-shadow:
    0 14px 28px rgba(3, 18, 78, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -8px 20px rgba(4, 49, 160, 0.2);
}

.sticky-cta .btn-secondary {
  position: relative;
  background: linear-gradient(180deg, #3ebaff 9.46%, #002feb 82.18%, #006fac 100%);
  color: #fff;
}

.sticky-cta .btn-secondary .download-btn-label {
  display: inline-block;
}

.sticky-cta.is-download-only .download-activity-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  display: inline-flex;
  height: 30px;
  padding: 0 12px 10px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  background-image: url("../images/tip.png");
  background-size: 100% 30px;
  color: #fff715;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 10px;
  white-space: nowrap;
}

.sticky-cta.is-download-only .download-btn-label {
  display: inline-block;
}

.sticky-activity-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  display: inline-flex;
  height: 30px;
  padding: 0 12px 10px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  background-image: url("../images/tip.png");
  background-size: 100% 30px;
  color: #fff715;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 10px;
  white-space: nowrap;
}

@media (min-width: 680px) {
  .page-shell {
    width: min(100%, 980px);
    padding-left: 20px;
    padding-right: 20px;
  }

  .sticky-cta {
    width: min(100%, 885px);
  }

  .sticky-cta .btn {
    flex: none;
    width: 170px;
  }

  .faq-wrap {
    width: 100%;
  }

  .floating-support {
    right: max(
      calc(20px + var(--safe-right)),
      calc((100vw - min(100vw, 980px)) / 2 + 20px)
    );
  }
}

@media (max-width: 420px) {
  .floating-support {
    right: calc(12px + var(--safe-right));
    bottom: calc(100px + var(--safe-bottom));
  }

  .service-btn {
    top: 8px;
    right: 8px;
    min-height: 32px;
    padding-right: 9px;
  }

  .download-notice-mask {
    padding: 16px;
  }

  .download-notice-head {
    font-size: 16px;
  }

  .download-notice-action {
    min-height: 60px;
    font-size: 16px;
  }
}
