html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #f5f5f5;
}

.container {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

.picture {
  display: block;
  width: 100%;
  height: 100%;
}

.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 1000px;
  margin: 0 auto;
  cursor: pointer;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 999;
}

.modal-backdrop[hidden] {
  display: none;
}

.popup-layout {
  display: flex;
  align-items: center;
  gap: 32px;
}

.paywrap-modal {
  width: 478px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  padding: 24px 30px 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans KR", Arial, sans-serif;
}

.paywrap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.paywrap-logo {
  width: 106px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.paywrap-close {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #1b2028;
  font-size: 28px;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
}

.paywrap-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.paywrap-step {
  display: flex;
  gap: 12px;
  align-items: center;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f3f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #4e5968;
}

.step-text {
  font-weight: 600;
  font-size: 16px;
  color: #333d4a;
  line-height: 1.4;
}

.paywrap-code-card {
  background: #f9f7ff;
  border-radius: 16px;
  padding: 20px;
}

.code-row {
  display: flex;
  gap: 20px;
  align-items: center;
}

.qr-white {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  overflow: hidden;
}

.qr-slot {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qr-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-loading[hidden] {
  display: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 2px solid rgba(102, 90, 209, 0.25);
  border-top-color: #665ad1;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.qr-img {
  width: 72px;
  height: 72px;
  display: block;
  image-rendering: pixelated;
}

.qr-fallback {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #6d7682;
  line-height: 1.4;
}

.code-divider {
  width: 1px;
  height: 46px;
  background: #e4e8fb;
}

.code-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.code-label {
  font-weight: 500;
  font-size: 14px;
  color: #6d7682;
  line-height: 1.4;
}

.code-value {
  font-weight: 700;
  font-size: 36px;
  color: #665ad1;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

.paywrap-aside {
  width: 406px;
  font-weight: 500;
  font-size: 18px;
  color: #333d4a;
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.paywrap-processing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #f7f6ff;
  color: #3e3877;
  font-size: 14px;
  font-weight: 600;
}

.processing-text {
  line-height: 1.2;
}

.paywrap-result {
  padding: 18px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #efeff6;
  text-align: center;
}

.result-title {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
}

.result-desc {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 14px;
}

.result-close {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: #665ad1;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  .popup-layout {
    width: 100%;
    justify-content: center;
  }

  .paywrap-modal {
    width: min(478px, 100%);
  }

  .paywrap-aside {
    display: none;
  }
}
