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

.app-install-prompt {
  position: fixed;
  z-index: 1500;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: min(390px, calc(100vw - 32px));
  padding: 18px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 13px 15px;
  color: #272a32;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(218, 220, 230, 0.96);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(28, 31, 45, 0.2);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.app-install-prompt.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-install-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(16, 17, 20, 0.18);
}

.app-install-copy {
  min-width: 0;
  padding-right: 22px;
}

.app-install-copy strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.app-install-copy p {
  margin: 5px 0 0;
  color: #777c87;
  font-size: 12px;
  line-height: 1.65;
}

.app-install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #8b909a;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.app-install-close:hover,
.app-install-close:focus-visible {
  color: #252830;
  background: #f1f2f6;
}

.app-install-actions,
.app-install-help {
  grid-column: 1 / -1;
}

.app-install-actions {
  display: flex;
  gap: 9px;
}

.app-install-action {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid #dedfe6;
  border-radius: 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.app-install-action-primary {
  flex: 1;
  color: #fff;
  background: #101114;
  border-color: #101114;
}

.app-install-action-secondary {
  color: #666b76;
  background: #f6f7f9;
}

.app-install-action:hover {
  transform: translateY(-1px);
}

.app-install-help {
  margin: 0;
  padding: 12px 14px 12px 32px;
  color: #686d78;
  background: #f6f7fa;
  border-radius: 11px;
  font-size: 11px;
  line-height: 1.7;
}

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

@media (max-width: 640px) {
  .app-install-prompt {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    padding: 16px;
    grid-template-columns: 50px minmax(0, 1fr);
    border-radius: 18px;
  }

  .app-install-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-install-prompt,
  .app-install-action {
    transition: none;
  }
}
