/* #1892 Instagram のブロック（parts/_instagram_list.php）で足した見せ方
   縦長3列（tall3）・本文つき（caption）・流れ続ける帯（marquee）・1枚ずつ大きく（single）・モザイク（mosaic）・すき間なし3列（tight3）
   今までの見せ方（grid3・grid4・scroll・feature）は _instagram_list.php の中の style にある */

.lig-tall3, .lig-tight3 { max-width: 720px; }
.lig-caption, .lig-mosaic { max-width: 880px; }
.lig-single { max-width: 560px; }

/* 縦長3列：Instagram の縦長（4:5）のまま */
.lig-tall3 .lig-list { grid-template-columns: repeat(3, 1fr); }
.lig-tall3 .lig-ph { aspect-ratio: 4 / 5; }

/* すき間なし3列 */
.lig-tight3 .lig-list { grid-template-columns: repeat(3, 1fr); gap: 0; }

/* 本文つき：写真の下に投稿の文章を2行と日付 */
.lig-caption .lig-list { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
.lig-caption .lig-cap { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 14px; line-height: 1.6; }
.lig-caption .lig-cap:empty { display: none; }
.lig-caption .lig-date { display: block; margin-top: 4px; font-size: 12px; opacity: .7; }

/* モザイク：大きい1件・小さい4件・小さい2件・横長1件（PC 4列×3段。下の段は左に小さい2件、右に横長。管理画面の見本 loyOptionPreview と同じ形） */
.lig-mosaic .lig-list { grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; }
.lig-mosaic .lig-list li { display: flex; }
.lig-mosaic .lig-list a { flex: 1; display: flex; }
.lig-mosaic .lig-ph { flex: 1; aspect-ratio: auto; min-height: 0; }
.lig-mosaic .lig-list li:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.lig-mosaic .lig-list li:nth-child(8) { grid-column: span 2; }
.lig-mosaic .lig-list li:not(:nth-child(1)):not(:nth-child(8)) .lig-ph { aspect-ratio: 1 / 1; }
.lig-mosaic .lig-list li:nth-child(8) .lig-ph { aspect-ratio: 2 / 1; }

/* 流れ続ける帯：同じ並びを2回つなげて、左へ流し続ける。マウスを乗せると止まる */
.lig-marquee { max-width: none; overflow: hidden; }
.lig-marquee .lig-mq { display: flex; width: max-content; animation: lig-mq var(--lig-sec, 40s) linear infinite; }
.lig-marquee:hover .lig-mq, .lig-marquee:focus-within .lig-mq { animation-play-state: paused; }
.lig-marquee .lig-list { display: flex; gap: 6px; padding-right: 6px; }
.lig-marquee .lig-list li { flex: none; width: 220px; }
@keyframes lig-mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.lig-marquee { overflow-x: auto; }
	.lig-marquee .lig-mq { animation: none; }
	.lig-marquee .lig-list[aria-hidden] { display: none; }
}

/* 1枚ずつ大きく：横に送る。‹ › と点で選ぶ（js/lt-ig.js）。指で横に送ってもよい */
.lig-single .lig-list { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lig-single .lig-list::-webkit-scrollbar { display: none; }
.lig-single .lig-list li { flex: 0 0 100%; scroll-snap-align: start; }
.lig-single .lig-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.lig-single .lig-prev, .lig-single .lig-next { width: 40px; height: 40px; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; opacity: .6; padding: 0; }
.lig-single .lig-prev:hover, .lig-single .lig-next:hover { opacity: 1; }
.lig-single .lig-dots { display: flex; gap: 8px; }
/* 点はサイトのボタンの角（lt-style-adjust.css の html[data-lt-btn] .pblk button:not(…) !important）に合わせず、いつも丸。あちらより強い書き方にする */
.lig-single .lig-dots button { width: 10px; height: 10px; padding: 0; border: 1px solid currentColor; background: transparent; opacity: .5; cursor: pointer; }
html .lig.lig-single .lig-dots button[type] { border-radius: 50% !important; }
.lig-single .lig-dots button[aria-current] { background: currentColor; opacity: .9; }

@media (max-width: 767px) {
	.lig-caption .lig-list { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
	.lig-tight3 .lig-list { gap: 0; }
	.lig-mosaic .lig-list { grid-template-columns: repeat(2, 1fr); }
	.lig-mosaic .lig-list li:nth-child(1) .lig-ph { aspect-ratio: 1 / 1; }	/* 2列では横に並ぶものが無く、段の高さが決まらないため */
	.lig-marquee .lig-list li { width: 150px; }
	.lig-marquee .lig-list { gap: 3px; padding-right: 3px; }
}
