.storyframe {
	--storyframe-height: 520px;
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0 auto;
	overflow: hidden;
	border-radius: var(--storyframe-radius, 0);
	background: transparent;
	color: #fff;
}

.storyframe * {
	box-sizing: border-box;
}

.storyframe__viewport {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: clamp(280px, var(--storyframe-height), 75vh);
	overflow: hidden;
	border-radius: var(--storyframe-radius, 0);
	background: transparent;
}

.storyframe > .storyframe__viewport > .storyframe__track,
.storyframe > .storyframe__viewport > .storyframe__track > .storyframe__slide {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
}

.storyframe > .storyframe__viewport > .storyframe__track > .storyframe__slide {
	background: transparent !important;
}

.storyframe__slide {
	z-index: 0;
	visibility: hidden;
	opacity: 0;
	transition: opacity .8s cubic-bezier(.22, 1, .36, 1), visibility .8s ease;
	will-change: opacity, transform;
}

.storyframe__slide.is-active {
	z-index: 1;
	visibility: visible;
	opacity: 1;
}

.storyframe--slide .storyframe__slide {
	transform: translate3d(5%, 0, 0) scale(1.01);
	transition: opacity .75s cubic-bezier(.22, 1, .36, 1), transform .75s cubic-bezier(.22, 1, .36, 1), visibility .75s ease;
}

.storyframe--slide .storyframe__slide.is-active {
	transform: translate3d(0, 0, 0) scale(1);
}

.storyframe__media {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 0;
	object-fit: cover;
}

img.storyframe__media {
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	max-height: none !important;
	object-fit: cover !important;
}

.storyframe__embed {
	background: #000;
}

video.storyframe__media {
	background: #000;
}

.storyframe__caption {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: 18px;
	width: min(760px, calc(100% - 96px));
	max-width: calc(100% - 96px);
	max-height: calc(100% - 116px);
	padding: 18px 26px;
	transform: translateX(-50%);
	border-radius: 4px;
	background: rgb(var(--storyframe-caption-color, 0 0 0) / var(--storyframe-caption-opacity, .6));
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	text-align: center;
	overflow: auto;
	overflow-wrap: anywhere;
	word-break: normal;
	pointer-events: auto;
	transition: background .25s ease;
}

.storyframe--has-dots .storyframe__caption {
	bottom: 58px;
}

.storyframe__caption--no-title {
	padding-top: 12px;
	padding-bottom: 12px;
}

.storyframe__caption--no-title .storyframe__excerpt {
	margin-top: 0;
}

.storyframe__title {
	margin: 0;
	color: #fff;
	font-size: clamp(1.35rem, 3vw, 2.25rem);
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.storyframe__excerpt {
	margin: 8px 0 0;
	color: #f2f2f2;
	font-size: 15px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.storyframe__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin-top: 14px;
	padding: 8px 18px;
	border: 1px solid rgba(255, 255, 255, .85);
	border-radius: 3px;
	background: #fff;
	color: #1d2327;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.storyframe__cta:hover {
	background: #f0f0f1;
	color: #101517;
	transform: translateY(-1px);
}

.storyframe__cta:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.storyframe__arrow {
	position: absolute;
	z-index: 4;
	top: 50%;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	-webkit-appearance: none;
	appearance: none;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 50%;
	background: rgb(var(--storyframe-caption-color, 0 0 0) / .72);
	color: #fff;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
	box-shadow: none;
	cursor: pointer;
	transition: background .25s ease, transform .25s ease;
}

.storyframe__arrow:hover {
	background: rgb(var(--storyframe-caption-color, 0 0 0) / .92);
}

.storyframe__arrow:focus-visible,
.storyframe__dots button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.storyframe__arrow--previous {
	left: 18px;
}

.storyframe__arrow--next {
	right: 18px;
}

.storyframe__arrow > span {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	line-height: 1;
}

.storyframe__dots {
	position: absolute;
	z-index: 5;
	left: 50%;
	bottom: 18px;
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 7px 11px;
	transform: translateX(-50%);
	border-radius: 20px;
	background: rgba(0, 0, 0, .28);
}

.storyframe__dots button {
	display: block;
	width: 11px;
	height: 11px;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}

.storyframe__dots button[aria-selected="true"] {
	background: #fff;
	transform: scale(1.22);
}

.storyframe-notice {
	padding: 12px;
	border-left: 4px solid #dba617;
	background: #fff8e5;
}

.storyframe-preview-page {
	margin: 0;
	padding: 32px;
	background: #f0f0f1;
}

.storyframe-preview-shell {
	width: min(1200px, 100%);
	margin: 0 auto;
}

@media (max-width: 600px) {
	.storyframe-preview-page {
		padding: 12px;
	}
	.storyframe__viewport {
		height: clamp(300px, 78vw, 430px);
	}
	.storyframe__caption {
		bottom: 14px;
		width: calc(100% - 88px);
		max-width: calc(100% - 88px);
		max-height: calc(100% - 90px);
		padding: 11px 14px;
		border-radius: 2px;
	}
	.storyframe--has-dots .storyframe__caption {
		bottom: 46px;
	}
	.storyframe__caption--no-title {
		padding-top: 8px;
		padding-bottom: 8px;
	}
	.storyframe__title {
		font-size: clamp(18px, 5.4vw, 24px);
		line-height: 1.25;
	}
	.storyframe__excerpt {
		display: -webkit-box;
		margin-top: 6px;
		font-size: 12px;
		line-height: 1.5;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 4;
		overflow: hidden;
	}
	.storyframe__cta {
		min-height: 36px;
		margin-top: 9px;
		padding: 7px 14px;
		font-size: 12px;
	}
	.storyframe__arrow {
		top: 50%;
		width: 40px;
		height: 40px;
		font-size: 18px;
		transform: translateY(-50%);
	}
	.storyframe__arrow--previous {
		left: 8px;
	}
	.storyframe__arrow--next {
		right: 8px;
	}
	.storyframe__dots {
		bottom: 14px;
		gap: 8px;
		padding: 6px 9px;
	}
	.storyframe__dots button {
		width: 10px;
		height: 10px;
	}
}

@media (max-width: 380px) {
	.storyframe__viewport {
		height: 300px;
	}
	.storyframe__caption {
		width: calc(100% - 72px);
		max-width: calc(100% - 72px);
		padding: 10px 11px;
	}
	.storyframe__title {
		font-size: 18px;
	}
	.storyframe__excerpt {
		-webkit-line-clamp: 3;
	}
	.storyframe__arrow {
		width: 34px;
		height: 34px;
		font-size: 16px;
	}
	.storyframe__arrow--previous {
		left: 6px;
	}
	.storyframe__arrow--next {
		right: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.storyframe__slide,
	.storyframe__arrow,
	.storyframe__dots button {
		transition: none !important;
	}
}
