/*
 * Civil data adapter for the criminal-renewal subpage layouts.
 * Loaded after the civil design system so the copied page geometry remains exact.
 */
.bk-civil-renewal:is(.field_of_work, .case_board, .news, .youtube_board, .qna, .location, .inquiry, .inquiry_write) .content_wrap > .bh_wrap,
.bk-civil-renewal:is(.field_of_work, .case_board, .news, .youtube_board, .qna, .location, .inquiry, .inquiry_write) #content,
.bk-civil-renewal:is(.field_of_work, .case_board, .news, .youtube_board, .qna, .location, .inquiry, .inquiry_write) .content_inner {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding-right: 0 !important;
	padding-left: 0 !important;
}

.bk-civil-renewal:is(.field_of_work, .case_board, .news, .youtube_board, .qna, .location, .inquiry, .inquiry_write) #content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.bk-civil-renewal:is(.field_of_work, .case_board, .news, .youtube_board, .qna, .location, .inquiry, .inquiry_write) .bk-subpage-hero::after {
	display: none !important;
}

.bk-civil-renewal.field_of_work .bk-subpage-hero {
	background-image: url("/common/renewal/assets/subpage-heroes/field-pc.png") !important;
}

.bk-civil-renewal.case_board .bk-subpage-hero {
	background-image: url("/common/renewal/assets/subpage-heroes/success-pc.png") !important;
}

.bk-civil-renewal:is(.news, .youtube_board) .bk-subpage-hero {
	background-image: url("/common/renewal/assets/subpage-heroes/media-pc.png") !important;

}

.bk-civil-renewal.qna .bk-subpage-hero {
	background-image: url("/common/renewal/assets/subpage-heroes/faq-pc.png") !important;
}

.bk-civil-renewal.location .bk-subpage-hero {
	background-image: url("/common/renewal/assets/subpage-heroes/location-pc.png") !important;
}

.bk-civil-renewal:is(.inquiry, .inquiry_write) .bk-subpage-hero {
	background-image: url("/common/renewal/assets/subpage-heroes/consulting-pc.png") !important;
}

/* PC subpage contract: the first content starts exactly 100px below breadcrumb. */
@media (min-width: 1025px) {
	.bk-civil-renewal:is(.field_of_work, .case_board, .news, .youtube_board, .qna, .location, .inquiry, .inquiry_write, .tos, .privacy)
	.bk-subpage-breadcrumb.bk-civil-subpage-breadcrumb {
		margin-bottom: 72px !important;
	}

	/* The success list previously made this gap with the search block's own
	 * top margin. Keep the spacing on the common breadcrumb instead so list
	 * and detail views obey the same 100px rule at every PC viewport width. */
	.bk-civil-renewal.case_board:not(.has_document) .success-renewal__search {
		margin-top: 0 !important;
	}

	.bk-civil-renewal.case_board:not(.has_document) .bk-subpage-breadcrumb.bk-civil-subpage-breadcrumb {
		margin-bottom: 50.4px !important;
	}

	/* The field page already receives the shared 100px from its breadcrumb.
	 * Its legacy page padding otherwise pushes the first visible tab to 200px. */
	.bk-civil-renewal.field_of_work .civil-field-detail {
		padding-top: 0 !important;
	}

	/* Keep the section's designed inner padding, but remove the inherited
	 * lawyer-success outer margin that duplicated the top whitespace. */
	.bk-civil-renewal.field_of_work .civil-field-detail__success.lawyer_renewal__success {
		margin-top: 0 !important;
	}

	/* Two exact text lines (14px × 1.4 × 2). The former 43px box exposed
	 * the top edge of a third line even though line-clamp was set to two. */
	.bk-civil-renewal.field_of_work .civil-field-detail__success-list .lawyer_renewal__case-body p {
		height: calc(39.2 / 1920 * 100vw) !important;
		min-height: calc(39.2 / 1920 * 100vw) !important;
		max-height: calc(39.2 / 1920 * 100vw) !important;
		display: -webkit-box !important;
		overflow: hidden !important;
		-webkit-box-orient: vertical !important;
		-webkit-line-clamp: 2 !important;
	}

	/* Four cards + three gaps fit inside the 1400px viewport with a deliberate
	 * 1px safety remainder, avoiding fractional border clipping at the right. */
	.bk-civil-renewal.field_of_work .civil-field-detail__success-list .lawyer_renewal__case {
		width: calc((1400 / 1920 * 100vw - 3 * (30.666667 / 1920 * 100vw) - 1px) / 4) !important;
		flex-basis: calc((1400 / 1920 * 100vw - 3 * (30.666667 / 1920 * 100vw) - 1px) / 4) !important;
	}

	.bk-civil-renewal.field_of_work .civil-field-detail__success-list :is(
		.lawyer_renewal__case-media,
		.lawyer_renewal__case-meta,
		.lawyer_renewal__case-image,
		.lawyer_renewal__case-body,
		.lawyer_renewal__case-body p,
		.lawyer_renewal__case-lawyer
	) {
		width: 100% !important;
	}

	/* Measure the visible FAQ heading, not the transparent intro wrapper. */
	.bk-civil-renewal.qna .civil-faq-intro {
		padding-top: 0 !important;
	}

	.bk-civil-renewal.youtube_board.has_document .content_header_wrap,
	.bk-civil-renewal.inquiry.has_document .content_header {
		margin-top: 0 !important;
	}

	.bk-civil-renewal:is(.tos, .privacy) #content {
		padding-top: 0 !important;
	}

	.bk-civil-renewal:is(.tos, .privacy) .content_inner > h1:first-child {
		margin-top: 0 !important;
	}
}

