:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #1a1f24;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #1a1f24;
}

body {
  min-width: 280px;
  color: #fff;
}

button,
a {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.download-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
}

.icp-filing {
  z-index: 4;
  margin-top: auto;
  padding: 4px 12px 10px;
  color: #89919a;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.icp-filing:hover,
.icp-filing:focus-visible {
  color: #cfff04;
}

.artboard {
  position: relative;
  width: min(100vw, 402px);
  aspect-ratio: 402 / 714.667;
  flex: 0 0 auto;
  overflow: hidden;
  background: #1a1f24;
}

.language-toggle {
  position: absolute;
  z-index: 5;
  top: max(6px, env(safe-area-inset-top));
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 64px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #89919a;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.language-toggle [aria-current="true"] {
  color: #cfff04;
}

.language-toggle:focus-visible,
.primary-download:focus-visible,
.dialog-close:focus-visible,
.dialog-action:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.decorations,
.decorations img {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.decorations {
  z-index: 0;
  inset: 0;
}

.decorations img {
  display: block;
  max-width: none;
}

.climber {
  left: -15.67%;
  top: 57.41%;
  width: 79.39%;
  height: 33.89%;
  transform: rotate(-14.2deg);
}

.hold-2539 {
  left: 56.2%;
  top: 55%;
  width: 8.72%;
  height: 4.91%;
  transform: rotate(-7.05deg);
}

.hold-2544 {
  left: 85.85%;
  top: 41.1%;
  width: 8.96%;
  height: 3.99%;
  transform: rotate(91.51deg);
}

.hold-2545 {
  left: 66.76%;
  top: -3.49%;
  width: 38.54%;
  height: 15.15%;
}

.hold-2550 {
  left: 78%;
  top: 89.1%;
  width: 32.35%;
  height: 14.86%;
  transform: rotate(-94.56deg);
}

.hold-2551 {
  left: 88.16%;
  top: 95.27%;
  width: 1.86%;
  height: .39%;
  transform: rotate(-43.27deg);
}

.hold-2552 {
  left: 68.24%;
  top: 72.03%;
  width: 8.5%;
  height: 4.24%;
  transform: rotate(180deg) scaleY(-1);
}

.hold-2556 {
  left: 74.91%;
  top: 56.61%;
  width: 18.55%;
  height: 8.01%;
}

.hold-2557 {
  left: 83.83%;
  top: 58.67%;
  width: 1.01%;
  height: .54%;
}

.hold-2558 {
  left: 89.17%;
  top: 30.47%;
  width: 21.64%;
  height: 16.64%;
}

.keke-logo {
  position: absolute;
  z-index: 2;
  top: 22.53%;
  left: 50%;
  width: 19.44%;
  height: auto;
  transform: translateX(-50%);
}

.product-name {
  position: absolute;
  z-index: 2;
  top: 34.66%;
  left: 50%;
  width: 92%;
  margin: 0;
  transform: translateX(-50%);
  color: #cfff04;
  font-size: clamp(16.6px, 5.185vw, 20.844px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .01em;
  text-align: center;
  white-space: nowrap;
}

.slogan {
  position: absolute;
  z-index: 2;
  top: 41.59%;
  left: 18.95%;
  margin: 0;
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: clamp(29.6px, 9.259vw, 37.222px);
  font-weight: 800;
  line-height: 1.19;
  letter-spacing: -.055em;
  white-space: nowrap;
}

.slogan-art {
  position: absolute;
  z-index: 2;
  top: 41.59%;
  left: 18.53%;
  width: 62.94%;
  height: auto;
}

.slogan-line {
  display: block;
}

.slogan strong {
  color: #cfff04;
  font-weight: inherit;
}

html[data-language="en"] .product-name {
  font-size: clamp(14px, 4.23vw, 17px);
  letter-spacing: 0;
}

html[data-language="en"] .slogan {
  top: 41.2%;
  left: 9.5%;
  font-size: clamp(25px, 7.96vw, 32px);
  letter-spacing: -.035em;
}

html[data-language="en"] .slogan-art {
  display: none;
}

html[data-language="zh"] .slogan {
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.primary-download {
  position: absolute;
  z-index: 3;
  top: 75.16%;
  left: 50%;
  min-width: 145.911px;
  max-width: 82%;
  min-height: 44.667px;
  margin: 0;
  padding: 5px 25px 6px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 29.778px;
  color: #1a1f24;
  background: #aed60f;
  font-size: clamp(18px, 5.926vw, 23.822px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.02em;
  white-space: nowrap;
  cursor: pointer;
}

.primary-download:active {
  transform: translateX(-50%) scale(.97);
}

.download-dialog {
  width: min(340px, calc(100vw - 32px));
  margin: auto;
  padding: 28px 24px 24px;
  border: 1px solid #3d464f;
  border-radius: 22px;
  color: #fff;
  background: #242b31;
  text-align: center;
}

.download-dialog::backdrop {
  background: rgb(0 0 0 / 68%);
}

.download-dialog h2 {
  margin: 0 28px 8px;
  color: #cfff04;
  font-size: 22px;
}

.dialog-subtitle,
.wechat-dialog p {
  margin: 0 0 18px;
  color: #c6ccd1;
  font-size: 14px;
  line-height: 1.55;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  color: #aab1b7;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.download-qr {
  display: block;
  width: 164px;
  height: 164px;
  margin: 0 auto 20px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}

.platform-links {
  display: grid;
  gap: 10px;
}

.dialog-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 16px;
  border-radius: 24px;
  color: #1a1f24;
  background: #cfff04;
  font-weight: 600;
  text-decoration: none;
}

.dialog-action.secondary {
  border: 1px solid #65707a;
  color: #fff;
  background: transparent;
}

.wechat-dialog {
  padding-top: 42px;
}

.wechat-dialog p {
  margin-bottom: 0;
}

.install-dialog {
  width: min(360px, calc(100vw - 24px));
  max-width: min(360px, calc(100vw - 24px));
  min-height: min(562px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 44px 35px 33px;
  overflow-y: auto;
  border-color: #7a8490;
  border-radius: 36px;
  text-align: left;
}

.install-dialog[open] {
  display: flex;
  flex-direction: column;
}

.install-dialog .dialog-close {
  top: 18px;
  right: 17px;
  width: 26px;
  height: 26px;
}

.install-dialog .dialog-close img {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
}

.install-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.install-header-logo {
  width: 38.4px;
  height: 38.4px;
  flex: 0 0 38.4px;
}

.install-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.install-dialog > .dialog-subtitle {
  margin: 10px -8px 0;
  color: #d9d9d9;
  font-size: 16px;
  letter-spacing: .04em;
  line-height: 1.35;
  text-align: center;
}

.install-steps {
  display: grid;
  gap: 23px;
  margin: 21px 0 24px;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.step-number {
  position: relative;
  display: grid;
  width: 26px;
  height: 24px;
  place-items: center;
  color: #242b31;
  font-size: 16px;
  font-weight: 700;
}

.step-number img {
  position: absolute;
  inset: 0;
  display: block;
  width: 26px;
  height: 24px;
}

.step-number > span {
  position: relative;
}

.install-steps h3 {
  margin: -1px 0 5px;
  color: #cfff04;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.2;
}

.install-steps p {
  margin: 0;
  color: #d9d9d9;
  font-size: 15px;
  letter-spacing: .03em;
  line-height: 1.35;
}

.install-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: auto;
}

.install-actions .dialog-action {
  min-width: 0;
  min-height: 43px;
  padding: 8px;
  border: 0;
  border-radius: 36px;
  background: #ceff05;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .05em;
  white-space: nowrap;
  cursor: pointer;
}

html[lang="en"] .install-actions .dialog-action {
  font-size: 14px;
  letter-spacing: 0;
}

.install-actions .dialog-action.secondary {
  border: 1px solid #a0aab8;
  color: #a0aab8;
  background: #2c333a;
}

@media (max-width: 360px) {
  .install-dialog {
    padding-right: 23px;
    padding-left: 23px;
  }

  .install-header h2 {
    font-size: 21px;
  }

  .install-steps {
    gap: 20px;
  }

  .install-steps h3 {
    font-size: 18px;
  }

  .install-actions {
    gap: 12px;
  }
}

.noscript-download {
  position: fixed;
  z-index: 10;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  padding: 12px;
  border-radius: 14px;
  color: #fff;
  background: #242b31;
  text-align: center;
}

.noscript-download p {
  margin: 0 0 8px;
}

.noscript-download a {
  margin: 0 8px;
  color: #cfff04;
}

@media (max-height: 620px) and (min-width: 403px) {
  .download-page {
    min-height: 715px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-download {
    transition: transform 120ms ease, filter 120ms ease;
  }

  .primary-download:hover {
    filter: brightness(1.07);
  }
}
