/* QR modal */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

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

.is-modal-open {
  overflow: hidden;
}

.qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(2px);
}

.qr-modal__panel {
  position: relative;
  width: min(420px, 92vw);
  border-radius: 18px;
  background: #ffffff;
  color: #102a43;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.qr-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(16, 42, 67, 0.08);
}

.qr-modal__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(16, 42, 67, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qr-modal__body {
  padding: 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.qr-modal__img {
  width: 220px;
  height: 220px;
  border-radius: 14px;
  background: #f3f6ff;
  border: 1px solid rgba(16, 42, 67, 0.08);
  image-rendering: pixelated;
}

.qr-modal__img:not([src]),
.qr-modal__img[src=""] {
  opacity: 0.6;
}

.qr-modal__hint {
  margin: 0;
  font-size: 13px;
  color: rgba(16, 42, 67, 0.72);
  text-align: center;
}

.qr-modal__actions {
  width: 100%;
  display: grid;
  gap: 10px;
}

.qr-modal__ios-btn {
  box-shadow: none;
}

/* iOS guide modal */
.ios-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 121;
  display: grid;
  place-items: center;
  padding: 18px;
}

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

.ios-guide-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.ios-guide-modal__panel {
  position: relative;
  width: min(480px, 94vw);
  max-height: min(92vh, 720px);
  border-radius: 18px;
  background: #fff;
  color: #102a43;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.ios-guide-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(16, 42, 67, 0.08);
}

.ios-guide-modal__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(16, 42, 67, 0.06);
  font-size: 22px;
}

.ios-guide-modal__body {
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
}

.ios-guide-modal__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #365072;
}

.ios-guide-modal__visual {
  display: grid;
  gap: 12px;
}

.ios-guide-step {
  margin: 0;
  padding: 10px;
  background: #f7f9fd;
  border: 1px solid rgba(16, 42, 67, 0.08);
  border-radius: 14px;
}

.ios-guide-step__illus {
  border-radius: 10px;
  overflow: hidden;
  background: #f2f4f8;
}

.ios-guide-step__illus svg {
  display: block;
  width: 100%;
  height: auto;
}

.ios-guide-modal__note {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #1a4a8c;
  background: #eef4ff;
  border: 1px solid rgba(11, 84, 255, 0.15);
  border-radius: 12px;
}

.ios-guide-step figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1a3a5c;
}

.ios-guide-step figcaption span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, #1a6bff, #0b54ff);
  border-radius: 50%;
}

.ios-guide-modal__actions {
  margin-top: 4px;
  padding-bottom: 4px;
}
