.dpsg-gallery {
	--dpsg-main: #006173;
	--dpsg-main-dark: #004b59;
	--dpsg-main-deep: #003844;
	--dpsg-accent: #f2e3b6;
	--dpsg-dark: #141414;
	--dpsg-dark-soft: #202020;
	--dpsg-white: #fff;
	--dpsg-light: #f5f7f7;
	--dpsg-text: #222;
	--dpsg-muted: #657176;
	--dpsg-line: rgba(0, 97, 115, .18);
	--dpsg-radius: 10px;
	position: relative;
	width: 100%;
	max-width: 1500px;
	margin: 0 auto;
	color: var(--dpsg-text);
}

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

.dpsg-gallery-title {
	margin: 0 0 24px;
	color: var(--dpsg-dark);
	font-family: "Fugaz One", sans-serif;
	font-size: clamp(36px, 4.2vw, 64px);
	font-weight: 400;
	letter-spacing: -.7px;
	line-height: 1.06;
}

.dpsg-grid {
	display: grid;
	grid-template-columns: repeat(var(--dpsg-units, 8), minmax(0, 1fr));
	grid-auto-flow: dense;
	grid-auto-rows: 8px;
	gap: var(--dpsg-gap, 16px);
	align-items: start;
}

.dpsg-item {
	position: relative;
	z-index: 1;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--dpsg-line);
	border-radius: var(--dpsg-radius);
	background: var(--dpsg-white);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .10);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
	grid-column: span 2;
}

.dpsg-item:hover,
.dpsg-item:focus-within {
	z-index: 5;
	border-color: rgba(0, 97, 115, .42);
	box-shadow: 0 20px 44px rgba(0, 0, 0, .18);
	transform: translateY(-4px) scale(1.025);
}

.dpsg-size-compact {
	grid-column: span 1;
}

.dpsg-size-large,
.dpsg-size-standard.dpsg-aspect-panoramic {
	grid-column: span 4;
}

.dpsg-image-button {
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: var(--dpsg-dark-soft);
	color: inherit;
	cursor: zoom-in;
	text-align: inherit;
}

.dpsg-image-static {
	cursor: default;
}

.dpsg-image-button:focus-visible {
	outline: 3px solid var(--dpsg-accent);
	outline-offset: -4px;
}

.dpsg-image-button::after {
	position: absolute;
	inset: 0;
	content: "";
	background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, .08));
	pointer-events: none;
}

.dpsg-image {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	object-fit: cover;
	transition: filter .3s ease, transform .35s ease;
}

.dpsg-item:hover .dpsg-image,
.dpsg-item:focus-within .dpsg-image {
	filter: saturate(1.04) contrast(1.02);
	transform: scale(1.035);
}

.dpsg-size-compact .dpsg-image {
	filter: saturate(.98);
}

.dpsg-watermark {
	position: absolute;
	right: 10px;
	bottom: 9px;
	z-index: 2;
	max-width: calc(100% - 20px);
	padding: 5px 8px;
	border-radius: 5px;
	background: rgba(20, 20, 20, .58);
	color: rgba(255, 255, 255, .92);
	font-family: "Josefin Sans", sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .7px;
	line-height: 1.2;
	pointer-events: none;
}

.dpsg-ai-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 6px 9px;
	border: 1px solid rgba(242, 227, 182, .50);
	border-radius: 999px;
	background: rgba(20, 20, 20, .76);
	color: var(--dpsg-white);
	font-family: "Josefin Sans", sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .8px;
	line-height: 1;
	text-transform: uppercase;
}

.dpsg-meta {
	display: grid;
	gap: 6px;
	padding: 15px 16px 17px;
	background: var(--dpsg-white);
}

.dpsg-image-title {
	display: block;
	color: var(--dpsg-main);
	font-family: "Fugaz One", sans-serif;
	font-size: clamp(18px, 1.4vw, 24px);
	font-weight: 400;
	line-height: 1.2;
}

.dpsg-caption {
	display: block;
	color: var(--dpsg-dark);
	font-family: "Josefin Sans", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
}

.dpsg-description {
	display: block;
	color: var(--dpsg-muted);
	font-size: 15px;
	line-height: 1.58;
}

