.ytbtn {
	display: inline-block;
	max-width: 100%;
	cursor: pointer;
}

.ytbtn img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 30px;
	transition: opacity 0.3s ease;
}

.ytbtn img:hover {
	opacity: 0.8;
}

/* バナー差し替え再生時 */
.ytbtn.is-playing {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 30px;
	background: #000;
	cursor: default;
}

.ytbtn.is-playing iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

body.yt-modal-open {
	overflow: hidden;
}

/* 既存の .modal と衝突しないように YouTube 専用クラスにする */
.yt-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 9999;
}

.yt-modal.is-show {
	display: flex;
}

.yt-modal__inner {
	position: relative;
	width: min(1000px, 90vw);
	background: #000;
}

.yt-video-container {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
}

.yt-video-container iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.yt-modal__close {
	position: absolute;
	top: -40px;
	right: 0;
	padding: 5px 10px;
	cursor: pointer;
	font-size: 2rem;
	color: #fff;
	background: none;
	border: none;
	line-height: 1;
}

@media (max-width: 768px) {
	.yt-modal.is-sp-fullscreen {
		align-items: stretch;
		justify-content: stretch;
		background: #000;
	}

	.yt-modal.is-sp-fullscreen .yt-modal__inner {
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		max-width: none;
	}

	.yt-modal.is-sp-fullscreen .yt-video-container {
		width: 100%;
		height: 100%;
		padding-bottom: 0;
	}

	.yt-modal.is-sp-fullscreen .yt-modal__close {
		top: max(20vw, env(safe-area-inset-top));
		right: max(12px, env(safe-area-inset-right));
		z-index: 2;
		width: 44px;
		height: 44px;
		padding: 0;
		margin: 4vw;
		border-radius: 10%;
		font-size: 2rem;
		background: rgba(0, 0, 0, 0.5);
		background-image: url("close.svg");
	}
}