.bk-civil-renewal:is(.case_board, .news, .youtube_board, .qna) #board_list,
.bk-civil-renewal:is(.case_board, .news, .youtube_board, .qna) #board_list.board_list {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
}

.bk-civil-renewal:is(.case_board, .news, .youtube_board, .qna) .list_footer > .tool_wrap,
.bk-civil-renewal:is(.case_board, .news, .youtube_board, .qna) .list_footer_html {
	display: none !important;
}

.bk-civil-renewal:is(.case_board, .news, .youtube_board, .qna) .list_footer {
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
}

.bk-civil-renewal .civil-exact-pagination {
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
}

.bk-civil-renewal .civil-exact-pagination > div {
	display: contents;
}

.bk-civil-renewal .civil-exact-pagination a,
.bk-civil-renewal .civil-exact-pagination strong {
	display: flex;
	flex: 0 0 auto !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
	background: #fff;
	color: #000 !important;
	font-style: normal;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
}

.bk-civil-renewal .civil-exact-pagination strong.active,
.bk-civil-renewal .civil-exact-pagination a.is-active {
	background: #005352;
	color: #fff !important;
}

.bk-civil-renewal .civil-exact-pagination a.is-disabled {
	opacity: .45;
	pointer-events: none;
}

.bk-civil-renewal .civil-exact-pagination .prev_wrap a:first-child,
.bk-civil-renewal .civil-exact-pagination .next_wrap a:last-child {
	display: none;
}

.bk-civil-renewal .success-renewal__lawyer-detail {
	white-space: nowrap;
}

.bk-civil-renewal.location .bk-subpage-breadcrumb {
	margin-bottom: calc(100 / 1920 * var(--bk-subpage-pc-vw, 100vw));
}

.civil-location-exact .location-renewal__contacts a {
	color: inherit;
	text-decoration: none;
}

.civil-location-exact .location-renewal__map {
	position: relative;
	overflow: hidden;
}

.civil-location-exact__fallback {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	background: #eef4f7;
	color: #172240 !important;
	font-weight: 600;
	text-decoration: none;
}

.civil-location-exact__marker {
	width: 61px;
	height: 62px;
}

.civil-location-exact__marker img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.civil-field-exact__practice {
	box-sizing: border-box;
	width: min(calc(100% - 80px), calc(1600 / 1920 * var(--bk-subpage-pc-vw, 100vw)));
	margin: 0 auto;
	padding: calc(120 / 1920 * var(--bk-subpage-pc-vw, 100vw)) 0;
	border-bottom: 1px solid #d4d4d4;
}

.civil-field-exact__practice > h2,
.civil-field-exact__practice > p {
	margin: 0;
}

.civil-field-exact__practice > h2 {
	font-size: calc(38 / 1920 * var(--bk-subpage-pc-vw, 100vw));
	font-weight: 600;
	line-height: 1.4;
}

.civil-field-exact__practice > p {
	margin-top: calc(20 / 1920 * var(--bk-subpage-pc-vw, 100vw));
	font-size: calc(24 / 1920 * var(--bk-subpage-pc-vw, 100vw));
	line-height: 1.6;
}

.civil-field-exact__practice .practice_item_box {
	margin-top: calc(40 / 1920 * var(--bk-subpage-pc-vw, 100vw));
}

