.zr-rp-dialog-open {
  overflow: hidden;
}

.zr-rp-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(25, 22, 22, .57);
  overflow: auto;
}

.zr-rp-dialog {
  box-sizing: border-box;
  width: min(100%, 368px);
  max-height: 100%;
  overflow: auto;
  padding: 29px 24px 22px;
  border: 1px solid #f5ddc5;
  border-radius: 22px;
  background: #fffaf3;
  color: #392822;
  font: 16px/1.55 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
  text-align: center;
  box-shadow: 0 18px 60px rgba(42, 20, 18, .27);
  animation: zr-rp-reveal .39s cubic-bezier(.2, .76, .35, 1) both;
}

.zr-rp-envelope {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 9px 9px 13px 13px;
  background: linear-gradient(150deg, #e35536, #b33029 73%);
  box-shadow: 0 8px 15px rgba(160, 48, 33, .2);
  overflow: hidden;
  animation: zr-rp-envelope-in .56s .08s ease-out both;
}

.zr-rp-envelope::before {
  position: absolute;
  inset: 0 0 auto;
  height: 42px;
  border-radius: 0 0 54% 54%;
  background: #ed6444;
  border-bottom: 1px solid #ffdcb16b;
  content: "";
}

.zr-rp-envelope-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 1px solid #fff2d0;
  border-radius: 50%;
  background: #ffdb94;
  color: #7c301c;
  font-size: 13px;
  font-weight: 700;
}

.zr-rp-dialog .zr-rp-dialog-title {
  margin: 0;
  color: #392822;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.35;
}

.zr-rp-dialog .zr-rp-credit {
  margin: 8px 0;
  color: #a72f24;
  font-size: 26px;
  font-weight: 750;
}

.zr-rp-dialog .zr-rp-notice {
  margin: 0;
  color: #694e42;
  font-size: 14px;
}

.zr-rp-dialog-actions,
.zr-rp-checkout-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.zr-rp-dialog-actions {
  margin-top: 20px;
}

.zr-rp-dialog-actions > * {
  flex: 1 0 92px;
}

.zr-rp-primary,
.zr-rp-secondary {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.zr-rp-primary,
.zr-rp-primary:hover,
.zr-rp-primary:visited {
  background: #a93127;
  color: #fff;
  text-decoration: none;
}

.zr-rp-secondary {
  border-color: #e4cec0;
  background: #fff;
  color: #654031;
}

.zr-rp-primary:focus-visible,
.zr-rp-secondary:focus-visible,
.zr-rp-amount input:focus-visible {
  outline: 2px solid #7e3e26;
  outline-offset: 2px;
}

.zr-rp-checkout button:disabled {
  opacity: .6;
  cursor: default;
}

.zr-rp-checkout {
  box-sizing: border-box;
  padding: 16px;
  margin: 12px 0 16px;
  border: 1px solid #efd9ca;
  border-radius: 12px;
  background: #fffaf6;
  color: #392822;
  font: 14px/1.55 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}

.zr-rp-mobile-host {
  padding: 0 14px;
}

.zr-rp-checkout-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.zr-rp-checkout-heading h2 {
  margin: 0;
  color: #392822;
  font-size: 17px;
  font-weight: 700;
}

.zr-rp-balance {
  color: #982f26;
  font-weight: 700;
}

.zr-rp-checkout .zr-rp-summary,
.zr-rp-checkout .zr-rp-feedback {
  margin: 6px 0;
  color: #694e42;
}

.zr-rp-checkout .zr-rp-feedback:last-child {
  margin-bottom: 0;
}

.zr-rp-feedback:empty {
  display: none;
}

.zr-rp-amount {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.zr-rp-amount input {
  box-sizing: border-box;
  width: 92px;
  height: 42px;
  padding: 6px 8px;
  border: 1px solid #d9bba9;
  border-radius: 8px;
  background: #fff;
  color: #392822;
  font: inherit;
  font-size: 16px;
}

@keyframes zr-rp-reveal {
  from { transform: translateY(16px) scale(.94); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes zr-rp-envelope-in {
  0% { transform: rotate(-9deg) translateY(6px) scale(.76); opacity: .25; }
  70% { transform: rotate(4deg) translateY(-3px) scale(1.06); opacity: 1; }
  100% { transform: rotate(0) translateY(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .zr-rp-dialog, .zr-rp-envelope { animation: none; }
}
