/*
 * 100年の歴史の個別ページ（新しい表示）。history.php が組み直した .jh-hist の中だけに効かせる。2026-11-09
 * 見本：.claude/projects/jihosha-history-design/history_design.css（担当者が確認したもの）を、サイトの中で使える形にしたもの。
 */
.jh-hist {
	--jh-hist-primary: var(--vk-color-primary, #8160fc);
	--jh-hist-primary-dark: var(--vk-color-primary-dark, #674dca);
	--jh-hist-ink: #222;
	--jh-hist-sub: #5f5f6b;
	--jh-hist-muted: #8a8a93;
	--jh-hist-line: #e6e4ee;
	--jh-hist-tint: #f6f5fb;
	color: var(--jh-hist-ink);
	font-size: 16px;
	line-height: 1.9;
}

/* サイトの見出し・一覧の飾り（線・背景・番号・記号）を打ち消す */
.entry-body .jh-hist h1,
.entry-body .jh-hist h2,
.entry-body .jh-hist h3 {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	letter-spacing: normal;
	text-align: left;
}
.entry-body .jh-hist h1::before,
.entry-body .jh-hist h1::after,
.entry-body .jh-hist h2::before,
.entry-body .jh-hist h2::after,
.entry-body .jh-hist h3::before,
.entry-body .jh-hist h3::after {
	content: none;
	display: none;
}
.entry-body .jh-hist ol,
.entry-body .jh-hist dl {
	margin: 0;
	padding: 0;
	list-style: none;
}
.entry-body .jh-hist p {
	margin: 0;
}

/* 1. 年号の見出し */
.jh-hist__head { padding: 16px 0 40px; border-bottom: 1px solid var(--jh-hist-line); }
.jh-hist__head-top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.entry-body .jh-hist .jh-hist__eyebrow { color: var(--jh-hist-primary); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; }
.entry-body .jh-hist .jh-hist__head-pager { color: var(--jh-hist-sub); font-size: 13px; white-space: nowrap; }
.jh-hist__head-pager a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--jh-hist-line); }
.jh-hist__head-pager a + a { margin-left: 20px; }
.jh-hist__head-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.entry-body .jh-hist .jh-hist__title { margin-top: 14px; font-size: 48px; line-height: 1.25; font-weight: 700; letter-spacing: 0.02em; }
.entry-body .jh-hist .jh-hist__years { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px; }
.jh-hist__ad { font-size: 30px; font-weight: 600; letter-spacing: 0.02em; }
.jh-hist__jp { color: var(--jh-hist-sub); font-size: 15px; }

/* この年の役員・従業員数 */
.jh-hist__facts { min-width: 300px; padding: 4px 0 4px 28px; border-left: 1px solid var(--jh-hist-line); font-size: 14px; line-height: 1.7; }
.entry-body .jh-hist .jh-hist__facts-label { margin-bottom: 6px; color: var(--jh-hist-muted); font-size: 12px; letter-spacing: 0.1em; }
/* 役員の表：元の表の行・マスのまま（1 マスに 2 行以上入る年もあるので、左右の行の高さをそろえる） */
.entry-body .jh-hist .jh-hist__officers,
.entry-body .jh-hist .jh-hist__officers td { width: auto; margin: 0; border: 0; background: none; }
.jh-hist__officers { border-collapse: collapse; font-size: 14px; line-height: 1.9; }
.entry-body .jh-hist .jh-hist__officers td { padding: 0; vertical-align: top; text-align: left; }
.jh-hist__officers-name { font-weight: 600; }
.entry-body .jh-hist .jh-hist__officers td.jh-hist__officers-note { padding-left: 20px; color: var(--jh-hist-primary-dark); white-space: nowrap; }
.jh-hist__officers img { display: inline-block; width: auto !important; height: 1em; vertical-align: -0.1em; }
.entry-body .jh-hist .jh-hist__staff { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--jh-hist-line); }
.jh-hist__staff strong { margin: 0 2px; font-size: 20px; font-weight: 600; }

/* 2. この年を表す一文と写真 */
.jh-hist__lead { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; padding: 64px 0; }
.jh-hist__lead--nofig { grid-template-columns: minmax(0, 1fr); padding: 48px 0; }
.jh-hist__figs { display: grid; gap: 24px; }
.entry-body .jh-hist .jh-hist__fig { margin: 0; }
.jh-hist__fig img { display: block; width: 100%; height: auto; border: 1px solid var(--jh-hist-line); border-radius: 0; }
/* 写真をクリックで拡大（WordPress 標準の機能）。拡大のボタンは画像の右上に重ね、スマホでも分かるよう常に見せる（2026-11-09 担当者の指定） */
.jh-hist__fig img { width: 100% !important; }
.jh-hist .wp-lightbox-container .lightbox-trigger {
	/* WordPress は画像の縦横比から位置を計算して書き込むが、トリミング指定のある写真ではずれて画像の下に出るので、右上に固定する */
	top: 8px !important;
	right: 8px !important;
	width: 32px;
	height: 32px;
	opacity: 1;
	border-radius: 4px;
	background-color: rgba(0, 0, 0, 0.5);
}
.jh-hist .wp-lightbox-container .lightbox-trigger svg { width: 14px; height: 14px; }
.jh-hist .wp-lightbox-container .lightbox-trigger:hover,
.jh-hist .wp-lightbox-container img:hover + .lightbox-trigger { background-color: rgba(0, 0, 0, 0.7); }
.jh-hist__fig figcaption { margin-top: 10px; color: var(--jh-hist-sub); font-size: 13px; line-height: 1.7; text-align: left; }
.jh-hist__lead-texts { border-top: 1px solid var(--jh-hist-line); }
.jh-hist__lead--nofig .jh-hist__lead-texts { border-top: 0; }
.entry-body .jh-hist .jh-hist__lead-text { padding: 24px 0; border-bottom: 1px solid var(--jh-hist-line); }
.jh-hist__lead--nofig .jh-hist__lead-text:first-child { padding-top: 0; }

