@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.2.1-terakoya
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
.header-container {
	background-color: #fff;
	background-image: url(http://laughstyle.net/terakoyablog/wp-content/uploads/2021/04/bg_body.png);
	background-repeat: repeat-x;
	background-position: top center;
	background-size: auto 16px;
	padding-top: 16px;
}
.site-name-text {
	line-height: 1;
}
.search-box {
	margin: 2em 0;
}
.sidebar h3 {
	background-color: #DFEEF9;
	border-left: 6px solid #1F4FA2;
}
.pagination-next-link, .comment-btn {
	background-color: #FFFFCC;
	border: 1px solid #1F4FA2;
	color: #1F4FA2;
	font-weight: bold;
}
.widget_recent_entries ul li a {
	color: #666;
	font-weight: bold;
}
.widget_categories ul li a {
    color: #1F4FA2;
    font-weight: bold;
}
.widget_categories ul .children li a {
    font-weight: normal;
}
.entry-card-title, .related-entry-card-title {
    color: #1F4FA2;
}
.cat-link, .cat-label {
	color: #fff;
}
.entry-title {
	color: #1F4FA2;
	border-left: 8px solid #1F4FA2;
	padding: 12px 0 12px 15px;
}
.article h2 {
	padding: 20px;
	background-color: #1F4FA2;
	border-radius: 5px;
	color: #fff;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
.logo-image {
	padding: 10px 24px;
}
}

/************************************
** Cocoon 2.9系との表示互換
** 現在の2.2.8.8・本番表示設定を基準にする。
************************************/
/* 新しいロゴリンクの左右余白で、独自の2ロゴが縮まないようにする。 */
#header .inner_flex .site-name-text-link,
#footer .inner_flex .site-name-text-link {
	padding: 0;
}

/* 現在使用している横型の一覧・関連記事カードの間隔を維持する。 */
#list.ect-entry-card,
#related-entries.rect-entry-card .related-list {
	display: block;
	gap: normal;
	margin-bottom: 0;
}
#list.ect-entry-card > .entry-card-wrap,
#related-entries.rect-entry-card .related-list > .related-entry-card-wrap {
	margin-bottom: 3%;
}
#list.ect-entry-card .entry-card-thumb,
#related-entries.rect-entry-card .related-entry-card-thumb {
	margin-bottom: 0;
}
/* 16:9への追加トリミングを外し、既存サムネイルの縦横比をそのまま表示する。 */
#list.ect-entry-card .entry-card-thumb img,
#related-entries.rect-entry-card .related-entry-card-thumb img,
.pager-post-navi .card-thumb img {
	aspect-ratio: revert-layer;
	object-fit: fill;
}

/* 従来の見出し行間・余白を保ち、長いタイトルを行数で切らない。 */
#list.ect-entry-card .entry-card-title,
#related-entries.rect-entry-card .related-entry-card-title {
	display: block;
	margin: 0 0 5px;
	line-height: 1.2;
	overflow: visible;
	-webkit-line-clamp: unset;
	-webkit-box-orient: initial;
}
/* 抜粋の表示/非表示設定は残し、表示時の上限だけ従来の6行へ戻す。 */
#list.ect-entry-card .entry-card-snippet,
#related-entries.rect-entry-card .related-entry-card-snippet {
	margin: 0;
	max-height: 7.8em;
	-webkit-line-clamp: unset;
}

/* サムネイル上の分類ラベルも従来の大きさ・位置にする。 */
#list.ect-entry-card .cat-label,
#related-entries.rect-entry-card .cat-label {
	top: 0.3em;
	left: 0.3em;
	font-size: 11px;
	max-width: 80%;
}

/* ページ番号の文字と行高、次ページボタン前の余白を現行に合わせる。 */
#main .pagination > .page-numbers {
	font-size: inherit;
	line-height: 46px;
}
#main .pagination-next {
	margin-top: 0;
}

