.yse-wrapper {
	position: relative;
}

.yse-notice {
	padding: 12px 16px;
	background: #fff3cd;
	border: 1px solid #ffe69c;
	border-radius: 6px;
	color: #664d03;
	font-size: 14px;
}

/* Carousel */
.yse-carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.yse-grid {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--yse-gap, 12px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	flex: 1 1 auto;
	min-width: 0;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.yse-grid::-webkit-scrollbar {
	display: none;
}

.yse-item {
	cursor: pointer;
	flex: 0 0 calc((100% - (var(--yse-cols, 4) - 1) * var(--yse-gap, 12px)) / var(--yse-cols, 4));
	scroll-snap-align: start;
	min-width: 0;
}

.yse-item__thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 12px;
	background: #000;
}

.yse-item__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.yse-hover-zoom .yse-item:hover .yse-item__thumb {
	transform: scale(1.06);
}

.yse-item__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: background 0.2s ease;
}

.yse-item__play svg {
	fill: #ffffff;
	margin-left: 3px;
}

.yse-item:hover .yse-item__play {
	background: rgba(0, 0, 0, 0.65);
}

.yse-item__title {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.yse-no-titles .yse-item__title {
	display: none;
}

/* Nav arrows */
.yse-nav {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: #fff;
	color: #111;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transition: opacity 0.2s ease, transform 0.15s ease;
	z-index: 2;
}

.yse-nav:hover {
	transform: scale(1.05);
}

.yse-nav[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.yse-nav.is-loading {
	opacity: 0.6;
	cursor: wait;
}

/* Full-screen lightbox */
.yse-modal {
	position: fixed;
	inset: 0;
	z-index: 10000000000;
	display: none;
	background: #000;
	touch-action: none;
	overscroll-behavior: contain;
}

.yse-modal.is-open {
	display: block;
}

.yse-modal__stage {
	display: flex;
	width: 100%;
	height: 100%;
}

.yse-modal__player-col {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	background: #000;
	min-width: 0;
}

/*
 * Sits above the YouTube iframe so touch gestures land on our own DOM
 * instead of being swallowed by the (cross-origin) iframe's browsing
 * context, which never bubbles events out to the parent document.
 * Only enabled on mobile, where the player fills this entire column.
 */
.yse-modal__swipe-zone {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.yse-modal__player {
	height: 100%;
	max-height: 100vh;
	aspect-ratio: 9 / 16;
	max-width: 100%;
}

.yse-modal__player iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.yse-modal__nav-vertical {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.yse-modal__nav-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.yse-modal__nav-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

.yse-modal__nav-btn[disabled] {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.yse-modal__nav-btn.is-loading {
	opacity: 0.6;
	cursor: wait;
}

.yse-modal__info-col {
	flex: 0 0 380px;
	max-width: 38vw;
	background: #111;
	color: #fff;
	padding: 32px 28px;
	overflow-y: auto;
}

.yse-modal__title {
	font-size: 20px;
	line-height: 1.35;
	margin: 0 0 16px;
}

.yse-modal__description {
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.75);
	white-space: pre-wrap;
	margin: 0;
}

.yse-modal__close {
	position: absolute;
	top: 20px;
	right: 28px;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

@media (max-width: 782px) {
	.yse-modal__player-col {
		flex: 1 1 auto;
		width: 100%;
		height: 100%;
	}

	.yse-modal__player {
		height: 100%;
		width: 100%;
		max-height: 100vh;
		max-width: 100vw;
		aspect-ratio: auto;
	}

	.yse-modal__swipe-zone {
		pointer-events: auto;
	}

	.yse-modal__nav-vertical,
	.yse-modal__info-col {
		display: none;
	}
}
