/* =============================================================================
   株式会社元希 ブログ著者表示（改訂版）  ecg-author.css
   貼り先: 子テーマ xwrite-child の style.css 末尾（推奨）。
           追加CSSでも可だが、追加CSSは公開版が全ページのHTMLに埋め込まれるため子テーマを推奨。
   対象:  投稿ページ（body.single-post）だけ。他のページ・既存の .ecgenki-* には影響しない。
   クラス接頭辞を ecg- に変更: 既存の記事内「執筆者」ボックス（.ecgenki-author*）と
          追加CSSの既存ルールに干渉しないため。
   配色:  オレンジ #E04119（ホバー #B8320F = サイトの --or-d）／ネイビー #1B2A41
   形状:  ボタン・バッジの角丸は0（サイトの .gk-btn と同じ四角）。グラデーションなし。
   写真:  丸形アバターのみ。四角にする場合は --ecg-photo-radius を 2px に変更。
   ============================================================================= */

/* 変数だけ :root に置く（見た目には影響しない）。著者ページのプロフィール写真でも使う */
:root {
  --ecg-photo-radius: 50%;
}

body.single-post .ecg-byline,
body.single-post .ecg-author,
body.single-post .ecg-byline *,
body.single-post .ecg-author *,
body.single-post .ecg-byline *::before,
body.single-post .ecg-author *::before,
body.single-post .ecg-byline *::after,
body.single-post .ecg-author *::after {
  box-sizing: border-box;
}

body.single-post .ecg-byline,
body.single-post .ecg-author {
  color: #222;
  font-family: inherit;
  line-height: 1.8;
  letter-spacing: normal;
}

/* ---------- タイトル下バイライン ---------- */
body.single-post .ecg-byline {
  display: flex;
  align-items: center;
  gap: 12px 14px;
  margin: 0 0 1.6em;
  padding: 12px 0 14px;
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
}

body.single-post .ecg-byline__photo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  max-width: none;
  margin: 0;
  border-radius: var(--ecg-photo-radius);
  object-fit: cover;
  object-position: center top;
  background: #eee;
}

body.single-post .ecg-byline__body {
  min-width: 0;
  flex: 1 1 auto;
}

body.single-post .ecg-byline__credit {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

body.single-post .ecg-byline__label {
  color: #666;
}

body.single-post .ecg-byline__name {
  color: #1B2A41;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

body.single-post .ecg-byline__name:hover,
body.single-post .ecg-byline__name:focus {
  color: #E04119;
  border-bottom-color: #E04119;
}

body.single-post .ecg-byline__role {
  color: #333;
}

body.single-post .ecg-byline__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.6;
  color: #666;
}

body.single-post .ecg-byline__dates li {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single-post .ecg-byline__dates li::before,
body.single-post .ecg-byline__dates li::marker {
  content: none;
}

body.single-post .ecg-byline__dates time {
  color: #666;
  font-style: normal;
}

/* ---------- 記事末尾の著者ボックス ---------- */
body.single-post .ecg-author {
  margin: 3em 0 2em;
}

body.single-post .ecg-author__heading {
  margin: 0 0 14px;
  padding: 0 0 0 12px;
  border: 0;
  border-left: 6px solid #1B2A41;
  background: none;
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  color: #111;
  letter-spacing: 0.04em;
}

body.single-post .ecg-author__card {
  border: 1px solid #dcdcdc;
  background: #f7f7f7;
  overflow: hidden;
}

body.single-post .ecg-author__main {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
}

body.single-post .ecg-author__photo {
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  max-width: none;
  margin: 0;
  border-radius: var(--ecg-photo-radius);
  object-fit: cover;
  object-position: center top;
  background: #eee;
}

body.single-post .ecg-author__bio {
  flex: 1 1 0;
  min-width: 0;
}

body.single-post .ecg-author__name {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #111;
}

body.single-post .ecg-author__name a {
  color: #1B2A41;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

body.single-post .ecg-author__name a:hover,
body.single-post .ecg-author__name a:focus {
  color: #E04119;
  border-bottom-color: #E04119;
}

body.single-post .ecg-author__title {
  margin: 2px 0 10px;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

/* 実績バッジ: 四角（角丸0）、細い枠線、ネイビー文字。塗りは白 */
body.single-post .ecg-author__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

body.single-post .ecg-author__badges li {
  margin: 0;
  padding: 3px 10px;
  border: 1px solid #1B2A41;
  border-radius: 0;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: #1B2A41;
  list-style: none;
}

body.single-post .ecg-author__badges li::before,
body.single-post .ecg-author__badges li::marker {
  content: none;
}

body.single-post .ecg-author__text {
  margin: 0 0 0.7em;
  padding: 0;
  font-size: 14px;
  line-height: 1.85;
  color: #333;
}

body.single-post .ecg-author__links {
  margin: 10px 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.8;
  color: #666;
}

body.single-post .ecg-author__links a {
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #bbb;
}

body.single-post .ecg-author__links a:hover,
body.single-post .ecg-author__links a:focus {
  color: #E04119;
  border-bottom-color: #E04119;
}

body.single-post .ecg-author__foot {
  padding: 20px 24px 22px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  border-bottom: 3px solid #E04119;
  text-align: center;
}

body.single-post .ecg-author__micro {
  margin: 0 0 14px;
  padding: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

/* CTA: サイトの .gk-btn（四角・オレンジ・矢印つき）と同じ形 */
body.single-post .ecg-author__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 220px;
  padding: 15px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  background: #E04119;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s;
}

body.single-post .ecg-author__cta::after {
  content: "→";
  font-weight: 600;
}

body.single-post .ecg-author__cta:hover,
body.single-post .ecg-author__cta:focus {
  background: #B8320F;
  color: #fff;
  text-decoration: none;
}

body.single-post .ecg-author__cta:focus-visible,
body.single-post .ecg-author__name a:focus-visible,
body.single-post .ecg-byline__name:focus-visible {
  outline: 2px solid #1B2A41;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body.single-post .ecg-byline {
    align-items: flex-start;
    gap: 10px 12px;
    padding: 10px 0 12px;
  }

  body.single-post .ecg-byline__photo {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    margin-top: 2px;
  }

  body.single-post .ecg-byline__credit {
    font-size: 13px;
  }

  body.single-post .ecg-byline__role {
    display: block;
    font-size: 12px;
    line-height: 1.5;
  }

  body.single-post .ecg-byline__dates {
    gap: 0 12px;
    font-size: 11px;
  }

  body.single-post .ecg-author__main {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px 16px 18px;
    text-align: center;
  }

  body.single-post .ecg-author__photo {
    flex-basis: auto;
    width: 96px;
    height: 96px;
  }

  body.single-post .ecg-author__bio {
    width: 100%;
    flex: 0 0 auto;
  }

  body.single-post .ecg-author__name {
    font-size: 17px;
  }

  body.single-post .ecg-author__badges {
    justify-content: center;
  }

  body.single-post .ecg-author__text {
    text-align: left;
  }

  body.single-post .ecg-author__foot {
    padding: 18px 16px 20px;
  }

  body.single-post .ecg-author__cta {
    width: 100%;
    min-width: 0;
  }
}
