/* 使い方マニュアル（manual/ 以下の一覧・記事）のスタイル。body に .page-manual を付けて読み込む
 * 見出し・本文は common.css、ページタイトル・パンくずは page.css */

.page-manual {
	--mn-line: #d9eef9;   /* 水色の枠線 */
	--mn-border: #e6e6e6; /* グレーの枠線 */
	--mn-sub: #666;       /* 説明文の文字色 */
}

/*==================== 記事の一覧（TOP の MANUAL と同じ並び：画像 → タイトル + 説明文） ====================*/
.mn-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 32px;
	max-width: 1160px;
	margin: 56px auto 0;
	list-style: none;
}
/* 記事カード全体が1つのリンク（a の直下に p を置かない：旧CSSの「a > p::before」対策） */
.mn-entry {
	display: flex;
	flex-direction: column;
	gap: 12px;
	color: var(--sec-text);
}
.mn-entry__thumb img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--mn-border);
	border-radius: 12px;
	box-sizing: border-box;
	transition: opacity 0.2s;
}
.mn-entry:hover .mn-entry__thumb img {
	opacity: 0.8;
}
.mn-entry:focus-visible {
	outline: 3px solid var(--sec-blue);
	outline-offset: 4px;
}
.mn-entry__meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.mn-entry__title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.04em;
}
.mn-entry__text {
	color: var(--mn-sub);
	font-size: 14px;
	line-height: 1.8;
}

/*==================== 解決しない場合（よくある質問・お問い合わせ） ====================*/
.mn-help {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	max-width: 1160px;
	margin-inline: auto;
	list-style: none;
}
.mn-help__card {
	display: block;
	height: 100%;
	padding: 28px 32px;
	border: 1px solid var(--mn-line);
	border-radius: 16px;
	background: #fff;
	box-sizing: border-box;
	color: var(--sec-text);
	transition: border-color 0.2s;
}
.mn-help__card:hover {
	border-color: var(--sec-blue);
}
.mn-help__label {
	color: var(--sec-blue);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
}
.mn-help__title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
}
.mn-help__text {
	margin-top: 4px;
	color: var(--mn-sub);
	font-size: 14px;
	line-height: 1.7;
}

@media screen and (max-width: 900px) {
	.mn-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px 24px;
		margin-top: 40px;
	}
}
@media screen and (max-width: 600px) {
	.mn-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.mn-help {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
	.mn-help__card {
		padding: 20px 24px;
	}
}

/*==================== 記事ページ：ページタイトル ==================== */
.page-manual {
	--mn-tint: #eaf8ff; /* 水色の帯・目次の背景 */
}
.page-hero--article {
	min-height: 192px; /* 上下の余白と合わせて 272px */
}
.page-hero--article .page-hero__title {
	font-size: 36px;
	word-break: auto-phrase;
}

/*==================== 記事ページ：本文と目次の2カラム ==================== */
/* 旧CSSの section { overflow: hidden } が残っていると目次が追従しないので、ここだけ解除する */
.mn-detail {
	overflow: visible;
}
.mn-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 64px;
	align-items: start;
	max-width: 1160px;
	margin-inline: auto;
}
/* HTML では目次を本文より先に書く（SP で本文の上に出すため）。PC は右の列に置く */
.mn-side {
	position: sticky;
	top: 84px; /* スクロール中の固定ヘッダー（高さ68px）の下 */
	grid-column: 2;
	grid-row: 1;
	transition: top 0.3s;
}
/* スクロール中はヘッダーが隠れるので上に詰める */
.hHide .mn-side {
	top: 24px;
}
.mn-article {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
	font-size: 16px;
	line-height: 2;
	letter-spacing: 0.04em;
}

/*==================== 記事ページ：目次 ==================== */
.mn-toc {
	padding: 24px;
	border-radius: 12px;
	background: var(--mn-tint);
}
.mn-toc__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.9;
	letter-spacing: 0.08em;
	list-style: none;
}
.mn-toc__title::-webkit-details-marker {
	display: none;
}
.mn-toc__list {
	margin-top: 12px;
	border-left: 2px solid var(--mn-line);
}
.mn-toc__list a {
	display: block;
	margin-left: -2px;
	padding: 6px 0 6px 16px;
	border-left: 2px solid transparent;
	color: var(--sec-text);
	font-size: 14px;
	line-height: 1.6;
	transition: color 0.2s;
}
.mn-toc__list ol a {
	padding-left: 28px;
	color: var(--mn-sub);
	font-size: 13px;
}
.mn-toc__list a:hover {
	color: var(--sec-blue);
}
/* いま読んでいる見出し（manual.js が付ける） */
.mn-toc__list a.is-current {
	border-left-color: var(--sec-blue);
	color: var(--sec-blue);
	font-weight: 600;
}

