:root {
	--sdf-dark: #080a09;
	--sdf-light: #fffdf6;
	--sdf-accent: #e8d79e;
}

body.sdf-show-open {
	overflow: hidden !important;
}

.sdf-album,
.sdf-album * {
	box-sizing: border-box;
}

.sdf-album {
	width: 100%;
	max-width: 1180px;
	margin: clamp(24px, 5vw, 64px) auto;
}

.sdf-album__launcher {
	position: relative;
	display: block;
	width: 100%;
	min-height: 340px;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: clamp(14px, 2vw, 28px);
	color: var(--sdf-light);
	text-align: left;
	background: var(--sdf-dark);
	box-shadow: 0 24px 70px rgba(20, 20, 17, 0.22);
	cursor: pointer;
}

.sdf-album__launcher img {
	display: block;
	width: 100% !important;
	height: clamp(340px, 58vw, 720px) !important;
	max-width: none !important;
	max-height: none !important;
	border: 0;
	border-radius: 0 !important;
	object-fit: contain !important;
	object-position: center center !important;
	background: var(--sdf-dark);
	transform: scale(1.002);
	transition: transform 700ms ease, filter 700ms ease;
}

.sdf-album__launcher:hover img,
.sdf-album__launcher:focus-visible img {
	filter: brightness(0.82);
	transform: scale(1.025);
}

.sdf-album__launcher:focus-visible {
	outline: 3px solid var(--sdf-accent);
	outline-offset: 4px;
}

.sdf-album__launcher-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.72));
	pointer-events: none;
}

.sdf-album__launcher-copy {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 8px 24px;
	padding: clamp(22px, 4vw, 54px);
}

.sdf-album__title {
	grid-column: 1 / -1;
	font: 500 clamp(20px, 3.2vw, 42px)/1.05 Georgia, "Times New Roman", serif;
	letter-spacing: -0.03em;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.sdf-album__open-label {
	font: 750 clamp(14px, 1.8vw, 18px)/1.2 system-ui, sans-serif;
	letter-spacing: 0.02em;
}

.sdf-album__count {
	font: 700 12px/1.2 system-ui, sans-serif;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	opacity: 0.76;
}

.sdf-notice {
	padding: 12px 15px;
	border-left: 4px solid #b88916;
	background: #fff8dd;
}

/* Vollbildbühne */
.sdf-show {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: block;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	color: var(--sdf-light);
	background: var(--sdf-dark);
	overscroll-behavior: contain;
	touch-action: pan-y;
}

.sdf-show[hidden] {
	display: none !important;
}

.sdf-show__music {
	display: none;
}

/* Das Beitragsbild bleibt in Übersichten sichtbar, aber nie im geöffneten Fotoshow-Beitrag. */
body.sdf-hide-featured-image main > article.type-post > .post-thumbnail,
body.sdf-hide-featured-image main > article.type-post > .featured-image,
body.sdf-hide-featured-image main > article.type-post > .post-featured-image,
body.sdf-hide-featured-image main > article.type-post > .entry-thumbnail,
body.sdf-hide-featured-image main > article.type-post > .entry-header .post-thumbnail,
body.sdf-hide-featured-image main > article.type-post > .entry-header .featured-image,
body.sdf-hide-featured-image main > article.type-post > .entry-header .post-featured-image,
body.sdf-hide-featured-image main > article.type-post > .entry-header .entry-thumbnail,
body.sdf-hide-featured-image main > article.type-post > .wp-block-post-featured-image {
	display: none !important;
}

.sdf-show:fullscreen {
	width: 100vw;
	height: 100vh;
	background: var(--sdf-dark);
}

.sdf-show__stage,
.sdf-slide {
	position: absolute;
	inset: 0;
}

.sdf-slide {
	margin: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 1250ms ease;
}

.sdf-slide.is-active {
	z-index: 2;
	opacity: 1;
	pointer-events: auto;
}

.sdf-slide img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	border: 0;
	border-radius: 0 !important;
	box-shadow: none !important;
	object-fit: contain !important;
	object-position: center center !important;
	background: var(--sdf-dark);
	user-select: none;
	-webkit-user-drag: none;
}

.sdf-show--einblenden .sdf-slide {
	transition: none;
}

.sdf-show--einblenden .sdf-slide.is-active img {
	animation: sdf-fade-from-black 1150ms ease both;
}

.sdf-show--zittern .sdf-slide {
	transition: opacity 420ms ease;
}

