.sdc-wrap{
  max-width:920px;
  margin:32px auto;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#24351f;
}
.sdc-actions{text-align:center;margin:0 0 22px}
.sdc-print-button{background:#8bbf45;color:#fff;border:0;border-radius:999px;padding:14px 22px;margin:5px;font-size:16px;font-weight:800;cursor:pointer;box-shadow:0 8px 22px rgba(139,191,69,.28)}
.sdc-png-button{background:#24351f;box-shadow:0 8px 22px rgba(36,53,31,.24)}
.sdc-print-button:hover{filter:brightness(.96)}.sdc-print-button:disabled{opacity:.6;cursor:wait}.sdc-small-note{font-size:14px;color:#6b7280;margin:10px 0 0}
.sdc-certificate{
  position:relative;overflow:hidden;box-sizing:border-box;width:100%;max-width:794px;min-height:1123px;margin:0 auto;
  background:radial-gradient(circle at 92% 8%, rgba(139,191,69,.20) 0, rgba(139,191,69,.10) 25%, rgba(139,191,69,0) 49%),linear-gradient(135deg,#ffffff 0%,#f9fcf6 42%,#edf7df 100%);
  border:10px solid #24351f;border-radius:30px;padding:58px 54px 50px;box-shadow:0 18px 44px rgba(0,0,0,.12);text-align:center;page-break-inside:avoid;
}
.sdc-certificate:before{content:"";position:absolute;inset:20px;border:2px solid rgba(139,191,69,.72);border-radius:20px;pointer-events:none;z-index:1}
.sdc-certificate:after{content:"";position:absolute;width:110px;height:110px;border-radius:50%;background:rgba(139,191,69,.16);right:-45px;bottom:-45px;pointer-events:none;z-index:0}
.sdc-corner{position:absolute;width:110px;height:110px;border-radius:50%;background:rgba(139,191,69,.16);bottom:-45px;z-index:0}.sdc-corner-left{left:-45px}.sdc-corner-right{display:none}
.sdc-footprints{position:absolute;inset:0;pointer-events:none;z-index:0}.sdc-footprint{position:absolute;width:54px;height:70px;opacity:.16;transform:rotate(-29deg)}
.sdc-footprint:before,.sdc-footprint:after{content:"";position:absolute;background:rgba(107,143,58,.18);border-radius:48% 48% 55% 55% / 56% 56% 42% 42%;width:18px;height:38px;top:19px;box-shadow:0 -13px 0 -5px rgba(107,143,58,.18),0 -23px 0 -8px rgba(107,143,58,.16)}
.sdc-footprint:before{left:9px;transform:rotate(9deg)}.sdc-footprint:after{right:9px;transform:rotate(-9deg)}
.sdc-footprint:nth-child(1){left:8%;bottom:11%;transform:rotate(-28deg) scale(1.08)}.sdc-footprint:nth-child(2){left:22%;bottom:25%;transform:rotate(-28deg) scale(1.00)}.sdc-footprint:nth-child(3){left:37%;bottom:40%;transform:rotate(-28deg) scale(.93)}.sdc-footprint:nth-child(4){left:53%;bottom:55%;transform:rotate(-28deg) scale(.86)}.sdc-footprint:nth-child(5){left:68%;bottom:69%;transform:rotate(-28deg) scale(.78)}.sdc-footprint:nth-child(6){left:79%;bottom:80%;transform:rotate(-28deg) scale(.70)}.sdc-footprint:nth-child(7){left:86%;bottom:89%;transform:rotate(-28deg) scale(.62)}
.sdc-certificate > *:not(.sdc-footprints):not(.sdc-corner){position:relative;z-index:2}
.sdc-badge{width:58px;height:58px;margin:0 auto 16px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#ffc44d,#f39a22);color:#fff;font-size:34px;line-height:1;box-shadow:0 8px 18px rgba(243,154,34,.24)}
.sdc-eyebrow{text-transform:uppercase;letter-spacing:2.4px;color:#6b8f3a;font-weight:900;font-size:14px;margin:0 0 22px}.sdc-title{font-size:50px;line-height:1.06;margin:0;color:#24351f;font-weight:950;letter-spacing:-.7px}.sdc-subtitle{font-size:21px;color:#6b8f3a;font-weight:850;margin:16px 0 32px}
.sdc-name{font-size:50px;line-height:1.1;font-family:Georgia,"Times New Roman",serif;color:#24351f;background:rgba(255,255,255,.95);border:1px solid rgba(139,191,69,.38);border-radius:16px;padding:17px 24px;margin:0 auto 32px;max-width:700px;box-shadow:0 8px 18px rgba(0,0,0,.035)}
.sdc-text{font-size:19px;line-height:1.68;color:#374151;max-width:700px;margin:0 auto 32px}.sdc-details{display:grid;grid-template-columns:1fr;gap:14px;margin:32px auto;max-width:620px}.sdc-details div{background:rgba(255,255,255,.88);border-radius:18px;padding:15px 16px;box-shadow:0 6px 18px rgba(0,0,0,.05)}.sdc-details span{display:block;font-size:13px;text-transform:uppercase;letter-spacing:1px;color:#6b8f3a;font-weight:850;margin-bottom:5px}.sdc-details strong{display:block;font-size:20px;color:#24351f}.sdc-thankyou{font-size:17px;color:#6b8f3a;font-weight:900;margin:24px 0 0}.sdc-footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;position:absolute;left:54px;right:54px;bottom:48px;z-index:2;box-sizing:border-box;overflow:hidden}.sdc-signature{text-align:left;width:230px;flex:0 0 230px;box-sizing:border-box}.sdc-signature span{display:block;width:190px;border-top:2px solid #24351f;margin:0 0 9px}.sdc-signature strong{display:block;font-size:16px;color:#24351f}.sdc-signature em{display:block;margin-top:3px;font-style:normal;font-size:13px;color:#6b8f3a;font-weight:750}.sdc-motto{text-align:right;color:#6b8f3a;width:230px;flex:0 0 230px;box-sizing:border-box}.sdc-motto strong{display:block;font-size:15px;color:#24351f;margin-bottom:3px;white-space:nowrap}.sdc-motto span{display:block;font-size:13px;font-weight:800;color:#6b8f3a;white-space:nowrap}
.sdc-certificate.sdc-export{width:794px!important;height:1123px!important;min-height:1123px!important;max-width:none!important;aspect-ratio:auto!important;padding:58px 54px 50px!important;border:10px solid #24351f!important;border-radius:30px!important;box-shadow:none!important}.sdc-certificate.sdc-export .sdc-footer{position:absolute!important;left:54px!important;right:54px!important;bottom:48px!important;display:flex!important;align-items:flex-end!important;justify-content:space-between!important}.sdc-certificate.sdc-export .sdc-motto{text-align:right!important}.sdc-certificate.sdc-export .sdc-signature{text-align:left!important;width:230px!important;flex:0 0 230px!important}.sdc-certificate.sdc-export .sdc-motto{width:230px!important;flex:0 0 230px!important}
@media(max-width:760px){.sdc-wrap{max-width:100%;overflow-x:auto;padding-bottom:6px}.sdc-certificate{width:640px;max-width:640px;min-height:905px;padding:42px 40px 40px;border-width:8px;border-radius:26px}.sdc-certificate:before{inset:16px}.sdc-title{font-size:40px}.sdc-name{font-size:38px}.sdc-text{font-size:17px}.sdc-footer{left:40px;right:40px;bottom:38px}.sdc-footprint{opacity:.13}}
@media print{ @page{size:A4 portrait;margin:0} html,body{width:210mm;height:297mm;margin:0!important;padding:0!important;background:#fff!important;overflow:hidden!important} body *{visibility:hidden!important}.sdc-wrap,.sdc-wrap *{visibility:visible!important}.sdc-wrap{position:absolute!important;left:0!important;top:0!important;width:210mm!important;height:297mm!important;margin:0!important;padding:0!important;max-width:none!important;overflow:hidden!important}.sdc-actions,.sdc-actions *,.no-print,.no-print *{display:none!important;visibility:hidden!important}.sdc-certificate{position:absolute!important;left:8mm!important;top:8mm!important;width:194mm!important;height:281mm!important;max-width:none!important;min-height:0!important;aspect-ratio:auto!important;margin:0!important;padding:16mm 14mm 12mm!important;border:2.5mm solid #24351f!important;border-radius:10mm!important;box-shadow:none!important;overflow:hidden!important;page-break-inside:avoid!important;break-inside:avoid!important}.sdc-certificate:before{inset:6mm!important;border-radius:7mm!important}.sdc-badge{width:14mm!important;height:14mm!important;font-size:22pt!important;margin:0 auto 5mm!important}.sdc-title{font-size:28pt!important;line-height:1.04!important}.sdc-name{font-size:30pt!important;border-radius:4mm!important;padding:4.5mm 6mm!important;margin:0 auto 8mm!important;max-width:150mm!important}.sdc-footer{position:absolute!important;left:14mm!important;right:14mm!important;bottom:12mm!important;display:flex!important;align-items:flex-end!important;justify-content:space-between!important} }

/* v3.2 preview polish */
.sdc-footprints span{font-size:0;line-height:0;color:transparent;}
.sdc-certificate .sdc-footprints{overflow:hidden;}
.sdc-certificate .sdc-footer *{max-width:100%;}
@media screen and (max-width:900px){
  .sdc-wrap{max-width:100%;overflow-x:auto;}
  .sdc-certificate{width:794px;max-width:794px;}
}


/* v3.3 preview footer fix - keep PDF/PNG export intact */
@media screen{
  .sdc-certificate:not(.sdc-export){
    padding-bottom:120px;
  }
  .sdc-certificate:not(.sdc-export) .sdc-thankyou{
    position:absolute;
    left:90px;
    right:90px;
    bottom:118px;
    margin:0;
    text-align:center;
    z-index:3;
    white-space:normal;
  }
  .sdc-certificate:not(.sdc-export) .sdc-footer{
    left:70px;
    right:70px;
    bottom:64px;
    overflow:visible;
    display:grid;
    grid-template-columns:220px 1fr 220px;
    align-items:end;
    gap:18px;
  }
  .sdc-certificate:not(.sdc-export) .sdc-signature{
    grid-column:1;
    width:220px;
    flex:none;
  }
  .sdc-certificate:not(.sdc-export) .sdc-motto{
    grid-column:3;
    width:220px;
    flex:none;
    text-align:right;
    justify-self:end;
  }
  .sdc-certificate:not(.sdc-export) .sdc-motto strong,
  .sdc-certificate:not(.sdc-export) .sdc-motto span{
    white-space:normal;
  }
}


/* v3.4 definitive preview footer fix
   The generic rule .sdc-certificate > * made the footer relative in the browser preview.
   PDF/PNG export already used !important, so this only makes the live preview match it. */
@media screen{
  .sdc-certificate:not(.sdc-export){
    min-height:1123px;
    padding-bottom:170px;
  }
  .sdc-certificate:not(.sdc-export) .sdc-thankyou{
    position:absolute!important;
    left:90px!important;
    right:90px!important;
    bottom:132px!important;
    margin:0!important;
    text-align:center!important;
    z-index:3!important;
    line-height:1.35!important;
  }
  .sdc-certificate:not(.sdc-export) .sdc-footer{
    position:absolute!important;
    left:70px!important;
    right:70px!important;
    bottom:70px!important;
    width:auto!important;
    max-width:none!important;
    box-sizing:border-box!important;
    overflow:visible!important;
    display:grid!important;
    grid-template-columns:minmax(0,220px) minmax(20px,1fr) minmax(0,220px)!important;
    align-items:end!important;
    gap:18px!important;
    z-index:3!important;
  }
  .sdc-certificate:not(.sdc-export) .sdc-signature{
    grid-column:1!important;
    width:220px!important;
    min-width:0!important;
    flex:none!important;
    text-align:left!important;
  }
  .sdc-certificate:not(.sdc-export) .sdc-signature span{
    width:190px!important;
    max-width:100%!important;
  }
  .sdc-certificate:not(.sdc-export) .sdc-motto{
    grid-column:3!important;
    width:220px!important;
    min-width:0!important;
    flex:none!important;
    text-align:right!important;
    justify-self:end!important;
    overflow-wrap:anywhere!important;
  }
  .sdc-certificate:not(.sdc-export) .sdc-motto strong,
  .sdc-certificate:not(.sdc-export) .sdc-motto span{
    white-space:normal!important;
    max-width:100%!important;
  }
}
