/* ショート動画一覧（page-shorts.php / functions/youtube-shorts.php） */

.ytShorts *,
.ytShorts *::before,
.ytShorts *::after {
	box-sizing: border-box;
}

.ytShorts__body {
	padding: 2.4rem 0 8rem;
	color: #4d320d;
}

.ytShorts__intro {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2.4rem;
	margin-bottom: 3.2rem;
}

.ytShorts__lead {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.9;
}

.ytShorts__subscribe {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 0.8rem;
	padding: 1.2rem 2.4rem;
	border-radius: 999px;
	background: #ff0000;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	text-decoration: none;
	transition: opacity 0.2s;
}

.ytShorts__subscribe:hover {
	opacity: 0.85;
	color: #fff;
}

/* 一覧 */
.ytShorts__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 2.8rem 1.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ytShorts__item[hidden] {
	display: none;
}

.ytShorts__card {
	display: block;
	color: inherit;
	text-decoration: none;
}

.ytShorts__thumb {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 12px;
	background: #f3e9dc;
}

.ytShorts__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.ytShorts__card:hover .ytShorts__thumb img {
	transform: scale(1.04);
}

.ytShorts__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 52px;
	height: 52px;
	margin: -26px 0 0 -26px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
}

.ytShorts__play::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -6px;
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff;
}

.ytShorts__title {
	display: -webkit-box;
	margin-top: 0.8rem;
	overflow: hidden;
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.5;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.ytShorts__empty {
	font-size: 1.5rem;
	text-align: center;
}

/* もっと見る */
.ytShorts__more {
	margin-top: 4rem;
	text-align: center;
}

.ytShorts__moreBtn {
	min-width: 280px;
	min-height: 52px;
	padding: 1rem 3.2rem;
	border: 2px solid #4d320d;
	border-radius: 999px;
	background: #fff;
	color: #4d320d;
	font-size: 1.6rem;
	font-weight: 700;
	cursor: pointer;
}

.ytShorts__moreBtn:hover {
	background: #fdf4ea;
}

/* 末尾のボタン */
.ytShorts__channel {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.6rem;
	max-width: 760px;
	margin: 5.6rem auto 0;
}

.ytShorts__channelBtn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 1.2rem 1.6rem;
	border: 2px solid #4d320d;
	border-radius: 999px;
	background: #fff;
	color: #4d320d;
	font-size: 1.6rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.2s;
}

.ytShorts__channelBtn--main {
	border-color: #ef6a22;
	background: #ef6a22;
	box-shadow: 0 4px 0 #b84a10;
	color: #fff;
}

.ytShorts__channelBtn:hover {
	opacity: 0.85;
}

.ytShorts__channelBtn--main:hover {
	color: #fff;
}

/* 再生モーダル */
.ytShorts__modal {
	/* テーマ共通の margin:0 で中央寄せが消えるので明示する */
	width: fit-content;
	height: fit-content;
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}

.ytShorts__modal::backdrop {
	background: rgba(0, 0, 0, 0.8);
}

.ytShorts__modalInner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.2rem;
}

.ytShorts__player {
	width: min(400px, 86vw, calc((100vh - 120px) * 9 / 16));
	width: min(400px, 86vw, calc((100dvh - 120px) * 9 / 16));
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 12px;
	background: #000;
}

.ytShorts__player iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.ytShorts__close {
	position: absolute;
	top: -4px;
	right: -52px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 3rem;
	line-height: 44px;
	cursor: pointer;
}

.ytShorts__modalLink {
	color: #fff;
	font-size: 1.4rem;
	text-decoration: underline;
}

.ytShorts__modalLink:hover {
	color: #fff;
}

@media screen and (max-width: 1000px) {
	.ytShorts__body {
		padding: 1.6rem 0 6rem;
	}

	.ytShorts__body .__inner {
		padding: 0 16px;
	}

	.ytShorts__intro {
		flex-direction: column;
		align-items: stretch;
		gap: 1.6rem;
		margin-bottom: 2.4rem;
	}

	.ytShorts__lead {
		font-size: 1.4rem;
		line-height: 1.8;
	}

	.ytShorts__pcBr {
		display: none;
	}

	.ytShorts__subscribe {
		justify-content: center;
	}

	.ytShorts__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem 1.2rem;
	}

	.ytShorts__channel {
		grid-template-columns: 1fr;
		gap: 1.2rem;
		margin-top: 4rem;
	}

	/* スマホは閉じるボタンを動画の下に */
	.ytShorts__close {
		position: static;
		order: 3;
	}
}

@media screen and (max-width: 600px) {
	.ytShorts__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ytShorts__title {
		font-size: 1.3rem;
	}

	.ytShorts__moreBtn {
		width: 100%;
		min-width: 0;
	}
}
