/**
 * SELFDUCK LAB - 記事単体ページ専用CSS
 * このファイルは single-media_article.php でのみ読み込まれる。
 * media.css（/media/）・media-category.css（カテゴリTOP）は変更しない。
 * 共通ヘッダー/フッターは media.css の既存スタイルをそのまま利用し、
 * このファイルは記事本文（.sdm-article-*）のみを対象とする。
 */

.sdm-article-main {
	max-width: 760px;
	margin: 0 auto;
	padding: 0 24px 64px;
}

.sdm-article-breadcrumb {
	font-size: 0.8rem;
	color: #888;
	padding: 20px 0;
}

.sdm-article-breadcrumb a {
	color: #888;
	text-decoration: none;
}

.sdm-article-breadcrumb a:hover {
	text-decoration: underline;
}

.sdm-article-breadcrumb__sep {
	margin: 0 6px;
}

.sdm-article-breadcrumb__current {
	color: #333;
}

.sdm-article__header {
	padding: 8px 0 28px;
	border-bottom: 1px solid #e6e0da;
	margin-bottom: 28px;
}

.sdm-article__title {
	font-size: 1.9rem;
	line-height: 1.5;
	margin: 0 0 16px;
}

.sdm-article__meta {
	margin: 0;
	font-size: 0.85rem;
	color: #666;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.sdm-article__author {
	font-weight: 600;
	color: #b5764f;
}

/* 記事上部の日付表示（公開日＝カレンダーアイコン／更新日＝更新アイコン）
   ロジックは single-media_article.php 側。ここは見た目のみ。 */
.sdm-article__date {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	color: #777;
	font-variant-numeric: tabular-nums;
}

.sdm-article__date::before {
	content: "";
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sdm-article__date--updated::before {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.4-5.7'/%3E%3Cpath d='M20 4v5h-5'/%3E%3C/svg%3E");
}

.sdm-article__body {
	font-size: 0.98rem;
	line-height: 2;
	color: #333;
}

.sdm-article__body h2 {
	font-size: 1.4rem;
	margin: 40px 0 16px;
	padding-bottom: 6px;
	border-bottom: 2px solid #e5b8a0;
}

.sdm-article__body h3 {
	font-size: 1.15rem;
	margin: 28px 0 12px;
}

.sdm-article__body p {
	margin: 0 0 20px;
}

.sdm-article__body a {
	color: #b5764f;
	overflow-wrap: break-word;
	word-break: break-all;
}

/* ============================================================
 * 比較表（すべての media_article 記事で共通の表仕様）
 * 2026-08-23 Phase 4 追加。記事ごとの個別CSSを増やさず、
 * ここで定義した仕様を今後の全記事の <table> に自動適用する。
 * ============================================================ */
.sdm-article__body table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	margin: 8px 0 28px;
	font-size: 0.92rem;
}

.sdm-article__body th,
.sdm-article__body td {
	border: 1px solid #d8cfc3;
	padding: 12px 14px;
	text-align: left;
	line-height: 1.6;
	vertical-align: top;
}

.sdm-article__body thead th {
	background: #f7ede4;
	color: #2a2a2a;
	font-weight: 700;
	white-space: nowrap;
}

.sdm-article__body tbody tr:nth-child(even) td,
.sdm-article__body tbody tr:nth-child(even) th {
	background: #fcfaf7;
}

.sdm-article__body td:first-child,
.sdm-article__body th:first-child {
	background: #f7ede4;
	font-weight: 600;
	white-space: nowrap;
}

.sdm-article__body thead th:first-child {
	background: #f2ddc9;
}

/* .s_table は既存の本文フィルターが <table> を自動でラップするクラス。
   PC では通常表示、SPの横スクロール対応は下部のメディアクエリで指定する。 */
.sdm-article__body .s_table {
	margin: 24px 0 28px;
}

.sdm-article__body .s_table table {
	margin: 8px 0 0;
}

/* ============================================================
 * 関連記事カード（.sdm-related-card）
 * 本文内で「次に読む記事」を案内するための共通コンポーネント。
 * 既存のCTA（q_button / sdm-cat-cta）とは意図的にデザインを分け、
 * 「次に読むコンテンツ」として控えめに見えるようにする。
 * 記事本文（Classic Editor）に直接貼り付けて使用する。
 * ============================================================ */