/* 新しい親の本文上下36pxを現行20pxへ戻す。横の設定はそのまま。 */
main.main {
	padding-top: 20px;
	padding-bottom: 20px;
}
/* 新しい生成CSSが加えるウィジェット下余白を、現行サイドバーでは加えない。 */
.body .sidebar .widget {
	margin-bottom: 0;
}
/* 本文・関連記事・コメント欄の外側には、従来ない下余白を増やさない。 */
.body .article,
.body .related-entries,
.body .comment-area {
	margin-bottom: 0;
}
.body .pager-post-navi {
	margin-bottom: 38px;
}
/* 新親の画像middle配置で減った行ボックスの高さを、本文領域では現行に戻す。 */
main img {
	vertical-align: baseline;
}
/* アイキャッチだけは旧親のbottom配置を保ち、画像下の行間を増やさない。 */
.article-header .eye-catch img {
	vertical-align: bottom;
}
/* 本文直下divへの新しい一括指定から、WP ULike本来の行高・外側余白を守る。 */
.entry-content > .wpulike {
	line-height: normal;
	margin-bottom: 0;
}
/* 新親のinline化で効かなくなった分類欄の下0.5emを、旧inline-blockで保つ。 */
.article-footer > .entry-categories-tags.ctdt-one-row > div {
	display: inline-block;
}
/* SNSの新しい内側em余白を外し、旧ボタン各行の下8pxをgapとpaddingで保つ。 */
.article-header > .sns-share > .sns-buttons,
.article-footer > .sns-share > .sns-buttons,
.article-footer > .sns-follow > .sns-buttons {
	margin: 0;
	row-gap: 8px;
	padding-bottom: 8px;
}
.article-header > .sns-share > .sns-buttons,
.article-footer > .sns-share > .sns-buttons {
	column-gap: 0;
	justify-content: space-around;
}
.article-footer > .sns-share,
.article-footer > .sns-follow {
	margin: 24px 0;
}
.article-footer > .sns-share.ss-col-3 .share-button {
	width: 32%;
}
/* 著者サイト・feedly・RSSのフォロー欄は、旧来の横幅と45px高を保つ。 */
.article-footer > .sns-follow > .sns-follow-buttons {
	flex-wrap: nowrap;
	column-gap: 8px;
}
.article-footer > .sns-follow .follow-button {
	width: 100%;
	height: 45px;
}

/* 現在の本文設定（行の余白1.8、文字18px/スマホ16px）の見出し間隔。 */
.article h2,
.article h3,
.article h4,
.article h5,
.article h6 {
	margin-top: 2.4em;
	margin-bottom: 18px;
}

/* 現行wrap幅1256pxの生成CSSは1280pxまで可変幅。新親の1255pxとの差を埋める。 */
@media screen and (min-width: 1256px) and (max-width: 1280px) {
	.wrap {
		width: auto;
	}
	.main,
	.sidebar,
	.sidebar-left .main,
	.sidebar-left .sidebar {
		margin: 0 0.5%;
	}
	.main {
		width: 67.4%;
	}
	.sidebar {
		padding: 1.5%;
		width: 30%;
	}
	.entry-card-thumb {
		width: 38%;
	}
	.entry-card-content {
		margin-left: 40%;
	}
}

/* 新しいタブレットの内側余白を、現在の余白に合わせる。 */
@media screen and (max-width: 834px) {
	main.main,
	div.sidebar {
		padding: 16px 20px;
		margin: 10px 0;
	}
}

@media screen and (max-width: 480px) {
	.article-header > .sns-share.ss-col-6 .share-button {
		width: 32%;
	}
	.article-footer > .sns-follow > .sns-follow-buttons {
		flex-wrap: wrap;
		column-gap: 0;
		justify-content: space-around;
	}
	.article-footer > .sns-follow .follow-button {
		width: 48%;
	}
	/* 現行は検索欄・月別選択欄がスマホでも18px。入力欄の高さを保つ。 */
	#sidebar .search-edit,
	#sidebar select {
		font-size: 18px;
	}
	/* 配信中の旧CSSと同じ、画像に本文が回り込むモバイルカードにする。 */
	#list.ect-entry-card .entry-card-thumb,
	#related-entries.rect-entry-card .related-entry-card-thumb {
		margin-bottom: 6px;
	}
	#list.ect-entry-card .entry-card-content,
	#related-entries.rect-entry-card .related-entry-card-content {
		margin: 0;
	}
	#list.ect-entry-card .entry-card-snippet,
	#related-entries.rect-entry-card .related-entry-card-snippet,
	#list.ect-entry-card .entry-card-meta,
	#related-entries.rect-entry-card .related-entry-card-meta {
		clear: both;
	}
	#list.ect-entry-card .entry-card-title,
	#related-entries.rect-entry-card .related-entry-card-title {
		line-height: 1.3;
	}
	#list.ect-entry-card .cat-label,
	#related-entries.rect-entry-card .cat-label {
		font-size: 10px;
		padding: 1px 3px;
	}
	#main .pagination > .page-numbers {
		width: 34px;
		height: 34px;
		line-height: 34px;
	}
	#main .pagination > .page-numbers.dots {
		display: inline-block;
	}
	.article h2,
	.article h3,
	.article h4,
	.article h5,
	.article h6 {
		margin-bottom: 16px;
	}
}
