.gmg-gallery{position:relative;max-width:var(--gmg-max);margin-inline:auto;box-sizing:border-box}.gmg-gallery *{box-sizing:border-box}.gmg-items,.gmg-track{gap:var(--gmg-gap)}.gmg-item{margin:0;min-width:0}.gmg-item img,.gmg-item video{display:block;width:100%;height:auto}.gmg-item video{background:#000}.gmg-item figcaption{margin-top:6px;font-size:.9em;line-height:1.4}.gmg-lightbox-trigger,.gmg-thumb-button{display:block;width:100%;padding:0;border:0;background:none;cursor:pointer}.gmg-layout-grid .gmg-items{display:grid;grid-template-columns:repeat(var(--gmg-cols-d),minmax(0,1fr))}.gmg-layout-column .gmg-items{display:flex;flex-direction:column}.gmg-layout-column .gmg-item img,.gmg-layout-column .gmg-item video{height:auto;object-fit:contain}.gmg-layout-masonry .gmg-items{column-count:var(--gmg-cols-d);column-gap:var(--gmg-gap)}.gmg-layout-masonry .gmg-item{break-inside:avoid;margin:0 0 var(--gmg-gap)}.gmg-layout-justified .gmg-items{display:flex;flex-wrap:wrap;align-items:stretch}.gmg-layout-justified .gmg-item{flex:1 1 240px}.gmg-layout-justified .gmg-item img,.gmg-layout-justified .gmg-item video{height:220px;object-fit:cover}.gmg-layout-horizontal .gmg-track,.gmg-layout-carousel .gmg-track,.gmg-layout-carousel-thumbs .gmg-track{display:flex;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain}.gmg-layout-horizontal .gmg-track::-webkit-scrollbar,.gmg-layout-carousel .gmg-track::-webkit-scrollbar,.gmg-layout-carousel-thumbs .gmg-track::-webkit-scrollbar{display:none}.gmg-layout-horizontal .gmg-item{flex:0 0 var(--gmg-scroll-w);scroll-snap-align:start}.gmg-layout-carousel .gmg-item,.gmg-layout-carousel-thumbs .gmg-track>.gmg-item{flex:0 0 100%;scroll-snap-align:start}.gmg-layout-carousel .gmg-item img,.gmg-layout-carousel .gmg-item video,.gmg-layout-carousel-thumbs .gmg-track>.gmg-item img,.gmg-layout-carousel-thumbs .gmg-track>.gmg-item video{max-height:80vh;object-fit:contain}.gmg-fit-cover.gmg-ratio-1x1 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-1x1 .gmg-item>img{aspect-ratio:1/1;object-fit:cover}.gmg-fit-cover.gmg-ratio-4x3 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-4x3 .gmg-item>img{aspect-ratio:4/3;object-fit:cover}.gmg-fit-cover.gmg-ratio-16x9 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-16x9 .gmg-item>img{aspect-ratio:16/9;object-fit:cover}.gmg-fit-cover.gmg-ratio-3x4 .gmg-item>button>img,.gmg-fit-cover.gmg-ratio-3x4 .gmg-item>img{aspect-ratio:3/4;object-fit:cover}.gmg-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:4;width:38px;height:38px;border:0;border-radius:999px;background:rgba(255,255,255,.92);box-shadow:0 2px 12px rgba(0,0,0,.12);font-size:28px;line-height:1;cursor:pointer}.gmg-prev{left:10px}.gmg-next{right:10px}.gmg-dots{display:flex;justify-content:center;gap:7px;padding-top:10px}.gmg-dots button{width:8px;height:8px;padding:0;border:0;border-radius:50%;background:currentColor;opacity:.25}.gmg-dots button.is-active{opacity:1}.gmg-thumbs{display:flex;gap:8px;overflow-x:auto;padding-top:10px;scrollbar-width:thin}.gmg-thumbs-top{order:-1;padding-top:0;padding-bottom:10px}.gmg-thumb{flex:0 0 88px}.gmg-thumb img,.gmg-video-thumb{width:88px;height:66px;object-fit:cover}.gmg-video-thumb{display:grid;place-items:center;background:#111;color:#fff;font-size:20px}.gmg-thumb{opacity:.65}.gmg-thumb.is-active{opacity:1}.gmg-lightbox{position:fixed;inset:0;z-index:999999;background:rgba(0,0,0,.92);display:grid;place-items:center;padding:40px}.gmg-lightbox-inner{max-width:min(95vw,1600px);max-height:90vh}.gmg-lightbox img{display:block;max-width:100%;max-height:90vh;width:auto;height:auto}.gmg-lightbox-close{position:fixed;top:14px;right:18px;border:0;background:none;color:#fff;font-size:42px;cursor:pointer}.gmg-lightbox-open{overflow:hidden}@media(max-width:900px){.gmg-layout-grid .gmg-items{grid-template-columns:repeat(var(--gmg-cols-t),minmax(0,1fr))}.gmg-layout-masonry .gmg-items{column-count:var(--gmg-cols-t)}.gmg-layout-justified .gmg-item{flex-basis:180px}.gmg-layout-justified .gmg-item img,.gmg-layout-justified .gmg-item video{height:180px}}@media(max-width:600px){.gmg-layout-grid .gmg-items{grid-template-columns:repeat(var(--gmg-cols-m),minmax(0,1fr))}.gmg-layout-masonry .gmg-items{column-count:var(--gmg-cols-m)}.gmg-layout-horizontal .gmg-item{flex-basis:min(88%,var(--gmg-scroll-w))}.gmg-arrow{width:34px;height:34px;font-size:24px}.gmg-lightbox{padding:20px}}


/* v0.3.3 — natural-width continuous column.
   Do not depend on intrinsic-size fallbacks or responsive image auto-sizes here:
   each figure receives its real attachment width as max-width inline. */
.gmg-layout-column .gmg-items{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.gmg-layout-column figure.gmg-item{
  flex:none;
  max-width:100%;
  margin-inline:auto;
}
.gmg-layout-column button.gmg-lightbox-trigger{
  display:block;
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
}
.gmg-layout-column figure.gmg-item img{
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  object-fit:contain;
}
.gmg-layout-column figure.gmg-item video{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  object-fit:contain;
}

/* Lightbox uses a fresh image element with the original attachment URL only.
   No srcset/sizes, no lazy-loading auto-size containment, and no enlargement
   beyond the source image's intrinsic dimensions. */
.gmg-lightbox{
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease, visibility .2s ease;
}
.gmg-lightbox.is-open{
  opacity:1;
  visibility:visible;
}
.gmg-lightbox-inner{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.gmg-lightbox img.gmg-lightbox-media{
  display:block !important;
  width:auto !important;
  height:auto !important;
  max-width:94vw !important;
  max-height:90vh !important;
  object-fit:contain;
  opacity:0;
  transform:translateY(5px);
  transition:opacity .2s ease, transform .2s ease;
  contain:none !important;
  contain-intrinsic-size:none !important;
}
.gmg-lightbox img.gmg-lightbox-media.is-ready{
  opacity:1;
  transform:none;
}
.gmg-lightbox-close{
  opacity:.82;
  transition:opacity .15s ease;
}
.gmg-lightbox-close:hover,
.gmg-lightbox-close:focus-visible{opacity:1}
@media (prefers-reduced-motion: reduce){
  .gmg-lightbox,.gmg-lightbox img,.gmg-lightbox-close{transition:none!important}
}
\n\n/* v0.3.4 — each continuous-column item uses its own attachment width. */
.gmg-layout-column figure.gmg-item{
  width:min(100%,var(--gmg-natural-w,100%)) !important;
  max-width:var(--gmg-natural-w,100%) !important;
}
.gmg-layout-column figure.gmg-item > .gmg-lightbox-trigger,
.gmg-layout-column figure.gmg-item > img{
  width:100% !important;
  max-width:100% !important;
}
/* The lightbox receives a per-image max width/height from JS so small images
   are never enlarged beyond their intrinsic pixel dimensions. */
.gmg-lightbox img.gmg-lightbox-media{
  width:auto !important;
  height:auto !important;
}

/* v0.4.0 — restrained interaction treatment. Theme button hover/focus styles
   are neutralised so gallery images get a gentle lift instead of a coloured stroke. */
.gmg-gallery .gmg-lightbox-trigger{
  border:0 !important;
  outline:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  transition:transform .22s ease, filter .22s ease !important;
  will-change:transform;
}
.gmg-gallery .gmg-lightbox-trigger:hover{
  transform:translateY(-3px);
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.12));
}
.gmg-gallery .gmg-lightbox-trigger:focus-visible{
  outline:0 !important;
  box-shadow:0 0 0 2px rgba(30,30,30,.18) !important;
  transform:translateY(-2px);
}
@media (prefers-reduced-motion: reduce){
  .gmg-gallery .gmg-lightbox-trigger{transition:none!important}
  .gmg-gallery .gmg-lightbox-trigger:hover,
  .gmg-gallery .gmg-lightbox-trigger:focus-visible{transform:none}
}


/* v0.6.2 — Horizontal Scroller: justified-style row, visible scrollbar, quieter arrows */
.gmg-layout-horizontal .gmg-track{
  align-items:stretch;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  padding-bottom:10px;
}
.gmg-layout-horizontal .gmg-track::-webkit-scrollbar{
  display:block;
  height:8px;
}
.gmg-layout-horizontal .gmg-track::-webkit-scrollbar-thumb{
  border-radius:999px;
}
.gmg-layout-horizontal figure.gmg-item{
  flex:0 0 auto !important;
  width:auto !important;
  height:var(--gmg-scroll-h,420px);
  scroll-snap-align:start;
}
.gmg-layout-horizontal figure.gmg-item > .gmg-lightbox-trigger,
.gmg-layout-horizontal figure.gmg-item > img{
  display:block;
  width:auto !important;
  height:100% !important;
  max-width:none !important;
}
.gmg-layout-horizontal figure.gmg-item img{
  width:auto !important;
  height:100% !important;
  max-width:none !important;
  object-fit:contain;
}
.gmg-layout-horizontal figure.gmg-item video{
  width:auto !important;
  height:100% !important;
  max-width:none !important;
  aspect-ratio:16/9;
  object-fit:cover;
}
.gmg-layout-horizontal .gmg-arrow{
  width:30px;
  height:30px;
  font-size:22px;
  background:rgba(255,255,255,.68);
  box-shadow:none;
  border:1px solid rgba(0,0,0,.08);
  opacity:.5;
  transition:opacity .18s ease, transform .18s ease, background .18s ease;
}
.gmg-layout-horizontal:hover .gmg-arrow,
.gmg-layout-horizontal .gmg-arrow:focus-visible{
  opacity:.9;
}
.gmg-layout-horizontal .gmg-arrow:hover{
  background:rgba(255,255,255,.92);
}
.gmg-layout-horizontal .gmg-prev{left:6px}
.gmg-layout-horizontal .gmg-next{right:6px}
@media(max-width:600px){
  .gmg-layout-horizontal figure.gmg-item{height:min(var(--gmg-scroll-h,420px),64vw)}
  .gmg-layout-horizontal .gmg-arrow{width:28px;height:28px;font-size:20px;opacity:.42}
}

/* v0.6.3 — Horizontal Scroller: fill-column height option + minimal edge chevrons */
.gmg-layout-horizontal{
  --gmg-scroll-effective-h:var(--gmg-scroll-h,420px);
}
.gmg-layout-horizontal figure.gmg-item{
  height:var(--gmg-scroll-effective-h, var(--gmg-scroll-h,420px));
}

/* Fixed mode remains predictable; fill mode is sized by view.js when the gallery
   lives in a Gutenberg Columns row. Outside a column it gracefully uses the fixed fallback. */
.gmg-layout-horizontal.gmg-horizontal-height-fixed{
  --gmg-scroll-effective-h:var(--gmg-scroll-h,420px);
}

/* Arrows are intentionally only a navigation hint; the visible scrollbar is primary. */
.gmg-layout-horizontal .gmg-arrow{
  width:34px;
  height:54px;
  padding:0;
  border:0;
  border-radius:5px;
  background:transparent;
  box-shadow:none;
  color:rgba(255,255,255,.92);
  text-shadow:0 1px 5px rgba(0,0,0,.58);
  font-size:31px;
  font-weight:300;
  line-height:1;
  opacity:.34;
  transition:opacity .18s ease, transform .18s ease, background-color .18s ease;
}
.gmg-layout-horizontal:hover .gmg-arrow,
.gmg-layout-horizontal .gmg-arrow:focus-visible{
  opacity:.78;
}
.gmg-layout-horizontal .gmg-arrow:hover,
.gmg-layout-horizontal .gmg-arrow:focus-visible{
  background:rgba(0,0,0,.10);
  opacity:1;
  transform:translateY(-50%) scale(1.06);
}
.gmg-layout-horizontal .gmg-prev{left:4px}
.gmg-layout-horizontal .gmg-next{right:4px}

@media(max-width:600px){
  .gmg-layout-horizontal figure.gmg-item{
    height:min(var(--gmg-scroll-effective-h, var(--gmg-scroll-h,420px)),68vw);
  }
  .gmg-layout-horizontal .gmg-arrow{
    width:30px;
    height:46px;
    font-size:27px;
    opacity:.28;
  }
}


/* v0.6.5 — Match Horizontal Scroller to sibling Gutenberg column height; 420px fallback/default.
   JS sets --gmg-scroll-effective-h only while the columns are side-by-side;
   stacked/mobile layouts naturally fall back to the configured row height. */
.gmg-layout-horizontal.gmg-horizontal-height-fill .gmg-track{
  min-height:0;
}

/* v0.7.2 — carousel polish: calm navigation, centred media, smooth states, configurable thumbnail navigation. */
.gmg-layout-carousel,
.gmg-layout-carousel-thumbs{
  overflow:visible;
}
.gmg-layout-carousel .gmg-track,
.gmg-layout-carousel-thumbs .gmg-track{
  scroll-behavior:smooth;
  scrollbar-width:none;
  align-items:center;
}
.gmg-layout-carousel .gmg-track>.gmg-item,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item{
  display:flex;
  align-items:center;
  justify-content:center;
}
.gmg-layout-carousel .gmg-track>.gmg-item>.gmg-lightbox-trigger,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item>.gmg-lightbox-trigger{
  display:flex !important;
  align-items:center;
  justify-content:center;
  width:100% !important;
  min-height:1px;
}
.gmg-layout-carousel .gmg-track>.gmg-item img,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item img,
.gmg-layout-carousel .gmg-track>.gmg-item video,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item video{
  width:auto !important;
  max-width:100% !important;
  height:auto !important;
  max-height:min(78vh,760px);
  margin-inline:auto;
  object-fit:contain;
}
/* Do not make carousel media jump on hover; the lightbox affordance stays quiet. */
.gmg-layout-carousel .gmg-lightbox-trigger:hover,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item .gmg-lightbox-trigger:hover{
  transform:none !important;
  filter:none !important;
}
.gmg-layout-carousel .gmg-lightbox-trigger,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item .gmg-lightbox-trigger{
  transition:opacity .28s ease !important;
}
.gmg-layout-carousel .gmg-lightbox-trigger:hover,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item .gmg-lightbox-trigger:hover{
  opacity:.985;
}

.gmg-layout-carousel .gmg-arrow,
.gmg-layout-carousel-thumbs .gmg-arrow{
  width:34px;
  height:52px;
  padding:0;
  border:0;
  border-radius:5px;
  background:rgba(255,255,255,.36);
  box-shadow:none;
  color:rgba(35,35,35,.72);
  font-size:30px;
  font-weight:300;
  line-height:1;
  opacity:.42;
  transition:opacity .3s ease, background-color .3s ease, color .3s ease, transform .3s ease;
}
.gmg-layout-carousel:hover .gmg-arrow,
.gmg-layout-carousel-thumbs:hover .gmg-arrow,
.gmg-layout-carousel .gmg-arrow:focus-visible,
.gmg-layout-carousel-thumbs .gmg-arrow:focus-visible{
  opacity:.78;
}
.gmg-layout-carousel .gmg-arrow:hover,
.gmg-layout-carousel-thumbs .gmg-arrow:hover{
  background:rgba(255,255,255,.72);
  color:rgba(20,20,20,.92);
  transform:translateY(-50%) scale(1.03);
}
.gmg-layout-carousel .gmg-prev,
.gmg-layout-carousel-thumbs .gmg-prev{left:8px}
.gmg-layout-carousel .gmg-next,
.gmg-layout-carousel-thumbs .gmg-next{right:8px}

.gmg-layout-carousel-thumbs .gmg-thumbs{
  margin:12px auto 0;
  padding:0;
  justify-content:center;
  overflow:visible;
  scrollbar-width:none;
}
.gmg-layout-carousel-thumbs .gmg-thumbs-top{
  margin:0 auto 12px;
  padding:0;
}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap{
  display:grid;
  grid-template-columns:repeat(var(--gmg-thumbs-per-row,8),minmax(0,1fr));
  width:100%;
  gap:8px;
}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-thumb{
  width:100%;
  min-width:0;
  flex:none;
  opacity:.58;
  transition:opacity .28s ease, transform .28s ease;
}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-thumb:hover{opacity:.82;transform:translateY(-1px)}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-thumb.is-active{opacity:1}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-thumb-button{
  aspect-ratio:4/3;
  overflow:hidden;
  border-radius:2px;
}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-thumb img,
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-video-thumb{
  display:block;
  width:100% !important;
  height:100% !important;
  object-fit:cover;
}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-numbered{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:5px;
}
.gmg-thumb-number{
  min-width:30px;
  height:30px;
  padding:0 8px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:inherit;
  opacity:.46;
  cursor:pointer;
  font:inherit;
  font-size:13px;
  transition:opacity .25s ease, background-color .25s ease, transform .25s ease;
}
.gmg-thumb-number:hover{opacity:.8;background:rgba(0,0,0,.05)}
.gmg-thumb-number.is-active{opacity:1;background:rgba(0,0,0,.08);font-weight:600}
.gmg-thumb-number:focus-visible{outline:2px solid currentColor;outline-offset:2px}
@media(max-width:700px){
  .gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap{
    grid-template-columns:repeat(min(var(--gmg-thumbs-per-row,8),4),minmax(0,1fr));
  }
  .gmg-layout-carousel .gmg-arrow,
  .gmg-layout-carousel-thumbs .gmg-arrow{width:30px;height:46px;font-size:27px}
}
@media(prefers-reduced-motion:reduce){
  .gmg-layout-carousel .gmg-track,.gmg-layout-carousel-thumbs .gmg-track{scroll-behavior:auto}
  .gmg-layout-carousel .gmg-arrow,.gmg-layout-carousel-thumbs .gmg-arrow,
  .gmg-layout-carousel-thumbs .gmg-thumb,.gmg-thumb-number{transition:none!important}
}


/* v0.7.3 — restore full carousel media, centre thumbnail rows, and remove unavailable arrows entirely. */
.gmg-arrow[hidden]{display:none!important}

.gmg-layout-carousel .gmg-track>.gmg-item img,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item img,
.gmg-layout-carousel .gmg-track>.gmg-item video,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item video{
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  max-height:min(82vh,900px);
  margin-inline:auto;
  object-fit:contain;
}

.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:flex-start;
  width:100%;
  gap:8px;
}
.gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-thumb{
  flex:0 0 calc((100% - (var(--gmg-thumbs-per-row,8) - 1) * 8px) / var(--gmg-thumbs-per-row,8));
  width:auto;
  max-width:140px;
}
@media(max-width:700px){
  .gmg-layout-carousel-thumbs .gmg-thumbs-mode-wrap .gmg-thumb{
    flex-basis:calc((100% - 24px) / 4);
  }
}

