/* ===== サービス内容ページ専用 (.page-service スコープ) ===== */

/* 01–03: 交互メディア＋テキスト */
.rail-media {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(28px, 4vw, 48px);
	align-items: start;
}
.rail-media--photo-left {
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}
.rail-media__body { min-width: 0; }
.rail-media__body > h2:first-child { margin-top: 0; }
.rail-media__visual {
	margin: 0;
	border-radius: 4px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--c-bg-alt);
}
.rail-media__visual img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
@media (max-width: 900px) {
	.rail-media,
	.rail-media--photo-left {
		grid-template-columns: 1fr;
		gap: clamp(20px, 3vw, 28px);
	}
	.rail-media__visual {
		order: -1;
		position: static;
		aspect-ratio: 16 / 10;
		max-width: 36rem;
	}
}

/* 見出し脇の日本語フェーズラベル（過去を知る 等） */
.page-service .svc-phase-jp {
	font-size: .58em;
	color: var(--c-green);
	letter-spacing: .06em;
	margin-left: .3em;
	vertical-align: middle;
}

/* 各サービスの項目リスト（先頭の罫線・余白を素直に） */
.page-service .page-service__items {
	border-top: none;
	padding-top: 0;
}

/* 「こんな先生に」ブロック */
.page-service .page-service__fit {
	margin-top: clamp(26px, 3.5vw, 40px);
	padding: clamp(20px, 2.6vw, 28px) clamp(22px, 3vw, 32px);
	background: var(--c-bg-alt);
	border-left: 2px solid var(--c-green);
}
.page-service .page-service__fit-label {
	display: inline-block;
	font-size: 10.5px;
	letter-spacing: .22em;
	color: var(--c-green);
	font-weight: 700;
	margin-bottom: 9px;
}
.page-service .page-service__fit p {
	margin: 0;
	font-size: var(--fz-sm);
	line-height: 1.95;
	color: var(--c-ink-2);
}

/* 04 プランと対応範囲：比較マトリクス */
.page-service .price-table-wrap {
	margin-top: clamp(12px, 2vw, 20px);
	border-radius: 12px;
	overflow-x: auto;
	overflow-y: hidden;
	max-width: 100%;
	contain: inline-size;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--c-line-2);
	background: #fff;
	box-shadow: 0 4px 24px rgba(30, 39, 97, .07);
}

.page-service .page-service__matrix {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	min-width: 520px;
	background: #fff;
}

.page-service .page-service__matrix th,
.page-service .page-service__matrix td {
	padding: 1rem 1.1rem;
	border-bottom: 1px solid var(--c-line);
	vertical-align: middle;
}

/* ヘッダー行（グローバル .price-table .col-reco の tint 上書きを防ぐ） */
.page-service .page-service__matrix thead th {
	background: var(--c-navy) !important;
	color: #fff !important;
	font-family: var(--f-sans);
	font-weight: 500;
	font-size: var(--fz-sm);
	letter-spacing: .05em;
	padding-block: 1.05rem;
	box-shadow: none !important;
	border-bottom: none;
}

.page-service .page-service__matrix thead th:first-child {
	text-align: left;
	font-size: var(--fz-xs);
	font-weight: 400;
	color: rgba(255, 255, 255, .72) !important;
	letter-spacing: .1em;
	width: 34%;
	border-radius: 11px 0 0 0;
}

.page-service .page-service__matrix thead th:last-child {
	border-radius: 0 11px 0 0;
}

.page-service .page-service__matrix thead th.col-reco {
	background: var(--c-green) !important;
	color: #fff !important;
	border: none !important;
	position: relative;
}

.page-service .page-service__matrix thead th.col-reco::after {
	content: "おすすめ";
	display: block;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: .14em;
	margin-top: 4px;
	opacity: .92;
}

/* ボディ行 */
.page-service .page-service__matrix tbody tr {
	background: transparent;
}

.page-service .page-service__matrix tbody tr:last-child th,
.page-service .page-service__matrix tbody tr:last-child td {
	border-bottom: none;
}

.page-service .page-service__matrix tbody th[scope="row"] {
	background: #fff;
	font-family: var(--f-serif);
	font-weight: 500;
}

.page-service .page-service__matrix tbody tr:nth-child(even) th[scope="row"] {
	background: var(--c-bg-alt);
}

.page-service .page-service__matrix tbody td:not(.col-reco) {
	background: #fff;
	text-align: center;
}

.page-service .page-service__matrix tbody tr:nth-child(even) td:not(.col-reco) {
	background: var(--c-bg-alt);
}

/* おすすめ列（tbody のみ tint — thead は上でネイビー/グリーン固定） */
.page-service .page-service__matrix tbody .col-reco {
	background: var(--c-green-tint) !important;
	box-shadow: none !important;
	border-left: 2px solid var(--c-green);
	border-right: 2px solid var(--c-green);
	text-align: center;
}

.page-service .page-service__matrix tbody tr:last-child .col-reco {
	border-bottom: 2px solid var(--c-green);
}

.page-service .page-service__matrix th[scope="row"] {
	font-size: var(--fz-body-2);
	color: var(--c-navy);
}

.page-service .page-service__matrix th[scope="row"] small {
	display: block;
	font-family: var(--f-sans);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: .04em;
	color: var(--c-green);
	margin-top: 4px;
}

.page-service .page-service__matrix thead th:not(:first-child) {
	text-align: center;
}

.page-service .page-service__matrix .mark {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	font-size: var(--fz-sm);
	line-height: 1;
	border-radius: 50%;
}

.page-service .page-service__matrix .mark--on {
	color: var(--c-green);
	background: #fff;
	border: 2px solid var(--c-green);
	font-weight: 700;
}

.page-service .page-service__matrix .mark--off {
	color: var(--c-line-4);
	background: transparent;
	border: none;
	font-size: 17px;
	font-weight: 300;
	width: auto;
	height: auto;
}

/* おすすめ列ヘッダー上の角丸 */
.page-service .page-service__matrix thead th.col-reco:first-of-type {
	border-radius: 0;
}

.page-service .price-table-wrap + .mt-block {
	margin-top: clamp(24px, 4vw, 36px);
}

/* 05 サービスの流れ：5ステップ用にカラムを調整 */
.page-service .page-service__flow .flow__grid {
	grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1024px) {
	.page-service .rail__spine {
		min-width: 0;
		overflow-x: hidden;
	}
	.page-service .price-table-wrap {
		width: 100%;
		min-width: 0;
	}
	.page-service .page-service__flow .flow__grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 560px) {
	.page-service .page-service__flow .flow__grid {
		grid-template-columns: 1fr;
	}
	.page-service .price-table-wrap {
		border-radius: 10px;
		box-shadow: inset -14px 0 14px -14px rgba(30, 39, 97, .1), 0 2px 16px rgba(30, 39, 97, .06);
	}
	.page-service .page-service__matrix {
		min-width: 480px;
	}
	.page-service .page-service__matrix th,
	.page-service .page-service__matrix td {
		padding: .85rem .75rem;
	}
	.page-service .page-service__matrix thead th {
		font-size: var(--fz-sm);
		padding-block: .9rem;
	}
	.page-service .page-service__matrix th[scope="row"] {
		font-size: var(--fz-sm);
	}
}
