@media print {
	@page { margin: 12mm; }

	html,
	body {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	/* 変数（PCと同値） */
	:root { --btnSize: 280px; }

	/* PC表示と同じレイアウト/配色を再現 */
	#contentsBody {
		width: calc(100% - 20px);
		padding-inline: 0;
	}

	img { vertical-align: bottom; }
	.ready_box { max-width: 980px; }

	.detail_unit {
		margin-top: 40px;
		background: #fff;
	}
	.detail_unit .content { margin-top: 20px; }

	/* 並びレイアウト */
	.flex_wrapper { display: flex !important; gap: 20px; }
	.img_block { width: 50%; text-align: center; }
	.img_block img { width: 100%; max-width: 480px; height: auto; }
	.txt_block { width: 50%; }

	/* ヘッダーブロック */
	.detail_unit .head_block { display: flex; gap: 20px; padding-bottom: 10px; border-bottom: 1px dotted #ccc; }
	.head_block h2 { margin: 0; display: inline-block; vertical-align: middle; font-size: 3.0rem; font-weight: bold; color: #444; }
	.detail_unit .head_block h2 a { display: flex; justify-content: center; align-items: center; gap: 10px; text-decoration: none; transition: none; color: #0155AD; border-bottom: 1px solid #0155AD; }
	.detail_unit .head_block h2 i { font-size: 1.8rem; color: #43a047; }

	/* 出走レース ボタン */
	.button-list a { font-weight: normal; }
	.button-list a .race_num { padding: 4px 8px; background-color: #eaf6fa; border-radius: 100vmax; font-size: 1.2rem; }
	.button-list a .opt { display: block; margin-top: 4px; }
	.button-list a .opt .dist { font-size: 1.1rem; }

	/* 血統表（Grid） */
	.horse_data .caution { display: none; width: 100%; margin-top: 10px; }
	.is-scrollable .caution { display: block; margin-top: 10px; }
	.bloodline-grid { display: grid !important; grid-template-columns: repeat(3, minmax(max-content, 1fr)); grid-auto-flow: column; gap: 2px; }
	.ancestor { display: grid; place-content: center start; background: #f9f9f9; padding: 0.5rem; }
	.ancestor .relation { display: block; font-size: 1.2rem; }
	.ancestor .ancestor_name { display: block; }
	.ancestor.sire, .ancestor.sire a { background-color: #EFF6FF; color: #235e96; }
	.ancestor.mare, .ancestor.mare a { background-color: #ffefef; color: #a51953; }
	.ancestor a { font-weight: bold; }
	.ancestor.first { grid-column:1 / span 1; grid-row: span 4; }
	.ancestor.second { grid-column:2 / span 1; grid-row: span 2; }
	.ancestor.third { grid-column:3 / span 1; grid-row: span 1; }
	.ancestor.third .row_1 { display: flex; align-items: center; gap: 0.5em; }

	/* 血統表（Grid未対応フォールバック） */
	@supports not (display: grid) {
		.bloodline-grid { column-count: 3; column-gap: 2px; }
		.ancestor { display: block; break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; width: 100%; }
		/* 背景色・配色はそのまま */
	}

	/* PICK UP エリア */
	.txt_block .balloon_top { position: relative; max-width: 120px; margin-bottom: 14px; padding: 4px; border-radius: 60px; background-color: #d13870; text-align: center; font-size: 1.2rem; font-weight: bold; color: #fff; z-index: 2; display: block; margin-block: 0; margin-left: 16px; }
	.txt_block .balloon_top::after { content: ""; position: absolute; bottom: 0; left: 50%; border-style: solid; border-width: 10px 0 0 10px; border-color: #d13870 transparent transparent; translate: -50% 100%; }
	.txt_block .txt { padding: 16px; padding-top: 32px; border-radius: 10px; margin-top: -12px; letter-spacing: 0.02em; background-color: #fef1f5; }

	/* 署名 */
	.signature { margin-top: 15px; text-align: right; font-size: 1.1rem; }

	/* バックナンバー */
	.horse_nav .panel .content { padding: 16px; font-size: 1.2rem; background-color: #F3F3F3; }
	.horse_nav .button-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(var(--btnSize), 1fr)); }
	.horse_nav .panel .content a { font-size: inherit; }
	.horse_nav .particle { padding-inline: 0.1em; font-size: 0.9em; }

	/* 画面特有の挙動解除 */
	html { scroll-behavior: auto !important; }
}
