/**
 * 記事の下の「参考資料」と「この記事を書いた人」（決まり7章・8章）。
 *
 * 記事のページで、どちらかを出すときだけ読み込む。
 * 色はすべて --lastshot-* の変数から取るので、メイン色を変えると
 * この枠の色も一緒に変わる。
 */

/* --- 参考資料：上に 1px の線＋見出し＋番号つきのリンク ------------------- */

.lastshot-references {
	margin: 2.5em 0 0;
	padding: 1.2em 0 0;
	border-top: 1px solid var( --lastshot-line, #e3e5e8 );
}

.lastshot-references__heading {
	margin: 0 0 0.8em;
	color: var( --lastshot-main, #12355b );
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
}

.lastshot-references__list {
	margin: 0;
	padding: 0 0 0 1.4em;
}

.lastshot-references__item {
	margin: 0 0 0.5em;
	padding: 0;
	line-height: 1.7;
}

.lastshot-references__item:last-child {
	margin-bottom: 0;
}

.lastshot-references__item::marker {
	color: var( --lastshot-main, #12355b );
	font-weight: 700;
}

.lastshot-references__link {
	/* 長い URL や題名でも、枠からはみ出さない。 */
	overflow-wrap: anywhere;
}

.lastshot-references__host {
	display: inline-block;
	margin-left: 0.5em;
	color: var( --lastshot-muted, #5b6270 );
	font-size: 0.8em;
	overflow-wrap: anywhere;
}

/* --- この記事を書いた人：1px の枠（四角）、丸い写真 --------------------- */

.lastshot-author {
	margin: 2em 0 0;
	padding: 1.1em 1.2em;
	border: 1px solid var( --lastshot-line, #e3e5e8 );
	background-color: var( --lastshot-paper, #fff );
}

.lastshot-author__heading {
	margin: 0 0 0.8em;
	color: var( --lastshot-main, #12355b );
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.5;
}

.lastshot-author__head {
	display: flex;
	align-items: center;
	gap: 0.9em;
}

.lastshot-author__photo {
	flex: 0 0 auto;
	overflow: hidden;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var( --lastshot-avatar-bg, #e8edf3 );
	line-height: 0;
}

.lastshot-author__image {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
}

.lastshot-author__who {
	min-width: 0;
}

.lastshot-author__name {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.lastshot-author__title {
	margin: 0.2em 0 0;
	color: var( --lastshot-muted, #5b6270 );
	font-size: 0.8125rem;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/* 紹介文がない書き手でも、名前と写真だけで形がくずれないようにする。 */
.lastshot-author__bio {
	margin: 0.9em 0 0;
	font-size: 0.9375rem;
	line-height: 1.8;
}

.lastshot-author__bio p {
	margin: 0 0 0.6em;
}

.lastshot-author__bio p:last-child {
	margin-bottom: 0;
}

.lastshot-author__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 0.9em 0 0;
	padding: 0;
	list-style: none;
}

.lastshot-author__linkitem {
	margin: 0;
}

/* ピル形は使わない（決まり5章）。四角い枠だけにする。 */
.lastshot-author__link {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0.25em 0.75em;
	border: 1px solid var( --lastshot-line-strong, #d5d9df );
	background-color: var( --lastshot-paper, #fff );
	font-size: 0.8125rem;
	line-height: 1.6;
	text-decoration: none;
}

.lastshot-author__link:hover,
.lastshot-author__link:focus {
	border-color: var( --lastshot-main, #12355b );
}

.lastshot-author__about {
	margin: 0.9em 0 0;
	font-size: 0.8125rem;
}

/* --- 狭い画面 ----------------------------------------------------------- */

@media ( max-width: 480px ) {

	.lastshot-author {
		padding: 1em;
	}

	.lastshot-author__head {
		gap: 0.7em;
	}

	.lastshot-author__photo,
	.lastshot-author__image {
		width: 56px;
		height: 56px;
	}
}

/* --- この記事を監修した人 ------------------------------------------------ */

/*
 * 枠は「この記事を書いた人」と同じクラス（lastshot-author）を付けて出すので、
 * 見た目の指定はここで足すだけにする（同じ指定を2回書かない）。
 */

.lastshot-author__date {
	margin: 0.9em 0 0;
	color: var( --lastshot-muted, #5b6270 );
	font-size: 0.8125rem;
	line-height: 1.6;
}

/*
 * 監修の1行。ふだんは「筆者と日付」ブロックの下に出す。
 * 左の縦の棒・背景は使わず、うすい文字だけにする（決まり5章）。
 */
.lastshot-supervisor-line {
	margin: 0.3em 0 0;
	color: var( --lastshot-muted, #5b6270 );
	font-size: 0.75rem;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.lastshot-supervisor-line a {
	color: var( --lastshot-main, #12355b );
	font-weight: 700;
}

/* 本文の先頭に出すとき（テンプレートにブロックが無いとき）は、少し離す。 */
.wp-block-post-content > .lastshot-supervisor-line {
	margin: 0 0 1.2em;
}
