.app-download {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1002;
  display: flex;
  align-items: center;
  width: min(304px, calc(100vw - 32px));
  min-height: 58px;
  padding: 6px 8px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 5px 24px rgba(17, 24, 39, 0.11), 0 1px 4px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  opacity: 0;
  transform: translateY(-7px) scale(0.985);
  animation: app-download-enter 320ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
}

.app-download__link {
  display: grid;
  flex: 1;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.app-download__icon {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(31, 58, 154, 0.2);
}

.app-download__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.app-download__eyebrow {
  overflow: hidden;
  color: #7b8493;
  font-family: "Sora", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.35;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-download__title {
  overflow: hidden;
  color: #1c1c1e;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-download__arrow {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.09);
  color: #3b82f6;
  transition: transform 160ms ease, background-color 160ms ease;
}

.app-download__close {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.app-download__link:hover .app-download__arrow {
  background: rgba(59, 130, 246, 0.15);
  transform: translateX(2px);
}

.app-download__close:hover {
  background: rgba(17, 24, 39, 0.055);
  color: #5f6978;
}

.app-download__link:focus-visible,
.app-download__close:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.75);
  outline-offset: 2px;
}

.app-download__link:active,
.app-download__close:active {
  transform: scale(0.97);
}

.app-download.is-closing {
  pointer-events: none;
  animation: app-download-exit 180ms ease forwards;
}

@keyframes app-download-enter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes app-download-exit {
  to {
    opacity: 0;
    transform: translateY(-5px) scale(0.985);
  }
}

@media (max-width: 639px) {
  .app-download {
    top: auto;
    right: 64px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: auto;
    min-height: 56px;
    padding: 5px 6px;
    border-radius: 15px;
    transform: translateY(8px) scale(0.985);
  }

  .app-download__link {
    grid-template-columns: 44px minmax(0, 1fr) 22px;
    gap: 9px;
  }

  .app-download__icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .app-download__close {
    width: 26px;
    height: 26px;
    margin-left: 0;
  }

  @keyframes app-download-enter {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes app-download-exit {
    to {
      opacity: 0;
      transform: translateY(7px) scale(0.985);
    }
  }
}

@media (max-width: 359px) {
  .app-download {
    right: 60px;
  }

  .app-download__eyebrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-download,
  .app-download.is-closing {
    animation-duration: 1ms;
    animation-delay: 0ms;
  }

  .app-download__arrow,
  .app-download__close {
    transition: none;
  }
}
