/*
Theme Name: CURE INUI Child
Description: Existing Salon INUI customizations separated from CURE 2.16.3.
Template: cure_tcd082
Version: 0.2.0
Text Domain: cure-inui-child
*/

/* These two rules were added to the original parent style.css. */
#footer_data .item.left .sub_item:nth-of-type(2) { margin:14px 0 0 0; }
#footer_data .item.left.position_type2 .sub_item:nth-of-type(2) { margin:0 0 14px 0; }

/* CURE's content formatting can leave an empty paragraph after the symptom
 * buttons. Exclude it from the flex row so the final right-hand button aligns. */
.syourei_wrap > p:empty { display:none; }

/* ----------------------------------------------------------------------
 INUI院長：記事下部の執筆・内容確認プロフィール
 single.phpの.inui_author_profileのみに適用（CURE既存著者欄は変更しない）
 自由記述CSSの「#article h2」「#article h3」の装飾は、この欄の中だけ打ち消す
---------------------------------------------------------------------- */
.author_profile.inui_author_profile {
  height: auto;
  padding: 30px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
#article .inui_author_profile .inui_author_heading,
#article .inui_author_profile .inui_author_name {
  position: static;
  background: none;
  box-shadow: none;
  border: 0;
  padding: 0;
  color: inherit;
  margin-top: 0 !important;
  line-height: 1.5 !important;
}
#article .inui_author_profile .inui_author_heading:after,
#article .inui_author_profile .inui_author_name:after { content: none; }
#article .inui_author_profile .inui_author_heading { margin-bottom: 15px; font-size: 22px; font-weight: bold; }
#article .inui_author_profile .inui_author_name { margin-bottom: 8px; font-size: 16px; font-weight: bold; }
.inui_author_profile .inui_author_name span { font-weight: normal; word-break: keep-all; }
.inui_author_profile .inui_author_identity { display: flex; align-items: flex-start; }
.inui_author_profile .inui_author_avatar { flex: 0 0 200px; width: 200px; margin-right: 25px; }
.inui_author_profile .inui_author_avatar a { display: block; }
.inui_author_profile .inui_author_avatar img { display: block; width: 100%; height: auto; }
.inui_author_profile .inui_author_body { flex: 1; min-width: 0; }
.inui_author_profile .inui_author_facts { margin: 0; padding: 0; font-size: 16px; line-height: 1.8; }
.inui_author_profile .inui_author_message { margin: 15px 0 0; font-size: 16px; line-height: 1.8; }
.inui_author_profile .inui_author_footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin: 10px 0 0; }
.inui_author_profile .inui_author_more { margin: 0; font-size: 16px; line-height: 1.8; }
.inui_author_profile .inui_author_more a { text-decoration: underline; }
.inui_author_profile .author_link { margin: 0; }
.inui_author_profile .author_link li:last-child { margin-right: 0; }
@media screen and (max-width: 767px) {
  #article .inui_author_profile .inui_author_heading { font-size: 18px; }
}
@media screen and (max-width: 750px) {
  .author_profile.inui_author_profile { padding: 20px; }
  .inui_author_profile .inui_author_identity { display: grid; grid-template-columns: 120px 1fr; column-gap: 12px; align-items: center; }
  .inui_author_profile .inui_author_avatar { width: 120px; margin-right: 0; }
  .inui_author_profile .inui_author_body { display: contents; }
  .inui_author_profile .inui_author_facts { grid-column: 1 / -1; margin-top: 12px; }
  #article .inui_author_profile .inui_author_name { margin-bottom: 0; }
  .inui_author_profile .inui_author_name > span { display: block; }
  .inui_author_profile .inui_author_sep { display: none; }
  .inui_author_profile .inui_author_footer { flex-direction: column; align-items: flex-start; }
  .inui_author_profile .author_link { margin-top: 12px; }
}
@media screen and (max-width: 340px) {
  .inui_author_profile .inui_author_identity { grid-template-columns: 100px 1fr; }
  .inui_author_profile .inui_author_avatar { width: 100px; }
}