/*==================== 記事ページ：本文のパーツ ==================== */
.mn-article__eyecatch {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}
.mn-article > p,
.mn-article section > p {
	margin-top: 20px;
}
.mn-article a {
	color: var(--sec-blue);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.mn-article a:hover {
	text-decoration: none;
}
.mn-article h2,
.mn-article h3 {
	scroll-margin-top: 24px;
}

/* この記事でわかること */
.mn-summary {
	margin-top: 32px;
	padding: 24px 32px;
	border: 2px solid var(--sec-blue);
	border-radius: 12px;
}
.mn-summary__title {
	color: var(--sec-blue);
	font-weight: 700;
}
.mn-summary ul {
	margin-top: 8px;
}
.mn-summary li {
	position: relative;
	padding-left: 28px;
	font-weight: 500;
}
.mn-summary li::before {
	content: "";
	position: absolute;
	top: 10px;
	left: 4px;
	width: 10px;
	height: 6px;
	border-bottom: 2px solid var(--sec-accent);
	border-left: 2px solid var(--sec-accent);
	rotate: -45deg;
}

/* h2：章 */
.mn-article h2 {
	position: relative;
	margin-top: 80px;
	padding: 4px 0 12px 20px;
	border-bottom: 1px solid var(--mn-border);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.04em;
}
.mn-article h2::before {
	content: "";
	position: absolute;
	top: 4px;
	bottom: 12px;
	left: 0;
	width: 6px;
	border-radius: 3px;
	background: var(--sec-blue);
}

/* h3：STEP */
.mn-article h3 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 56px;
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--mn-tint);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
}
.mn-step {
	flex-shrink: 0;
	padding: 2px 12px;
	border-radius: 999px;
	background: var(--sec-blue);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

/* h4：設定項目 */
.mn-article h4 {
	position: relative;
	margin-top: 40px;
	padding-left: 20px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
}
.mn-article h4::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 0;
	width: 10px;
	height: 10px;
	border: 3px solid var(--sec-accent);
	border-radius: 50%;
	box-sizing: border-box;
}

/* 画面の画像 */
.mn-figure {
	margin-top: 24px;
}
.mn-figure img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--mn-border);
	border-radius: 8px;
	box-sizing: border-box;
}
/* 画面の一部を切り出した小さい画像（表示幅は HTML の --w で指定） */
.mn-figure--fit img {
	width: min(var(--w), 100%);
}
.mn-figure figcaption {
	margin-top: 8px;
	color: var(--mn-sub);
	font-size: 13px;
	line-height: 1.6;
	text-align: center;
}

/* POINT・注意の囲み */
.mn-note {
	margin-top: 24px;
	padding: 20px 24px;
	border-left: 4px solid var(--sec-blue);
	border-radius: 8px;
	background: #f2faff;
	font-size: 15px;
	line-height: 1.8;
}
.mn-note__label {
	display: block;
	margin-bottom: 4px;
	color: var(--sec-blue);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
}
.mn-note--caution {
	border-left-color: var(--sec-orange);
	background: #fff6ee;
}
.mn-note--caution .mn-note__label {
	color: #e57a12;
}

/* 箇条書き */
.mn-bullets {
	margin-top: 16px;
	padding: 20px 28px;
	border-radius: 8px;
	background: #f7f9fa;
}
.mn-bullets li {
	position: relative;
	padding-left: 20px;
	font-size: 15px;
	line-height: 1.9;
}
.mn-bullets li::before {
	content: "";
	position: absolute;
	top: 11px;
	left: 2px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--sec-accent);
}

/* 表（狭い画面では枠の中で横スクロール） */
.mn-table-wrap {
	margin-top: 20px;
	overflow-x: auto;
}
.mn-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.7;
}
.mn-table th,
.mn-table td {
	padding: 12px 16px;
	border: 1px solid var(--mn-border);
	text-align: left;
	vertical-align: middle;
}
.mn-table th {
	font-weight: 600;
}
.mn-table thead th {
	background: var(--mn-tint);
}
.mn-table tbody th {
	background: #f7f9fa;
	white-space: nowrap;
}
.mn-table--spec tbody th {
	width: 216px;
}
.mn-result {
	font-weight: 600;
	white-space: nowrap;
}
.mn-result--yes {
	color: var(--sec-blue);
}
.mn-result--no {
	color: #e5534b;
}

/* 選択肢と説明の一覧 */
.mn-options {
	margin-top: 20px;
	border: 1px solid var(--mn-border);
	border-radius: 8px;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.7;
}
.mn-options__row {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
}
.mn-options__row + .mn-options__row {
	border-top: 1px solid var(--mn-border);
}
.mn-options dt {
	padding: 14px 20px;
	background: #f7f9fa;
	font-weight: 600;
}
.mn-options dd {
	padding: 14px 20px;
}

