/* SoftIngenious Photo Gallery 1.1 — ten layouts, ten mouse-over effects, entrance animations,
   full-screen viewer. No external fonts, libraries or images. */

.sipg {
	--sipg-h: 300px; --sipg-hm: 170px; --sipg-gap: 6px; --sipg-cols: 4; --sipg-cols-m: 2;
	--sipg-ar: 1; --sipg-rad: 2px; --sipg-lb: #0b0d0c; --sipg-accent: #e0a526;
	--sipg-row: var(--sipg-h); --sipg-c: var(--sipg-cols);
	box-sizing: border-box; margin-top: 24px; margin-bottom: 24px; position: relative;
}
.sipg *, .sipg *::before, .sipg *::after { box-sizing: border-box; }
.sipg.sipg-w-full { padding: 0 var(--sipg-gap); }
@media (max-width: 600px) { .sipg { --sipg-row: var(--sipg-hm); --sipg-c: var(--sipg-cols-m); } }

/* ---------- the tile (same markup in every layout) ---------- */
.sipg .sipg-grid { margin: 0; padding: 0; }
.sipg a.sipg-tile { position: relative; display: block; text-decoration: none; color: inherit; cursor: zoom-in; border: 0; box-shadow: none; }
.sipg-click-none a.sipg-tile, .sipg a.sipg-tile[target] { cursor: pointer; }
.sipg .sipg-frame { position: relative; display: block; overflow: hidden; border-radius: var(--sipg-rad); background: #e7e5df; isolation: isolate; }
.sipg .sipg-frame > i { display: block; padding-bottom: calc(100% / var(--r)); }
.sipg .sipg-frame > img {
	position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0;
	border: 0; border-radius: 0; box-shadow: none; object-fit: cover; display: block;
	transition: transform .55s cubic-bezier(.2,.7,.2,1), filter .45s ease, opacity .3s ease;
}
.sipg a.sipg-tile.is-broken { display: none; }
.sipg a.sipg-tile:focus { outline: none; }
.sipg a.sipg-tile:focus:not(:focus-visible) { outline: none !important; box-shadow: none !important; }
.sipg a.sipg-tile:focus-visible .sipg-frame { outline: 3px solid var(--sipg-accent); outline-offset: 2px; }

/* captions on the tile */
.sipg .sipg-tcap {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 26px 12px 10px;
	background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff;
	font: 600 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	text-shadow: 0 1px 2px rgba(0,0,0,.5); border-radius: 0 0 var(--sipg-rad) var(--sipg-rad); pointer-events: none;
}
.sipg-cap-hover .sipg-tcap { opacity: 0; transition: opacity .25s; }
.sipg-cap-hover a.sipg-tile:hover .sipg-tcap, .sipg-cap-hover a.sipg-tile:focus-visible .sipg-tcap { opacity: 1; }
@media (hover: none) { .sipg-cap-hover .sipg-tcap { opacity: 1; } }
.sipg-cap-below:is(.sipg-l-grid, .sipg-l-masonry) .sipg-tcap,
.sipg.sipg-l-feed .sipg-tcap, .sipg.sipg-l-polaroid .sipg-tcap {
	position: static; background: none; color: inherit; text-shadow: none; padding: 8px 2px 2px; opacity: 1; font-weight: 500;
}

/* ================= 1. Justified rows ================= */
.sipg-l-justified .sipg-grid { display: flex; flex-wrap: wrap; gap: var(--sipg-gap); }
.sipg-l-justified .sipg-grid::after { content: ""; flex-grow: 1000000; }
.sipg-l-justified a.sipg-tile { flex: var(--r) 1 calc(var(--sipg-row) * var(--r)); }

/* ================= 2. Masonry columns ================= */
.sipg-l-masonry .sipg-grid { column-count: var(--sipg-c); column-gap: var(--sipg-gap); }
.sipg-l-masonry a.sipg-tile { break-inside: avoid; margin: 0 0 var(--sipg-gap); display: inline-block; width: 100%; vertical-align: top; }

/* ================= 3. Uniform grid ================= */
.sipg-l-grid .sipg-grid { display: grid; grid-template-columns: repeat(var(--sipg-c), minmax(0, 1fr)); gap: var(--sipg-gap); }
.sipg-l-grid .sipg-frame > i { padding-bottom: calc(100% / var(--sipg-ar)); }

/* ================= 4. Mosaic ================= */
.sipg-l-mosaic .sipg-grid {
	display: grid; grid-template-columns: repeat(var(--sipg-c), minmax(0, 1fr)); gap: var(--sipg-gap);
	grid-auto-flow: row dense; grid-auto-rows: 220px; container-type: inline-size;
}
@supports (width: 1cqi) {
	.sipg-l-mosaic .sipg-grid { grid-auto-rows: calc((100cqi - (var(--sipg-c) - 1) * var(--sipg-gap)) / var(--sipg-c)); }
}
.sipg-l-mosaic a.sipg-tile, .sipg-l-mosaic .sipg-frame { height: 100%; }
.sipg-l-mosaic .sipg-frame > i { display: none; }
.sipg-l-mosaic .sipg-big { grid-column: span 2; grid-row: span 2; }
.sipg-l-mosaic .sipg-wide { grid-column: span 2; }
.sipg-l-mosaic .sipg-tall { grid-row: span 2; }

/* ================= 5. Carousel ================= */
.sipg-l-carousel .sipg-grid {
	display: flex; gap: var(--sipg-gap); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
	scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 6px;
}
.sipg-l-carousel a.sipg-tile { flex: 0 0 auto; height: var(--sipg-row); width: calc(var(--sipg-row) * var(--r)); max-width: 92%; scroll-snap-align: start; }
.sipg-l-carousel .sipg-frame { height: 100%; }
.sipg-l-carousel .sipg-frame > i { display: none; }

/* arrows used by carousel, filmstrip and slideshow */
.sipg .sipg-nav {
	position: absolute; top: 50%; z-index: 6; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 0;
	background: rgba(255,255,255,.92); color: #1d2327; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0; transition: opacity .2s, transform .2s;
}
.sipg .sipg-nav:hover { transform: scale(1.08); }
.sipg .sipg-nav:focus-visible { outline: 3px solid var(--sipg-accent); outline-offset: 2px; }
.sipg .sipg-nav[disabled] { opacity: 0; pointer-events: none; }
.sipg .sipg-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sipg .sipg-prev { left: calc(var(--sipg-gap) + 8px); }
.sipg .sipg-next { right: calc(var(--sipg-gap) + 8px); }
.sipg-l-carousel .sipg-nav { margin-top: -26px; }

/* ================= 6. Filmstrip ================= */
.sipg-l-filmstrip .sipg-stage {
	position: relative; height: min(72vh, calc(var(--sipg-h) * 2.2)); margin-bottom: var(--sipg-gap);
	background: #111; border-radius: var(--sipg-rad); overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: zoom-in;
}
.sipg-l-filmstrip .sipg-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; object-fit: contain; transition: opacity .35s ease; }
.sipg-l-filmstrip .sipg-stage .sipg-stage-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); font: 600 15px/1.35 system-ui, sans-serif; text-align: center; pointer-events: none; }
.sipg-l-filmstrip .sipg-stage .sipg-stage-cap:empty { display: none; }
.sipg-l-filmstrip .sipg-grid { display: flex; gap: var(--sipg-gap); overflow-x: auto; scroll-behavior: smooth; padding: 4px 2px 6px; scrollbar-width: thin; }
.sipg-l-filmstrip a.sipg-tile { flex: 0 0 auto; height: 88px; width: calc(88px * var(--r)); cursor: pointer; opacity: .62; transition: opacity .2s; }
.sipg-l-filmstrip a.sipg-tile:hover, .sipg-l-filmstrip a.sipg-tile.is-active { opacity: 1; }
.sipg-l-filmstrip a.sipg-tile.is-active .sipg-frame { outline: 3px solid var(--sipg-accent); outline-offset: -3px; }
.sipg-l-filmstrip .sipg-frame { height: 100%; }
.sipg-l-filmstrip .sipg-frame > i { display: none; }
.sipg-l-filmstrip .sipg-tcap { display: none; }
@media (max-width: 600px) { .sipg-l-filmstrip .sipg-stage { height: 56vh; } .sipg-l-filmstrip a.sipg-tile { height: 62px; width: calc(62px * var(--r)); } }

