/* =========================================
   コラム記事詳細ページ 専用スタイル
========================================= */

/* --- パンくずリスト --- */
.breadcrumb {
  margin-bottom: 24px;
  font-size: 11px;
  color: #888;
  font-family: inherit;
  line-height: 1.6;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  row-gap: 8px;
}
.breadcrumb li {
  display: flex;
  align-items: center;
}
.breadcrumb a {
  color: #666;
  text-decoration: underline;
  transition: opacity 0.3s;
}
.breadcrumb a:hover {
  opacity: 0.7;
}
.breadcrumb-arrow {
  margin: 0 8px;
  font-size: 10px;
  color: #ccc;
}

/* --- 記事ヘッダー --- */
.article-body {
  background: #fff;
  border-radius: 8px;
  padding: 24px 16px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.article-header {
  margin-bottom: 32px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.article-title {
  font-family: inherit;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.5;
  color: #333;
  margin-bottom: 24px;
}
.article-main-img {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 16 / 9;
}
.article-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 記事本文 ベース --- */
.article-content {
  margin-top: 32px;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  letter-spacing: 0.5px;
  font-family: inherit;
}
.article-content p {
  margin-bottom: 24px;
}
.article-content img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}
.article-content hr {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 40px 0;
}

/* 見出し */
.article-content h2 {
  font-size: 22px;
  font-weight: bold;
  margin: 48px 0 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}
.article-content h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 32px 0 16px;
}

/* 装飾要素 */
.article-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  color: #555;
  background: #f7f7f7;
  border-left: 4px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
.marker-line {
  background: linear-gradient(transparent 60%, #ffd1d9 60%);
  font-weight: bold;
}

/* 一般リスト */
.article-content ul, .article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}
.article-content ul li, .article-content ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ステップリスト */
.article-content ul.step-list,
.article-content ol.step-list,
.step-list {
  list-style: none;
  padding-left: 0 !important;
  margin: 24px 0;
  counter-reset: step-counter;
}
.step-list li {
  position: relative;
  padding: 16px 0 16px 36px;
  border-bottom: 1px dotted #ccc;
  font-size: 15px;
  font-weight: bold;
  color: #333;
}
.step-list li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 16px;
  width: 24px;
  height: 24px;
  background: #333;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}
.step-list li:last-child {
  border-bottom: none;
}

/* チェックリスト */
.article-content ul.check-list,
.article-content ol.check-list,
.check-list {
  list-style: none;
  padding-left: 0 !important;
  margin: 0 0 24px 0;
}
.check-list li, .check-text {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.check-text {
  margin-bottom: 24px;
}
.check-list li::before, .check-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background-image: url('../img/ic_checkbox.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* --- コンポーネント (サマリー, 目次, カラーBOX, Q&Aなど) --- */
.article-summary-box {
  position: relative;
  margin: 36px 0 28px;
  padding: 20px 16px 8px;
  border: 2px solid #e67a88;
  background-color: #fff;
}
.summary-title {
  position: absolute;
  top: -15px;
  left: 16px;
  background-color: #e67a88;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 4px 16px;
  line-height: 1.4;
  letter-spacing: 0.5px;
}
.article-content .summary-list, .summary-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.summary-list li {
  position: relative;
  padding: 10px 0 10px 36px;
  border-bottom: 1px dashed #e0e0e0;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  line-height: 1.5;
}
.summary-list li:last-child {
  border-bottom: none;
}
.summary-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 17px;
  width: 6px;
  height: 6px;
  background-color: #333;
  border-radius: 50%;
}

/* ★ 目次 (「▼」の左端とテキスト行頭の左端を縦一直線に整列) */
.article-toc {
  background-color: #f3f6f8;
  padding: 16px;
  border-radius: 4px;
  margin: 32px 0;
}
.toc-title {
  font-size: 15px;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  list-style: none;
  margin-bottom: 8px;
  padding: 0;
}
.toc-title::-webkit-details-marker {
  display: none;
}
.toc-title::before {
  content: "▶";
  display: inline-block;
  font-size: 11px;
  margin-right: 6px;
  transition: transform 0.3s;
}
details[open].article-toc .toc-title::before {
  transform: rotate(90deg);
}

/* 本文用ulのパディング干渉を強力リセット */
.article-content ul.toc-list,
.article-content ol.toc-list,
.toc-list, .toc-list ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin-bottom: 0;
}
.toc-list li, .toc-list ul li {
  border-bottom: 1px solid #dcdcdc;
  margin-bottom: 0;
}
.toc-list li:last-child {
  border-bottom: none;
}
.toc-list a {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  color: #555;
  text-decoration: none;
  line-height: 1.5;
  transition: opacity 0.3s;
}
.toc-list a:hover {
  opacity: 0.7;
}