@media (min-width: 1025px) {
	.bk-civil-renewal .civil-exact-pagination {
		width: calc(250 / 1920 * var(--bk-subpage-pc-vw, 100vw));
		gap: calc(6 / 1920 * var(--bk-subpage-pc-vw, 100vw)) !important;
		margin: calc(120 / 1920 * var(--bk-subpage-pc-vw, 100vw)) auto 0 !important;
	}

	.bk-civil-renewal .civil-exact-pagination a,
	.bk-civil-renewal .civil-exact-pagination strong {
		flex-basis: calc(26 / 1920 * var(--bk-subpage-pc-vw, 100vw)) !important;
		width: calc(26 / 1920 * var(--bk-subpage-pc-vw, 100vw)) !important;
		min-width: calc(26 / 1920 * var(--bk-subpage-pc-vw, 100vw));
		max-width: calc(26 / 1920 * var(--bk-subpage-pc-vw, 100vw));
		height: calc(25 / 1920 * var(--bk-subpage-pc-vw, 100vw)) !important;
		border: calc(.5 / 1920 * var(--bk-subpage-pc-vw, 100vw)) solid #94969d !important;
		font-size: calc(12 / 1920 * var(--bk-subpage-pc-vw, 100vw));
	}
}

@media (max-width: 1024px) {
	.bk-civil-renewal .content_footer,
	.bk-civil-renewal .content_footer_html { display:none !important; }

	.civil-location-exact__marker {
		width: calc(45 / 390 * 100vw);
		height: calc(46 / 390 * 100vw);
	}

	.bk-civil-renewal.field_of_work .bk-subpage-hero {
		background-image: url("/common/renewal/assets/subpage-heroes/field-mobile.png") !important;
	}

	.bk-civil-renewal.case_board .bk-subpage-hero {
		background-image: url("/common/renewal/assets/subpage-heroes/success-mobile.png") !important;
	}

	.bk-civil-renewal:is(.news, .youtube_board) .bk-subpage-hero {
		background-image: url("/common/renewal/assets/subpage-heroes/media-mobile.png") !important;
	}

	.bk-civil-renewal.qna .bk-subpage-hero {
		background-image: url("/common/renewal/assets/subpage-heroes/faq-mobile.png") !important;
	}

	.bk-civil-renewal.location .bk-subpage-hero {
		background-image: url("/common/renewal/assets/subpage-heroes/location-mobile.png") !important;
	}

	.bk-civil-renewal:is(.inquiry, .inquiry_write) .bk-subpage-hero {
		background-image: url("/common/renewal/assets/subpage-heroes/consulting-mobile.png") !important;
	}

	.bk-civil-renewal .civil-exact-pagination {
		width: calc(250 / 390 * 100vw);
		gap: calc(6 / 390 * 100vw) !important;
		margin: calc(40 / 390 * 100vw) auto 0 !important;
	}

	.bk-civil-renewal .civil-exact-pagination a,
	.bk-civil-renewal .civil-exact-pagination strong {
		flex-basis: calc(26 / 390 * 100vw) !important;
		width: calc(26 / 390 * 100vw) !important;
		min-width: calc(26 / 390 * 100vw);
		max-width: calc(26 / 390 * 100vw);
		height: calc(25 / 390 * 100vw) !important;
		border: calc(.5 / 390 * 100vw) solid #94969d !important;
		font-size: calc(12 / 390 * 100vw);
	}

	.civil-field-exact__practice {
		display: flex;
		width: calc(350 / 390 * 100vw);
		margin: calc(40 / 390 * 100vw) auto 0;
		padding: calc(20 / 390 * 100vw) calc(10 / 390 * 100vw);
		flex-direction: column;
		align-items: center;
		border: 0;
		border-radius: calc(20 / 390 * 100vw);
		background: #f4f9ff;
	}

	.civil-field-exact__practice > h2 {
		font-size: calc(26 / 390 * 100vw);
		line-height: 1.4;
	}

	.civil-field-exact__practice > p {
		width: calc(330 / 390 * 100vw);
		margin-top: calc(15 / 390 * 100vw);
		font-size: calc(14 / 390 * 100vw);
		line-height: 1.5;
		text-align: center;
	}

	.civil-field-exact__practice .practice_item_box {
		width: calc(330 / 390 * 100vw);
		margin-top: calc(25 / 390 * 100vw);
	}
}