.sdf-show--zittern .sdf-slide.is-active img {
	animation: sdf-gentle-shiver 900ms ease both;
}

@keyframes sdf-fade-from-black {
	0% {
		opacity: 0;
		filter: brightness(0.35);
		transform: scale(1.012);
	}
	100% {
		opacity: 1;
		filter: brightness(1);
		transform: scale(1);
	}
}

@keyframes sdf-gentle-shiver {
	0% {
		opacity: 0;
		transform: translate3d(0, 0, 0) scale(1.008);
	}
	22% {
		opacity: 0.76;
		transform: translate3d(-3px, 1px, 0) scale(1.006);
	}
	39% {
		transform: translate3d(3px, -2px, 0) scale(1.004);
	}
	56% {
		transform: translate3d(-2px, 1px, 0) scale(1.003);
	}
	72% {
		transform: translate3d(1px, -1px, 0) scale(1.001);
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
}

/* Oberzeile und Bedienung erscheinen nur bei Bewegung. */
.sdf-show__top {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 18px;
	padding: clamp(16px, 3vw, 34px);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent);
	transition: opacity 320ms ease, transform 320ms ease;
}

.sdf-show__title {
	max-width: 38vw;
	overflow: hidden;
	font: 650 13px/1.2 system-ui, sans-serif;
	letter-spacing: 0.08em;
	text-align: center;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	opacity: 0.82;
}

.sdf-show__counter {
	justify-self: end;
	font: 700 13px/1 system-ui, sans-serif;
	font-variant-numeric: tabular-nums;
	opacity: 0.82;
}

.sdf-battery {
	display: flex;
	align-items: center;
	gap: 4px;
	justify-self: start;
}

.sdf-battery__body {
	display: block;
	width: 58px;
	height: 23px;
	padding: 3px;
	border: 2px solid rgba(255, 255, 255, 0.78);
	border-radius: 6px;
}

.sdf-battery__fill {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 2px;
	background: var(--sdf-accent);
	transform: scaleX(1);
	transform-origin: left center;
}

.sdf-battery__tip {
	width: 3px;
	height: 9px;
	border-radius: 0 2px 2px 0;
	background: rgba(255, 255, 255, 0.78);
}

.sdf-battery__seconds {
	min-width: 22px;
	margin-left: 5px;
	font: 750 12px/1 system-ui, sans-serif;
	font-variant-numeric: tabular-nums;
}

.sdf-show__controls {
	position: absolute;
	right: 50%;
	bottom: clamp(18px, 4vw, 42px);
	z-index: 11;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 7px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: rgba(9, 10, 9, 0.76);
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
	backdrop-filter: blur(18px);
	transform: translateX(50%);
	transition: opacity 320ms ease, transform 320ms ease;
}

.sdf-show__controls button {
	min-width: 44px;
	min-height: 44px;
	padding: 10px 14px;
	border: 0;
	border-radius: 999px;
	color: inherit;
	font: 750 13px/1 system-ui, sans-serif;
	background: transparent;
	cursor: pointer;
}

.sdf-show__controls button:hover,
.sdf-show__controls button:focus-visible {
	color: var(--sdf-dark);
	background: var(--sdf-light);
}

.sdf-show__play {
	min-width: 76px !important;
}

.sdf-show.is-controls-hidden {
	cursor: none;
}

.sdf-show.is-controls-hidden .sdf-show__top {
	opacity: 0;
	transform: translateY(-18px);
	pointer-events: none;
}

.sdf-show.is-controls-hidden .sdf-show__controls {
	opacity: 0;
	transform: translate(50%, 18px);
	pointer-events: none;
}

@media (max-width: 680px) {
	.sdf-album__launcher {
		min-height: 300px;
	}

	.sdf-album__launcher img {
		height: 430px !important;
	}

	.sdf-show__top {
		grid-template-columns: 1fr auto;
	}

	.sdf-show__title {
		display: none;
	}

	.sdf-show__controls {
		width: calc(100% - 24px);
		justify-content: center;
	}

	.sdf-show__controls button {
		flex: 1;
		padding-inline: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sdf-slide,
	.sdf-show__top,
	.sdf-show__controls,
	.sdf-album__launcher img {
		transition-duration: 1ms !important;
	}

	.sdf-show--einblenden .sdf-slide.is-active img,
	.sdf-show--zittern .sdf-slide.is-active img {
		animation: none;
	}
}