/* v0.7.4 — breathing room, active-slide auto-height and clearer carousel controls. */
.gmg-gallery{
  margin-top:var(--gmg-space-top,24px);
  margin-bottom:var(--gmg-space-bottom,24px);
}
.gmg-layout-carousel .gmg-track,
.gmg-layout-carousel-thumbs .gmg-track{
  align-items:flex-start;
  transition:height .32s ease;
}
.gmg-layout-carousel .gmg-arrow,
.gmg-layout-carousel-thumbs .gmg-arrow{
  opacity:.68;
  background:rgba(255,255,255,.58);
  color:rgba(25,25,25,.86);
  text-shadow:0 1px 2px rgba(255,255,255,.55);
}
.gmg-layout-carousel:hover .gmg-arrow,
.gmg-layout-carousel-thumbs:hover .gmg-arrow,
.gmg-layout-carousel .gmg-arrow:focus-visible,
.gmg-layout-carousel-thumbs .gmg-arrow:focus-visible{
  opacity:.92;
}
.gmg-layout-carousel .gmg-arrow:hover,
.gmg-layout-carousel-thumbs .gmg-arrow:hover{
  background:rgba(255,255,255,.82);
  opacity:1;
}
@media(prefers-reduced-motion:reduce){
  .gmg-layout-carousel .gmg-track,
  .gmg-layout-carousel-thumbs .gmg-track{transition:none!important}
}

