.popup {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 48px 32px 32px;
  border: 0;
  text-align: center;
}

.popup::backdrop {
  background: rgb(0 0 0 / 60%);
}

.popup .close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.popup .close:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.popup .content,
.popup form,
.popup .done {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popup [hidden] {
  display: none;
}

.popup .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.popup .invalid-feedback {
  display: block;
  text-align: left;
}

.popup .invalid-feedback:empty {
  display: none;
}

.popup .code {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 2px dashed currentColor;
}

.popup .code strong {
  font-size: 24px;
  letter-spacing: 0.1em;
}
