:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", sans-serif;
  color: #f5f5f5;
  background: #000;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.landing {
  position: relative;
  max-width: 750px;
  min-height: 100svh;
  margin-inline: auto;
  padding-bottom: 130px;
  background: #160e0a var(--mobile-artwork, url("./img/background.webp")) center top / cover no-repeat;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px 10px;
  background: #241716eb;
}
.topbar > a { min-width: 0; }
.topbar > a > img { display: block; width: min(35vw, 150px); height: auto; }
.scan { display: none; }
.featured {
  overflow: hidden;
  padding: 50px 0 12px;
  touch-action: pan-y;
  cursor: grab;
}
.featured-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}
.featured-track.is-animating {
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.featured img {
  display: block;
  flex: 0 0 46.667%;
  width: 46.667%;
  aspect-ratio: 175 / 232;
  object-fit: cover;
  border-radius: 10px;
  transform: scale(.86);
  opacity: .72;
  user-select: none;
}
.featured-track.is-animating img { transition: transform .45s ease, opacity .45s ease; }
.featured img.is-active {
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 8px 22px #0005;
}
.catalog { padding: 20px 0 6px; }
.catalog h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 10px;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: .02em;
  text-shadow: 0 1px 2px #0006;
}
.catalog h2::before {
  content: "";
  width: 5px;
  height: 1em;
  border-radius: 999px;
  background: linear-gradient(#ffd84a, #ff9a1a);
  box-shadow: 0 0 6px #ffb42859;
}
.poster-row { overflow: clip; touch-action: pan-y; }
.poster-strip, .poster-group { display: flex; width: max-content; }
.poster-group { flex: none; gap: 10px; padding-right: 10px; }
.poster-strip { animation: posters-left 36s linear infinite; }
.catalog + .catalog .poster-strip { animation-duration: 56s; }
.poster-row img {
  display: block;
  width: clamp(85px, 29.333vw, 220px);
  aspect-ratio: 110 / 146;
  object-fit: cover;
  border-radius: 8px;
  background: #291711;
  cursor: pointer;
  user-select: none;
}
@keyframes posters-left { to { transform: translateX(-50%); } }
.download-bar {
  position: fixed;
  z-index: 2;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(90vw, 675px);
  transform: translateX(-50%);
  text-align: center;
}
.actions {
  display: flex;
  gap: 3%;
  align-items: flex-end;
  aspect-ratio: 702 / 172;
  background: var(--download-artwork, url("./img/download-bar.webp")) center / contain no-repeat;
}
.button {
  flex: 1;
  display: block;
  height: 52%;
  border-radius: 14px;
  color: transparent;
  text-decoration: none;
}
.button:focus-visible, .scan a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.android-guide {
  width: min(340px, calc(100% - 24px), calc((100svh - 32px) * 594 / 882));
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}
.android-guide::backdrop { background: #000a; }
.android-guide img { display: block; width: 100%; height: auto; }
.android-guide button {
  position: absolute;
  inset: 87.3% 27.9% 5.1% 28.5%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.android-guide button:focus-visible { outline: 2px solid #242424; outline-offset: 2px; }
.hint, .copy-feedback {
  margin: 6px 0 0;
  padding: 5px;
  background: #160e0a;
  border-radius: 8px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  .poster-strip { width: 100%; animation: none; }
  .poster-group { width: 100%; flex-wrap: wrap; }
  .poster-group[aria-hidden="true"] { display: none; }
}
@media (max-width: 960px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
    column-gap: clamp(8px, 3vw, 24px);
    width: 100%;
    min-height: clamp(80px, 21vw, 104px);
    padding: 12px clamp(12px, 4vw, 24px);
  }
  .topbar > a > img { width: min(100%, 176px); }
  .mobile-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(5px, 1.5vw, 12px);
    justify-items: center;
  }
  .mobile-links img {
    display: block;
    width: min(100%, 29px);
    height: 40px;
    object-fit: contain;
  }
}
@media (min-width: 961px) {
  body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
  }
  .landing {
    width: min(100vw, 193.51vh);
    width: min(100vw, 193.51svh);
    max-width: none;
    min-height: 0;
    aspect-ratio: 358 / 185;
    padding: 0;
    overflow: hidden;
    background: #000 var(--desktop-artwork, url("./img/desktop.png")) left top / 100% auto no-repeat;
  }
  .topbar {
    position: absolute;
    top: 3.4%;
    left: 6.25%;
    width: 14.1%;
    height: 8.7%;
    min-height: 0;
    padding: 0;
    background: transparent;
  }
  .topbar > a { display: block; width: 100%; height: 100%; }
  .topbar > a > img { display: none; }
  .mobile-links, .featured, .catalog, .download-bar { display: none; }
  .scan {
    position: absolute;
    z-index: 1;
    top: 75.6%;
    left: 79.3%;
    display: block;
    width: 10.4%;
    aspect-ratio: 1;
    border-radius: 3%;
  }
  .scan a, .scan canvas { position: absolute; inset: 0; border-radius: inherit; }
  .scan canvas { display: block; width: 100%; height: 100%; }
}
