@charset "utf-8";
/* ---------------------------------------------------------
ブロックエディタ「画像ギャラリー」(custom-image_gallery)用スタイル。
tsuchiuraテーマの同ブロックの見た目・挙動(グリッド表示+タップで拡大表示)を踏襲しているが、
tsuchiuraはvw基準のrem値でサイズ指定しているため、kidsの固定px設計(html{font-size:100%}、
940px固定幅レイアウト)にそのまま流用できず、px値に置き換えて作成している。
--------------------------------------------------------- */
.image-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 20px 0;
	padding: 0;
	list-style: none;
}

.image-gallery.-clm-2 {
	grid-template-columns: repeat(2, 1fr);
}

.image-gallery.-clm-4 {
	grid-template-columns: repeat(4, 1fr);
}

.image-gallery > * {
	margin: 0;
	position: relative;
}

.image-gallery > * img {
	display: block;
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 6px;
}

.image-gallery > * a {
	display: block;
}

.image-gallery > * a img {
	cursor: zoom-in;
	transition: opacity .2s ease;
}

.image-gallery > * a:hover img {
	opacity: .85;
}

.image-gallery > * figcaption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 20px 10px 6px;
	background-image: linear-gradient(to top, rgba(0,0,0,.75), transparent);
	color: #fff;
	font-size: 92%;
	font-weight: bold;
}

@media screen and (max-width: 767px) {
	.image-gallery,
	.image-gallery.-clm-2,
	.image-gallery.-clm-4 {
		grid-template-columns: repeat(2, 1fr);
	}
	.image-gallery > * img {
		height: 110px;
	}
}

/* ---------------------------------------------------------
画像ポップアップ用モーダル(js/gallery-modal.jsが操作する)。
--------------------------------------------------------- */
.modal-dialog {
	display: none;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
}

.modal-dialog[open] {
	display: block;
}

.modal-dialog::backdrop {
	background: rgba(0, 0, 0, .85);
}

.modal-wrap {
	position: absolute;
	top: 50%;
	left: 50%;
	max-width: calc(100% - 40px);
	max-height: calc(100% - 40px);
	transform: translate(-50%, -50%);
}

.modal-content {
	text-align: center;
}

.modal-content img {
	display: block;
	max-width: 90vw;
	max-height: 80vh;
	margin: 0 auto;
	border-radius: 6px;
}

.modal-close {
	display: block;
	position: absolute;
	top: 0;
	right: 0;
	width: 36px;
	height: 36px;
	margin-left: auto;
	transform: translate(50%, -50%);
	border: none;
	border-radius: 50%;
	background: #3d1300;
	color: #fff;
	font-size: 18px;
	line-height: 34px;
	text-align: center;
	cursor: pointer;
}

.modal-close::before {
	content: "\00d7";
}

.modal-navigation {
	display: none;
}

.modal-prev,
.modal-next {
	position: absolute;
	top: 50%;
	width: 40px;
	height: 40px;
	transform: translateY(-50%);
	border: none;
	border-radius: 50%;
	background: rgba(61, 19, 0, .8);
	color: #fff;
	font-size: 20px;
	line-height: 38px;
	text-align: center;
	cursor: pointer;
}

.modal-prev {
	left: -20px;
}

.modal-prev::before {
	content: "\2039";
}

.modal-next {
	right: -20px;
}

.modal-next::before {
	content: "\203a";
}

.modal-prev:disabled,
.modal-next:disabled {
	opacity: .3;
	cursor: default;
}

.modal-counter {
	position: absolute;
	bottom: -28px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 13px;
}

html.modal-open {
	overflow: hidden;
}

@media screen and (max-width: 767px) {
	.modal-prev {
		left: 4px;
	}
	.modal-next {
		right: 4px;
	}
}