/* v0.8.0 — multi-item carousels, YouTube media, no vertical carousel scrolling. */
.gmg-layout-carousel .gmg-track,
.gmg-layout-carousel-thumbs .gmg-track{
  overflow-y:hidden!important;
  transition:height .32s ease;
}
.gmg-layout-carousel .gmg-track>.gmg-item,
.gmg-layout-carousel-thumbs .gmg-track>.gmg-item{
  flex:0 0 calc((100% - (var(--gmg-carousel-per-view,1) - 1) * var(--gmg-gap)) / var(--gmg-carousel-per-view,1));
  min-width:0;
}
.gmg-youtube{width:100%;aspect-ratio:16/9;background:#000;overflow:hidden}
.gmg-youtube iframe{display:block;width:100%;height:100%;border:0}
.gmg-youtube-thumb{position:relative;display:block;width:100%;height:100%;overflow:hidden;background:#111}
.gmg-youtube-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.gmg-youtube-thumb>span{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.88);color:#111;font-size:15px}
.gmg-layout-carousel .gmg-arrow,
.gmg-layout-carousel-thumbs .gmg-arrow{
  opacity:.82;
  background:rgba(255,255,255,.72);
  color:rgba(20,20,20,.92);
}
.gmg-layout-carousel:hover .gmg-arrow,
.gmg-layout-carousel-thumbs:hover .gmg-arrow,
.gmg-layout-carousel .gmg-arrow:focus-visible,
.gmg-layout-carousel-thumbs .gmg-arrow:focus-visible{opacity:1}
@media(max-width:700px){
  .gmg-layout-carousel .gmg-track>.gmg-item,
  .gmg-layout-carousel-thumbs .gmg-track>.gmg-item{flex-basis:100%}
}


/* v0.8.3 — carousel sizing system.
   Recommended defaults: 1-up = natural-height contain (4:3 preferred if switched to cover),
   2-up = equal 1:1 cover cards, 3-up = equal 3:4 cover cards.
   Lightbox continues to open the full original image. */
.gmg-ratio-1x1{--gmg-carousel-ratio:1/1}
.gmg-ratio-4x5{--gmg-carousel-ratio:4/5}
.gmg-ratio-3x4{--gmg-carousel-ratio:3/4}
.gmg-ratio-9x16{--gmg-carousel-ratio:9/16}
.gmg-ratio-4x3{--gmg-carousel-ratio:4/3}
.gmg-ratio-16x9{--gmg-carousel-ratio:16/9}

/* Single-item contain mode stays natural/auto-height. */
.gmg-carousel-natural .gmg-track>.gmg-item,
.gmg-carousel-natural .gmg-track>.gmg-item>.gmg-lightbox-trigger{
  height:auto!important;
  aspect-ratio:auto!important;
}
.gmg-carousel-natural .gmg-track>.gmg-item img,
.gmg-carousel-natural .gmg-track>.gmg-item video{
  width:100%!important;
  height:auto!important;
  max-height:min(82vh,900px);
  object-fit:contain!important;
}

/* Framed mode is used by 2/3-up defaults and by custom Cover selections. */
.gmg-carousel-framed .gmg-track>.gmg-item>.gmg-lightbox-trigger,
.gmg-carousel-framed .gmg-track>.gmg-item>img,
.gmg-carousel-framed .gmg-track>.gmg-item>video,
.gmg-carousel-framed .gmg-track>.gmg-item>.gmg-youtube{
  width:100%!important;
  aspect-ratio:var(--gmg-carousel-ratio,1/1)!important;
  overflow:hidden;
}
.gmg-carousel-framed .gmg-track>.gmg-item>.gmg-lightbox-trigger>img,
.gmg-carousel-framed .gmg-track>.gmg-item>img,
.gmg-carousel-framed .gmg-track>.gmg-item>video,
.gmg-carousel-framed .gmg-track>.gmg-item>.gmg-youtube iframe{
  width:100%!important;
  height:100%!important;
  max-height:none!important;
  object-fit:cover!important;
}
.gmg-carousel-framed.gmg-fit-contain .gmg-track>.gmg-item>.gmg-lightbox-trigger>img,
.gmg-carousel-framed.gmg-fit-contain .gmg-track>.gmg-item>img,
.gmg-carousel-framed.gmg-fit-contain .gmg-track>.gmg-item>video{
  object-fit:contain!important;
  background:#f6f7f7;
}

/* Editor mirrors the front-end proportions. */
.gmg-editor-carousel-preview.framed .gmg-editor-carousel-stage .gmg-editor-item{
  aspect-ratio:var(--gmg-editor-ratio,1/1);
  overflow:hidden;
}
.gmg-editor-carousel-preview.ratio-1x1{--gmg-editor-ratio:1/1}
.gmg-editor-carousel-preview.ratio-4x5{--gmg-editor-ratio:4/5}
.gmg-editor-carousel-preview.ratio-3x4{--gmg-editor-ratio:3/4}
.gmg-editor-carousel-preview.ratio-9x16{--gmg-editor-ratio:9/16}
.gmg-editor-carousel-preview.ratio-4x3{--gmg-editor-ratio:4/3}
.gmg-editor-carousel-preview.ratio-16x9{--gmg-editor-ratio:16/9}
.gmg-editor-carousel-preview.framed .gmg-editor-carousel-stage .gmg-editor-item>img,
.gmg-editor-carousel-preview.framed .gmg-editor-carousel-stage .gmg-editor-video,
.gmg-editor-carousel-preview.framed .gmg-editor-carousel-stage .gmg-editor-video>img{
  width:100%!important;
  height:100%!important;
  max-height:none!important;
  object-fit:cover!important;
}
.gmg-editor-carousel-preview.framed.fit-contain .gmg-editor-carousel-stage .gmg-editor-item>img,
.gmg-editor-carousel-preview.framed.fit-contain .gmg-editor-carousel-stage .gmg-editor-video,
.gmg-editor-carousel-preview.framed.fit-contain .gmg-editor-carousel-stage .gmg-editor-video>img{
  object-fit:contain!important;
}
.gmg-editor-carousel-preview.natural .gmg-editor-carousel-stage .gmg-editor-item{
  aspect-ratio:auto!important;
}
.gmg-editor-carousel-preview.natural .gmg-editor-carousel-stage .gmg-editor-item>img,
.gmg-editor-carousel-preview.natural .gmg-editor-carousel-stage .gmg-editor-video{
  width:100%!important;
  height:auto!important;
  object-fit:contain!important;
}
\n\n/* v0.8.4 — equal grid frames, Metro / Mosaic, HD YouTube thumbnail support. */
.gmg-layout-grid .gmg-items{align-items:stretch}
.gmg-layout-grid .gmg-item{height:100%}
.gmg-layout-grid .gmg-item>.gmg-lightbox-trigger,
.gmg-layout-grid .gmg-item>img,
.gmg-layout-grid .gmg-item>video,
.gmg-layout-grid .gmg-item>.gmg-youtube{width:100%;height:100%;overflow:hidden}
.gmg-layout-grid.gmg-ratio-1x1 .gmg-item{aspect-ratio:1/1}
.gmg-layout-grid.gmg-ratio-4x5 .gmg-item{aspect-ratio:4/5}
.gmg-layout-grid.gmg-ratio-3x4 .gmg-item{aspect-ratio:3/4}
.gmg-layout-grid.gmg-ratio-9x16 .gmg-item{aspect-ratio:9/16}
.gmg-layout-grid.gmg-ratio-4x3 .gmg-item{aspect-ratio:4/3}
.gmg-layout-grid.gmg-ratio-16x9 .gmg-item{aspect-ratio:16/9}
.gmg-layout-grid:not(.gmg-ratio-auto) .gmg-item>.gmg-lightbox-trigger,
.gmg-layout-grid:not(.gmg-ratio-auto) .gmg-item>img,
.gmg-layout-grid:not(.gmg-ratio-auto) .gmg-item>video,
.gmg-layout-grid:not(.gmg-ratio-auto) .gmg-item>.gmg-youtube,
.gmg-layout-grid:not(.gmg-ratio-auto) .gmg-item>.gmg-youtube iframe{width:100%!important;height:100%!important;max-height:none!important}
.gmg-layout-grid.gmg-fit-cover:not(.gmg-ratio-auto) .gmg-item img,
.gmg-layout-grid.gmg-fit-cover:not(.gmg-ratio-auto) .gmg-item video{object-fit:cover!important}
.gmg-layout-grid.gmg-fit-contain:not(.gmg-ratio-auto) .gmg-item img,
.gmg-layout-grid.gmg-fit-contain:not(.gmg-ratio-auto) .gmg-item video{object-fit:contain!important;background:#f6f7f7}

.gmg-layout-metro .gmg-items{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:clamp(120px,14vw,220px);
  grid-auto-flow:dense;
}
.gmg-layout-metro .gmg-item{min-width:0;overflow:hidden;height:100%}
.gmg-layout-metro .gmg-item>.gmg-lightbox-trigger,
.gmg-layout-metro .gmg-item>img,
.gmg-layout-metro .gmg-item>video,
.gmg-layout-metro .gmg-item>.gmg-youtube{width:100%!important;height:100%!important;overflow:hidden}
.gmg-layout-metro .gmg-item img,
.gmg-layout-metro .gmg-item video,
.gmg-layout-metro .gmg-item>.gmg-youtube iframe{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important}
.gmg-layout-metro .gmg-metro-wide{grid-column:span 2}
.gmg-layout-metro .gmg-metro-tall{grid-row:span 2}
.gmg-layout-metro .gmg-metro-large{grid-column:span 2;grid-row:span 2}
/* Automatic preset sizing applies only when the item has no explicit tile-size class. */
.gmg-layout-metro.gmg-metro-preset-feature-left .gmg-item:first-child:not([class*="gmg-metro-"]){grid-column:span 2;grid-row:span 2}
.gmg-layout-metro.gmg-metro-preset-feature-right .gmg-item:first-child:not([class*="gmg-metro-"]){grid-column:3/span 2;grid-row:span 2}
.gmg-layout-metro.gmg-metro-preset-feature-centre .gmg-item:first-child:not([class*="gmg-metro-"]){grid-column:2/span 2;grid-row:span 2}
.gmg-layout-metro.gmg-metro-preset-mixed .gmg-item:nth-child(8n+1):not([class*="gmg-metro-"]){grid-column:span 2}
.gmg-layout-metro.gmg-metro-preset-mixed .gmg-item:nth-child(8n+2):not([class*="gmg-metro-"]){grid-row:span 2}
.gmg-layout-metro.gmg-metro-preset-mixed .gmg-item:nth-child(8n+5):not([class*="gmg-metro-"]){grid-column:span 2;grid-row:span 2}
.gmg-layout-metro.gmg-metro-preset-auto .gmg-item:first-child:not([class*="gmg-metro-"]){grid-column:span 2;grid-row:span 2}
.gmg-layout-metro.gmg-metro-preset-auto .gmg-item:nth-child(7n):not([class*="gmg-metro-"]){grid-row:span 2}
.gmg-layout-metro.gmg-metro-preset-auto .gmg-item:nth-child(5n):not([class*="gmg-metro-"]){grid-column:span 2}
@media(max-width:900px){
  .gmg-layout-metro .gmg-items{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:clamp(130px,28vw,230px)}
  .gmg-layout-metro.gmg-metro-preset-feature-right .gmg-item:first-child:not([class*="gmg-metro-"]),
  .gmg-layout-metro.gmg-metro-preset-feature-centre .gmg-item:first-child:not([class*="gmg-metro-"]){grid-column:auto/span 2}
}
@media(max-width:600px){
  .gmg-layout-metro .gmg-items{grid-template-columns:1fr;grid-auto-rows:auto}
  .gmg-layout-metro .gmg-item,
  .gmg-layout-metro .gmg-metro-wide,
  .gmg-layout-metro .gmg-metro-tall,
  .gmg-layout-metro .gmg-metro-large{grid-column:auto!important;grid-row:auto!important;aspect-ratio:4/3}
}


/* v0.8.5 — FOUC / CLS hardening.
   The server-rendered gallery is already a usable CSS-first layout. JS only
   enhances navigation and sizing. During that short enhancement window we
   reserve control space and keep only the initially visible carousel group in
   layout, preventing a tall off-screen slide from determining first paint. */
.gmg-gallery{
  --gmg-control-transition:.16s;
}

/* Controls are positioned/reserved by CSS immediately, but only become
   interactive after view.js has initialised the gallery. Visibility keeps any
   navigation rows from collapsing and reappearing. */
.gmg-gallery:not(.gmg-is-ready) .gmg-arrow,
.gmg-gallery:not(.gmg-is-ready) .gmg-dots{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.gmg-gallery.gmg-is-ready .gmg-arrow,
.gmg-gallery.gmg-is-ready .gmg-dots{
  visibility:visible;
}

/* Before JS initialises a carousel, paint only the first visible group. This
   avoids the flex track taking the height of a later portrait/tall item. JS
   fixes the active-group height before the remaining slides are revealed. */
.gmg-layout-carousel:not(.gmg-is-ready).gmg-carousel-per-view-1 .gmg-track>.gmg-item:nth-child(n+2),
.gmg-layout-carousel-thumbs:not(.gmg-is-ready).gmg-carousel-per-view-1 .gmg-track>.gmg-item:nth-child(n+2),
.gmg-layout-carousel:not(.gmg-is-ready).gmg-carousel-per-view-2 .gmg-track>.gmg-item:nth-child(n+3),
.gmg-layout-carousel-thumbs:not(.gmg-is-ready).gmg-carousel-per-view-2 .gmg-track>.gmg-item:nth-child(n+3),
.gmg-layout-carousel:not(.gmg-is-ready).gmg-carousel-per-view-3 .gmg-track>.gmg-item:nth-child(n+4),
.gmg-layout-carousel-thumbs:not(.gmg-is-ready).gmg-carousel-per-view-3 .gmg-track>.gmg-item:nth-child(n+4){
  display:none!important;
}

/* Mobile carousels always initialise as one-up, regardless of the desktop
   setting, so reserve only the first item on first paint. */
@media(max-width:700px){
  .gmg-layout-carousel:not(.gmg-is-ready) .gmg-track>.gmg-item:nth-child(n+2),
  .gmg-layout-carousel-thumbs:not(.gmg-is-ready) .gmg-track>.gmg-item:nth-child(n+2){
    display:none!important;
  }
}

/* Reserve media geometry before assets decode. WordPress image width/height
   attributes provide intrinsic ratios; fixed gallery modes define their own
   ratio. YouTube frames and video placeholders therefore never start at 0px. */
.gmg-layout-grid:not(.gmg-ratio-auto) .gmg-item,
.gmg-carousel-framed .gmg-track>.gmg-item{
  min-height:1px;
}
.gmg-youtube,
.gmg-youtube-thumb,
.gmg-video-thumb{
  min-height:1px;
}

/* YouTube HD thumbnails are swapped only after a candidate has loaded. Keep
   the stable dark tile/play affordance visible rather than flashing a broken
   image while maxres -> sd -> hq fallback is resolved. */
.gmg-youtube-thumb img[data-gmg-youtube-id]{
  opacity:0;
  transition:opacity .18s ease;
}
.gmg-youtube-thumb img[data-gmg-youtube-id].is-ready{
  opacity:1;
}

/* Metro already has explicit grid rows; isolate paint for each tile so image
   decode/repaint does not disturb surrounding tiles. */
.gmg-layout-metro .gmg-item,
.gmg-layout-grid .gmg-item{
  contain:paint;
}

/* Avoid animated first-load height changes. Height transitions are enabled
   only after initialisation, so the first measured carousel height is applied
   atomically rather than visibly tweening from the CSS fallback. */
.gmg-layout-carousel:not(.gmg-is-ready) .gmg-track,
.gmg-layout-carousel-thumbs:not(.gmg-is-ready) .gmg-track{
  transition:none!important;
}

@media(prefers-reduced-motion:reduce){
  .gmg-youtube-thumb img[data-gmg-youtube-id]{transition:none!important}
}
