/* Every rule is scoped under .dpsf-wrap: this sheet shares <body> with the theme. */

.dpsf-wrap {
	--dpsf-accent: #4a1426;
	--dpsf-card: #b5524a;
	--dpsf-dot: #d6ccca;
	--dpsf-dot-active: #333333;
	--dpsf-gap: 10px;
	--dpsf-per-view: 1.35;
	position: relative;
	width: 100%;
	max-width: 1840px;
	margin: 0 auto;
	box-sizing: border-box;
}
.dpsf-wrap *,
.dpsf-wrap *::before,
.dpsf-wrap *::after {
	box-sizing: border-box;
}

/* Filter chips */
.dpsf-wrap .dpsf-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 18px;
}
.dpsf-wrap .dpsf-chip {
	appearance: none;
	margin: 0;
	padding: 7px 18px;
	border: 1.5px solid var(--dpsf-accent);
	border-radius: 999px;
	background: transparent;
	color: var(--dpsf-accent);
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}
.dpsf-wrap .dpsf-chip:hover {
	background: rgba(74, 20, 38, 0.08);
}
.dpsf-wrap .dpsf-chip[aria-pressed="true"] {
	background: var(--dpsf-accent);
	color: #fff;
}

/* Track */
.dpsf-wrap .dpsf-viewport {
	position: relative;
}
.dpsf-wrap .dpsf-track {
	display: flex;
	gap: var(--dpsf-gap);
	margin: 0;
	padding: 4px 0 8px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	position: relative;
}
.dpsf-wrap .dpsf-track::-webkit-scrollbar {
	display: none;
}
.dpsf-wrap .dpsf-item {
	flex: 0 0 calc((100% - (var(--dpsf-per-view) - 1) * var(--dpsf-gap)) / var(--dpsf-per-view));
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
	list-style: none;
}
.dpsf-wrap .dpsf-item[hidden] {
	display: none;
}

/* Grid layout */
.dpsf-wrap.dpsf-raster .dpsf-track {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	overflow: visible;
	scroll-snap-type: none;
}

