/* =========================================================
   Case Study 01（投稿テンプレ）
   ・目次は「元のデザイン」を維持
   ・本文は記事感（余白/見出し/段落）
   ・画像は横長比率で統一（縦長も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; }

/* 大見出し：太く・余白多め */
.cs-h2{
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.7;
  letter-spacing: .01em;
  color: #0f172a;
}

/* ★追加：キャッチコピー感（帯） */
.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);
}

/* 中見出し：下線（※記号なし運用） */
.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;
}

/* アンカーずれ */
.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%;
  }
}
