.anzai-gallery {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: clamp(16px, 2.2vw, 34px);
}

.anzai-gallery__item {
	grid-column: span 4;
	margin: 0;
}

.anzai-gallery__item[hidden] {
	display: none !important;
}

.anzai-gallery__item.is-gallery-revealed {
	animation: anzai-gallery-reveal .58s cubic-bezier(.2, .72, .2, 1) both;
}

@keyframes anzai-gallery-reveal {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: translateY(0); }
}

.anzai-gallery__image-button {
	display: block;
	width: 100%;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: #e9eeeb;
	color: inherit;
	cursor: zoom-in;
}

.anzai-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
}

.anzai-gallery__image-button:hover .anzai-gallery__image,
.anzai-gallery__image-button:focus-visible .anzai-gallery__image {
	transform: scale(1.025);
	filter: brightness(1.03);
}

.anzai-gallery__image-button:focus-visible {
	outline: 1px solid #00937f;
	outline-offset: 4px;
}

.anzai-gallery__caption {
	display: grid;
	gap: 5px;
	margin-top: 13px;
	padding-left: 13px;
	border-left: 1px solid rgba(0, 147, 127, 0.42);
}

.anzai-gallery__tag {
	justify-self: start;
	margin-bottom: 2px;
	padding: 4px 9px;
	border: 1px solid rgba(0, 147, 127, 0.2);
	border-radius: 999px;
	background: rgba(232, 247, 243, 0.88);
	color: #007f6e !important;
	font-family: 'Inter', 'Noto Sans JP', sans-serif;
	font-size: 10px !important;
	font-weight: 500;
	line-height: 1.2 !important;
	letter-spacing: 0.08em;
}

.anzai-gallery__caption strong {
	font-family: 'Noto Serif JP', serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.55;
}

.anzai-gallery__caption span {
	color: rgba(20, 31, 28, 0.62);
	font-size: 12px;
	line-height: 1.75;
}

.anzai-gallery--activities .anzai-gallery__item:first-child {
	grid-column: span 8;
	grid-row: span 2;
}

.anzai-gallery--activities .anzai-gallery__item:first-child .anzai-gallery__image {
	aspect-ratio: 16 / 10;
}

.anzai-gallery--activities .anzai-gallery__item:nth-child(2),
.anzai-gallery--activities .anzai-gallery__item:nth-child(3) {
	grid-column: span 4;
}

.anzai-gallery--goods {
	position: relative;
	z-index: 1;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(18px, 2vw, 30px);
	width: min(100%, 1220px);
	margin-right: auto;
	margin-left: auto;
	counter-reset: goods-item;
}

.anzai-gallery--goods .anzai-gallery__item:nth-child(n) {
	grid-column: auto;
}

.anzai-gallery--goods .anzai-gallery__item {
	position: relative;
	padding: 9px 9px 17px;
	border: 1px solid rgba(22, 45, 39, .08);
	background: rgba(255, 255, 255, .82);
	box-shadow: 0 16px 42px rgba(18, 45, 38, .055);
	counter-increment: goods-item;
	transition: transform .55s cubic-bezier(.2, .7, .2, 1), box-shadow .55s ease;
}

.anzai-gallery--goods .anzai-gallery__item::before {
	content: counter(goods-item, decimal-leading-zero);
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 2;
	color: rgba(0, 127, 110, .62);
	font-family: 'Noto Serif JP', serif;
	font-size: 16px;
	font-style: italic;
}

.anzai-gallery--goods .anzai-gallery__item:nth-child(4n + 2) {
	background: rgba(244, 249, 252, .92);
}

.anzai-gallery--goods .anzai-gallery__item:nth-child(4n + 3) {
	background: rgba(249, 247, 241, .92);
}

.anzai-gallery--goods .anzai-gallery__item:hover {
	transform: translateY(-5px);
	box-shadow: 0 22px 50px rgba(18, 45, 38, .085);
}

.anzai-gallery--goods .anzai-gallery__image-button {
	background: transparent;
}

.anzai-gallery--goods .anzai-gallery__image {
	aspect-ratio: 1 / 1;
	padding: clamp(16px, 1.7vw, 28px);
	object-fit: contain;
}

.anzai-gallery--goods .anzai-gallery__caption {
	margin: 14px 4px 0;
	padding-left: 0;
	border-left: 0;
}

.anzai-gallery--preview {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(12px, 1.4vw, 22px);
}

.anzai-gallery--preview .anzai-gallery__item {
	grid-column: auto;
}

.anzai-gallery--preview .anzai-gallery__item:first-child {
	grid-row: span 2;
}

.anzai-gallery--preview .anzai-gallery__item:first-child .anzai-gallery__image {
	aspect-ratio: 4 / 5;
}

.anzai-gallery--preview .anzai-gallery__image {
	aspect-ratio: 16 / 10;
}

.anzai-gallery--preview .anzai-gallery__caption {
	display: none;
}

