:root {
  color-scheme: light;
  font-family: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #243247;
  background: #fff9f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(237, 143, 167, 0.2), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(127, 183, 234, 0.22), transparent 34%),
    linear-gradient(155deg, #fff8ef 0%, #fff5f7 48%, #f4f7ff 100%);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  content: "";
  filter: blur(12px);
  opacity: 0.5;
}

body::before {
  top: -110px;
  left: -90px;
  background: rgba(248, 190, 202, 0.42);
}

body::after {
  right: -100px;
  bottom: -120px;
  background: rgba(158, 202, 242, 0.38);
}

.download-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    max(28px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
}

.download-card {
  width: min(100%, 580px);
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 32px;
  background: rgba(255, 253, 250, 0.86);
  box-shadow: 0 32px 90px rgba(91, 72, 91, 0.16);
  text-align: center;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.brand {
  display: block;
  margin: 0 auto 28px;
}

.brand img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.download-copy p {
  margin: 10px 0 0;
  color: #7a879a;
  font-size: 16px;
  font-weight: 650;
}

.platform-switch {
  width: min(100%, 390px);
  margin: 26px auto 0;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid rgba(77, 94, 118, 0.1);
  border-radius: 18px;
  background: rgba(238, 241, 246, 0.78);
}

.platform-button {
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  color: #667489;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.platform-button:hover {
  color: #26364d;
}

.platform-button:focus-visible {
  outline: 3px solid rgba(106, 175, 230, 0.42);
  outline-offset: 2px;
}

.platform-button.is-active {
  color: #243247;
  background: #fff;
  box-shadow: 0 7px 20px rgba(70, 69, 86, 0.12);
}

.platform-button:active {
  transform: scale(0.98);
}

.platform-icon {
  width: 8px;
  height: 8px;
  margin-right: 6px;
  display: inline-block;
  overflow: hidden;
  border-radius: 50%;
  color: transparent;
  background: #8793a5;
  vertical-align: 1px;
}

.android-icon {
  background: #69b673;
}

.qr-panel {
  margin: 24px auto 0;
}

.qr-panel[hidden] {
  display: none;
}

.qr-frame {
  width: min(100%, 312px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(77, 94, 118, 0.1);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 20px 52px rgba(74, 62, 82, 0.12);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px;
  object-fit: contain;
  image-rendering: auto;
  -webkit-touch-callout: default;
  user-select: auto;
}

.qr-panel span {
  display: block;
}

.qr-panel span {
  margin-top: 18px;
  color: #8995a6;
  font-size: 17px;
  font-weight: 650;
}

.device-hint {
  margin-top: 24px;
  padding: 13px 18px;
  border-radius: 999px;
  color: #35665f;
  background: rgba(93, 161, 151, 0.11);
  font-size: 14px;
  font-weight: 800;
}

.mobile-hint {
  display: none;
}

@media (max-width: 600px) {
  .download-page {
    align-items: start;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .download-card {
    min-height: calc(100svh - 36px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 20px;
    border-radius: 26px;
  }

  .brand {
    margin-bottom: 20px;
  }

  .brand img {
    width: 82px;
    height: 82px;
  }

  .qr-panel {
    margin-top: 18px;
  }

  .platform-switch {
    margin-top: 20px;
  }

  .platform-button {
    min-height: 46px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 14px;
  }

  .qr-frame {
    width: min(72vw, 286px);
    padding: 12px;
    border-radius: 22px;
  }

  .desktop-hint {
    display: none;
  }

  .mobile-hint {
    display: inline;
  }
}

@media (max-height: 700px) and (max-width: 600px) {
  .download-card {
    justify-content: flex-start;
  }

  .brand {
    margin-bottom: 12px;
  }

  .qr-frame {
    width: min(58vh, 250px);
  }

  .device-hint {
    margin-top: 16px;
  }
}