.color-box {
  background-color: #fceaeb;
  color: #333;
  padding: 24px;
  border-radius: 4px;
  margin: 32px 0;
}

.definition-list {
  margin: 32px 0;
}
.definition-list dt {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  line-height: 1.5;
  margin-top: 24px;
}
.definition-list dt:first-child {
  margin-top: 0;
}
.definition-list dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background-color: #333;
  border-radius: 50%;
}
.definition-list dd {
  margin: 8px 0 0 0;
  padding-left: 18px;
  font-size: 15px;
  color: #444;
  line-height: 1.8;
}

.speech-balloon {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 32px 0;
}
.balloon-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 72px;
}
.balloon-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #eee;
}
.balloon-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.balloon-name {
  font-size: 12px;
  font-weight: bold;
  color: #333;
  margin-top: 6px;
  text-align: center;
  line-height: 1.3;
}
.balloon-content {
  position: relative;
  background-color: #fceaeb;
  color: #333;
  padding: 20px 24px;
  border-radius: 8px;
  flex-grow: 1;
}
.balloon-content::before {
  content: "";
  position: absolute;
  top: 24px;
  left: -10px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid #fceaeb;
}

/* BOX内要素の上下余白リセット（共通化） */
.color-box > *:first-child, .balloon-content > *:first-child, .qa-content > *:first-child { margin-top: 0; }
.color-box > *:last-child, .balloon-content > *:last-child, .qa-content > *:last-child { margin-bottom: 0; }

.qa-block {
  background-color: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 24px;
  margin: 32px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.qa-question {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #eaeaea;
}

/* QAアイコン共通設定 */
.qa-badge-q, .qa-badge-a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  line-height: 1;
}
.qa-badge-q { background-color: #e67a88; }
.qa-badge-a { background-color: #555; }

.qa-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  line-height: 1.5;
  padding-top: 2px;
}
.qa-answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
}
.qa-content {
  flex: 1;
  font-size: 15px;
  color: #333;
  line-height: 1.7;
  padding-top: 2px;
}

/* =========================================
   比較テーブル (1列目スクロール固定版)
========================================= */
.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
  border: 1px solid #eaeaea;
  border-radius: 6px;
}
.article-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  line-height: 1.5;
  background-color: #fff;
}
.article-table th, .article-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #eaeaea;
  border-right: 1px solid #eaeaea;
  vertical-align: middle;
  text-align: left;
  box-sizing: border-box;
}
.article-table tr:last-child th, .article-table tr:last-child td {
  border-bottom: none;
}

/* 1列目（一番左のセル）を左端に固定表示 */
.article-table tr th:first-child,
.article-table tr td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: #f7f7f8;
  color: #777;
  font-weight: bold;
  font-size: 13px;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  white-space: normal;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.04);
}

/* 1行目の2列目以降（比較対象名など）は固定せずスクロールさせる */
.article-table tr:first-child th:not(:first-child) {
  position: static;
  background-color: #f7f7f8;
  color: #777;
  font-weight: bold;
  font-size: 13px;
  min-width: 140px;
  width: 200px;
  box-shadow: none;
}

