:root {
  color-scheme: dark;
  --page-width: 500px;
  --blue: #1678ff;
  --gold: #ffaa09;
  --red: #ea4e3d;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #0a0a0a;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.page {
  position: relative;
  width: min(100%, var(--page-width));
  min-height: 100vh;
  padding-bottom: min(16vw, 80px);
  background: #0a0a0a;
  overflow: hidden;
}

.image-section,
.image-section img {
  display: block;
  width: 100%;
}

.interactive-download {
  position: relative;
}

.image-hotspot {
  position: absolute;
  z-index: 2;
  left: 62.8%;
  width: 31%;
  height: 40%;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.image-hotspot-client {
  top: 25%;
}

.image-hotspot-native {
  top: 23%;
}

.image-hotspot:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.top-art {
  position: relative;
  height: min(17.6vw, 88px);
  overflow: hidden;
  background: #0a0a0a;
}

.top-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.floating-entry {
  position: absolute;
  z-index: 3;
  top: min(33.2vw, 166px);
  left: 84%;
  width: min(14vw, 70px);
  height: min(14vw, 70px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translateX(0);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .35));
}

.floating-entry img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  display: flex;
  width: min(100%, var(--page-width));
  height: calc(min(16vw, 80px) + env(safe-area-inset-bottom));
  padding: min(3.466vw, 17.33px) min(2.533vw, 12.667px) env(safe-area-inset-bottom);
  gap: min(5.066vw, 25.333px);
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(2px);
}

.cta-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.cta {
  width: 100%;
  height: min(9.066vw, 45.328px);
  padding: 0 min(2.533vw, 12.667px);
  border: 0;
  border-radius: min(2.133vw, 10.667px);
  color: #fff;
  font-size: min(3.466vw, 17.333px);
  line-height: 1;
  letter-spacing: min(.18vw, .899px);
  white-space: nowrap;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}

.cta:active {
  transform: scale(.98);
  filter: brightness(.92);
}

.cta-blue {
  background: var(--blue);
}

.cta-gold {
  background: var(--gold);
}

.reward {
  position: absolute;
  z-index: 2;
  top: max(-8.268vw, -41.34px);
  right: min(.49vw, 2.45px);
  height: min(7.2vw, 36px);
  padding: 0 min(2.533vw, 12.667px);
  border-radius: min(2.133vw, 10.667px);
  background: var(--red);
  color: #fff;
  font-size: min(2.933vw, 14.667px);
  line-height: min(7.2vw, 36px);
  letter-spacing: min(.226vw, 1.128px);
  white-space: nowrap;
  pointer-events: none;
}

.reward::after {
  content: "";
  position: absolute;
  left: max(-1.56vw, -7.8px);
  bottom: max(-1.48vw, -7.4px);
  width: min(4.4vw, 22px);
  height: min(4.4vw, 22px);
  background: center / contain no-repeat url("../img/reward-tail.svg");
  transform: rotate(-30deg);
}

.cta-wrap:last-child .reward::after {
  background-image: url("../img/reward-tail.svg");
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(min(20vw, 100px) + env(safe-area-inset-bottom));
  max-width: min(84vw, 420px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 190, 50, .55);
  border-radius: 999px;
  background: rgba(18, 13, 4, .94);
  color: #ffe0a4;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  border-radius: 8px;
  outline: none;
}

.app-modal-card {
  width: min(100%, 316px);
  padding: 18px;
  background: #fff;
}

.modal-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #007aff;
  color: #fff;
  cursor: pointer;
}

.app-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.app-icon[hidden] {
  display: none;
}

.route-modal-card {
  padding: 12px;
  background: rgba(255, 255, 255, .9);
}

.route-list {
  display: grid;
  max-height: min(65vh, 520px);
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.route-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  min-height: 48px;
  gap: 10px;
}

.route-quality {
  display: grid;
  justify-items: center;
  color: #20c942;
  font-size: 12px;
  line-height: 1;
}

.signal-bars {
  display: flex;
  align-items: end;
  height: 20px;
  gap: 2px;
}

.signal-bars i {
  display: block;
  width: 4px;
  border-radius: 2px 2px 0 0;
  background: #20c942;
}

.signal-bars i:nth-child(1) {
  height: 7px;
}

.signal-bars i:nth-child(2) {
  height: 11px;
}

.signal-bars i:nth-child(3) {
  height: 15px;
}

.signal-bars i:nth-child(4) {
  height: 20px;
}

.route-name {
  color: #333;
  text-align: center;
}

.route-play {
  min-width: 86px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #007aff;
  color: #fff;
  cursor: pointer;
}

.modal-close {
  position: absolute;
  left: 50%;
  bottom: -50px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transform: translateX(-50%);
}

.modal-close svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.modal button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #005ecb;
}

@media (max-height: 560px) {
  .modal {
    align-items: start;
    overflow-y: auto;
    padding-top: 24px;
    padding-bottom: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .toast {
    transition: none;
  }
}
