/* Theme block margins reveal the parent background between sections.
 * Match that background without removing the spacing or touching the header.
 */
body.mihashi-home-page,
.mihashi-home-page .l-contents,
.mihashi-home-page .l-contents__inner,
.mihashi-home-page .l-main,
.mihashi-home-page .c-entry,
.mihashi-home-page .c-entry__body,
.mihashi-home-page .c-entry__content {
	background-color: #faf8f1;
}

/* Extend section backgrounds beyond Snow Monkey's centered content container.
 * Painting the background avoids 100vw scrollbar overflow and preserves text widths.
 */
.mihashi-home-news,
.mihashi-home-about,
.mihashi-home-assurance,
.mihashi-home-flow,
.mihashi-home-faq,
.mihashi-home-cemetery-pickup {
	box-shadow: 0 0 0 100vmax #faf8f1;
	clip-path: inset(0 -100vmax);
}

/* Keep the existing three cards, with room comparable to the original layout.
 * Only homepage cards are affected; the cemetery list retains its own sizing.
 */
.mihashi-home-cemetery-pickup .mihashi-home-cemetery-pickup__grid {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.mihashi-home-cemetery-pickup .mihashi-cemetery-card-common {
	width: 100%;
	min-width: 0;
	max-width: none;
}
@media (max-width: 1100px) {
	.mihashi-home-cemetery-pickup .mihashi-home-cemetery-pickup__grid {
		max-width: 800px;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
@media (max-width: 767px) {
	.mihashi-home-cemetery-pickup .mihashi-home-cemetery-pickup__grid {
		max-width: 390px;
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

/* Adjacent sections share one interval: 40 + 40px on desktop,
 * 24 + 24px on mobile, instead of stacking large independent paddings
 * and the theme's default block margins. Keep all inner content spacing.
 */
.mihashi-home-page :is(
	.mihashi-home-news,
	.mihashi-home-cemetery-pickup,
	.mihashi-home-about,
	.mihashi-home-assurance,
	.mihashi-home-flow,
	.mihashi-home-faq
) {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 40px;
	padding-bottom: 40px;
}
.mihashi-home-page .mihashi-home-hero {
	margin-bottom: 0 !important;
}
@media (max-width: 767px) {
	.mihashi-home-page :is(
		.mihashi-home-news,
		.mihashi-home-cemetery-pickup,
		.mihashi-home-about,
		.mihashi-home-assurance,
		.mihashi-home-flow,
		.mihashi-home-faq
	) {
		padding-top: 24px;
		padding-bottom: 24px;
	}
	/* The last section still clears the phone's bottom safe area. */
	.mihashi-home-page .mihashi-home-faq {
		padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	}
}
