@charset "utf-8";

@media print {
	/* 余白と用紙サイズ：A4縦・12mm余白（必要に応じて調整） */
	@page {
		size: A4 portrait;
		margin: 12mm;
	}
	/* 全体の基本リセット */
	html, body {
		background: #fff !important;
		color: #000 !important;
		-webkit-print-color-adjust: exact; /* Chrome系 */
		print-color-adjust: exact; /* 標準 */
	}
	/* 画面専用UIを隠す（必要なものを追加） */
	.no-print, nav, .site-header, .site-footer, .btn, .button, .cookie-banner, video, iframe, .sticky, .fixed, .ads, .share, .pagination {
		display: none !important;
	}
	/* 逆に印刷でだけ表示 */
	.only-print {
		display: block !important;
	}
	/* レイアウトの安定化 */
	* {
		box-shadow: none !important;
		text-shadow: none !important;
	}
	img, svg {
		max-width: 100% !important;
		height: auto !important;
	}
	a {
		color: inherit !important;
		text-decoration: none !important;
	}
	/* リンク先URLを本文に出したい場合（長すぎるなら外す） */
	a[href^="http"]:after {
		content: " ("attr(href) ")";
		font-size: 90%;
		word-break: break-all;
	}
	/* 見出しや図表での改ページ制御 */
	h1, h2, h3 {
		break-after: avoid-page;
		page-break-after: avoid;
	}
	.section, .card, figure, pre, blockquote, table {
		break-inside: avoid;
		page-break-inside: avoid;
	}
	/* 表はヘッダ/フッタをページごとに繰り返し */
	thead {
		display: table-header-group;
	}
	tfoot {
		display: table-footer-group;
	}
	tr, td, th {
		break-inside: avoid;
	}
	/* アニメーション停止 */
	*, *:before, *:after {
		animation: none !important;
		transition: none !important;
	}
	/* 余白が詰まりがちな要素を少し整える */
	p, li {
		orphans: 3;
		widows: 3;
	} /* 行頭/行末の“孤児/寡婦”対策 */

	a[href]:after {
		display: none;
	}
}

