/* ============================================
   AI記事用スタイル
   単一投稿ページで .ts-ai-article ラッパー内のみに適用
   ============================================ */

.ts-ai-article {
  font-family: "Noto Sans JP", "Yu Gothic Medium", YuGothic, sans-serif;
  color: #2a2a2a;
  line-height: 1.9;
  font-size: 16px;
  letter-spacing: 0.04em;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 24px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.ts-ai-article > *:first-child {
  margin-top: 0;
}

.ts-ai-article p {
  margin: 1.1em 0;
  line-height: 1.9;
}

/* 導入段落を大きめに */
.ts-ai-article > p:first-of-type {
  font-size: 17px;
  line-height: 1.95;
  color: #3a3a3a;
  margin-bottom: 1.5em;
  padding: 14px 18px;
  background: linear-gradient(135deg, #FFF9EC 0%, #FDF5E0 100%);
  border-radius: 10px;
  border-left: 4px solid #F4D463;
}

/* 大見出し（セクション見出し） */
.ts-ai-article h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  color: #141414;
  margin: 2.4em 0 1em;
  padding: 14px 16px 14px 22px;
  background: linear-gradient(to right, rgba(255, 155, 62, 0.12), rgba(244, 212, 99, 0.06) 60%, transparent);
  border-left: 6px solid #FF9B3E;
  border-radius: 6px;
  line-height: 1.4;
  position: relative;
}

.ts-ai-article h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #F4D463;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(244, 212, 99, 0.35);
}

/* 小見出し */
.ts-ai-article h3 {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 700;
  color: #141414;
  margin: 1.8em 0 0.7em;
  padding: 0 0 8px 1.7em;
  border-bottom: 2px dotted #F4D463;
  line-height: 1.5;
  position: relative;
}

.ts-ai-article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 1.1em;
  height: 1.1em;
  background: #FF9B3E;
  border-radius: 3px;
  transform: rotate(45deg);
}

.ts-ai-article h3::after {
  content: "";
  position: absolute;
  left: 0.35em;
  top: 0.85em;
  width: 0.4em;
  height: 0.4em;
  background: #fff;
  border-radius: 2px;
  transform: rotate(45deg);
}

/* 強調テキスト（ハイライト風） */
.ts-ai-article strong {
  color: #d87a1d;
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(244, 212, 99, 0.5) 62%);
  padding: 0 2px;
}

/* リンク */
.ts-ai-article a {
  color: #e88a2e;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(232, 138, 46, 0.4);
}

.ts-ai-article a:hover {
  color: #FF9B3E;
  text-decoration-color: #FF9B3E;
}

/* 箇条書きリスト */
.ts-ai-article ul {
  padding-left: 0;
  margin: 1.2em 0;
  list-style: none;
}

.ts-ai-article ul li {
  position: relative;
  padding-left: 2em;
  margin-bottom: 0.7em;
  line-height: 1.85;
}

.ts-ai-article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 12px;
  height: 12px;
  background: #FF9B3E;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 155, 62, 0.2);
}

/* 番号リスト */
.ts-ai-article ol {
  padding-left: 0;
  margin: 1.2em 0;
  list-style: none;
  counter-reset: tsai-counter;
}

.ts-ai-article ol li {
  position: relative;
  padding-left: 2.4em;
  margin-bottom: 0.7em;
  line-height: 1.85;
  counter-increment: tsai-counter;
}

.ts-ai-article ol li::before {
  content: counter(tsai-counter);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.7em;
  height: 1.7em;
  background: linear-gradient(135deg, #FF9B3E, #e88a2e);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 1.7em;
  font-weight: 700;
  font-size: 13px;
}

/* ポイントボックス（blockquote） */
.ts-ai-article blockquote {
  background: linear-gradient(135deg, #FDF9E8 0%, #FFF6D5 100%);
  border: none;
  border-left: 4px solid #F4D463;
  padding: 18px 22px 18px 56px;
  margin: 1.8em 0;
  border-radius: 0 12px 12px 0;
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.85;
  position: relative;
  box-shadow: 0 1px 4px rgba(244, 212, 99, 0.15);
}

.ts-ai-article blockquote::before {
  content: "💡";
  position: absolute;
  left: 18px;
  top: 16px;
  font-size: 22px;
  line-height: 1;
}

.ts-ai-article blockquote p {
  margin: 0.4em 0;
}

.ts-ai-article blockquote p:first-child {
  margin-top: 0;
}

.ts-ai-article blockquote p:last-child {
  margin-bottom: 0;
}

/* 免責文（最後の段落） */
.ts-ai-article > p:last-child {
  font-size: 12px;
  color: #999;
  background: #f7f5ef;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px dashed #d9d3bd;
  margin-top: 2.4em;
  line-height: 1.75;
}

/* テーブル */
.ts-ai-article table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.8em 0;
  font-size: 14px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ts-ai-article table th,
.ts-ai-article table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f0e8d0;
}

.ts-ai-article table th {
  background: linear-gradient(135deg, #FFF9EC 0%, #FDF5E0 100%);
  color: #141414;
  font-weight: 700;
}

.ts-ai-article table tr:last-child td {
  border-bottom: none;
}

.ts-ai-article table tr:nth-child(even) td {
  background: #fcfaf3;
}

/* 画像（記事内） */
.ts-ai-article img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.5em auto;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 水平線 */
.ts-ai-article hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #F4D463, transparent);
  margin: 2em 0;
}

/* モバイル調整 */
@media (max-width: 600px) {
  .ts-ai-article {
    padding: 18px 16px;
    font-size: 15px;
    border-radius: 8px;
  }
  .ts-ai-article h2 {
    padding: 12px 14px 12px 18px;
  }
  .ts-ai-article > p:first-of-type {
    padding: 12px 14px;
    font-size: 15px;
  }
  .ts-ai-article blockquote {
    padding: 16px 18px 16px 48px;
  }
}
