.fmw-wrap {
	--fmw-border: #dedede;
	--fmw-bg: #fff;
	--fmw-soft: #f7f5f2;
	--fmw-text: #242424;
	--fmw-accent: #7d4f50;
	max-width: 1180px;
	margin: 2rem auto;
	color: var(--fmw-text);
}

.fmw-title,
.fmw-gallery-section > h3,
.fmw-upload-panel > h3 {
	text-align: center;
}

.fmw-panel {
	padding: clamp(1rem, 3vw, 2rem);
	margin: 1.25rem 0 2rem;
	background: var(--fmw-soft);
	border: 1px solid var(--fmw-border);
	border-radius: 18px;
}

.fmw-help,
.fmw-empty,
.fmw-upload-closed {
	text-align: center;
}

.fmw-form {
	display: grid;
	gap: 1rem;
	max-width: 720px;
	margin: 0 auto;
}

.fmw-file-label {
	display: grid;
	gap: .6rem;
	padding: 1rem;
	background: var(--fmw-bg);
	border: 2px dashed var(--fmw-border);
	border-radius: 12px;
	font-weight: 600;
}

.fmw-file-label input {
	width: 100%;
}

.fmw-consent {
	display: flex;
	gap: .65rem;
	align-items: flex-start;
	font-size: .92rem;
	line-height: 1.45;
}

.fmw-consent input {
	margin-top: .2rem;
	flex: 0 0 auto;
}

.fmw-button {
	justify-self: center;
	min-width: 180px;
	padding: .8rem 1.2rem;
	border: 0;
	border-radius: 999px;
	background: var(--fmw-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.fmw-button:hover,
.fmw-button:focus-visible {
	filter: brightness(.92);
}

.fmw-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.fmw-notice {
	padding: .9rem 1rem;
	margin: 1rem 0;
	border-radius: 10px;
	text-align: center;
}

.fmw-notice--success {
	background: #edf8ef;
	border: 1px solid #8bc697;
}

.fmw-notice--error {
	background: #fff0f0;
	border: 1px solid #dc9a9a;
}

.fmw-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 12px;
	margin-top: 1.25rem;
}

.fmw-photo {
	position: relative;
	aspect-ratio: 1 / 1;
	margin: 0;
	overflow: hidden;
	background: #eee;
	border-radius: 12px;
}

.fmw-photo a,
.fmw-photo img {
	display: block;
	width: 100%;
	height: 100%;
}

.fmw-photo img {
	object-fit: cover;
	transition: transform .2s ease;
}

.fmw-photo a:hover img,
.fmw-photo a:focus-visible img {
	transform: scale(1.035);
}

.fmw-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .4rem;
	padding: 0;
	margin: 1.5rem 0 0;
	list-style: none;
}

.fmw-pagination a,
.fmw-pagination span {
	display: inline-block;
	padding: .45rem .7rem;
	border: 1px solid var(--fmw-border);
	border-radius: 8px;
	text-decoration: none;
}

.fmw-pagination .current {
	background: var(--fmw-accent);
	color: #fff;
	border-color: var(--fmw-accent);
}

@media (max-width: 520px) {
	.fmw-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
}

.fmw-gallery-help {
	margin: .35rem 0 0;
	text-align: center;
	font-size: .95rem;
	opacity: .78;
}

.fmw-photo-link {
	position: relative;
	cursor: zoom-in;
}

.fmw-photo-zoom {
	position: absolute;
	right: .55rem;
	bottom: .55rem;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid rgba(255, 255, 255, .75);
	border-radius: 999px;
	background: rgba(0, 0, 0, .58);
	color: #fff;
	font-size: 1.05rem;
	line-height: 1;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
	transition: transform .2s ease, background .2s ease;
}

.fmw-photo-link:hover .fmw-photo-zoom,
.fmw-photo-link:focus-visible .fmw-photo-zoom {
	transform: scale(1.08);
	background: rgba(0, 0, 0, .76);
}

body.fmw-lightbox-open {
	overflow: hidden;
}

.fmw-lightbox[hidden] {
	display: none !important;
}

.fmw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	grid-template-columns: minmax(44px, auto) minmax(0, 1fr) minmax(44px, auto);
	grid-template-rows: 52px minmax(0, 1fr) auto;
	gap: .5rem;
	align-items: center;
	padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
	background: rgba(5, 5, 5, .94);
	color: #fff;
}

.fmw-lightbox button {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	font: inherit;
}

.fmw-lightbox-close,
.fmw-lightbox-nav {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .13);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}

.fmw-lightbox-close:hover,
.fmw-lightbox-close:focus-visible,
.fmw-lightbox-nav:hover,
.fmw-lightbox-nav:focus-visible {
	background: rgba(255, 255, 255, .25);
	transform: scale(1.04);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.fmw-lightbox-close {
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	font-size: 2rem;
	line-height: 1;
}

.fmw-lightbox-prev {
	grid-column: 1;
	grid-row: 2;
	justify-self: start;
	font-size: 1.55rem;
}

.fmw-lightbox-next {
	grid-column: 3;
	grid-row: 2;
	justify-self: end;
	font-size: 1.55rem;
}

.fmw-lightbox-stage {
	position: relative;
	grid-column: 2;
	grid-row: 2;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	min-height: 0;
	overflow: hidden;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.fmw-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 12px 45px rgba(0, 0, 0, .38);
}

.fmw-lightbox-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 42px;
	height: 42px;
	margin: -21px 0 0 -21px;
	border: 4px solid rgba(255, 255, 255, .24);
	border-top-color: #fff;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
}

.fmw-lightbox.is-loading .fmw-lightbox-image {
	opacity: .35;
}

.fmw-lightbox.is-loading .fmw-lightbox-spinner {
	opacity: 1;
	animation: fmw-spin .8s linear infinite;
}

.fmw-lightbox-meta {
	grid-column: 2;
	grid-row: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .25rem;
	min-height: 1.5rem;
	padding: .25rem 0;
	text-align: center;
}

.fmw-lightbox-counter {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.fmw-lightbox-caption {
	max-width: 760px;
	font-size: .92rem;
	opacity: .82;
}

@keyframes fmw-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 640px) {
	.fmw-lightbox {
		grid-template-columns: 48px minmax(0, 1fr) 48px;
		grid-template-rows: 48px minmax(0, 1fr) auto;
		gap: .15rem;
		padding: max(.4rem, env(safe-area-inset-top)) max(.4rem, env(safe-area-inset-right)) max(.4rem, env(safe-area-inset-bottom)) max(.4rem, env(safe-area-inset-left));
	}

	.fmw-lightbox-close,
	.fmw-lightbox-nav {
		width: 42px;
		height: 42px;
		background: rgba(0, 0, 0, .48);
	}

	.fmw-lightbox-stage {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.fmw-lightbox-prev,
	.fmw-lightbox-next {
		z-index: 2;
		grid-row: 2;
	}

	.fmw-lightbox-meta {
		grid-column: 1 / -1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fmw-photo img,
	.fmw-photo-zoom,
	.fmw-lightbox-close,
	.fmw-lightbox-nav {
		transition: none;
	}

	.fmw-lightbox.is-loading .fmw-lightbox-spinner {
		animation-duration: 1.6s;
	}
}