/* 一般セルの設定 */
.article-table td {
  background-color: #fff;
  color: #333;
  min-width: 140px;
  width: 200px;
}
.article-table td:last-child {
  border-right: none;
}
.article-table td img {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* =========================================
   埋め込みカード / その他装飾
========================================= */

/* 埋め込みカード */
.article-embed-card {
  display: flex;
  flex-direction: column-reverse;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  margin: 32px auto;
  max-width: 400px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s, transform 0.3s;
}
.article-embed-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.embed-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.embed-card-title {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.5;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.embed-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.embed-card-thumb {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: #f0f0f0;
  position: relative;
  border-bottom: 1px solid #eaeaea;
}
.embed-card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 記事内ボタン */
.article-full-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  background-color: #e67a88;
  color: #fff !important;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  padding: 20px 24px;
  margin: 32px 0;
  box-sizing: border-box;
  transition: opacity 0.3s;
  border-radius: 4px;
}
.article-full-btn:hover {
  opacity: 0.8;
}
.article-full-btn::after {
  content: "";
  position: absolute;
  right: 24px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
}

/* --- 記事下部 ハッシュタグ & 執筆者情報 --- */
.article-bottom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: -8px;
  margin-bottom: -40px;
  position: relative;
  z-index: 1;
}
.article-tag-link {
  color: #e67a88;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.article-tag-link:hover {
  opacity: 0.7;
}

.author-profile {
  background: #f9f9fa;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 24px;
  margin-top: 64px;
}
.author-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.author-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
  flex-shrink: 0;
}
.author-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.author-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}
.author-name {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.author-body {
  font-size: 14px;
  color: #444;
  line-height: 1.8;
}
.author-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eaeaea;
  font-size: 11px;
  color: #888;
  line-height: 1.5;
}

/* --- 配置ユーティリティ --- */
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.block-center { margin-left: auto !important; margin-right: auto !important; }
.block-right { margin-left: auto !important; margin-right: 0 !important; }

/* 記事内画像の配置 */
.img-left, .img-center, .img-right {
  display: block;
  margin-bottom: 24px;
}
.img-left { margin-right: auto; margin-left: 0; }
.img-center { margin-right: auto; margin-left: auto; }
.img-right { margin-right: 0; margin-left: auto; }

/* キャプション・注記テキスト */
.caption-text {
  font-size: 11px !important;
  color: #666666;
  margin-top: -16px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* --- 関連記事セクション --- */
.related-articles-section {
  margin-bottom: 0;
}
.column-page .cta-area {
  padding-top: 0;
}
.section-title {
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 12px;
  color: #333;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: #e67a88;
  margin: 8px auto 0;
}
.scroll-hint-wrapper {
  text-align: right;
  margin-bottom: 8px;
}
.scroll-hint {
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  color: #888;
  background: #f9f9f9;
  padding: 6px 12px;
  border-radius: 20px;
  animation: pulse-horizontal 2s infinite ease-in-out;
}

@keyframes pulse-horizontal {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}

.related-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.related-scroll-container::-webkit-scrollbar {
  height: 8px;
}
.related-scroll-container::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}
.related-scroll-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.related-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}
.related-scroll-container .article-card {
  flex: 0 0 45vw;
  scroll-snap-align: start;
}

/* --- レスポンシブ (PC用) --- */
@media (min-width: 768px) {

  /* 記事とCTAをPC幅(800px)に制限して中央寄せ */
  .column-main,
  .column-page .cta-area {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  .article-body {
    padding: 40px 32px;
    margin-bottom: 32px;
  }
  .article-title {
    font-size: 24px;
  }
  .article-embed-card {
    max-width: 480px;
  }
  .embed-card-body {
    padding: 20px;
  }
  .embed-card-title {
    font-size: 15px;
  }

  /* PC時は横スクロールのスナップを解除してカクつき防止 */
  .related-scroll-container {
    gap: 24px;
    scroll-snap-type: none;
    overscroll-behavior-x: contain;
  }
  .related-scroll-container .article-card {
    flex: 0 0 340px;
    scroll-snap-align: none;
  }
}
