@font-face{font-family:CodekindDate;src:url("fonts/Allura-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
#chapter-certificate{width:min(920px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 28px);padding:0;border:0;border-radius:7px;background:#f8f2e4;color:#253d4f;box-shadow:0 25px 90px #0d202955;overflow:auto}
#chapter-certificate::backdrop{background:#142734ae;backdrop-filter:blur(4px)}
#chapter-certificate .certificate-paper{position:relative;margin:18px;padding:25px 38px 22px;border:3px double #a58442;text-align:center;background:radial-gradient(ellipse at 50% 40%,#fffdf8 0%,#faf5e9 80%);font-family:Georgia,'Times New Roman',serif}
#chapter-certificate .certificate-paper:before{content:'';position:absolute;inset:5px;border:1px solid #d3bc86;pointer-events:none}
#chapter-certificate .certificate-brand{display:block;width:160px;height:auto;margin:0 auto 12px}
#chapter-certificate .certificate-eyebrow{margin:0 0 8px;font-family:system-ui,sans-serif;font-size:11px;font-weight:600;letter-spacing:2.4px;text-transform:uppercase;color:#8a6b2a}
#chapter-certificate h2{font-family:Georgia,'Times New Roman',serif;font-size:clamp(25px,4.4vw,43px);font-weight:normal;line-height:1.12;letter-spacing:-.7px;margin:0 0 22px;color:#243e53}
#chapter-certificate .certificate-presented,#chapter-certificate .certificate-for{font-size:15px;line-height:1.5;margin:0;color:#5b6263}
#chapter-certificate .certificate-name-label{display:block;width:min(440px,90%);margin:9px auto 14px;border-bottom:1px solid #b99d61}
#chapter-certificate #certificate-name{box-sizing:border-box;width:100%;height:53px;min-width:0;padding:4px 8px 8px;border:0;border-radius:2px;box-shadow:none;background:transparent;text-align:center;font:italic 30px Georgia,'Times New Roman',serif;color:#233e53;outline-offset:2px}
#chapter-certificate #certificate-name::placeholder{color:#8d8c82;font-size:26px;opacity:1}
#chapter-certificate #certificate-name:focus-visible{outline:2px solid #6e9eac;background:#fffaf0}
#chapter-certificate h3{font:600 clamp(18px,2.7vw,25px)/1.3 Georgia,'Times New Roman',serif;margin:6px 0 8px;color:#243e53}
#chapter-certificate .certificate-praise{font:italic 15px/1.4 Georgia,'Times New Roman',serif;margin:0;color:#716b5a}
#chapter-certificate .certificate-footer{display:grid;grid-template-columns:1fr 138px 1fr;align-items:center;gap:25px;margin:20px auto 0;max-width:650px}
#chapter-certificate .certificate-footer time,#chapter-certificate .pip-autograph{display:block;padding:0 2px 8px;border-bottom:1px solid #b99d61;font-size:16px;font-weight:normal;line-height:1.3}
#chapter-certificate .certificate-footer time{font-family:CodekindDate,cursive;font-size:25px;line-height:1.2}
#chapter-certificate .certificate-footer span{display:block;font:11px/1.4 system-ui,sans-serif;color:#70694f;margin-top:8px}
#chapter-certificate .pip-autograph>svg{display:block;width:200px;max-width:100%;height:auto;margin:0 auto}
#chapter-certificate .certificate-signature{min-width:0}
#chapter-certificate .certificate-seal svg{display:block;width:114px;height:129px;margin:0 auto}
#chapter-certificate .certificate-seal span{margin-top:0;font-size:9px;font-weight:700;letter-spacing:1px}
#chapter-certificate .certificate-corner{position:absolute;width:23px;height:23px;border:2px solid #9c7d3d;pointer-events:none}
#chapter-certificate .corner-tl{top:9px;left:9px;border-right:0;border-bottom:0}
#chapter-certificate .corner-tr{top:9px;right:9px;border-left:0;border-bottom:0}
#chapter-certificate .corner-bl{bottom:9px;left:9px;border-right:0;border-top:0}
#chapter-certificate .corner-br{bottom:9px;right:9px;border-left:0;border-top:0}
#chapter-certificate .certificate-actions{display:flex;justify-content:center;gap:12px;margin:0;padding:0 18px 18px;background:transparent}
#chapter-certificate .certificate-actions button{min-height:48px;min-width:110px;padding:10px 22px;border:1px solid #c5bea7;border-radius:9px;font:600 16px/1.2 system-ui,sans-serif;background:#fffdf6;color:#243e53;box-shadow:none;cursor:pointer}
#chapter-certificate #certificate-continue{background:#243e53;color:#fffdf5;border-color:#243e53}
#chapter-certificate .certificate-actions button:focus-visible{outline:3px solid #b99549;outline-offset:3px}
#chapter-certificate .certificate-print-name{display:none}
#chapter-certificate .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.certificate-open{overflow:hidden}
@media(max-width:600px){
 #chapter-certificate{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
 #chapter-certificate .certificate-paper{margin:10px;padding:24px 16px 20px}
 #chapter-certificate .certificate-brand{width:130px}
 #chapter-certificate h2{font-size:31px;margin-bottom:18px}
 #chapter-certificate .certificate-eyebrow{font-size:10px;letter-spacing:1.5px}
 #chapter-certificate .certificate-name-label{width:100%}
 #chapter-certificate #certificate-name{font-size:26px}
 #chapter-certificate .certificate-footer{gap:7px;grid-template-columns:minmax(0,1fr) 80px minmax(112px,1.2fr);margin-top:22px}
 #chapter-certificate .certificate-footer time{font-size:21px}
 #chapter-certificate .certificate-footer span{font-size:10px}
 #chapter-certificate .certificate-seal svg{width:80px;height:91px}
 #chapter-certificate .certificate-seal span{font-size:8px;letter-spacing:.4px}
 #chapter-certificate .certificate-actions{gap:8px;padding:4px 10px 14px;flex-wrap:wrap}
 #chapter-certificate #certificate-continue{flex-basis:100%}
 #chapter-certificate .certificate-actions button{flex:1;min-width:0;padding:10px 9px;font-size:15px}
}
@media(prefers-reduced-motion:no-preference){#chapter-certificate[open]{animation:certificate-arrive .3s ease-out}@keyframes certificate-arrive{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}}
@media print{
 @page{size:landscape;margin:0}
 html,body.certificate-open{background:white!important;width:100%!important;height:auto!important;margin:0!important;padding:0!important;overflow:visible!important}
 body.certificate-open>*:not(#chapter-certificate){display:none!important}
 #chapter-certificate[open]{display:block!important;position:absolute!important;inset:0!important;width:100%!important;max-width:none!important;max-height:none!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;background:white!important;animation:none!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 #chapter-certificate::backdrop{background:transparent}
 #chapter-certificate .certificate-paper{box-sizing:border-box;margin:10mm;padding:10mm 14mm 8mm;min-height:175mm;break-inside:avoid}
 #chapter-certificate h2{font-size:35pt;margin-bottom:7mm}
 #chapter-certificate .certificate-name-label,#chapter-certificate .certificate-actions{display:none!important}
 #chapter-certificate .certificate-print-name{display:block;width:75%;margin:6mm auto;padding-bottom:3mm;border-bottom:1px solid #b99d61;font:italic 28pt Georgia,serif;overflow-wrap:anywhere}
 #chapter-certificate h3{font-size:23pt}
 #chapter-certificate .certificate-footer{margin-top:9mm;max-width:190mm}
}

#certificate-library{width:min(860px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;border:2px solid #526251;border-radius:22px;background:#fffaf0;color:#28334b;box-shadow:0 22px 80px #18302c40}
#certificate-library[open]{display:flex;flex-direction:column}
#certificate-library::backdrop{background:#1427349e;backdrop-filter:blur(4px)}
.certificate-library-copy{padding:28px;overflow:auto;min-height:0}
#certificate-library h2{font:800 30px/1.15 ui-rounded,"Trebuchet MS",system-ui,sans-serif;letter-spacing:-.03em;margin:0 0 24px}
#certificate-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
#certificate-library-grid:empty{display:none}
#certificate-library-empty{margin:10px 0 24px;font-size:18px;line-height:1.5;color:#596073}
#certificate-library-empty[hidden]{display:none}
.certificate-tile{padding:0;text-align:left;overflow:hidden;border:1px solid #d2c6a9;border-radius:12px;background:#fffdf6;box-shadow:0 3px 0 #e5dcc6;transition:box-shadow .15s ease}
.certificate-tile:hover{box-shadow:0 5px 0 #d8cdae}
.certificate-tile img{display:block;width:100%;height:auto;border-bottom:1px solid #e5dcc6}
.certificate-tile>span{display:block;padding:15px 17px 17px}
.certificate-tile>span>span{display:block;font-size:14px;font-weight:500;color:#71684f;margin-bottom:4px}
.certificate-tile strong{display:block;font:800 20px/1.25 ui-rounded,"Trebuchet MS",system-ui,sans-serif;color:#374b43}
#certificate-library form{margin:0;padding:16px 28px 22px;border-top:1px solid #e5dcc6;background:#fffaf0;flex-shrink:0}
#certificate-library form button{min-height:48px;padding:10px 24px;border-radius:12px;border:1px solid #38533d;background:#bce884;font-size:17px}
@media(max-width:600px){#certificate-library{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.certificate-library-copy{padding:20px}#certificate-library-grid{grid-template-columns:1fr;gap:16px}#certificate-library h2{font-size:27px;margin-bottom:20px}#certificate-library form{padding:14px 20px 18px}#certificate-library form button{width:100%}}

#chapter-certificate #certificate-heading svg{display:block;width:min(610px,100%);height:auto;margin:0 auto}

#certificate-sharing{box-sizing:border-box;width:min(540px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:25px;border:1px solid #d2c6a9;border-radius:22px;background:#fffaf0;color:#243e53;box-shadow:0 22px 80px #18302c50;overflow:auto;font-family:system-ui,sans-serif;text-align:center}
#certificate-sharing::backdrop{background:#14273499;backdrop-filter:blur(3px)}
#certificate-sharing h2{font:800 27px/1.15 ui-rounded,"Trebuchet MS",system-ui,sans-serif;letter-spacing:-.03em;margin:0 0 7px}
#certificate-sharing-chapter{font-size:16px;line-height:1.4;margin:0 0 16px;color:#596073}
#certificate-sharing-preview{display:block;width:min(220px,100%);height:auto;margin:0 auto 16px;border:1px solid #d8c89f;border-radius:4px;box-shadow:0 4px 14px #79683b18}
#certificate-sharing .certificate-image-actions{display:flex;gap:10px;justify-content:center;margin-top:18px}
#certificate-sharing button,#certificate-sharing a{box-sizing:border-box;min-height:48px;padding:12px 16px;border:1px solid #c5bea7;border-radius:12px;background:#fffdf6;color:#243e53;font:600 16px/1.25 system-ui,sans-serif;box-shadow:none;text-decoration:none;cursor:pointer;touch-action:manipulation}
#certificate-sharing .certificate-image-actions button{flex:1;min-width:0}
#certificate-sharing #certificate-share-image{background:#243e53;color:#fffdf5;border-color:#243e53}
#certificate-sharing .certificate-share-hint{font-size:14px;line-height:1.4;margin:10px 0 20px;color:#596073}
#certificate-sharing h3{font:600 16px/1.4 system-ui,sans-serif;margin:0 0 12px;padding-top:18px;border-top:1px solid #e3dcca}
#certificate-sharing .certificate-social-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#certificate-sharing .certificate-social-links a{font-size:14px;display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 5px}
#certificate-sharing .social-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;font-size:26px;line-height:1;color:white}
#certificate-sharing .social-snapchat{background:#ffed00;color:#20242b}
#certificate-sharing .social-threads{background:#20242b;font-family:Arial,sans-serif;font-weight:700}
#certificate-sharing .social-whatsapp{background:#187943}
#certificate-sharing .social-instagram{background:linear-gradient(35deg,#f4a33d,#d33174 55%,#734bcc)}
#certificate-sharing .social-instagram svg,#certificate-sharing .social-snapchat svg,#certificate-sharing .social-whatsapp svg{width:27px;height:27px}
#certificate-sharing form{margin:20px 0 0;padding:0;display:flex;justify-content:center}
#certificate-sharing form button{min-width:125px;background:#e3efc9;border-color:#a7b78b}
#certificate-sharing button:focus-visible,#certificate-sharing a:focus-visible{outline:3px solid #8d7131;outline-offset:3px}
#certificate-sharing button:disabled{opacity:.55;cursor:wait}
#certificate-sharing [hidden]{display:none!important}
#certificate-sharing-status{font-size:16px;line-height:1.4;margin:16px 0 0;color:#5c4e34}
@media(max-width:420px){#certificate-sharing{padding:20px 16px}#certificate-sharing h2{font-size:25px}}
@media(max-height:760px){#certificate-sharing-preview{width:170px}}
@media(max-width:420px){#certificate-sharing .certificate-social-links{grid-template-columns:repeat(2,minmax(0,1fr))}#certificate-sharing .certificate-social-links a{flex-direction:row;font-size:15px;gap:8px;padding:10px 8px}#certificate-sharing-preview{width:180px}}

#certificate-sharing .social-facebook{background:#1877f2;font-family:Arial,sans-serif;font-weight:700}
#certificate-sharing .social-x{background:#202327;color:#fff}

#chapter-certificate .certificate-boomchuk{display:block;width:150px;margin:16px auto 0;color:#28352c;text-decoration:none}
#chapter-certificate .certificate-boomchuk svg{display:block;width:100%;height:auto}
#chapter-certificate .certificate-boomchuk:focus-visible{outline:3px solid #8d7131;outline-offset:4px;border-radius:4px}
#certificate-sharing .social-x svg{width:25px;height:25px}