/* ================= 7. Slideshow ================= */
.sipg-l-slideshow .sipg-grid { position: relative; height: min(78vh, calc(var(--sipg-h) * 2.4)); overflow: hidden; border-radius: var(--sipg-rad); background: #111; }
.sipg-l-slideshow a.sipg-tile { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s 1s; cursor: zoom-in; }
.sipg-l-slideshow a.sipg-tile.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease, visibility 0s 0s; z-index: 1; }
.sipg-l-slideshow a.sipg-tile:first-child { opacity: 1; visibility: visible; } /* before script runs */
.sipg-js.sipg-l-slideshow a.sipg-tile:first-child:not(.is-active) { opacity: 0; visibility: hidden; }
.sipg-l-slideshow .sipg-frame { height: 100%; background: #111; border-radius: 0; }
.sipg-l-slideshow .sipg-frame > i { display: none; }
.sipg-l-slideshow .sipg-frame > img.sipg-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) brightness(.55) saturate(1.2); transform: none !important; animation: none !important; }
.sipg-l-slideshow .sipg-frame > img:not(.sipg-bg) { object-fit: contain; }
.sipg-kb.sipg-l-slideshow a.sipg-tile.is-active .sipg-frame > img:not(.sipg-bg) { animation: sipg-kb var(--sipg-dur, 6s) ease-out both; }
.sipg-kb.sipg-l-slideshow a.sipg-tile:nth-child(even).is-active .sipg-frame > img:not(.sipg-bg) { animation-name: sipg-kb2; }
@keyframes sipg-kb { from { transform: scale(1); } to { transform: scale(1.09) translate(-1.2%, -1%); } }
@keyframes sipg-kb2 { from { transform: scale(1.09) translate(1.2%, 1%); } to { transform: scale(1); } }
.sipg-l-slideshow .sipg-dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 6; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0 60px; }
.sipg-l-slideshow .sipg-dot { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; opacity: .85; }
.sipg-l-slideshow .sipg-dot[aria-current="true"] { background: #fff; opacity: 1; }
.sipg-l-slideshow .sipg-dot:focus-visible { outline: 3px solid var(--sipg-accent); outline-offset: 2px; }
.sipg-l-slideshow .sipg-tcap { bottom: 30px; text-align: center; font-size: 17px; }
.sipg-l-slideshow .sipg-bar { position: absolute; left: 0; bottom: 0; height: 3px; z-index: 7; background: var(--sipg-accent); width: 0; }
@media (max-width: 600px) { .sipg-l-slideshow .sipg-grid { height: 62vh; } }

/* ================= 8. Polaroid ================= */
.sipg-l-polaroid .sipg-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--sipg-gap) + 22px); padding: 18px 6px 28px; }
.sipg-l-polaroid a.sipg-tile {
	--rot: -2.5deg; flex: 0 0 auto; width: calc(var(--sipg-row) * .78 * var(--r) + 24px); max-width: 100%;
	background: #fff; padding: 12px 12px 0; min-height: 0; box-shadow: 0 6px 18px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.12);
	transform: rotate(var(--rot)); transition: transform .35s ease, box-shadow .35s ease; border-radius: 3px;
}
.sipg-l-polaroid a.sipg-tile:nth-child(3n+2) { --rot: 2deg; }
.sipg-l-polaroid a.sipg-tile:nth-child(4n+3) { --rot: -1deg; }
.sipg-l-polaroid a.sipg-tile:nth-child(5n+4) { --rot: 3deg; }
.sipg-l-polaroid .sipg-frame { border-radius: 0; }
.sipg-l-polaroid .sipg-tcap { min-height: 46px; padding: 10px 2px 12px; text-align: center; color: #333; font: 18px/1.25 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; }
.sipg-l-polaroid a.sipg-tile::after { content: ""; display: block; height: 46px; }
.sipg-l-polaroid a.sipg-tile:has(.sipg-tcap)::after { display: none; }
@media (hover: hover) { .sipg-l-polaroid a.sipg-tile:hover { transform: rotate(0) scale(1.06); z-index: 5; box-shadow: 0 18px 40px rgba(0,0,0,.28); } }
.sipg-l-polaroid a.sipg-tile:focus-visible { transform: rotate(0) scale(1.04); z-index: 5; }

/* ================= 9. Accordion ================= */
.sipg-l-accordion .sipg-strip { display: flex; gap: var(--sipg-gap); height: calc(var(--sipg-h) * 1.25); margin-bottom: var(--sipg-gap); }
.sipg-l-accordion a.sipg-tile { flex: 1 1 0; min-width: 0; transition: flex-grow .6s cubic-bezier(.2,.7,.2,1); }
.sipg-l-accordion .sipg-frame { height: 100%; }
.sipg-l-accordion .sipg-frame > i { display: none; }
@media (hover: hover) {
	.sipg-l-accordion a.sipg-tile:hover { flex-grow: 4.5; }
}
.sipg-l-accordion a.sipg-tile:focus-visible { flex-grow: 4.5; }
@media (max-width: 600px) {
	.sipg-l-accordion .sipg-strip { flex-direction: column; height: auto; }
	.sipg-l-accordion a.sipg-tile { flex: 0 0 auto; height: calc(var(--sipg-hm) * .9); }
}

/* ================= 10. Story feed ================= */
.sipg-l-feed .sipg-grid { display: flex; flex-direction: column; gap: calc(var(--sipg-gap) * 4 + 8px); max-width: 960px; margin: 0 auto; }
.sipg-l-feed .sipg-tcap { font-size: 16px; padding-top: 10px; }

/* ================= mouse-over effects (only on devices with a mouse) ================= */
.sipg .sipg-frame::before, .sipg .sipg-frame::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .35s ease, transform .7s ease; }
@media (hover: hover) {
	.sipg-fx-zoom a.sipg-tile:hover .sipg-frame > img { transform: scale(1.07); }
	.sipg-fx-zoomout .sipg-frame > img { transform: scale(1.12); }
	.sipg-fx-zoomout a.sipg-tile:hover .sipg-frame > img { transform: scale(1); }
	.sipg-fx-lift a.sipg-tile { transition: transform .35s ease; }
	.sipg-fx-lift .sipg-frame { transition: box-shadow .35s ease; }
	.sipg-fx-lift a.sipg-tile:hover { transform: translateY(-6px); z-index: 4; }
	.sipg-fx-lift a.sipg-tile:hover .sipg-frame { box-shadow: 0 16px 34px rgba(0,0,0,.3); }
	.sipg-fx-mono .sipg-frame > img { filter: grayscale(1) contrast(1.05); }
	.sipg-fx-mono a.sipg-tile:hover .sipg-frame > img { filter: none; transform: scale(1.03); }
	.sipg-fx-darken .sipg-frame::after {
		background: rgba(0,0,0,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.8-4.8M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 46px no-repeat;
		transform: scale(1.15);
	}
	.sipg-fx-darken a.sipg-tile:hover .sipg-frame::after { opacity: 1; transform: scale(1); }
	.sipg-fx-caption .sipg-tcap { transform: translateY(101%); opacity: 0; transition: transform .35s ease, opacity .35s ease; }
	.sipg-fx-caption a.sipg-tile:hover .sipg-tcap { transform: none; opacity: 1; }
	.sipg-fx-caption .sipg-frame::after { background: linear-gradient(transparent 55%, rgba(0,0,0,.45)); }
	.sipg-fx-caption a.sipg-tile:hover .sipg-frame::after { opacity: 1; }
	.sipg-fx-shine .sipg-frame::before { opacity: 1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 48%, transparent 66%); transform: translateX(-120%); }
	.sipg-fx-shine a.sipg-tile:hover .sipg-frame::before { transform: translateX(120%); }
	.sipg-fx-shine a.sipg-tile:hover .sipg-frame > img { transform: scale(1.03); }
	.sipg-fx-tilt a.sipg-tile { transition: transform .25s ease; transform-style: preserve-3d; will-change: transform; }
	.sipg-fx-tilt a.sipg-tile:hover .sipg-frame { box-shadow: 0 18px 40px rgba(0,0,0,.3); }
	.sipg-fx-spotlight .sipg-grid:hover a.sipg-tile:not(:hover) .sipg-frame > img { opacity: .38; filter: saturate(.5); }
	.sipg-fx-spotlight a.sipg-tile:hover .sipg-frame > img { transform: scale(1.03); }
	.sipg-fx-glow .sipg-frame { transition: box-shadow .35s ease; }
	.sipg-fx-glow a.sipg-tile:hover .sipg-frame { box-shadow: 0 0 0 3px var(--sipg-accent), 0 0 26px 4px var(--sipg-accent); z-index: 3; }
}
/* slideshow and filmstrip thumbnails keep their own behaviour */
.sipg-l-slideshow .sipg-frame::before, .sipg-l-slideshow .sipg-frame::after { display: none; }