.sdm-related-card {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 32px 0;
	padding: 18px 20px;
	background: #ffffff;
	border: 1px solid #d9e3ee;
	border-radius: 14px;
	text-decoration: none !important;
	color: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sdm-related-card:hover {
	border-color: #a9c3e0;
	box-shadow: 0 4px 14px rgba(76, 110, 150, 0.14);
	transform: translateY(-1px);
}

.sdm-related-card__thumb {
	flex: 0 0 92px;
	width: 92px;
	height: 92px;
	border-radius: 10px;
	overflow: hidden;
	background: #eef4fb;
}

.sdm-related-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* サムネイルが無い場合は、本文側で .sdm-related-card__thumb 要素ごと省略する。
   flex レイアウトのため、省略してもカード全体のレイアウトは崩れない。 */

.sdm-related-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.sdm-related-card__label {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #4a72a3;
	background: #eaf1fa;
	padding: 3px 10px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.sdm-related-card__title {
	font-size: 1rem;
	font-weight: 700;
	color: #222;
	margin: 0 0 6px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sdm-related-card__desc {
	font-size: 0.83rem;
	color: #666;
	margin: 0 0 8px;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sdm-related-card__more {
	font-size: 0.8rem;
	font-weight: 700;
	color: #4a72a3;
}

/* ============================================================
 * FAQコンポーネント（.sdm-faq）
 * SELFDUCK LAB 全記事共通のFAQ表示コンポーネント。
 * 2026-08-25 追加。記事ごとの個別CSSを増やさず、
 * 本文（Classic Editor）に直接貼り付けて使用する共通仕様とする。
 * JavaScript不使用・アコーディオン化なし（静的なQ&Aカード）。
 * FAQPage構造化データはここでは追加しない（別工程で判断）。
 * ============================================================ */
.sdm-article__body .sdm-faq {
	margin: 8px 0 28px;
}

.sdm-article__body .sdm-faq-item {
	background: #ffffff;
	border: 1px solid #d9e3ee;
	border-radius: 14px;
	padding: 20px 22px;
	margin: 0 0 16px;
}

.sdm-article__body .sdm-faq-item:last-child {
	margin-bottom: 0;
}

.sdm-article__body .sdm-faq-q {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 700;
	font-size: 1rem;
	color: #222;
	margin: 0 0 12px;
	line-height: 1.6;
}

.sdm-article__body .sdm-faq-a {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	line-height: 1.6;
	padding-top: 12px;
	border-top: 1px solid #eaf1fa;
}

.sdm-article__body .sdm-faq-q-mark,
.sdm-article__body .sdm-faq-a-mark {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
}

.sdm-article__body .sdm-faq-q-mark {
	background: #4a72a3;
	color: #ffffff;
}

.sdm-article__body .sdm-faq-a-mark {
	background: #eaf1fa;
	color: #4a72a3;
}

.sdm-article__body .sdm-faq-q-text {
	flex: 1 1 auto;
	padding-top: 2px;
}

.sdm-article__body .sdm-faq-a-text {
	flex: 1 1 auto;
}

.sdm-article__body .sdm-faq-a-text p {
	margin: 0 0 12px;
	font-size: 0.98rem;
	color: #333;
}

.sdm-article__body .sdm-faq-a-text p:last-child {
	margin-bottom: 0;
}

/* ==== レスポンシブ対応（media.css の既存ブレークポイントに合わせる） ==== */
@media screen and (max-width: 760px) {
	.sdm-article__title {
		font-size: 1.5rem;
	}

	.sdm-article__body .s_table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.sdm-article__body .s_table::before {
		content: "← 横にスクロールして比較できます →";
		display: block;
		margin-bottom: 8px;
		font-size: 0.72rem;
		color: #888;
	}

	.sdm-related-card {
		gap: 14px;
		padding: 14px 16px;
	}

	.sdm-related-card__thumb {
		flex: 0 0 72px;
		width: 72px;
		height: 72px;
	}

	.sdm-related-card__title {
		font-size: 0.94rem;
	}

	.sdm-related-card__desc {
		font-size: 0.8rem;
	}

	.sdm-article__body .sdm-faq-item {
		padding: 16px 16px;
	}
}

@media screen and (max-width: 600px) {
	.sdm-article-main {
		padding: 0 16px 48px;
	}
}

@media screen and (max-width: 420px) {
	.sdm-article__title {
		font-size: 1.3rem;
	}

	.sdm-article__body table {
		font-size: 0.86rem;
	}

	.sdm-article__body th,
	.sdm-article__body td {
		padding: 10px 12px;
	}

	.sdm-article__body .sdm-faq-q,
	.sdm-article__body .sdm-faq-a {
		font-size: 0.92rem;
	}
}


/* ============================================================
 * SELFDUCKの現場からコンポーネント（.sdm-genba）
 * 実店舗事例・実際の質問・運営知見などを、医学的一般論と
 * 明確に区別して掲載するための共通コンポーネント。
 * 2026-08-25 追加。B03専用ではなく、今後のmedia_article全体で
 * 再利用する。JavaScript不使用。
 * ============================================================ */
.sdm-article__body .sdm-genba { background: #f7fafc; border: 1px solid #dbe6f0; border-radius: 10px; padding: 14px 18px; margin: 8px 0 24px; }
.sdm-article__body .sdm-genba__label { display: inline-block; font-size: 0.78rem; font-weight: 700; color: #4a72a3; background: #eaf1fa; border-radius: 999px; padding: 2px 10px; margin: 0 0 8px; }
.sdm-article__body .sdm-genba p { margin: 0 0 8px; font-size: 0.95rem; line-height: 1.7; color: #333; }
.sdm-article__body .sdm-genba p:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .sdm-article__body .sdm-genba { padding: 12px 14px; }
}
@media (max-width: 420px) {
  .sdm-article__body .sdm-genba p { font-size: 0.9rem; }
}

/**
 * SELFDUCK代表・編集部コメント 共通コンポーネント（.sdm-voice）
 * .sdm-genba の配色・余白ルールをベースに、
 * 「誰が、どの立場から話している情報か」を明示するための吹き出し型コンポーネントへ拡張。
 * 現時点では SELFDUCK代表（.sdm-voice--rep）のみ実装。
 * 将来的に編集部・店舗スタッフ・商品検証担当等へ拡張する場合は
 * 同様の修飾クラス（例: .sdm-voice--editor, .sdm-voice--staff）を追加する想定。
 * 顔写真が未設定の間は .sdm-voice__avatar--placeholder を使用し、
 * 画像確定後は同じ .sdm-voice__avatar 内に <img class="sdm-voice__photo"> を追加するだけで差し替え可能。
 */
.sdm-article__body .sdm-voice {
  background: #f7fafc;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 8px 0 24px;
}
.sdm-article__body .sdm-voice__label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a72a3;
  background: #eaf1fa;
  border-radius: 999px;
  padding: 2px 10px;
  margin: 0 0 10px;
}
.sdm-article__body .sdm-voice__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.sdm-article__body .sdm-voice__avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #e3ebf3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sdm-article__body .sdm-voice__photo {
  position: absolute;
  width: 160%;
  height: 160%;
  left: -16%;
  top: -2%;
  object-fit: cover;
  display: block;
}
.sdm-article__body .sdm-voice__avatar--placeholder {
  background-color: #e3ebf3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23aebccb' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4.4 0-9 2.2-9 5v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-2c0-2.8-4.6-5-9-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58%;
}
.sdm-article__body .sdm-voice__body {
  flex: 1 1 auto;
  min-width: 0;
}
.sdm-article__body .sdm-voice__meta {
  margin: 0 0 6px;
  line-height: 1.4;
}
.sdm-article__body .sdm-voice__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #222;
}
.sdm-article__body .sdm-voice__role {
  display: block;
  font-size: 0.72rem;
  color: #6b7c93;
  margin-top: 2px;
}
.sdm-article__body .sdm-voice__bubble {
  position: relative;
  background: #fff;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 2px;
}
.sdm-article__body .sdm-voice__bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 16px;
  width: 11px;
  height: 11px;
  background: #fff;
  border-left: 1px solid #dbe6f0;
  border-bottom: 1px solid #dbe6f0;
  transform: rotate(45deg);
}
.sdm-article__body .sdm-voice__bubble p {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
}
.sdm-article__body .sdm-voice__bubble p:last-child {
  margin-bottom: 0;
}
@media (max-width: 760px) {
  .sdm-article__body .sdm-voice { padding: 12px 14px; }
  .sdm-article__body .sdm-voice__row { gap: 10px; }
  .sdm-article__body .sdm-voice__avatar { width: 44px; height: 44px; }
}
@media (max-width: 420px) {
  .sdm-article__body .sdm-voice__avatar { width: 40px; height: 40px; }
  .sdm-article__body .sdm-voice__name { font-size: 0.88rem; }
  .sdm-article__body .sdm-voice__bubble { padding: 9px 12px; }
  .sdm-article__body .sdm-voice__bubble p { font-size: 0.88rem; }
}
