/*
 * Shared HAMILLE case presentation.
 *
 * This file owns presentation only. Clinic identity, taxonomy labels, medical
 * facts, fees, periods, risks, and WordPress data remain site-local.
 */
.case {
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line-soft, #e3edf5);
	border-radius: 6px;
	box-shadow: 0 14px 32px rgba(55, 81, 104, .08);
	color: var(--text-body, #4b535b);
}

.case_head {
	background: linear-gradient(180deg, #fff 0%, var(--surface-soft, #f8fbfd) 100%);
	text-align: center;
}

.case_num {
	margin: 0;
	padding: 8px 14px;
	background: var(--brand-blue, #0078d4);
	color: #fff;
	font-family: var(--font-latin, sans-serif);
	font-size: 1.25rem;
	font-weight: 500;
	letter-spacing: .12em;
	line-height: 1.45;
	text-align: center;
}

.case_cate,
.case .case_cate {
	margin: 0;
	padding: clamp(18px, 2.3vw, 28px) clamp(18px, 3vw, 32px) clamp(18px, 2.5vw, 30px);
	background: none;
	border: 0;
	border-radius: 0;
	color: var(--text-strong, #375168) !important;
	font-size: clamp(2.1rem, 2vw, 2.6rem);
	font-weight: 500;
	letter-spacing: .02em;
	line-height: 1.45;
	text-align: center;
}

.case_inner {
	width: auto;
	margin: 0;
	padding: 0 clamp(20px, 3vw, 32px) clamp(22px, 3vw, 34px);
	background: var(--surface-soft, #f8fbfd);
}

.case_media {
	position: static;
	top: auto;
	width: 100%;
	margin: 0 0 24px;
}

.case--card .case_media.one_img img,
.case--detail .case_media.one_img img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.case--card .case_media.one_img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 750 / 563;
	object-fit: cover;
	border: 1px solid var(--line-soft, #e3edf5);
	border-radius: 4px;
}

.case--detail .case_media.one_img img {
	width: 100%;
	object-fit: contain;
}

.case_media.flex {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
	gap: 0;
	align-items: center;
}

.case .before_img,
.case .after_img {
	display: grid;
	grid-template-rows: 1fr auto;
	position: relative;
	width: auto;
	margin: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line-soft, #e3edf5);
	border-radius: 4px;
	text-align: left;
}

.case .before_img img,
.case .after_img img {
	display: block;
	width: 100%;
	height: clamp(160px, 14vw, 210px);
	object-fit: cover;
}

.case_media_label {
	display: block;
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip-path: none;
	padding: 7px 10px;
	color: #fff;
	font-family: var(--font-latin, sans-serif);
	font-size: 1.2rem;
	font-weight: 500;
	letter-spacing: .12em;
	line-height: 1.25;
	white-space: normal;
}

.case_media .before_img .case_media_label {
	background: #59636d;
}

.case_media .after_img .case_media_label {
	background: var(--brand-blue, #0078d4);
}

.case_media .before_img::after,
.case_media .after_img::after {
	content: none;
}

.case_arrow {
	display: grid;
	place-items: center;
	width: auto;
	text-align: center;
}

.case_arrow img,
.case_arrow_mark {
	width: 18px;
	height: auto;
}

.case_guideline {
	display: grid;
	margin: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line-soft, #e3edf5);
	border-radius: 5px;
}

.case_guideline_row {
	display: grid;
	grid-template-columns: minmax(9.2em, 28%) minmax(0, 1fr);
	border-top: 1px solid var(--line-soft, #e3edf5);
}

.case_guideline_row:first-child {
	border-top: 0;
}

.case_guideline dt,
.case_guideline dd {
	margin: 0;
	font-family: var(--font-ja, sans-serif);
	letter-spacing: .01em;
}

.case_guideline dt {
	display: flex;
	align-items: center;
	padding: 14px 16px;
	background: var(--brand-blue-soft, #eef7ff);
	color: var(--hamille-blue-ink, #15345f);
	font-size: 1.35rem;
	font-weight: 500;
	line-height: 1.55;
}

.case_guideline dd {
	padding: 14px 16px;
	color: var(--text-body, #4b535b);
	font-size: 1.45rem;
	font-weight: 400;
	line-height: 1.78;
	border-left: 1px solid var(--line-soft, #e3edf5);
}

.case_guideline dd :where(p, ul, ol) {
	margin: 0;
}

.case_guideline dd :where(p, ul, ol) + :where(p, ul, ol) {
	margin-top: .65em;
}

.case_card_more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	color: var(--brand-blue, #0078d4);
	font-size: 1.35rem;
	font-weight: 500;
	letter-spacing: .04em;
	line-height: 1.5;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .24em;
}

.case_card_more::after {
	content: "";
	width: 7px;
	height: 7px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
}

.case--detail {
	margin-top: 28px;
}

.case--detail .case_head {
	display: grid;
	gap: clamp(10px, 1.2vw, 16px);
	padding-bottom: clamp(22px, 2.8vw, 34px);
	background: var(--surface-soft, #f8fbfd);
}

.case_single_title {
	margin-bottom: 12px !important;
	color: var(--text-strong, #375168) !important;
	font-size: clamp(2.6rem, 2.8vw, 3.4rem) !important;
	font-weight: 500 !important;
	line-height: 1.45 !important;
	letter-spacing: .02em !important;
}

.case_single_summary {
	margin: 0 0 26px;
	padding: 18px 20px;
	background: var(--surface-soft, #f8fbfd);
	border-left: 3px solid var(--brand-blue, #0078d4);
	color: var(--text-body, #4b535b);
	font-size: 1.55rem;
	font-weight: 400;
	line-height: 1.9;
	letter-spacing: .01em;
}

.case--detail .case_cate {
	width: auto;
	margin: 0 auto;
	padding: 0 clamp(20px, 4vw, 32px);
	background: transparent;
	border-radius: 0;
	color: var(--brand-blue, #0078d4) !important;
	font-size: clamp(2.2rem, 2.4vw, 3rem);
	font-weight: 700;
	line-height: 1.45;
}

.case.case--detail .case_cate,
.case.case--detail .case_cate :where(a, span, strong) {
	color: var(--brand-blue, #0078d4) !important;
}

.case--detail .case_inner {
	padding: 0 clamp(24px, 4vw, 40px) clamp(28px, 4vw, 44px);
}

.case--detail .case_media {
	margin-bottom: 30px;
}

.case--detail .before_img img,
.case--detail .after_img img {
	height: clamp(190px, 18vw, 260px);
}

.case--detail .case_guideline dt {
	font-size: 1.45rem;
}

.case--detail .case_guideline dd {
	font-size: 1.55rem;
	line-height: 1.85;
}

.term_nav {
	margin-bottom: 50px;
}

.term_nav_list {
	gap: 10px;
}

.term_nav_item a {
	display: block;
	padding: 5px 20px;
	background: var(--brand-blue, #0078d4);
	border-radius: 30px;
	color: #fff;
	font-size: 16px;
	font-weight: 400;
	text-align: center;
}

.term_nav_item a:hover,
.term_nav_item a:focus-visible {
	opacity: 1;
	background: var(--hamille-blue-ink, #15345f);
	color: #fff;
}

.case_list_child {
	display: flex;
	width: calc((100% - 30px) / 2);
	padding: 0;
	color: inherit;
	text-decoration: none;
}

body.home #case .archive_list,
body.post-type-archive-case .archive_list,
body.tax-case_category .archive_list {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 30px;
}

.case_list_child .case {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.case_list_child:hover .case,
.case_list_child:focus-visible .case {
	transform: translateY(-2px);
	border-color: rgba(21, 52, 95, .24);
	box-shadow: 0 18px 38px rgba(55, 81, 104, .12);
}

body.home .case_list_child .case_inner,
body.post-type-archive-case .case_list_child .case_inner,
body.tax-case_category .case_list_child .case_inner {
	display: flex;
	flex: 1;
	flex-direction: column;
}

body.post-type-archive-case .archive_wrap,
body.tax-case_category .archive_wrap {
	width: 1280px;
	max-width: calc(100% - 80px);
}

.home_case {
	padding: 0;
}

@media screen and (max-width: 750px) {
	.case {
		border-radius: 5px;
		box-shadow: 0 10px 24px rgba(55, 81, 104, .08);
	}

	.case_num {
		font-size: 1.15rem;
	}

	.case_cate,
	.case .case_cate {
		font-size: clamp(1.9rem, 5.8vw, 2.25rem);
		line-height: 1.48;
	}

	.case_single_title {
		font-size: clamp(2.2rem, 6.2vw, 2.6rem) !important;
	}

	.case_single_summary {
		margin-bottom: 22px;
		padding: 15px 16px;
		font-size: 1.45rem;
		line-height: 1.82;
	}

	.case_inner,
	.case--detail .case_inner {
		padding: 0 16px 22px;
	}

	.case_media.flex {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.case .before_img img,
	.case .after_img img,
	.case--detail .before_img img,
	.case--detail .after_img img {
		height: clamp(190px, 56vw, 254px);
	}

	.case_arrow {
		height: 20px;
	}

	.case_arrow img,
	.case_arrow_mark {
		transform: rotate(90deg);
	}

	.case_guideline_row {
		grid-template-columns: 1fr;
	}

	.case_guideline dt {
		padding: 11px 13px 7px;
		font-size: 1.3rem;
	}

	.case_guideline dd {
		padding: 0 13px 12px;
		border-left: 0;
		font-size: 1.42rem;
		line-height: 1.76;
	}

	.term_nav {
		margin-bottom: 30px;
	}

	.term_nav_item a {
		font-size: 14px;
	}

	.case_list_child {
		width: 100%;
	}

	body.post-type-archive-case .archive_wrap,
	body.tax-case_category .archive_wrap {
		width: calc(100% - 40px);
		max-width: calc(100% - 40px);
	}
}

@media screen and (max-width: 899px) {
	.home_case {
		width: 100%;
	}
}
