/* =========================================================
   Case Study 10（投稿テンプレ）
   ・目次は「7つのセクション」を想定
   ・本文は会話UI（スタッフ/お客様/ドット君）中心
   ・画像は横長比率で統一（縦長はCSSでトリミング）
   ========================================================= */

.cs-article{
  background: #ffffff;
  padding: 28px 16px 60px;
}

.cs-article__container{
  max-width: 900px;
  margin: 0 auto;
}

/* パンくず */
.cs-article__breadcrumb{
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 14px;
}
.cs-article__breadcrumb a{
  color: inherit;
  text-decoration: none;
}
.cs-article__breadcrumb a:hover{ text-decoration: underline; }
.cs-article__breadcrumb span{ margin: 0 6px; }

/* タイトル・メタ */
.cs-article__title{
  font-size: 28px;
  line-height: 1.45;
  font-weight: 900;
  margin: 0 0 10px;
  color: #0f172a;
  letter-spacing: .01em;
}
.cs-article__meta{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 18px;
}
.cs-article__cat{
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

/* サムネ */
.cs-article__thumb{
  margin: 12px 0 16px;
}
.cs-article__thumb img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* リード */
.cs-article__lead{
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 2.05;
  color: #111827;
}

/* 強調ペン */
.hl-pen{
  display: inline;
  padding: 0 .12em;
  background: linear-gradient(transparent 55%, #fde68a 55%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 800;
}

/* 概要 */
.cs-overview{ margin: 20px 0 18px; }
.cs-overview__title{
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 10px;
  color: #111827;
}

/* 表（可読性アップのため薄い枠） */
.cs-overview__table{
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.cs-overview__table table{
  width: 100%;
  border-collapse: collapse;
}
.cs-overview__table th,
.cs-overview__table td{
  padding: 12px 14px;
  border-top: 1px solid #e5e7eb;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.9;
}
.cs-overview__table tr:first-child th,
.cs-overview__table tr:first-child td{
  border-top: none;
}
.cs-overview__table th{
  width: 30%;
  background: #f9fafb;
  font-weight: 800;
  color: #0f172a;
}
.cs-overview__table td{ color: #111827; }

/* =========================================================
   目次（.independence-blog__toc）を流用
   ========================================================= */
.cs-article .independence-blog__toc{
  margin: 0 0 32px;
  padding: 22px 24px 18px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.cs-article .independence-blog__toc-heading{
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin: 0 0 10px;
}
.cs-article .independence-blog__toc-list{
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px solid #e5e7eb;
  counter-reset: toc;
}
.cs-article .independence-blog__toc-list li{
  counter-increment: toc;
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 14px;
  border-top: 1px solid #e5e7eb;
}
.cs-article .independence-blog__toc-list li:first-child{ border-top: none; }
.cs-article .independence-blog__toc-list li::before{
  content: counter(toc) " |";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #6b7280;
}
.cs-article .independence-blog__toc-list a{
  color: #111827;
  text-decoration: none;
}
.cs-article .independence-blog__toc-list a:hover{
  text-decoration: underline;
}

/* =========================================================
   本文（会話中心・写真多め）
   ========================================================= */
.cs-body{
  font-size: 16px;
  line-height: 2.05;
  color: #111827;
}

/* セクション区切り（上線のみ） */
.cs-section{
  padding: 40px 0;
  border-top: 1px solid #e5e7eb;
}
.cs-section:first-of-type{
  border-top: none;
  padding-top: 14px;
}
.cs-section--last{ padding-bottom: 0; }

/* 大見出し（h2） */
.cs-h2{
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.7;
  letter-spacing: .01em;
  color: #0f172a;
}

/* キャッチ用h2（1. きっかけ用） */
.cs-h2--catch{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

/* 中見出し（h3） */
.cs-h3{
  margin: 18px 0 18px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.8;
  color: #0f172a;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

/* キャッチ化：質問見出し（例. Qを先頭表示） */
.cs-h3--q{
  position: relative;
  padding-left: 2.4em;
}
.cs-h3--q::before{
  content: "Q.";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 900;
  color: #1d4ed8;
}

/* 段落 */
.cs-p{
  margin: 0 0 16px;
}

/* H様パート（見出し・引用） */
.cs-voice{
  margin: 0 0 18px;
}
.cs-voice__name{
  display: inline-block;
  font-weight: 900;
  color: #0f172a;
  margin-right: 10px;
}

/* =========================================================
   画像（横長で統一・縦長もトリミングで対応）
   ========================================================= */
.cs-figure{
  margin: 22px 0 14px;
}

/* デフォルト（横長想定） */
.cs-figure img{
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;

  /* ここが重要：縦長画像を横長に揃える */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

/* 横長固定（明示） */
.cs-figure--wide img{
  aspect-ratio: 16 / 9;
}

/* もし「上側を見せたい」写真が出たらこのクラスで調整できる */
.cs-figure--top img{ object-position: center top; }
.cs-figure--bottom img{ object-position: center bottom; }

.cs-figure figcaption{
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
}

/* 2カラム（PC） */
.cs-grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

/* 事例テンプレのペア画像（01〜06）は縦長写真前提 */
.cs-grid2 img{
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* アンカーずれ */
.cs-overview,
.cs-toc,
.cs-section{ scroll-margin-top: 90px; }

/* =========================================================
   会話UI（スタッフ/お客様/ドット君）
   ========================================================= */
.cs-chat{
  margin: 1.2rem 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cs-chat__item{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cs-chat__item.is-right{
  flex-direction: row-reverse;
}

/* ★ アイコン（丸・少し大きめ・外枠） */
.cs-chat__icon{
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid rgba(15,23,42,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.cs-chat__item.is-staff .cs-chat__icon{ border-color: rgba(37, 99, 235, .35); }    /* 青系 */
.cs-chat__item.is-customer .cs-chat__icon{ border-color: rgba(239, 68, 68, .35); } /* 赤系 */
.cs-chat__item.is-dot .cs-chat__icon{ border-color: rgba(99, 102, 241, .35); }    /* 紫系 */

.cs-chat__icon img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: center;
}

/* ★ スタッフ/お客様は顔が上にある想定で、上寄りにトリミング */
.cs-chat__item.is-staff .cs-chat__icon img{
  object-position: center 18%;
}
.cs-chat__item.is-customer .cs-chat__icon img{
  object-position: center 18%;
}
/* ドット君は中程でOK */
.cs-chat__item.is-dot .cs-chat__icon img{
  object-position: center;
}

.cs-chat__body{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-chat__name{
  font-size: .85rem;
  opacity: .78;
  line-height: 1.2;
  margin: 4px 0 0;
  font-weight: 800;
}
.cs-chat__bubble{
  max-width: 720px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  line-height: 1.75;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

/* 色分け */
.cs-chat__item.is-staff .cs-chat__bubble{
  background: #e9f6ff;
}
.cs-chat__item.is-customer .cs-chat__bubble{
  background: #ffecec;
}
.cs-chat__item.is-dot .cs-chat__bubble{
  background: #f2f5ff;
}

/* 吹き出しの角（それっぽさ強化） */
.cs-chat__item.is-right .cs-chat__bubble{
  border-top-right-radius: 10px;
}
.cs-chat__item:not(.is-right) .cs-chat__bubble{
  border-top-left-radius: 10px;
}

/* =========================================================
   担当者カード（任意で使える）
   ========================================================= */
.cs-staff-card{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  background: rgba(0,0,0,.02);
  margin: 1rem 0 1.2rem;
}
.cs-staff-card__photo{
  width: 72px;
  height: 72px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 72px;
  background: rgba(0,0,0,.06);
  border: 2px solid rgba(15,23,42,.12);
}
.cs-staff-card__photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.cs-staff-card__meta{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-staff-card__label{
  font-size: .85rem;
  opacity: .75;
}
.cs-staff-card__name{
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.2;
  color: #0f172a;
}

/* レスポンシブ */
@media (max-width: 768px){
  .cs-article{ padding: 18px 12px 44px; }
  .cs-article__title{ font-size: 22px; }
  .cs-body{ font-size: 15.5px; }

  .cs-section{ padding: 32px 0; }
  .cs-h2{ font-size: 20px; }

  .cs-overview__table th{ width: 38%; }
  .cs-grid2{ grid-template-columns: 1fr; }

  .cs-article .independence-blog__toc{
    padding: 18px 18px 14px;
  }

  .cs-chat__bubble{
    max-width: 100%;
  }
}