/* ----------------------------------------------------------------------
 記事タイトル下の公開日・最終更新日（single.php の .inui_post_dates）
 本番（CURE 1.2.3）の style.css 末尾と同じ見た目にする。CURE 2.16.3 の
 #post_title_area .date（14px・Arial・スマホの左右の余白）を、本番の .date に合わせて打ち消す
---------------------------------------------------------------------- */
#post_title_area .date.inui_post_dates { margin: 8px 0 0; padding: 0; font-size: 12px; font-family: inherit; line-height: 1.6; }
#post_title_area .inui_post_dates .inui_post_date { display: inline-block; margin-right: 1.5em; }
#post_title_area .inui_post_dates .inui_post_date:last-child { margin-right: 0; }
@media screen and (max-width: 750px) {
  #post_title_area .date.inui_post_dates { margin: 3px 0 0; padding: 0 20px; }
}

/* CURE 2.16.3 で増えた、記事一覧（カテゴリー・タグ・月別など）の上の余白（120px）を、本番の 1.2.3 と同じ 0 に戻す。
 * 画面幅 1251px 以下の分（40px）は assets/css/responsive.css */
#blog_archive>div:first-child:not(#content_header) { padding-top:0; }

/* WordPress 5.9（本番）は画像ブロックの下に 1em の余白を付けていた（block-library の .wp-block-image{margin:0 0 1em}）。
 * 新しい WordPress ではこの決まりが無くなり、画像のすぐ下に文が詰まるので、同じ値を戻す。 */
.wp-block-image { margin:0 0 1em; }
/* 表と埋め込み（YouTube）のブロックも同じ（5.9 は .wp-block-table・.wp-block-embed に margin:0 0 1em）。 */
.post_content .wp-block-table, .post_content .wp-block-embed { margin:0 0 1em; }

/* 記事の上下の SNS ボタン。見た目（灰色のボタン、X・LINE）は CURE 2.16.3 のままにして、
 * ボタンの高さと段の間隔だけを本番（1.2.3）と同じにする（本番は高さ 39px・下の余白 2%、480px 未満は 41px・3%）。
 * そろえないと、記事の本文が PC で 21px、スマホで 52px 上にずれる。 */
#single_share_top .share-type4 a, #single_share_bottom .share-type4 a { height:39px; line-height:39px; }
#single_share_top .share-type4 li, #single_share_bottom .share-type4 li { margin-bottom:2%; }
@media screen and (max-width:479px) {
  #single_share_top .share-type4 a, #single_share_bottom .share-type4 a { height:41px; line-height:41px; }
  #single_share_top .share-type4 li, #single_share_bottom .share-type4 li { margin-bottom:3%; }
}
/* 親の responsive.css が !important で -5px を付けているので、こちらも !important */
#single_share_top .share-type4 ul, #single_share_bottom .share-type4 ul { margin-bottom:0 !important; }
#single_share_bottom .share-btm { margin-top:20px; }

/* 見出しのタグが 2.16.3 で h2・h3 から div・p に変わった所（ウィジェットの見出し、ページ上部の英字の見出し、フッターの予約の見出し、一覧ページの見出し）。
 * 見出しタグのときの行の高さ（1.2 倍）が効かなくなり、1つにつき 3px ほど詰まるので、本番と同じ行の高さに戻す。 */
/* :where() で優先度を 0 にしてあるので、行の高さを自分で決めている見出しには影響しない */
:where(p.headline, div.headline, p.top_headline, div.top_headline, div.widget_headline) { line-height:1.2; }

/* スタッフ紹介の年表（Cool Timeline）。本番は説明文の段落の下に 10px の余白がある。 */
.ctl-wrapper .ctl-story .ctl-description p { margin-bottom:10px; }

/* パンくずの文字。2.16.3 で 13px になったので、本番と同じ 12px に戻す（1251px 以下の分は assets/css/responsive.css）。 */
#bread_crumb li { font-size:12px; }
