.sd-card-gallery{width:100%;margin-inline:auto;box-sizing:border-box;background-color:var(--sdcg-gallery-background,transparent)!important;padding:12px 0}.sd-card-gallery__grid{display:grid;grid-template-columns:repeat(var(--sdcg-cols-d,4),minmax(0,1fr));gap:var(--sdcg-gap,24px)}
.sd-info-card{position:relative;isolation:isolate;aspect-ratio:1086/1448;width:100%;max-width:var(--sdcg-card-max,380px);min-width:0;justify-self:center;box-sizing:border-box;transition:transform .2s ease;background-color:var(--sdcg-cell-background,transparent)}
.sd-info-card__image-wrap{position:absolute;z-index:1;left:10%;top:8%;width:80%;height:57%;overflow:hidden;background:var(--sdcg-image-background,transparent)}
.sd-info-card__image{display:block;width:100%;height:100%;object-fit:var(--sdcg-image-fit,cover);object-position:var(--sdcg-focal-x,50%) var(--sdcg-focal-y,50%)}
.sd-info-card__frame{position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}
.sd-info-card__content{position:absolute;z-index:3;left:11%;right:11%;top:67%;bottom:7.5%;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:.35em;min-width:0;text-align:center;overflow:visible;color:#f5e5c9;font-family:var(--sdcg-font-family,inherit);font-size:clamp(10px,1.1vw,16px);line-height:1.25}
/* Layout only: do not override native Gutenberg heading/paragraph font families, sizes, colors or line heights. */
.sd-info-card__content :where(.sd-info-card__heading,.sd-info-card__description){margin:0}
.sd-info-card__cta-row{margin-top:.3em}.sd-info-card__cta{display:inline-block;padding:.35em .75em;font-size:.9em;text-decoration:none}
.sd-info-card__content .wp-block-sd-card-modal-content,.sd-info-card__content .sdcg-modal-content-editor{display:none}
.sd-card-gallery .sd-info-card[data-sdcg-url],.sd-card-gallery .sd-info-card[data-sdcg-modal]{cursor:pointer}.sd-info-card[data-sdcg-url]:hover,.sd-info-card[data-sdcg-modal]:hover{transform:translateY(-3px)}
.sd-info-card:focus-visible{outline:2px solid #b9804a;outline-offset:3px}
.sd-card-modal{border:0;border-radius:10px;max-width:min(650px,92vw);width:100%;padding:0;color:#242424}.sd-card-modal::backdrop{background:rgba(0,0,0,.7)}.sd-card-modal__panel{padding:24px;max-height:85vh;overflow:auto;position:relative}.sd-card-modal__close{position:absolute;top:8px;right:12px;font-size:26px;background:transparent;border:0;cursor:pointer}.sd-card-modal__image{display:block;width:100%;max-height:250px;object-fit:cover}.sd-card-modal__header h2{margin-bottom:.4em}
@media(max-width:999px){.sd-card-gallery__grid{grid-template-columns:repeat(var(--sdcg-cols-t,2),minmax(0,1fr))}.sd-info-card__content{font-size:clamp(11px,1.7vw,17px)}}
@media(max-width:600px){.sd-card-gallery__grid{grid-template-columns:repeat(var(--sdcg-cols-m,1),minmax(0,1fr))}.sd-info-card__content{font-size:clamp(12px,3.1vw,18px)}}


/* Sponsor Platinum frames: fixed minimum width */
.sd-info-card--frame-sponsor-platinum {
  min-width: 400px !important;
  width: 400px !important;
  max-width: none !important;
}

/* Narrow screens: fit within viewport */
@media (max-width: 449px) {
  .sd-info-card--frame-sponsor-platinum {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Center Sponsor Platinum cards on narrow screens */
@media (max-width: 600px) {
  .sd-info-card--frame-sponsor-platinum {
    margin-inline: auto !important;
  }
}

/* Fixed-asset safe areas. The ornate artwork leaves less usable room for type. */
.sd-info-card--frame-ornate .sd-info-card__content{left:15%;right:15%;top:70%;bottom:9%;gap:.25em}
/* No background/fill controls on native text: they escape fixed leather plaques. */
.sd-info-card__content .sd-info-card__heading,.sd-info-card__content .sd-info-card__description{background:none!important;background-image:none!important;padding:0!important;box-shadow:none!important;border:0!important;max-width:100%;overflow-wrap:break-word}
/* Native Gutenberg typography and palette choices are not overridden here. */

/* Heading and paragraph font family, size, case and spacing belong to native Gutenberg blocks. */

/* Optional registered site texture, layered over the independent gallery color. */
.sd-card-gallery{background-image:var(--sdcg-gallery-texture,none)!important;background-repeat:repeat!important;}

/* Fixed raster flair overlay — separate from the approved frame PNG. */
.sd-info-card .sdcg-flair{position:absolute;z-index:4;pointer-events:none;user-select:none;width:13%;height:auto;aspect-ratio:1;object-fit:contain}
.sd-info-card .sdcg-flair--small{width:9%}.sd-info-card .sdcg-flair--large{width:18%}
.sd-info-card .sdcg-flair--top-left{top:0;left:0}.sd-info-card .sdcg-flair--top-center{top:0;left:50%;transform:translate(-50%,-10%)}.sd-info-card .sdcg-flair--top-right{top:0;right:0}
.sd-info-card .sdcg-flair--bottom-left{bottom:0;left:0}.sd-info-card .sdcg-flair--bottom-center{bottom:0;left:50%;transform:translate(-50%,10%)}.sd-info-card .sdcg-flair--bottom-right{bottom:0;right:0}

/* v0.0.36 front-end-only row alignment; Gutenberg editor grid remains unchanged.
   Gutenberg retains the tested v0.0.32 grid editor layout untouched. */
.sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid {
 display:flex;
 flex-wrap:wrap;
 justify-content:center;
 --sdcg-active-cols:var(--sdcg-cols-d,4);
 /* Limit the entire row, not the individual slot. The former 380px item cap
    allowed a fifth card to slip into a four-column row on wide displays. */
 width:100%;
 max-width:calc(var(--sdcg-active-cols) * var(--sdcg-card-max,380px) + (var(--sdcg-active-cols) - 1) * var(--sdcg-gap,24px));
 margin-inline:auto;
}
.sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid > .sd-info-card {
 flex:0 0 calc((100% - (var(--sdcg-active-cols) - 1) * var(--sdcg-gap,24px)) / var(--sdcg-active-cols) - 0.1px);
 max-width:var(--sdcg-card-max,380px);
}
@media(max-width:999px) {
 .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid {--sdcg-active-cols:var(--sdcg-cols-t,2)}
}
@media(max-width:600px) {
 .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid {--sdcg-active-cols:var(--sdcg-cols-m,1)}
}

/* Row alignment applies only to published layout. */
.sd-card-gallery--align-left:not(.sd-card-gallery--editor) > .sd-card-gallery__grid{justify-content:flex-start}
.sd-card-gallery--align-center:not(.sd-card-gallery--editor) > .sd-card-gallery__grid{justify-content:center}
.sd-card-gallery--align-right:not(.sd-card-gallery--editor) > .sd-card-gallery__grid{justify-content:flex-end}

/* New fixed-frame families: preset-specific dimensions and independent safe areas.
   Original presets retain their existing geometry and assets. */
.sd-info-card--frame-postcard-chamfered{aspect-ratio:1006/940}
.sd-info-card--frame-postcard-chamfered .sd-info-card__image-wrap{left:10%;width:80%;top:8.5%;height:42%}
.sd-info-card--frame-postcard-chamfered .sd-info-card__content{left:11%;right:11%;top:55%;bottom:7%;gap:.25em}
.sd-info-card--frame-postcard-square{aspect-ratio:1058/946}
.sd-info-card--frame-postcard-square .sd-info-card__image-wrap{left:11%;width:78%;top:9.09%;height:42.82%}
.sd-info-card--frame-postcard-square .sd-info-card__content{left:11%;right:11%;top:56.71%;bottom:5.82%;gap:.25em}
.sd-info-card--frame-postcard-rounded{aspect-ratio:1064/938}
.sd-info-card--frame-postcard-rounded .sd-info-card__image-wrap{left:11%;width:78%;top:8.96%;height:46.8%}
.sd-info-card--frame-postcard-rounded .sd-info-card__content{left:11%;right:11%;top:60.06%;bottom:5.9%;gap:.25em}
.sd-info-card--frame-postcard-ornate{aspect-ratio:1068/1054}
.sd-info-card--frame-postcard-ornate .sd-info-card__image-wrap{left:15%;width:70%;top:18.02%;height:32.44%}
.sd-info-card--frame-postcard-ornate .sd-info-card__content{left:15%;right:15%;top:60.01%;bottom:7.45%;gap:.25em}
.sd-info-card--frame-sixty-forty-chamfered{aspect-ratio:1006/1417}
.sd-info-card--frame-sixty-forty-chamfered .sd-info-card__image-wrap{left:10%;width:80%;top:5.65%;height:38.46%}
.sd-info-card--frame-sixty-forty-chamfered .sd-info-card__content{left:11%;right:11%;top:48%;bottom:7%;gap:.25em}
.sd-info-card--frame-sixty-forty-square{aspect-ratio:1058/1397}
.sd-info-card--frame-sixty-forty-square .sd-info-card__image-wrap{left:11%;width:78%;top:6.16%;height:39.08%}
.sd-info-card--frame-sixty-forty-square .sd-info-card__content{left:11%;right:11%;top:49%;bottom:7%;gap:.25em}
.sd-info-card--frame-sixty-forty-rounded{aspect-ratio:1064/1390}
.sd-info-card--frame-sixty-forty-rounded .sd-info-card__image-wrap{left:11%;width:78%;top:6.04%;height:39.21%}
.sd-info-card--frame-sixty-forty-rounded .sd-info-card__content{left:11%;right:11%;top:49%;bottom:7%;gap:.25em}
.sd-info-card--frame-sixty-forty-ornate{aspect-ratio:1068/1429}
.sd-info-card--frame-sixty-forty-ornate .sd-info-card__image-wrap{left:15%;width:70%;top:13.3%;height:30.72%}
.sd-info-card--frame-sixty-forty-ornate .sd-info-card__content{left:15%;right:15%;top:51%;bottom:9%;gap:.25em}

/* v0.0.39: natural card heights in mixed frame rows; do not stretch shorter cards. */
.sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid{align-items:flex-start;align-content:flex-start}
.sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid > .sd-info-card{align-self:flex-start;flex-grow:0;flex-shrink:0}
.sd-info-card--frame-postcard-chamfered .sd-info-card__image-wrap{left:7.058%;width:86.879%;top:7.447%;height:43.617%;}
.sd-info-card--frame-postcard-ornate .sd-info-card__image-wrap{left:10.861%;width:79.869%;top:17.173%;height:33.966%;}
.sd-info-card--frame-postcard-rounded .sd-info-card__image-wrap{left:11.184%;width:79.699%;top:8.102%;height:48.401%;}
.sd-info-card--frame-postcard-square .sd-info-card__image-wrap{left:10.302%;width:82.042%;top:8.140%;height:44.609%;}
.sd-info-card--frame-sixty-forty-chamfered .sd-info-card__image-wrap{left:7.058%;width:86.879%;top:5.011%;height:39.591%;}
.sd-info-card--frame-sixty-forty-ornate .sd-info-card__image-wrap{left:10.861%;width:79.869%;top:12.666%;height:31.840%;}
.sd-info-card--frame-sixty-forty-rounded .sd-info-card__image-wrap{left:11.184%;width:79.699%;top:5.468%;height:40.288%;}
.sd-info-card--frame-sixty-forty-square .sd-info-card__image-wrap{left:10.302%;width:82.042%;top:5.512%;height:40.301%;}

/* v0.0.53: Ornate photo-window fit. The previous transparent image window
   left a visible inset inside the ornamental frame. Widen the photo backing
   under the frame mask; preserve the artwork and all user image settings.
   Only the two ornate card presets are affected. */
.sd-info-card--frame-postcard-ornate .sd-info-card__image-wrap{left:7.5%;width:85%;top:14%;height:40%;}
.sd-info-card--frame-sixty-forty-ornate .sd-info-card__image-wrap{left:7.5%;width:85%;top:10%;height:36%;}


.sd-card-gallery .sd-info-card__image-wrap > img.sd-info-card__image{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:var(--sdcg-image-fit,cover)}

/* Native block content can extend beyond the decorative text window. */
.sd-card-gallery .sd-info-card__content > .wp-block-spacer{flex-shrink:0}
.sd-card-gallery .sd-info-card__content > :not(.sd-info-card__heading):not(.sd-info-card__description){max-width:100%}

/* Heritage finished PNG frames — independent proportions and safe areas. */
.sd-info-card--frame-heritage-tall{aspect-ratio:1024/1536}

.sd-info-card--frame-heritage-tall .sd-info-card__content{left:13%;right:13%;top:72%;bottom:9%;gap:.25em}
.sd-info-card--frame-heritage-compact{aspect-ratio:1122/1402}
.sd-info-card--frame-heritage-compact .sd-info-card__content{left:13%;right:13%;top:71%;bottom:9%;gap:.25em}


/* Heritage Tall — expanded image coverage */
.sd-info-card--frame-heritage-tall .sd-info-card__image-wrap {
  left: 6%;
  width: 88%;
  top: 6.7%;
  height: 67%;
}

/* Heritage Compact — expanded image coverage */
.sd-info-card--frame-heritage-compact .sd-info-card__image-wrap {
  left: 7.5%;
  width: 85%;
  top: 10.7%;
  height: 59.5%;
}


/* v0.0.51 sponsor frame presets: existing frame geometry remains untouched. */
.sd-info-card--frame-sponsor-platinum{aspect-ratio:1017/1348}
.sd-info-card--frame-sponsor-platinum .sd-info-card__image-wrap{left:6%;width:88%;top:7.8%;height:30.7%}
.sd-info-card--frame-sponsor-platinum .sd-info-card__content{left:9%;right:9%;top:39%;bottom:6%;gap:.3em;color:#392719;justify-content:flex-start}
.sd-info-card--frame-sponsor-gold{aspect-ratio:670/1344}
.sd-info-card--frame-sponsor-gold .sd-info-card__image-wrap{left:7%;width:86%;top:7.8%;height:30.5%}
.sd-info-card--frame-sponsor-gold .sd-info-card__content{left:11%;right:11%;top:39%;bottom:6%;gap:.3em;color:#392719;justify-content:flex-start}
.sd-info-card--frame-sponsor-standard{aspect-ratio:1122/1402}
.sd-info-card--frame-sponsor-standard .sd-info-card__image-wrap{display:none}
.sd-info-card--frame-sponsor-standard .sd-info-card__content{left:10%;right:10%;top:12%;bottom:7%;gap:.3em;color:#392719;justify-content:flex-start}

/* v0.0.52: Approved paired sponsor frame geometry. Exactly two cards only.
   Preserve the artwork's natural aspect ratios rather than giving both
   images equally wide slots. Does not affect other frames or galleries. */
@media (min-width:601px) {
  .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid:has(> .sd-info-card--frame-sponsor-platinum:first-child:nth-last-child(2) + .sd-info-card--frame-sponsor-gold),
  .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid:has(> .sd-info-card--frame-sponsor-gold:first-child:nth-last-child(2) + .sd-info-card--frame-sponsor-platinum) {
    --sdcg-active-cols:2;
  }
  .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid:has(> .sd-info-card--frame-sponsor-platinum:first-child:nth-last-child(2) + .sd-info-card--frame-sponsor-gold) > .sd-info-card--frame-sponsor-platinum,
  .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid:has(> .sd-info-card--frame-sponsor-gold:first-child:nth-last-child(2) + .sd-info-card--frame-sponsor-platinum) > .sd-info-card--frame-sponsor-platinum {
    flex:0 0 calc((100% - var(--sdcg-gap,24px)) * 1017 / 1687);
    max-width:none;
  }
  .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid:has(> .sd-info-card--frame-sponsor-platinum:first-child:nth-last-child(2) + .sd-info-card--frame-sponsor-gold) > .sd-info-card--frame-sponsor-gold,
  .sd-card-gallery:not(.sd-card-gallery--editor) > .sd-card-gallery__grid:has(> .sd-info-card--frame-sponsor-gold:first-child:nth-last-child(2) + .sd-info-card--frame-sponsor-platinum) > .sd-info-card--frame-sponsor-gold {
    flex:0 0 calc((100% - var(--sdcg-gap,24px)) * 670 / 1687);
    max-width:none;
  }
}
