.pulse-install-prompt {
  position: fixed;
  z-index: 900;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 9px;
  width: min(360px, calc(100vw - 28px));
  min-height: 56px;
  padding: 8px 8px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(12, 15, 28, 0.96);
  color: #f7f8ff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(118, 103, 255, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.96);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.pulse-install-prompt.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.pulse-install-prompt-icon {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  background: #151a32;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.pulse-install-prompt-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pulse-install-prompt-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.86rem;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pulse-install-prompt-copy span {
  overflow: hidden;
  max-height: 0;
  color: rgba(229, 232, 247, 0.78);
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  transition: max-height 180ms ease, opacity 180ms ease;
}

.pulse-install-prompt.is-guide .pulse-install-prompt-copy span {
  max-height: 2.8em;
  white-space: normal;
  opacity: 1;
}

.pulse-install-prompt-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 58px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #7868ee;
  color: #ffffff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.pulse-install-prompt-action:hover,
.pulse-install-prompt-action:focus-visible {
  background: #897cff;
}

.pulse-install-prompt-action:active {
  transform: translateY(1px);
}

.pulse-install-prompt-action svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.pulse-install-prompt-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(229, 232, 247, 0.68);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.pulse-install-prompt-close:hover,
.pulse-install-prompt-close:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
  .pulse-install-prompt {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(340px, calc(100vw - 20px));
  }
}

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

html[data-theme="light"] .pulse-install-prompt,
html[data-theme="meow"] .pulse-install-prompt {
  border-color: rgba(58, 43, 88, 0.16);
  background: rgba(255, 252, 255, 0.96);
  color: #322541;
  box-shadow: 0 14px 34px rgba(86, 57, 112, 0.18);
}

html[data-theme="light"] .pulse-install-prompt-copy strong,
html[data-theme="meow"] .pulse-install-prompt-copy strong {
  color: #322541;
}

html[data-theme="light"] .pulse-install-prompt-copy span,
html[data-theme="meow"] .pulse-install-prompt-copy span {
  color: rgba(76, 58, 95, 0.78);
}
