/* QR modal — show WeChat / Xiaohongshu QR codes on demand.
   Loaded on every page (cheap; ~1 KB). Single instance in #qr-modal. */

.qr-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 24px;
}
.qr-modal[aria-hidden="false"] { display: flex; }

.qr-modal-panel {
  background: #fff; border-radius: 12px;
  max-width: 360px; width: 100%;
  padding: 32px 28px 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: qr-pop 0.15s ease-out;
}
@keyframes qr-pop {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.qr-modal-close {
  position: absolute; top: 8px; right: 12px;
  background: transparent; border: 0;
  font-size: 28px; line-height: 1; cursor: pointer;
  color: #888; padding: 4px 8px;
  border-radius: 4px;
}
.qr-modal-close:hover { color: #000; background: rgba(0,0,0,0.05); }

.qr-modal-title {
  font-size: 18px; font-weight: 700;
  color: var(--primary); margin-bottom: 16px;
}

.qr-modal-img {
  width: 240px; height: 240px;
  margin: 0 auto 16px;
  background: #f5f5f5;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.qr-modal-img img { width: 100%; height: 100%; object-fit: contain; }

.qr-modal-hint {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}

@media (max-width: 480px) {
  .qr-modal { padding: 16px; }
  .qr-modal-img { width: 200px; height: 200px; }
}