/* Card */
.dpsf-wrap .dpsf-card {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 6px;
	background: var(--dpsf-card);
	text-decoration: none;
	transition: transform 0.2s ease;
}
.dpsf-wrap .dpsf-card:hover {
	transform: translateY(-3px);
}
.dpsf-wrap .dpsf-card:focus-visible {
	outline: 3px solid var(--dpsf-accent);
	outline-offset: 2px;
}
.dpsf-wrap .dpsf-card img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border: 0;
	border-radius: 0;
}
.dpsf-wrap .dpsf-badge,
.dpsf-wrap .dpsf-type {
	position: absolute;
	top: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	pointer-events: none;
}
.dpsf-wrap .dpsf-badge {
	left: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--dpsf-accent);
}
.dpsf-wrap .dpsf-type {
	right: 8px;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
}
.dpsf-wrap .dpsf-badge svg,
.dpsf-wrap .dpsf-type svg {
	display: block;
	width: 18px;
	height: 18px;
}
.dpsf-wrap .dpsf-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Text under the card */
.dpsf-wrap .dpsf-item {
	display: flex;
	flex-direction: column;
}
.dpsf-wrap .dpsf-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 10px 2px 0;
	color: #3b2a2a;
	font-size: 15px;
	line-height: 1.5;
}
.dpsf-wrap .dpsf-full {
	display: none !important; /* Pop-up source; some themes force div { display: block }. */
}
.dpsf-wrap .dpsf-text {
	max-height: calc(1.5em * var(--dpsf-lines, 3)); /* Fallback where line-clamp is unsupported. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--dpsf-lines, 3);
	line-clamp: var(--dpsf-lines, 3);
	overflow: hidden;
	margin: 0 0 6px;
	padding: 0;
	overflow-wrap: anywhere;
}
.dpsf-wrap .dpsf-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 10px;
	margin-top: auto;
	font-size: 13px;
	color: #8a6f6a;
}
.dpsf-wrap .dpsf-more {
	color: var(--dpsf-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.dpsf-wrap .dpsf-more:hover {
	text-decoration-thickness: 2px;
}
.dpsf-wrap .dpsf-more:focus-visible {
	outline: 2px solid var(--dpsf-accent);
	outline-offset: 2px;
}

/* Arrows: only once the script has taken over (without it the track just scrolls). */
.dpsf-wrap .dpsf-nav {
	display: none;
}
.dpsf-wrap.dpsf-js .dpsf-nav {
	appearance: none;
	position: absolute;
	top: var(--dpsf-nav-top, 50%); /* Middle of the picture, not of picture + text. */
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -22px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #111;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}
.dpsf-wrap.dpsf-js .dpsf-nav:hover {
	background: #fff;
}
.dpsf-wrap.dpsf-js .dpsf-nav:focus-visible {
	outline: 3px solid var(--dpsf-accent);
	outline-offset: 2px;
}
.dpsf-wrap .dpsf-nav svg {
	width: 22px;
	height: 22px;
}
.dpsf-wrap .dpsf-prev {
	left: 4px;
}
.dpsf-wrap .dpsf-next {
	right: 4px;
}
.dpsf-wrap.dpsf-single .dpsf-nav,
.dpsf-wrap.dpsf-single .dpsf-dots {
	display: none;
}

/* Dots */
.dpsf-wrap .dpsf-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 16px 0 0;
}
.dpsf-wrap .dpsf-dot {
	appearance: none;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.dpsf-wrap .dpsf-dot::before {
	content: "";
	display: block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--dpsf-dot);
	transition: background-color 0.15s;
}
.dpsf-wrap .dpsf-dot[aria-current="true"]::before {
	background: var(--dpsf-dot-active);
}
.dpsf-wrap .dpsf-dot:focus-visible {
	outline: 2px solid var(--dpsf-accent);
	border-radius: 50%;
}

/* Pop-up (a <dialog> in the browser's top layer, outside .dpsf-wrap) */
.dpsf-dialog {
	width: min(960px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: #fff;
	color: #3b2a2a;
	overflow: hidden;
	box-sizing: border-box;
}
.dpsf-dialog *,
.dpsf-dialog *::before,
.dpsf-dialog *::after {
	box-sizing: border-box;
}
.dpsf-dialog::backdrop {
	background: rgba(40, 10, 20, 0.7);
}
.dpsf-dialog .dpsf-dlg {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	max-height: calc(100vh - 32px);
}
.dpsf-dialog .dpsf-dlg-media {
	position: relative;
	background: #b5524a;
	aspect-ratio: 4 / 5;
	max-height: calc(100vh - 32px);
}
.dpsf-dialog .dpsf-dlg-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	border: 0;
	border-radius: 0;
}
.dpsf-dialog .dpsf-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #4a1426;
}
.dpsf-dialog svg {
	display: block;
	width: 20px;
	height: 20px;
}
.dpsf-dialog .dpsf-dlg-body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 0;
	padding: 56px 28px 24px;
	overflow: hidden; /* Text is cut with "…" to fit; "Weiterlesen" makes it scroll. */
	contain: size; /* Take the picture's height instead of stretching the pop-up to the text. */
	font-size: 16px;
	line-height: 1.65;
}
.dpsf-dialog .dpsf-dlg-body.is-expanded {
	overflow-y: auto;
}
.dpsf-dialog .dpsf-dlg-head {
	margin: 0;
	font-size: 13px;
	color: #8a6f6a;
}
.dpsf-dialog .dpsf-dlg-text {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	overflow-wrap: anywhere;
}
.dpsf-dialog .dpsf-dlg-body.is-expanded .dpsf-dlg-text {
	flex: none;
	overflow: visible;
}
.dpsf-dialog .dpsf-dlg-more {
	appearance: none;
	align-self: flex-start;
	flex-shrink: 0;
	margin: -6px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: #4a1426;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.dpsf-dialog .dpsf-dlg-more[hidden] {
	display: none;
}
.dpsf-dialog .dpsf-dlg-more:focus-visible {
	outline: 2px solid #4a1426;
	outline-offset: 2px;
}
.dpsf-dialog .dpsf-dlg-text a,
.dpsf-dialog .dpsf-dlg-link {
	color: #4a1426;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.dpsf-dialog .dpsf-dlg-link {
	flex-shrink: 0;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid #eadcd8;
	font-size: 14px;
	font-weight: 600;
}
.dpsf-dialog .dpsf-dlg-close,
.dpsf-dialog .dpsf-dlg-nav {
	appearance: none;
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #111;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}
.dpsf-dialog .dpsf-dlg-close:focus-visible,
.dpsf-dialog .dpsf-dlg-nav:focus-visible {
	outline: 3px solid #4a1426;
	outline-offset: 2px;
}
.dpsf-dialog .dpsf-dlg-close {
	top: 10px;
	right: 10px;
	z-index: 2; /* Stays clickable when the arrows scroll past it on phones. */
}
.dpsf-dialog .dpsf-dlg-nav {
	top: calc(50% - 20px);
}
.dpsf-dialog .dpsf-dlg-prev {
	left: 10px;
}
.dpsf-dialog .dpsf-dlg-next {
	left: calc(50% - 50px);
}
.dpsf-dialog .dpsf-dlg-nav[hidden] {
	display: none;
}
@media (max-width: 700px) {
	.dpsf-dialog {
		width: 100vw;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}
	.dpsf-dialog .dpsf-dlg {
		display: block;
		height: 100%;
		max-height: none;
		overflow-y: auto;
	}
	.dpsf-dialog .dpsf-dlg-media {
		max-height: none;
	}
	.dpsf-dialog .dpsf-dlg-body {
		overflow: visible;
		contain: none;
		padding: 18px 18px 28px;
	}
	.dpsf-dialog .dpsf-dlg-text {
		overflow: visible; /* Phones: the whole pop-up scrolls, full text. */
	}
	.dpsf-dialog .dpsf-dlg-nav {
		top: calc(62vw - 20px);
	}
	.dpsf-dialog .dpsf-dlg-next {
		left: auto;
		right: 10px;
	}
	.dpsf-dialog .dpsf-dlg-close {
		position: fixed;
	}
}

@media (min-width: 480px) {
	.dpsf-wrap {
		--dpsf-per-view: 2;
	}
}
@media (min-width: 720px) {
	.dpsf-wrap {
		--dpsf-per-view: 3;
	}
	.dpsf-wrap.dpsf-raster .dpsf-track {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (min-width: 960px) {
	.dpsf-wrap {
		--dpsf-per-view: 4;
	}
	.dpsf-wrap.dpsf-raster .dpsf-track {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
@media (min-width: 1200px) {
	.dpsf-wrap {
		--dpsf-per-view: 5;
	}
	.dpsf-wrap.dpsf-raster .dpsf-track {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}
@media (prefers-reduced-motion: reduce) {
	.dpsf-wrap .dpsf-card,
	.dpsf-wrap .dpsf-chip,
	.dpsf-wrap .dpsf-dot::before {
		transition: none;
	}
	.dpsf-wrap .dpsf-card:hover {
		transform: none;
	}
}
