@media (max-width: 768px) {
  .retention-popup__panel {
    padding: 20px 16px !important;
  }

  .retention-popup__close {
    top: 12px !important;
    font-size: 28px !important;
  }

  .retention-popup__header {
    justify-content: center;
  }

  .retention-popup__content .retention-popup__left {
    padding-top: 20px !important;
  }

  .retention-popup__title {
    text-align: center;
    font-size: 24px !important;
    font-weight: 500 !important;
  }

  .retention-popup__desc {
    margin-bottom: 20px !important;
  }

  .retention-popup__actions {
    gap: 10px !important;
  }

  .retention-popup__btn {
    height: 40px !important;
    border-radius: 32px !important;
    flex: auto !important;
  }

  .retention-popup__illustration {
    display: none !important;
  }

  /* 支付 */
  .retention-gmpay-modal__panel {
    padding: 20px 16px !important;
  }

  .retention-gmpay-modal__title {
    text-align: center;
    font-size: 18px !important;
    font-weight: 500 !important;
    margin: 0 0 20px 0 !important;
    border-bottom: 1px solid #EBEBEB;
  }

  .retention-gmpay-modal__hint {
    text-align: center !important;
    color: #666 !important;
  }

  .retention-gmpay-modal__qr {
    width: 150px !important;
    height: 150px !important;

  }

  .retention-gmpay-modal__times {
    padding: 4px 20px !important;
  }

  .retention-gmpay-modal__field {
    flex-direction: row !important;
    align-items: center !important;
    padding: 16px 0 !important;
  }

  .retention-gmpay-modal__address {
    width: 124px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    /* 显示省略号 */
  }

  .retention-gmpay-modal__error {
    margin-top: -10px !important;
  }
  .retention-gmpay-modal__footer{
    flex-direction: row !important;
  }
}

.retention-popup {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.retention-popup[hidden] {
  display: none !important;
}

.retention-popup__panel {
  position: relative;
  width: min(600px, calc(100vw - 32px));
  padding: 30px;
  background: linear-gradient(246deg, #c4d4f8 1%, #f7fbfe 52%, #e9f2ff 100%);
  border-radius: 8px;
}

.retention-popup__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.retention-popup__close:hover {
  background: #f0f0f0;
  color: #333;
}

.retention-popup__header {
  display: flex;
  align-items: center;
}

.retention-popup__logo {
  height: 30px;
  width: auto;
  display: block;
}

.retention-popup__content {
  display: flex;
  gap: 60px;
}

.retention-popup__left {
  padding-top: 24px;
  min-width: 0;
  flex: 1;
}

.retention-popup__title {
  font-size: 28px;
  font-weight: 600;
  color: #191717;
  margin-bottom: 12px;
  line-height: 1.3;
}

.retention-popup__highlight {
  color: #ff9900;
}

.retention-popup__desc {
  font-size: 14px;
  color: #4d4d4d;
  line-height: 1.6;
  margin-bottom: 46px;
  max-width: 340px;
}

.retention-popup__amount {
  color: #f59e0b;
  font-weight: 600;
}

.retention-popup__illustration {
  width: 107px;
  height: 143px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.retention-popup__illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.retention-popup__actions {
  display: flex;
  gap: 12px;
  height: 40px;
}

.retention-popup__btn {
  flex: 1;
  height: 40px;
  margin: 0;
  border: 0;
  padding: 0 16px;
  border-radius: 32px;
  font-family: inherit;
  font-size: 14px;
  font-weight: normal;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.retention-popup__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.retention-popup__btn--primary {
  color: #fff;
  background: #277eff;
}

.retention-popup__btn--primary:hover:not(:disabled) {
  background: #2070e5;
}

.retention-popup__btn--outline {
  border: 1px solid #ebebeb;
  color: #191717;
  background: #fff;
}

.retention-popup__btn--outline:hover:not(:disabled) {
  background: #f7f6f5;
}

@media (max-width: 640px) {
  .retention-popup__panel {
    padding: 24px 20px;
  }

  .retention-popup__content {
    gap: 16px;
  }

  .retention-popup__title {
    font-size: 22px;
  }

  .retention-popup__desc {
    margin-bottom: 24px;
    max-width: none;
  }

  .retention-popup__illustration {
    width: 80px;
    height: 107px;
  }

  .retention-popup__actions {
    height: auto;
    flex-direction: column;
  }

  .retention-popup__btn {
    width: 100%;
  }
}

/* GMPay 站内二维码弹窗（高于挽留弹窗） */
.retention-gmpay-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  padding: 16px;
}

.retention-gmpay-modal[hidden] {
  display: none !important;
}

.retention-gmpay-modal__panel {
  position: relative;
  width: min(550px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px 24px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.retention-gmpay-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.retention-gmpay-modal__close:hover:not(:disabled) {
  background: #f0f0f0;
  color: #333;
}

.retention-gmpay-modal__close:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.retention-gmpay-modal__title {
  margin: 0 28px 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #191717;
  line-height: 1.35;
}

.retention-gmpay-modal__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.retention-gmpay-modal__hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.65);
}

.retention-gmpay-modal__hint strong {
  color: #277eff;
  font-weight: 600;
}

.retention-gmpay-modal__qr-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.retention-gmpay-modal__qr {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.retention-gmpay-modal__qr-missing {
  margin: 0;
  color: #ff4d4f;
  font-size: 14px;
}

.retention-gmpay-modal__times {
  padding: 8px 20px;
  background: #ffeded;
  display: inline-block;
  border: 1px solid #ffcaca;
  border-radius: 32px;
  margin: 0 auto;
  font-size: 14px;
  color: #191717;
  text-align: center;
}

.retention-gmpay-modal__times [data-gmpay-countdown] {
  font-weight: 600;
  color: #ff4d4f;
}

.retention-gmpay-modal__border {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0 12px;
  background: #fcfbfa;
}

.retention-gmpay-modal__field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.retention-gmpay-modal__label {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

.retention-gmpay-modal__address-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.retention-gmpay-modal__address {
  margin: 0;
  word-break: break-all;
  font-size: 13px;
  font-family: inherit;
  color: #191717;
  text-align: right;
}

.retention-gmpay-modal__copy {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.retention-gmpay-modal__copy img {
  width: 16px;
  height: 16px;
  display: block;
}

.retention-gmpay-modal__order {
  margin: 0;
  font-size: 14px;
  color: #666;
  padding: 12px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.retention-gmpay-modal__order-no {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #191717;
  word-break: break-all;
}

.retention-gmpay-modal__error {
  margin: 0;
  font-size: 13px;
  color: #ff4d4f;
}

.retention-gmpay-modal__error[hidden] {
  display: none !important;
}

.retention-gmpay-modal__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.retention-gmpay-modal__btn {
  flex: 1;
  min-width: 96px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.retention-gmpay-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.retention-gmpay-modal__btn--ghost {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: rgba(0, 0, 0, 0.65);
}

.retention-gmpay-modal__btn--ghost:hover:not(:disabled) {
  background: #f7f6f5;
}

.retention-gmpay-modal__btn--primary {
  border: 0;
  background: #247cff;
  color: #fff;
}

.retention-gmpay-modal__btn--primary:hover:not(:disabled) {
  background: #1f6fe6;
}

@media (max-width: 640px) {
  .retention-gmpay-modal__field {
    flex-direction: column;
    align-items: flex-start;
  }

  .retention-gmpay-modal__address {
    text-align: left;
  }

  .retention-gmpay-modal__footer {
    flex-direction: column;
  }
}