There are 3 Church laws that govern the eligibility and election of the Pope:
(1) The Apostolic Constitution Universi Dominici Gregis, as amended, issued by the late Bl. Pope John Paul II in 1996;
(2) the Latin Code of Canons; and
(3) the Eastern Code of Canons.
The Apostolic Constitution abrogates all previous laws governing the eligibility and election of the Pope and amends or otherwise modifies those provided by the Latin and Eastern Codes.
Based on the aforecited Apostolic Constitution, on the Codes of Canons, and on the traditions of the Roman Church, I think the following are clear:
(1) General Rule.–The Sacred College of Cardinals (from East and West), in conclave, elect the next Pope from among themselves, i.e., Cardinal electors (under 80) and non-conclave Cardinals (80 and over) are equally eligible for election.
This is inferred from Provision #53 of the AC which provides that the Roman Pontiff shall be elected from among the members of the Sacred College of Cardinals.
In effect this precludes the election of a Deacon (much less a layman, including women and minors) because of Section 1, Canon 351, of the 1983 Latin Code of Canons (and the corresponding Eastern Canon) which provides that those to be promoted Cardinals are men who are at least in the order of priesthood.
The last non-Cardinal who was elected Pope was Pope Urban VI, the then Archbishop of Acerenza (Kingdom of Naples), who was Supreme Pontiff from 1378 through his death in 1389.
(2) Exception.–The AC recognizes the remote possibility of an impasse in the election of the next Pope. In such an event, the Cardinal-electors may elect a non-member of the Sacred College, i.e., a non-Cardinal under Provision #83!
However, even under this exception, such an “outsider” must be at least a priest because, under Section 1, Canon 355, of the Latin Code (and the corresponding Eastern Canon), the newly elected Supreme Pontiff must be consecrated immediately a Bishop, if he is not already a Bishop, to exercise his office (as Pope) canonically.The immediacy of episcopal consecration as required by the Canons precludes the interim ordination of a deacon to the priesthood and the latter’s ordination to the episcopacy.
By the way, since 769 A.D. non-Cardinal clerics and the laity have been debarred from participating in the election of the Pope.
Based on the foregoing, the chances for a Deacon (much less a Catholic layman), or for a non-Cardinal for that matter, to be elected Pope are nil.
Just my opinion.