.rp-magic-recovery-root {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 99990;
  width: min(420px, calc(100vw - 28px));
  pointer-events: none;
}

/* Vertical toast: message spans the full width (no cramped wrapping), a prominent
   Continue-delivery action below, and the close tucked top-right. Matches the
   site design system (navy card, blue/violet accent, Manrope). */
.rp-mr-card {
  pointer-events: auto;
  position: relative;
  display: block;
  padding: 16px 18px 15px;
  border: 1px solid rgba(96, 165, 250, .28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 38, 80, .97), rgba(8, 18, 40, .98));
  color: #e6edf7;
  box-shadow: 0 28px 64px -18px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  font-family: Manrope, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
  animation: rp-mr-in .28s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rp-mr-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rp-mr-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, #5bb7ff, #a78bfa);
}

.rp-mr-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding-right: 26px; /* clear the close button */
}

.rp-mr-copy strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.01em;
}

.rp-mr-copy span {
  color: #9aa9c2;
  font-size: 13px;
  line-height: 1.5;
}

.rp-mr-copy small {
  color: #8ec3ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.rp-mr-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rp-mr-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(96, 165, 250, .3);
  border-radius: 12px;
  padding: 0 16px;
  background: rgba(96, 165, 250, .1);
  color: #cfe0ff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .18s ease, background .18s ease;
}

.rp-mr-btn-primary {
  flex: 1 1 auto;
  border-color: transparent;
  background: linear-gradient(180deg, #5bb7ff, #3b82f6);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(59,130,246,.7), inset 0 1px 0 rgba(255,255,255,.3);
}
.rp-mr-btn-primary:hover { filter: brightness(1.05); }

.rp-mr-hide {
  position: absolute;
  top: 12px; right: 12px;
  width: 26px; height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: #9aa9c2;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.rp-mr-hide:hover { color: #fff; background: rgba(255,255,255,.08); }

.rp-gs-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 24px;
}

.rp-gs-card p {
  margin: 0 0 16px;
  color: var(--rp-ad-muted, #9ba9c5);
}

.rp-gs-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(123, 166, 255, .16);
  border-radius: 14px;
  background: rgba(5, 14, 27, .48);
}

.rp-gs-panel strong {
  color: #fff;
}

.rp-gs-panel span {
  color: var(--rp-ad-muted, #9ba9c5);
  font-size: 13px;
}

.rp-gs-email-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.rp-gs-email-form label {
  display: grid;
  gap: 7px;
  color: var(--rp-ad-muted, #9ba9c5);
  font-size: 13px;
  font-weight: 750;
}

.rp-gs-email-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(123, 166, 255, .16);
  border-radius: 12px;
  background: rgba(5, 14, 27, .65);
  color: #fff;
  padding: 0 12px;
}

.rp-gs-message {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(123, 166, 255, .16);
  background: rgba(255,255,255,.04);
  color: #dbe7ff;
  font-size: 13px;
  font-weight: 750;
}

.rp-gs-message.is-good {
  border-color: rgba(53, 217, 152, .28);
  background: rgba(53, 217, 152, .09);
}

.rp-gs-message.is-bad {
  border-color: rgba(255, 95, 114, .28);
  background: rgba(255, 95, 114, .09);
}

@media (max-width: 680px) {
  .rp-magic-recovery-root {
    left: 14px;
    right: 14px;
    bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }

  .rp-mr-card,
  .rp-gs-email-form {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .rp-mr-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
