:root {
  color: #18313f;
  background: #eef3f6;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background-color: #eef3f6;
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(4 124 168 / 25%);
  outline-offset: 3px;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 max(24px, env(safe-area-inset-bottom));
}

.brand-bar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  color: #fff;
  background: #075f85;
  border: 1px solid #075171;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgb(9 54 75 / 15%);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 8px;
}

.brand-name {
  font-size: 20px;
  font-weight: 750;
  line-height: 27px;
}

.brand-subtitle {
  margin-top: 1px;
  color: rgb(255 255 255 / 72%);
  font-size: 12px;
  line-height: 18px;
}

.official-mark {
  flex: none;
  padding: 5px 9px;
  color: #075f85;
  background: #dff5fb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}

.download-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 4px 14px;
}

.heading-kicker {
  margin: 0 0 8px;
  color: #047ca8;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

h1 {
  margin: 0;
  color: #102d3d;
  font-size: 30px;
  font-weight: 750;
  line-height: 40px;
  letter-spacing: 0;
}

.heading-description {
  margin: 9px 0 0;
  color: #607986;
  font-size: 14px;
  line-height: 22px;
}

.retry-button {
  min-width: 92px;
  height: 38px;
  padding: 0 14px;
  color: #075f85;
  background: #fff;
  border: 1px solid #9fc5d4;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 650;
}

.retry-button:hover {
  background: #e8f6fa;
}

.page-status {
  min-height: 22px;
  margin: 0 4px 14px;
  color: #607986;
  font-size: 13px;
  line-height: 22px;
}

.page-status.is-error {
  color: #c2413a;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.platform-card {
  display: flex;
  min-width: 0;
  min-height: 424px;
  flex-direction: column;
  padding: 22px;
  background: #fff;
  border: 1px solid #d8e3e8;
  border-top: 4px solid #047ca8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(24 49 63 / 7%);
}

.platform-card[data-platform="ios"] {
  border-top-color: #344553;
}

.platform-card[data-platform="miniprogram"] {
  border-top-color: #16a66a;
}

.platform-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.platform-symbol {
  display: flex;
  width: 42px;
  height: 42px;
  flex: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #047ca8;
  border-radius: 8px;
  font-size: 19px;
  font-weight: 800;
  line-height: 42px;
}

.platform-symbol--ios {
  background: #344553;
  font-family: Georgia, serif;
  font-size: 23px;
}

.platform-symbol--mini {
  background: #16a66a;
  font-size: 17px;
}

.platform-title-wrap {
  min-width: 0;
}

.platform-title-wrap h2 {
  margin: 0;
  overflow: hidden;
  color: #18313f;
  font-size: 18px;
  font-weight: 750;
  line-height: 25px;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.platform-version {
  margin: 3px 0 0;
  overflow: hidden;
  color: #718792;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-content {
  display: -webkit-box;
  min-height: 44px;
  margin: 18px 0 16px;
  overflow: hidden;
  color: #536b77;
  font-size: 13px;
  line-height: 22px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.desktop-delivery {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: end;
}

.qr-frame {
  position: relative;
  display: flex;
  width: 192px;
  height: 192px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f8fa;
  border: 1px solid #d8e3e8;
  border-radius: 8px;
}

.qr-canvas {
  display: none;
  width: 176px;
  height: 176px;
  background: #fff;
}

.qr-image {
  display: none;
  width: 176px;
  height: 176px;
  object-fit: contain;
  background: #fff;
}

.qr-placeholder {
  padding: 0 18px;
  color: #83949d;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

.delivery-tip {
  margin: 11px 0 0;
  color: #718792;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.mobile-delivery {
  display: none;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  color: #fff;
  background: #047ca8;
  border: 1px solid #047ca8;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 44px;
  text-align: center;
  text-decoration: none;
}

.platform-card[data-platform="ios"] .mobile-delivery {
  background: #344553;
  border-color: #344553;
}

.mobile-delivery[aria-disabled="true"] {
  color: #8798a1;
  background: #e7edf0;
  border-color: #d8e3e8;
  cursor: not-allowed;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 4px 0;
  color: #7c909a;
  font-size: 12px;
  line-height: 20px;
}

@media (max-width: 900px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .platform-card {
    min-height: 0;
  }
}

@media (max-width: 767px) {
  .page-shell {
    width: calc(100% - 24px);
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .brand-bar {
    min-height: 64px;
    padding: 9px 12px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 18px;
    line-height: 25px;
  }

  .download-heading {
    align-items: start;
    padding: 26px 2px 12px;
  }

  h1 {
    font-size: 25px;
    line-height: 34px;
  }

  .heading-description {
    max-width: 250px;
  }

  .retry-button {
    min-width: 80px;
    height: 36px;
    padding: 0 10px;
  }

  .platform-grid {
    gap: 12px;
  }

  .platform-card {
    padding: 18px;
  }

  .platform-card:not([data-platform="miniprogram"]) .desktop-delivery {
    display: none;
  }

  .platform-card:not([data-platform="miniprogram"]) .mobile-delivery {
    display: flex;
  }

  .platform-card:not([data-platform="miniprogram"]) .platform-content {
    margin-bottom: 20px;
  }

  .platform-card[data-platform="miniprogram"] .qr-frame {
    width: 184px;
    height: 184px;
  }

  .platform-card[data-platform="miniprogram"] .qr-canvas {
    width: 168px;
    height: 168px;
  }

  .platform-card[data-platform="miniprogram"] .qr-image {
    width: 168px;
    height: 168px;
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

.is-mobile .platform-card:not([data-platform="miniprogram"]) .desktop-delivery {
  display: none;
}

.is-mobile .platform-card:not([data-platform="miniprogram"]) .mobile-delivery {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