.dpsg-ai-notice {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	max-width: 940px;
	margin: 18px 0 0;
	color: var(--dpsg-muted);
	font-size: 12px;
	line-height: 1.55;
}

.dpsg-ai-notice > span {
	color: var(--dpsg-main);
	font-size: 14px;
}

.dpsg-copy-protected .dpsg-image-button,
.dpsg-copy-protected .dpsg-lightbox {
	-webkit-touch-callout: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
	user-select: none;
}

.dpsg-copy-protected .dpsg-image {
	pointer-events: none;
}

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

.dpsg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.dpsg-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 13, 14, .94);
	backdrop-filter: blur(8px);
}

.dpsg-lightbox-panel {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) 52px;
	align-items: center;
	width: min(1500px, 100%);
	height: min(92vh, 1000px);
}

.dpsg-lightbox-content {
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-height: 100%;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 12px;
	background: var(--dpsg-dark);
	box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
}

.dpsg-lightbox-image {
	display: block;
	width: 100%;
	min-height: 0;
	max-height: calc(92vh - 104px);
	object-fit: contain;
	background: #0b0b0b;
}

.dpsg-lightbox-meta {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	min-height: 70px;
	padding: 13px 18px;
	color: var(--dpsg-white);
}

.dpsg-lightbox-title {
	font-family: "Fugaz One", sans-serif;
	font-size: 18px;
	font-weight: 400;
}

.dpsg-lightbox-description {
	color: rgba(255, 255, 255, .72);
	font-size: 14px;
	line-height: 1.4;
}

.dpsg-lightbox-count {
	color: var(--dpsg-accent);
	font-family: "Josefin Sans", sans-serif;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.dpsg-lightbox-close,
.dpsg-lightbox-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 50%;
	background: rgba(20, 20, 20, .84);
	color: var(--dpsg-white);
	cursor: pointer;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

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

.dpsg-lightbox-close:hover,
.dpsg-lightbox-close:focus-visible,
.dpsg-lightbox-nav:hover,
.dpsg-lightbox-nav:focus-visible {
	background: var(--dpsg-accent);
	color: var(--dpsg-dark);
	transform: scale(1.06);
}

.dpsg-lightbox-close {
	position: absolute;
	top: -13px;
	right: -13px;
	z-index: 2;
	width: 44px;
	height: 44px;
	font-size: 29px;
	line-height: 1;
}

.dpsg-lightbox-nav {
	width: 44px;
	height: 44px;
	justify-self: center;
	font-size: 32px;
	line-height: 1;
}

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

.dpsg-error {
	padding: 12px 15px;
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
	color: #8a2424;
}

@media (max-width: 1024px) {
	.dpsg-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.dpsg-lightbox {
		padding: 18px;
	}
}

@media (max-width: 680px) {
	.dpsg-grid {
		display: block;
	}

	.dpsg-item,
	.dpsg-size-large,
	.dpsg-size-standard.dpsg-aspect-panoramic {
		width: 100%;
		margin-bottom: var(--dpsg-gap, 16px);
	}

	.dpsg-item:hover,
	.dpsg-item:focus-within {
		transform: translateY(-2px) scale(1.008);
	}

	.dpsg-lightbox {
		padding: 10px;
	}

	.dpsg-lightbox-panel {
		display: block;
		height: auto;
	}

	.dpsg-lightbox-content {
		max-height: 94vh;
	}

	.dpsg-lightbox-image {
		max-height: calc(94vh - 118px);
	}

	.dpsg-lightbox-meta {
		grid-template-columns: 1fr auto;
		min-height: 92px;
	}

	.dpsg-lightbox-description {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.dpsg-lightbox-nav {
		position: absolute;
		top: 45%;
		z-index: 3;
		width: 42px;
		height: 42px;
		background: rgba(20, 20, 20, .72);
	}

	.dpsg-lightbox-prev {
		left: 7px;
	}

	.dpsg-lightbox-next {
		right: 7px;
	}

	.dpsg-lightbox-close {
		top: 7px;
		right: 7px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dpsg-item,
	.dpsg-image,
	.dpsg-lightbox-close,
	.dpsg-lightbox-nav {
		transition: none;
	}
}
