/* ==============================================
   Instagramフィード（自前取得版）
   旧Smash Balloon（Instagram Feed Pro）の見た目に合わせている
   ============================================== */
.p-igFeed {
	position: relative;
	padding: 0 5px;
}

.p-igFeed__link {
	position: relative;
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	color: #fff;
}

.p-igFeed__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.p-igFeed__svg {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
}

/* 動画の再生アイコン */
.p-igFeed__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 52px;
	line-height: 1;
	color: #fff;
	opacity: 0.9;
	filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.4));
	pointer-events: none;
}

/* 複数枚投稿のアイコン */
.p-igFeed__multi {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 24px;
	line-height: 1;
	color: #fff;
	filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.4));
	pointer-events: none;
}

/* ホバー時のオーバーレイ */
.p-igFeed__hover {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 14px 16px 12px;
	background-color: rgba(0, 0, 0, 0.6);
	text-align: center;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.p-igFeed__link:hover .p-igFeed__hover,
.p-igFeed__link:focus-visible .p-igFeed__hover {
	opacity: 1;
}

.p-igFeed__user {
	font-size: 12px;
	letter-spacing: 0.05em;
	opacity: 0.85;
}

.p-igFeed__caption {
	margin-top: 18px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.p-igFeed__more {
	display: block;
	line-height: 1;
}

.p-igFeed__bottom {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 12px;
}

.p-igFeed__date .p-igFeed__svg,
.p-igFeed__meta .p-igFeed__svg {
	margin-right: 6px;
}

.p-igFeed__meta {
	display: flex;
	gap: 14px;
}

.p-igFeed__ig {
	position: absolute;
	right: 10px;
	bottom: 10px;
	font-size: 18px;
	line-height: 1;
}

.p-igFeed__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 矢印（旧フィードと同じ半透明の白丸） */
.p-igFeed__arrow {
	position: absolute;
	top: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
	color: #000;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.3s ease;
}

.p-igFeed__arrow:hover,
.p-igFeed__arrow:focus-visible {
	background-color: rgba(255, 255, 255, 0.9);
}

.p-igFeed__arrow svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

.p-igFeed__arrow--prev {
	left: 0;
}

.p-igFeed__arrow--prev svg {
	transform: scaleX(-1);
}

.p-igFeed__arrow--next {
	right: 0;
}

.p-igFeed__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

/* ==============================================
   拡大表示（モーダル）
   旧Smash Balloonのライトボックスに合わせている
   ============================================== */
.is-igModalOpen {
	overflow: hidden;
}

.p-igModal {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: #fff;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.p-igModal::backdrop {
	background-color: rgba(0, 0, 0, 0.9);
}

.p-igModal__inner {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 16px;
	min-height: 100%;
	padding: 50px 16px;
}

.p-igModal__body {
	width: 100%;
	max-width: 600px;
}

.p-igModal__media {
	position: relative;
	display: block;
}

.p-igModal__img {
	display: block;
	width: 100%;
	max-height: calc(100vh - 160px);
	object-fit: contain;
	background-color: #000;
}

.p-igModal__play {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-size: 64px;
	color: #fff;
	background-color: rgba(0, 0, 0, 0.25);
}

.p-igModal__play[hidden] {
	display: none;
}

.p-igModal__playText {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.p-igModal__data {
	padding: 10px 4px 0;
}

.p-igModal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.p-igModal__user {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
}

.p-igModal__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
}

.p-igModal__close {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 6px;
	border: none;
	background: transparent;
	color: #fff;
	opacity: 0.7;
	cursor: pointer;
}

.p-igModal__close:hover,
.p-igModal__close:focus-visible {
	opacity: 1;
}

.p-igModal__caption {
	margin-top: 14px;
	font-size: 13px;
	line-height: 1.8;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.p-igModal__caption a {
	font-weight: 700;
	color: #fff;
}

.p-igModal__caption a:hover {
	text-decoration: underline;
}

.p-igModal__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 16px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}

.p-igModal__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	color: #fff;
}

.p-igModal__link:hover {
	text-decoration: underline;
}

.p-igModal__nav {
	position: sticky;
	top: calc(50vh - 30px);
	flex-shrink: 0;
	width: 44px;
	height: 60px;
	margin-top: calc(50vh - 80px);
	padding: 8px;
	border: none;
	background: transparent;
	color: #fff;
	opacity: 0.6;
	cursor: pointer;
}

.p-igModal__nav:hover,
.p-igModal__nav:focus-visible {
	opacity: 1;
}

.p-igModal__nav svg,
.p-igModal__close svg {
	width: 100%;
	height: 100%;
}

/* スマホ：矢印は画像の上に重ねる */
@media screen and (max-width: 767px) {
	.p-igModal__inner {
		position: relative;
		padding: 56px 12px 40px;
	}

	.p-igModal__nav {
		position: absolute;
		top: 56px;
		z-index: 1;
		width: 40px;
		height: 52px;
		margin: 0;
		margin-top: min(40vw, 30vh);
		background-color: rgba(0, 0, 0, 0.35);
		opacity: 0.9;
	}

	.p-igModal__nav--prev {
		left: 12px;
	}

	.p-igModal__nav--next {
		right: 12px;
	}

	.p-igModal__img {
		max-height: 70vh;
	}
}