/* 3. 年表 */
.jh-hist__chron { padding: 16px 0 72px; }
.entry-body .jh-hist .jh-hist__sec-title { margin: 6px 0 28px; font-size: 26px; line-height: 1.4; font-weight: 700; }
.jh-hist__item { display: grid; grid-template-columns: 160px minmax(0, 1fr); padding: 22px 0; border-bottom: 1px solid var(--jh-hist-line); }
.jh-hist__chron--era .jh-hist__item { grid-template-columns: 200px minmax(0, 1fr); }
.jh-hist__when { padding-right: 24px; }
.jh-hist__yearnote { display: block; color: var(--jh-hist-sub); font-size: 13px; line-height: 1.6; }
.jh-hist__md { display: block; font-size: 20px; font-weight: 600; line-height: 1.5; }
.jh-hist__body > *:first-child { margin-top: 0; }
.jh-hist__body > *:last-child { margin-bottom: 0; }
.entry-body .jh-hist .jh-hist__body p + p { margin-top: 6px; }
.jh-hist__body figure { margin: 16px 0 0; }
.jh-hist__body img { max-width: 100%; height: auto; }
.jh-hist__extra { margin-top: 32px; }

/* 4. その他の動き（ページの幅いっぱいの淡い帯） */
.jh-hist__other {
	margin-inline: calc(50% - 50vw);
	padding: 64px calc(50vw - 50%) 72px;
	background: var(--jh-hist-tint);
}
.jh-hist__other-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.entry-body .jh-hist .jh-hist__other-col h3 { margin-bottom: 8px; padding-bottom: 10px; border-bottom: 2px solid var(--jh-hist-ink); font-size: 17px; }
.jh-hist__other-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--jh-hist-line); font-size: 14px; line-height: 1.8; }
.jh-hist__other--era .jh-hist__other-row { grid-template-columns: 104px minmax(0, 1fr); }
.jh-hist__other-row dt { font-weight: 600; line-height: 1.4; }
.jh-hist__other-row dt small { display: block; margin-top: 2px; color: var(--jh-hist-muted); font-size: 11px; font-weight: 400; }
.jh-hist__other-row dd { margin: 0; }

/* 5. 前後の年へ */
.jh-hist__pager { padding: 48px 0 24px; }
.jh-hist__pager-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--jh-hist-ink); }
.jh-hist__pager-grid a,
.jh-hist__pager-none { display: block; padding: 22px 0; color: inherit; text-decoration: none; }
.jh-hist__pager-label { display: block; color: var(--jh-hist-muted); font-size: 12px; letter-spacing: 0.1em; }
.jh-hist__pager-name { display: block; margin-top: 4px; font-size: 18px; font-weight: 700; }
.jh-hist__pager-prev .jh-hist__pager-name::before { content: "← "; color: var(--jh-hist-primary); }
.jh-hist__pager-next { text-align: right; border-left: 1px solid var(--jh-hist-line); }
.jh-hist__pager-next .jh-hist__pager-name::after { content: " →"; color: var(--jh-hist-primary); }
.entry-body .jh-hist .jh-hist__pager-all { margin-top: 20px; font-size: 14px; }
.jh-hist__pager-all a { color: var(--jh-hist-primary-dark); text-decoration: none; }

/* テーマ標準の「前後の記事」は、上の「前の年・次の年」と重なるので出さない */
body:has(.jh-hist) .next-prev { display: none; }

/* タブレット：その他の動きは 3 列だと本文が詰まるので 1 列。
 * 見出しは「大正15年／昭和元年」のように長い年があり、右の役員の欄と並ぶと折り返すので小さくする */
@media (max-width: 1023px) {
	.jh-hist__other-grid { grid-template-columns: 1fr; gap: 36px; }
	.entry-body .jh-hist .jh-hist__title { font-size: 38px; }
}

/* スマホ */
@media (max-width: 767px) {
	.jh-hist__head { padding: 8px 0 28px; }
	.jh-hist__head-top { flex-direction: column; gap: 6px; }
	.jh-hist__head-main { grid-template-columns: 1fr; gap: 24px; }
	.entry-body .jh-hist .jh-hist__title { font-size: 34px; }
	.jh-hist__ad { font-size: 22px; }
	.jh-hist__facts { min-width: 0; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--jh-hist-line); }
	.jh-hist__lead { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
	.jh-hist__figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.jh-hist__figs:has(> :only-child) { grid-template-columns: minmax(0, 200px); }
	.entry-body .jh-hist .jh-hist__sec-title { font-size: 22px; }
	.jh-hist__item,
	.jh-hist__chron--era .jh-hist__item { grid-template-columns: 1fr; padding: 18px 0; }
	.jh-hist__when { display: flex; flex-direction: column; padding: 0 0 6px; }
	.jh-hist__md { font-size: 17px; }
	.jh-hist__other { padding-top: 44px; padding-bottom: 52px; }
	.jh-hist__pager-grid { grid-template-columns: 1fr; }
	.jh-hist__pager-next { border-left: 0; border-top: 1px solid var(--jh-hist-line); }
	.jh-hist__pager-none { display: none; }
}
