.fpg-gallery,
.fpg-gallery *,
.fpg-lightbox,
.fpg-lightbox * {
	box-sizing: border-box;
}

.fpg-gallery--card {
	position: relative;
	min-width: 0;
}

.fpg-card-trigger {
	position: absolute;
	z-index: 1;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	color: currentColor;
	cursor: zoom-in;
	appearance: none;
}

.fpg-card-trigger:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.fpg-card-image {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 280ms ease, filter 280ms ease;
}

.fpg-gallery--card:hover .fpg-card-image {
	transform: scale(1.025);
	filter: brightness(0.92);
}

.fpg-card-body {
	width: 100%;
}

.fpg-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	overflow: hidden !important;
	white-space: nowrap !important;
}

.fpg-gallery [data-fpg-item][hidden] {
	display: none !important;
}

.fpg-grid {
	display: grid;
	grid-template-columns: repeat(var(--fpg-columns, 4), minmax(0, 1fr));
	gap: var(--fpg-gap, 12px);
}

.fpg-item {
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #e7e7e7;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	cursor: zoom-in;
}

.fpg-thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 280ms ease, filter 280ms ease;
}

.fpg-item:hover .fpg-thumbnail {
	transform: scale(1.035);
	filter: brightness(0.88);
}

.fpg-item:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.fpg-lightbox[hidden] {
	display: none;
}

.fpg-lightbox {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	place-items: stretch;
	color: #fff;
	opacity: 0;
	transition: opacity 180ms ease;
}

.fpg-lightbox.is-open {
	opacity: 1;
}

.fpg-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 10, 0.96);
	cursor: zoom-out;
}

.fpg-viewer {
	position: relative;
	display: grid;
	grid-template-columns: minmax(56px, 8vw) minmax(0, 1fr) minmax(56px, 8vw);
	grid-template-rows: 64px minmax(0, 1fr);
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.fpg-toolbar {
	position: relative;
	z-index: 2;
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px 8px 22px;
	pointer-events: auto;
}

.fpg-counter {
	font: 500 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.72);
}

.fpg-control {
	z-index: 2;
	display: grid;
	place-items: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	box-shadow: none;
	line-height: 1;
	cursor: pointer;
	pointer-events: auto;
	transition: background 160ms ease, transform 160ms ease;
}

.fpg-control:hover {
	background: rgba(255, 255, 255, 0.18);
	transform: scale(1.04);
}

.fpg-control:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.fpg-close {
	width: 44px;
	height: 44px;
	font-size: 32px;
	font-weight: 200;
}

.fpg-prev,
.fpg-next {
	align-self: center;
	justify-self: center;
	width: 48px;
	height: 48px;
	font-size: 48px;
	font-weight: 200;
}

.fpg-prev {
	grid-column: 1;
	grid-row: 2;
}

.fpg-next {
	grid-column: 3;
	grid-row: 2;
}

.fpg-stage {
	position: relative;
	grid-column: 2;
	grid-row: 2;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	align-items: center;
	justify-items: center;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0 0 24px;
	pointer-events: auto;
}

.fpg-full-image {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 128px);
	object-fit: contain;
	opacity: 1;
	transition: opacity 140ms ease;
	user-select: none;
}

.fpg-full-image.is-loading {
	opacity: 0.28;
}

.fpg-caption {
	max-width: 760px;
	padding: 12px 18px 0;
	color: rgba(255, 255, 255, 0.78);
	font: 400 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-align: center;
}

.fpg-notice {
	padding: 12px 14px;
	border-left: 4px solid #dba617;
	background: #fff8e5;
	color: #3c434a;
}

@media (max-width: 760px) {
	.fpg-grid {
		grid-template-columns: repeat(min(2, var(--fpg-columns, 4)), minmax(0, 1fr));
	}

	.fpg-viewer {
		grid-template-columns: 56px minmax(0, 1fr) 56px;
		grid-template-rows: 58px minmax(0, 1fr);
	}

	.fpg-toolbar {
		padding: 7px 10px 7px 16px;
	}

	.fpg-close {
		width: 42px;
		height: 42px;
	}

	.fpg-prev,
	.fpg-next {
		width: 42px;
		height: 42px;
		font-size: 42px;
		background: rgba(0, 0, 0, 0.3);
	}

	.fpg-stage {
		grid-column: 1 / -1;
		padding: 0 10px 18px;
	}

	.fpg-full-image {
		max-height: calc(100vh - 116px);
	}
}

@media (max-width: 420px) {
	.fpg-grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fpg-lightbox,
	.fpg-thumbnail,
	.fpg-control,
	.fpg-full-image {
		transition: none;
	}
}
