.rp-pwa-card,
.rp-pwa-card * {
  box-sizing: border-box;
}

.rp-pwa-card {
  position: fixed;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2147483000;
  width: min(380px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(244, 91, 147, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  color: #3f2232;
  box-shadow: 0 18px 48px rgba(63, 34, 50, 0.2), 0 4px 14px rgba(244, 91, 147, 0.16);
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.45;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: rp-pwa-enter 220ms ease-out both;
}

body.has-generate-sticky .rp-pwa-card {
  bottom: max(96px, calc(76px + env(safe-area-inset-bottom)));
}

.rp-pwa-card[hidden] {
  display: none !important;
}

.rp-pwa-card__top {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  gap: 12px;
  align-items: start;
}

.rp-pwa-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(63, 34, 50, 0.16);
}

.rp-pwa-card__title {
  margin: 0;
  color: #3f2232;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.rp-pwa-card__message {
  margin: 5px 0 0;
  color: #765166;
  font-size: 13px;
  line-height: 1.5;
}

.rp-pwa-card__close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #765166;
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  line-height: 1;
}

.rp-pwa-card__close:hover,
.rp-pwa-card__close:focus-visible {
  background: #fff0f6;
  color: #3f2232;
}

.rp-pwa-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.rp-pwa-card__button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #f45b93;
  border-radius: 999px;
  background: #f45b93;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(244, 91, 147, 0.25);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.rp-pwa-card__button:hover,
.rp-pwa-card__button:focus-visible {
  transform: translateY(-1px);
  background: #e94f88;
  box-shadow: 0 10px 22px rgba(244, 91, 147, 0.3);
}

.rp-pwa-card__button--secondary {
  border-color: rgba(244, 91, 147, 0.28);
  background: #fff7fb;
  color: #6f4359;
  box-shadow: none;
}

.rp-pwa-card__button--secondary:hover,
.rp-pwa-card__button--secondary:focus-visible {
  background: #ffe8f1;
  box-shadow: none;
}

.rp-pwa-card__help {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 91, 147, 0.16);
  color: #8d6176;
  font-size: 12px;
  line-height: 1.55;
}

.rp-pwa-card__help strong {
  color: #5b3548;
}

@keyframes rp-pwa-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .rp-pwa-card {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    padding: 16px;
    border-radius: 16px;
  }

  body.has-generate-sticky .rp-pwa-card {
    bottom: max(92px, calc(72px + env(safe-area-inset-bottom)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .rp-pwa-card {
    animation: none;
  }

  .rp-pwa-card__button {
    transition: none;
  }
}