/* うまくいかないときのチェックリスト */
.mn-check {
	margin-top: 24px;
	padding: 24px 32px;
	border-radius: 12px;
	background: #f7f9fa;
}
.mn-check li {
	position: relative;
	padding-left: 32px;
	font-size: 15px;
}
.mn-check li + li {
	margin-top: 12px;
}
.mn-check li::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 0;
	width: 16px;
	height: 16px;
	border: 2px solid var(--sec-accent);
	border-radius: 4px;
	box-sizing: border-box;
}

/*==================== 記事ページ：関連マニュアル・前後の記事 ==================== */
.mn-after__inner {
	max-width: 1160px;
	margin-inline: auto;
}
.mn-after__title {
	font-size: 22px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.04em;
}
.mn-related {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin-top: 24px;
}
.mn-related a {
	display: block;
	color: var(--sec-text);
}
.mn-related img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--mn-border);
	border-radius: 8px;
	box-sizing: border-box;
	transition: opacity 0.2s;
}
.mn-related a:hover img {
	opacity: 0.8;
}
.mn-related__title {
	margin-top: 12px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.6;
}
.mn-pager {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	grid-template-areas: "prev index next";
	align-items: center;
	gap: 24px;
	margin-top: 56px;
	padding: 24px 0;
	border-block: 1px solid var(--mn-border);
}
.mn-pager__link {
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--sec-text);
}
.mn-pager__link--prev {
	grid-area: prev;
}
.mn-pager__link--next {
	grid-area: next;
	flex-direction: row-reverse;
	text-align: right;
}
.mn-pager__arrow {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: 1px solid var(--sec-blue);
	border-radius: 50%;
	color: var(--sec-blue);
	transition: background 0.2s, color 0.2s;
}
.mn-pager__arrow svg {
	width: 20px;
	height: 20px;
}
.mn-pager__link:hover .mn-pager__arrow {
	background: var(--sec-blue);
	color: #fff;
}
.mn-pager__label {
	display: block;
	color: var(--sec-blue);
	font-size: 12px;
	line-height: 1.6;
	letter-spacing: 0.08em;
}
.mn-pager__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.6;
}
.mn-pager__index {
	grid-area: index;
	padding: 10px 28px;
	border: 1px solid var(--sec-blue);
	border-radius: 999px;
	color: var(--sec-blue);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	transition: background 0.2s, color 0.2s;
}
.mn-pager__index:hover {
	background: var(--sec-blue);
	color: #fff;
}

@media screen and (max-width: 1100px) {
	.mn-layout {
		grid-template-columns: minmax(0, 1fr) 260px;
		gap: 40px;
	}
}
/* SP：1カラムにして、目次は本文の上に開閉式で置く */
@media screen and (max-width: 900px) {
	.page-hero--article {
		min-height: 120px;
	}
	.page-hero--article .page-hero__title {
		font-size: 24px;
		letter-spacing: 0.04em;
	}
	.mn-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
	.mn-side {
		position: static;
		grid-column: 1;
		grid-row: auto;
	}
	.mn-article {
		grid-column: 1;
		grid-row: auto;
	}
	.mn-toc {
		padding: 16px 20px;
	}
	.mn-toc__title {
		position: relative;
		cursor: pointer;
	}
	/* 開閉を示す印 */
	.mn-toc__title::after {
		content: "";
		position: absolute;
		top: 8px;
		right: 4px;
		width: 8px;
		height: 8px;
		border-right: 2px solid var(--sec-blue);
		border-bottom: 2px solid var(--sec-blue);
		rotate: 45deg;
		transition: rotate 0.2s;
	}
	.mn-toc[open] .mn-toc__title::after {
		rotate: -135deg;
		top: 12px;
	}
	.mn-article h2 {
		margin-top: 64px;
		font-size: 22px;
	}
	.mn-article h3 {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		margin-top: 40px;
		padding: 12px 16px;
		font-size: 18px;
	}
	.mn-summary,
	.mn-check {
		padding: 20px;
	}
	.mn-note {
		padding: 16px 20px;
	}
	.mn-bullets {
		padding: 16px 20px;
	}
	.mn-article h4 {
		font-size: 17px;
	}
	.mn-table {
		font-size: 14px;
	}
	.mn-table th,
	.mn-table td {
		padding: 10px 12px;
	}
	.mn-table--spec tbody th {
		width: auto;
	}
	.mn-related {
		gap: 16px;
	}
	.mn-pager {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas:
			"prev next"
			"index index";
		margin-top: 40px;
		gap: 20px 16px;
	}
	.mn-pager__index {
		justify-self: center;
	}
}
@media screen and (max-width: 600px) {
	.mn-options__row {
		grid-template-columns: minmax(0, 1fr);
	}
	.mn-options dt {
		padding: 10px 16px;
	}
	.mn-options dd {
		padding: 10px 16px;
	}
	.mn-related {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
	.mn-pager__link {
		align-items: flex-start;
		gap: 8px;
	}
	.mn-pager__arrow {
		width: 32px;
		height: 32px;
	}
	.mn-pager__title {
		font-size: 14px;
	}
}