/* ================= entrance animations (only once the script is running) ================= */
.sipg-js.sipg-in-fade a.sipg-tile:not(.is-in), .sipg-js.sipg-in-rise a.sipg-tile:not(.is-in), .sipg-js.sipg-in-pop a.sipg-tile:not(.is-in) { opacity: 0; }
.sipg-js.sipg-in-rise a.sipg-tile:not(.is-in) { transform: translateY(26px); }
.sipg-js.sipg-in-pop a.sipg-tile:not(.is-in) { transform: scale(.9); }
.sipg-js:is(.sipg-in-fade, .sipg-in-rise, .sipg-in-pop) a.sipg-tile.is-in { transition: opacity .6s ease var(--sipg-delay, 0s), transform .6s cubic-bezier(.2,.7,.2,1) var(--sipg-delay, 0s); }
.sipg-l-slideshow.sipg-js a.sipg-tile, .sipg-l-polaroid.sipg-js a.sipg-tile.is-in { --sipg-delay: 0s; }
.sipg-js.sipg-l-polaroid:is(.sipg-in-rise, .sipg-in-pop) a.sipg-tile:not(.is-in) { transform: rotate(var(--rot)) translateY(26px) scale(.95); }

@media (prefers-reduced-motion: reduce) {
	/* Movement off — but nothing is ever hidden, and the slideshow still changes photos. */
	.sipg .sipg-frame > img, .sipg a.sipg-tile, .sipg .sipg-frame { transition: none !important; }
	.sipg-js a.sipg-tile:not(.is-in) { opacity: 1 !important; transform: none !important; }
	.sipg-kb.sipg-l-slideshow a.sipg-tile.is-active .sipg-frame > img:not(.sipg-bg) { animation: none; }
	.sipg-l-polaroid a.sipg-tile { transform: rotate(var(--rot)) !important; }
}