.anzai-lightbox {
	width: min(92vw, 1500px);
	max-width: none;
	height: min(90vh, 980px);
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
}

.anzai-lightbox::backdrop {
	background: rgba(7, 15, 13, 0.9);
	backdrop-filter: blur(8px);
}

.anzai-lightbox__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 42px;
}

.anzai-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: calc(100% - 42px);
	object-fit: contain;
}

.anzai-lightbox__caption {
	margin: 14px 0 0;
	font-size: 12px;
	letter-spacing: 0.06em;
}

.anzai-lightbox__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.anzai-lightbox__close span {
	position: absolute;
	top: 18px;
	left: 10px;
	width: 17px;
	height: 1px;
	background: #fff;
}

.anzai-lightbox__close span:first-child { transform: rotate(45deg); }
.anzai-lightbox__close span:last-child { transform: rotate(-45deg); }

@media (max-width: 768px) {
	.anzai-gallery,
	.anzai-gallery--activities,
	.anzai-gallery--goods {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 12px;
		width: 100%;
	}

	.anzai-gallery .anzai-gallery__item,
	.anzai-gallery--activities .anzai-gallery__item:nth-child(n),
	.anzai-gallery--goods .anzai-gallery__item:nth-child(n) {
		grid-column: auto;
		grid-row: auto;
	}

	.anzai-gallery--activities .anzai-gallery__item:first-child {
		grid-column: 1 / -1;
	}

	.anzai-gallery__caption {
		margin-top: 10px;
		padding-left: 10px;
	}

	.anzai-lightbox__inner {
		padding: 46px 12px 18px;
	}
}

@media (min-width: 769px) and (max-width: 1080px) {
	.anzai-gallery--goods {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.anzai-gallery:not(.anzai-gallery--preview) {
		grid-template-columns: 1fr;
	}

	.anzai-gallery.anzai-gallery--goods {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.anzai-gallery--goods .anzai-gallery__item {
		padding: 7px 7px 13px;
	}

	.anzai-gallery--goods .anzai-gallery__item::before {
		top: 12px;
		left: 12px;
		font-size: 13px;
	}

	.anzai-gallery--goods .anzai-gallery__image {
		padding: 10px;
	}

	.anzai-gallery--goods .anzai-gallery__caption {
		margin-top: 10px;
	}

	.anzai-gallery--goods .anzai-gallery__caption strong {
		font-size: 12px;
	}

	.anzai-gallery--goods .anzai-gallery__tag {
		padding: 3px 7px;
		font-size: 9px !important;
	}

	.anzai-gallery--activities .anzai-gallery__item:nth-child(n),
	.anzai-gallery--goods .anzai-gallery__item:nth-child(n) {
		grid-column: auto;
	}
}

.page-template-page-activities .activities-goods-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(18px, 2vw, 30px);
	width: 100%;
	margin: 0;
	padding: 0;
	counter-reset: goods-item;
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__item:nth-child(n) {
	grid-column: auto;
	grid-row: auto;
	padding: 0;
	border: 1px solid rgba(7, 75, 72, .12);
	background: #fff;
	box-shadow: 0 16px 40px rgba(11, 59, 56, .06);
	counter-increment: goods-item;
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__item::before {
	content: counter(goods-item, decimal-leading-zero);
	top: 15px;
	left: 15px;
	padding: 5px 7px;
	background: #006b69;
	color: #fff !important;
	font-family: 'Inter', sans-serif;
	font-size: 10px;
	font-style: normal;
	font-weight: 600;
	line-height: 1;
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__image-button {
	position: relative;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: #f2f5f3;
	box-shadow: none;
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__item:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 46px rgba(11, 59, 56, .1);
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__image {
	aspect-ratio: 1 / 1;
	padding: clamp(17px, 2.3vw, 36px);
	background: #f2f5f3;
	object-fit: contain;
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__caption {
	min-height: 108px;
	margin: 0;
	padding: 16px 17px 19px;
	border: 0;
	background: #fff;
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__caption strong {
	font-family: 'Noto Sans JP', sans-serif;
	font-size: 15px;
	font-weight: 600;
}

.page-template-page-activities .activities-goods-grid .anzai-gallery__tag {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #007e6c !important;
	font-size: 10px !important;
	font-weight: 700;
}

@media (min-width: 769px) and (max-width: 1100px) {
	.page-template-page-activities .activities-goods-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.page-template-page-activities .activities-goods-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 12px;
	}

	.page-template-page-activities .activities-goods-grid .anzai-gallery__item:nth-child(n) {
		grid-column: auto;
		grid-row: auto;
	}
}

@media (max-width: 520px) {
	.page-template-page-activities .activities-goods-grid .anzai-gallery__caption strong {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.anzai-gallery__image,
	.anzai-gallery__item.is-gallery-revealed {
		animation: none;
		transition: none;
	}
}
