.nn-download-popover {
  position: fixed;
  z-index: 160;
  width: min(410px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(91, 66, 132, .16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(128, 87, 231, .13), transparent 38%),
    #fff;
  box-shadow:
    0 28px 76px rgba(35, 25, 59, .22),
    0 8px 24px rgba(35, 25, 59, .10);
  color: #1a1626;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  transition:
    opacity .18s ease,
    visibility .18s ease,
    transform .18s cubic-bezier(.2, .7, .2, 1);
}

.nn-download-popover[data-state="open"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.nn-download-popover-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 16px;
  align-items: start;
}

.nn-download-popover-kicker {
  margin: 0 0 7px;
  color: #7045d6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nn-download-popover-title {
  margin: 0;
  color: #17131f;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.nn-download-popover-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid #e9e4ef;
  border-radius: 50%;
  background: rgba(255, 255, 255, .84);
  color: #61596c;
  font: 400 22px/1 Arial, sans-serif;
  cursor: pointer;
}

.nn-download-popover-close:hover {
  border-color: #d8cbea;
  background: #f8f4ff;
  color: #5936bc;
}

.nn-download-popover-bio {
  margin: 14px 0 18px;
  color: #625b6e;
  font-size: 13px;
  line-height: 1.65;
}

.nn-download-popover-stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nn-download-popover-store {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ece7f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  color: #1a1626;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.nn-download-popover-store:hover {
  border-color: rgba(112, 69, 214, .34);
  box-shadow: 0 12px 26px rgba(74, 48, 122, .10);
  color: #5634bc;
  transform: translateY(-2px);
}

.nn-download-popover-store img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  image-rendering: pixelated;
}

.nn-download-popover-store span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 740;
  line-height: 1.35;
}

.nn-download-popover-store span::after {
  content: "↗";
  flex: 0 0 auto;
  color: #8d75b6;
  font-size: 11px;
}

.nn-download-popover-directs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.nn-download-popover-direct {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #ece7f1;
  border-radius: 15px;
  background: rgba(255, 255, 255, .88);
  color: #1a1626;
  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

.nn-download-popover-direct:hover {
  border-color: rgba(112, 69, 214, .34);
  box-shadow: 0 12px 26px rgba(74, 48, 122, .10);
  color: #5634bc;
  transform: translateY(-2px);
}

.nn-download-popover-direct-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f0ebff;
  color: #6540c8;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.nn-download-popover-direct strong,
.nn-download-popover-direct small {
  display: block;
}

.nn-download-popover-direct strong {
  font-size: 11px;
  line-height: 1.25;
}

.nn-download-popover-direct small {
  margin-top: 3px;
  color: #777080;
  font-size: 9px;
  line-height: 1.25;
}

.nn-download-popover-direct > span:last-child {
  color: #8d75b6;
  font-size: 11px;
}

.nn-download-popover-apk-note {
  margin: 11px 2px 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: #f4f1f7;
  color: #6d6677;
  font-size: 10px;
  line-height: 1.55;
}

.nn-download-popover-all {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 0 4px;
  border-top: 1px solid #ece7f1;
  color: #5936bc;
  font-size: 13px;
  font-weight: 760;
}

.nn-download-popover-all span {
  transition: transform .16s ease;
}

.nn-download-popover-all:hover span {
  transform: translateX(3px);
}

.nn-download-popover :focus-visible {
  outline: 3px solid rgba(112, 69, 214, .28);
  outline-offset: 3px;
}

.nn-download-trigger-active {
  box-shadow:
    0 0 0 3px rgba(112, 69, 214, .16),
    0 12px 28px rgba(72, 44, 151, .16);
}

@media (max-width: 480px) {
  .nn-download-popover {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 18px;
    border-radius: 19px;
  }

  .nn-download-popover-title {
    font-size: 19px;
  }

  .nn-download-popover-bio {
    margin-top: 12px;
    font-size: 12px;
  }

  .nn-download-popover-stores {
    gap: 9px;
  }

  .nn-download-popover-store {
    gap: 8px;
    padding: 9px;
    border-radius: 14px;
  }

  .nn-download-popover-store span {
    font-size: 11px;
  }

  .nn-download-popover-directs {
    gap: 8px;
  }

  .nn-download-popover-direct {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }

  .nn-download-popover-direct-icon {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nn-download-popover,
  .nn-download-popover-store,
  .nn-download-popover-direct,
  .nn-download-popover-all span {
    transition: none;
  }
}