/* ================= full-screen viewer ================= */
html.sipg-lock, html.sipg-lock body { overflow: hidden !important; }
.sipg-lb {
	position: fixed; inset: 0; z-index: 2147483000; display: none; flex-direction: column;
	background: var(--sipg-lb, #0b0d0c); color: #fff; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--sipg-accent: #e0a526;
}
.sipg-lb.is-open { display: flex; animation: sipg-lb-in .25s ease; }
@keyframes sipg-lb-in { from { opacity: 0; } to { opacity: 1; } }
.sipg-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); flex-wrap: wrap; }
.sipg-lb-count { font-weight: 600; opacity: .85; min-width: 64px; }
.sipg-lb-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sipg-lb button, .sipg-lb a.sipg-lb-btn {
	min-width: 44px; min-height: 44px; border-radius: 22px; border: 0; cursor: pointer; background: rgba(255,255,255,.12); color: #fff;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; font: inherit; text-decoration: none;
}
.sipg-lb button:hover, .sipg-lb a.sipg-lb-btn:hover { background: rgba(255,255,255,.24); color: #fff; }
.sipg-lb button:focus-visible, .sipg-lb a.sipg-lb-btn:focus-visible { outline: 3px solid var(--sipg-accent); outline-offset: 2px; }
.sipg-lb button[aria-pressed="true"] { background: var(--sipg-accent); color: #111; }
.sipg-lb [hidden] { display: none !important; }
.sipg-lb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.sipg-lb-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 64px; overflow: hidden; touch-action: none; }
.sipg-lb-stage img {
	max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none;
	transform-origin: 50% 50%; will-change: transform, opacity;
}
.sipg-lb-stage.is-zoomed img { cursor: grab; }
.sipg-lb-stage.is-zoomed.is-dragging img { cursor: grabbing; }
.sipg-lb-stage img.sipg-anim-fade { animation: sipg-a-fade .35s ease both; }
.sipg-lb-stage img.sipg-anim-zoom { animation: sipg-a-zoom .35s ease both; }
.sipg-lb-stage img.sipg-anim-slide-next { animation: sipg-a-next .35s cubic-bezier(.2,.7,.2,1) both; }
.sipg-lb-stage img.sipg-anim-slide-prev { animation: sipg-a-prev .35s cubic-bezier(.2,.7,.2,1) both; }
@keyframes sipg-a-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sipg-a-zoom { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes sipg-a-next { from { opacity: .2; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes sipg-a-prev { from { opacity: .2; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
.sipg-lb .sipg-lb-prev, .sipg-lb .sipg-lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; padding: 0; z-index: 3; }
.sipg-lb-prev { left: 8px; }
.sipg-lb-next { right: 8px; }
.sipg-lb-cap { min-height: 22px; padding: 8px 16px; text-align: center; opacity: .92; }
.sipg-lb-cap:empty { padding: 3px; }
.sipg-lb-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); scrollbar-width: thin; justify-content: safe center; }
.sipg-lb-thumbs button { flex: 0 0 auto; width: auto; height: 58px; min-height: 0; min-width: 0; padding: 0; border-radius: 4px; overflow: hidden; opacity: .5; background: #222; }
.sipg-lb-thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--sipg-accent); outline-offset: 1px; }
.sipg-lb-thumbs img { height: 58px; width: auto; display: block; }
.sipg-lb-spin { position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: sipg-spin .8s linear infinite; display: none; z-index: 2; }
.sipg-lb-stage.is-loading .sipg-lb-spin { display: block; }
@keyframes sipg-spin { to { transform: rotate(360deg); } }
.sipg-lb-progress { position: absolute; left: 0; top: 0; height: 3px; background: var(--sipg-accent); width: 0; z-index: 4; }
.sipg-lb-toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: rgba(255,255,255,.95); color: #111; padding: 8px 14px; border-radius: 20px; font-weight: 600; z-index: 9; }
.sipg-lb-menu { position: absolute; right: 12px; top: 62px; z-index: 9; background: #fff; color: #111; border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; min-width: 200px; }
.sipg-lb-menu button, .sipg-lb-menu a { background: none !important; color: #111 !important; justify-content: flex-start !important; border-radius: 6px !important; width: 100%; }
.sipg-lb-menu button:hover, .sipg-lb-menu a:hover { background: #eee !important; }
@media (max-width: 600px) {
	.sipg-lb-stage { padding: 0; }
	.sipg-lb .sipg-lb-prev, .sipg-lb .sipg-lb-next { background: rgba(0,0,0,.35); }
	.sipg-lb .sipg-lb-label { display: none; }
	.sipg-lb-thumbs button, .sipg-lb-thumbs img { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.sipg-lb.is-open, .sipg-lb-stage img { animation: none !important; }
}

/* note for logged-in editors when photos fail to load */
.sipg-enote { margin: 8px var(--sipg-gap); padding: 10px 14px; border: 2px dashed #b32d2e; background: #fff; color: #1d2327; font: 14px/1.5 system-ui, sans-serif; }
