.zhijing-qr-modal[hidden] {
  display: none !important;
}

.zhijing-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.zhijing-qr-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 30px 28px 26px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.zhijing-qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font: 26px/1 Arial, sans-serif;
  cursor: pointer;
}

.zhijing-qr-close:hover,
.zhijing-qr-close:focus-visible {
  background: #e2e8f0;
  outline: 3px solid rgba(37, 99, 235, 0.25);
}

.zhijing-qr-kicker {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.zhijing-qr-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.28;
}

.zhijing-qr-description {
  margin: 10px auto 20px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.7;
}

.zhijing-qr-code {
  position: relative;
  width: min(300px, 76vw);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border: 10px solid #fff;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.12);
}

.zhijing-qr-code img {
  position: absolute;
  top: -291.9%;
  left: -75.68%;
  width: 248.92%;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.zhijing-qr-hint {
  margin: 16px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.zhijing-qr-direct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #334155;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.zhijing-qr-direct:hover,
.zhijing-qr-direct:focus-visible {
  border-color: #2563eb;
  color: #1d4ed8;
  outline: none;
}

body.zhijing-qr-modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .zhijing-qr-modal {
    align-items: end;
    padding: 12px;
  }

  .zhijing-qr-dialog {
    max-height: calc(100vh - 24px);
    padding: 28px 18px 22px;
    border-radius: 22px 22px 16px 16px;
  }

  .zhijing-qr-description {
    margin-bottom: 14px;
  }

  .zhijing-qr-code {
    width: min(270px, 76vw);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .zhijing-qr-modal:not([hidden]) .zhijing-qr-dialog {
    animation: zhijing-qr-enter 180ms ease-out both;
  }

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