/* ==========================================================================
   Column CSS — mg- prefix (Mujin Gym Guide)
   コラム記事専用スタイル（is_singular('post') / is_page('column') / is_category()）
   ========================================================================== */

/* ==========================================================================
   4-1. 目次 (mg-toc)
   ========================================================================== */

.mg-toc {
	background: var(--color-sub, #FAF5FF);
	border: 1px solid var(--color-border, #E5E7EB);
	border-radius: var(--radius, 8px);
	padding: 1.25rem 1.5rem;
	margin-bottom: 2rem;
}

.mg-toc__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-text, #1F2937);
	padding: 0;
}

.mg-toc__toggle-icon::after {
	content: "\25B2";
	font-size: 0.7rem;
	display: inline-block;
	transition: transform 0.2s ease;
}

.mg-toc__toggle[aria-expanded="false"] .mg-toc__toggle-icon::after {
	transform: rotate(180deg);
}

.mg-toc__list {
	margin-top: 0.75rem;
	padding-left: 1.5em;
	list-style: none;
}

.mg-toc__list.is-hidden {
	display: none;
}

.mg-toc__item {
	margin-bottom: 0.35rem;
	line-height: 1.6;
}

.mg-toc__item a {
	color: var(--color-text, #1F2937);
	font-size: 0.875rem;
	text-decoration: none;
}

.mg-toc__item a:hover {
	color: var(--color-primary, #7C3AED);
}

.mg-toc__item--sub {
	margin-left: 1.25em;
	list-style-type: disc;
	font-size: 0.8125rem;
}

.mg-toc__item--sub a {
	font-size: 0.8125rem;
}

/* ==========================================================================
   4-2. ポイント・重要事項ボックス (mg-point)
   ========================================================================== */

.mg-point {
	background: var(--color-sub, #FAF5FF);
	border-left: 4px solid var(--color-primary, #7C3AED);
	border-radius: 0 var(--radius, 8px) var(--radius, 8px) 0;
	padding: 1.25rem 1.5rem;
	margin: 2rem 0;
}

.mg-point__label {
	font-family: var(--font-heading);
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--color-primary, #7C3AED);
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem;
}

.mg-point__body p {
	margin-bottom: 0.5rem;
}

.mg-point__body p:last-child {
	margin-bottom: 0;
}

.mg-point__body ul {
	padding-left: 1.5em;
	list-style: disc;
	margin-top: 0.5rem;
}

.mg-point__body li {
	margin-bottom: 0.25rem;
	font-size: 0.9375rem;
}

/* ==========================================================================
   4-3. 注意点ボックス (mg-caution)
   ========================================================================== */

.mg-caution {
	background: #FEF3C7;
	border-left: 4px solid #F59E0B;
	border-radius: 0 var(--radius, 8px) var(--radius, 8px) 0;
	padding: 1.25rem 1.5rem;
	margin: 2rem 0;
}

.mg-caution__label {
	font-family: var(--font-heading);
	font-size: 0.8125rem;
	font-weight: 700;
	color: #B45309;
	margin-bottom: 0.5rem;
}

.mg-caution__body p {
	margin-bottom: 0.5rem;
	color: #78350F;
}

.mg-caution__body p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   4-4. チェックリスト (mg-checklist)
   ========================================================================== */

.mg-checklist {
	background: var(--color-sub, #FAF5FF);
	border-radius: var(--radius, 8px);
	padding: 1.25rem 1.5rem;
	margin: 2rem 0;
}

.mg-checklist__title {
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-text, #1F2937);
	margin-bottom: 0.75rem;
}

.mg-checklist ul {
	list-style: none;
	padding: 0;
}

.mg-checklist li {
	position: relative;
	padding-left: 1.75em;
	margin-bottom: 0.5rem;
	font-size: 0.9375rem;
	line-height: 1.7;
}

.mg-checklist li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0.15em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25em;
	height: 1.25em;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	background: var(--color-accent, #C026D3);
	border-radius: 50%;
}

/* ==========================================================================
   4-5. 比較表 (mg-table)
   ========================================================================== */

.mg-table-wrap {
	margin: 2rem 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--radius, 8px);
	border: 1px solid var(--color-border, #E5E7EB);
}

.mg-table {
	width: 100%;
	min-width: 500px;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.mg-table thead th {
	background: var(--color-primary, #7C3AED);
	color: #fff;
	font-weight: 700;
	padding: 0.75rem 1rem;
	text-align: center;
	white-space: nowrap;
}

.mg-table tbody th {
	background: var(--color-sub, #FAF5FF);
	font-weight: 700;
	text-align: left;
	padding: 0.75rem 1rem;
	white-space: nowrap;
}

.mg-table tbody td {
	padding: 0.75rem 1rem;
	text-align: center;
	border-bottom: 1px solid var(--color-border, #E5E7EB);
}

.mg-table tbody tr:last-child td,
.mg-table tbody tr:last-child th {
	border-bottom: none;
}

.mg-table tbody th {
	border-bottom: 1px solid var(--color-border, #E5E7EB);
	border-right: 1px solid var(--color-border, #E5E7EB);
}

/* ==========================================================================
   4-6. FAQ (mg-faq)
   ========================================================================== */

.mg-faq {
	background: var(--color-sub, #FAF5FF);
	border-radius: var(--radius, 8px);
	padding: 1.5rem;
	margin: 2rem 0;
}

.mg-faq__item {
	padding: 1rem 0;
	border-bottom: 1px solid var(--color-border, #E5E7EB);
}

.mg-faq__item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.mg-faq__item:first-child {
	padding-top: 0;
}

.mg-faq__q,
.mg-faq__a {
	display: flex;
	gap: 0.75rem;
	line-height: 1.7;
	font-size: 0.9375rem;
}

.mg-faq__q {
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.mg-faq__q::before,
.mg-faq__a::before {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	font-size: 0.8125rem;
	font-weight: 700;
	flex-shrink: 0;
	line-height: 1;
	margin-top: 0.1em;
}

.mg-faq__q::before {
	content: "Q";
	background: var(--color-primary, #7C3AED);
	color: #fff;
}

.mg-faq__a::before {
	content: "A";
	background: var(--color-accent, #C026D3);
	color: #fff;
}

/* ==========================================================================
   4-7. 関連記事 (mg-related) — card-grid を再利用
   ========================================================================== */

.mg-related {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border, #E5E7EB);
}

.mg-related__title {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	padding-left: 1rem;
	border-left: 4px solid var(--color-primary, #7C3AED);
}

/* ==========================================================================
   4-8. 吹き出し (mg-balloon)
   ========================================================================== */

.mg-balloon {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin: 2rem 0;
}

.mg-balloon--right {
	flex-direction: row-reverse;
}

.mg-balloon__icon {
	flex-shrink: 0;
	width: 56px;
	text-align: center;
}

.mg-balloon__icon img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}

.mg-balloon__body {
	position: relative;
	max-width: 80%;
}

.mg-balloon__name {
	font-size: 0.75rem;
	color: var(--color-text-light, #6B7280);
	margin-bottom: 0.25rem;
}

.mg-balloon__text {
	background: var(--color-sub, #FAF5FF);
	border-radius: var(--radius, 8px);
	padding: 0.875rem 1.25rem;
	font-size: 0.9375rem;
	line-height: 1.7;
	position: relative;
}

.mg-balloon--left .mg-balloon__text::before {
	content: "";
	position: absolute;
	top: 14px;
	left: -8px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 8px 6px 0;
	border-color: transparent var(--color-sub, #FAF5FF) transparent transparent;
}

.mg-balloon--right .mg-balloon__text::before {
	content: "";
	position: absolute;
	top: 14px;
	right: -8px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 0 6px 8px;
	border-color: transparent transparent transparent var(--color-sub, #FAF5FF);
}

.mg-balloon--right .mg-balloon__name {
	text-align: right;
}

/* ==========================================================================
   4-9. 監修者・執筆者情報ブロック (mg-person)
   ========================================================================== */

.mg-persons {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-top: 2.5rem;
}

@media (min-width: 768px) {
	.mg-persons {
		flex-direction: row;
	}
}

.mg-person {
	flex: 1;
	border: 1px solid var(--color-border, #E5E7EB);
	border-radius: var(--radius, 8px);
	padding: 1.5rem;
	background: var(--color-bg, #fff);
}

.mg-person__badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	padding: 2px 10px;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.mg-person--supervisor .mg-person__badge {
	background: var(--color-primary, #7C3AED);
}

.mg-person--author .mg-person__badge {
	background: var(--color-accent, #C026D3);
}

.mg-person__inner {
	display: flex;
	gap: 1rem;
}

.mg-person__avatar {
	flex-shrink: 0;
}

.mg-person__avatar img {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
}

.mg-person__name {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 0.15rem;
}

.mg-person__title {
	font-size: 0.8125rem;
	color: var(--color-text-light, #6B7280);
	margin-bottom: 0.5rem;
}

.mg-person__profile {
	font-size: 0.8125rem;
	line-height: 1.7;
	color: var(--color-text, #1F2937);
	margin-bottom: 0.5rem;
}

.mg-person__credentials {
	font-size: 0.75rem;
	color: var(--color-text-light, #6B7280);
	margin-bottom: 0.5rem;
	line-height: 1.6;
}

.mg-person__credentials-label {
	font-weight: 700;
}

.mg-person__links {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.mg-person__links a {
	font-size: 0.75rem;
	color: var(--color-primary, #7C3AED);
	border: 1px solid var(--color-border, #E5E7EB);
	padding: 2px 8px;
	border-radius: 4px;
	text-decoration: none;
}

.mg-person__links a:hover {
	background: var(--color-sub, #FAF5FF);
}

/* ==========================================================================
   4-10. CTA (mg-cta)
   ========================================================================== */

.mg-cta {
	background: linear-gradient(135deg, #4C1D95, #7C3AED);
	border-radius: var(--radius, 8px);
	padding: 2rem 1.5rem;
	text-align: center;
	color: #fff;
	margin: 2.5rem 0;
}

.mg-cta__title {
	font-family: var(--font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.mg-cta__text {
	font-size: 0.9375rem;
	opacity: 0.9;
	margin-bottom: 1.25rem;
}

.mg-cta__button {
	display: inline-block;
	padding: 0.875rem 2rem;
	background: var(--color-accent, #C026D3);
	color: #fff;
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 700;
	border-radius: var(--radius, 8px);
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.mg-cta__button:hover {
	background: #A21CAF;
	color: #fff;
	transform: scale(1.03);
	box-shadow: 0 0 20px rgba(192, 38, 211, 0.4);
}

@media (prefers-reduced-motion: reduce) {
	.mg-cta__button:hover {
		transform: none;
		box-shadow: none;
	}
}

/* ==========================================================================
   カテゴリ絞り込み (mg-cat-filter)
   ========================================================================== */

.mg-cat-filter {
	margin-bottom: 2rem;
}

.mg-cat-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
}

.mg-cat-filter__link {
	display: inline-block;
	padding: 0.4rem 1rem;
	font-size: 0.8125rem;
	border: 1px solid var(--color-border, #E5E7EB);
	border-radius: 100px;
	color: var(--color-text, #1F2937);
	text-decoration: none;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mg-cat-filter__link:hover {
	border-color: var(--color-primary, #7C3AED);
	color: var(--color-primary, #7C3AED);
}

.mg-cat-filter__link--active {
	background: var(--color-primary, #7C3AED);
	border-color: var(--color-primary, #7C3AED);
	color: #fff;
}

.mg-cat-filter__link--active:hover {
	color: #fff;
}

/* ==========================================================================
   目次 JS toggle (column.css 側でも定義)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.mg-toc__toggle-icon::after {
		transition: none;
	}
}

/* ==========================================================================
   マーカー（薄紫ハイライト） (mg-marker)
   ========================================================================== */

.mg-marker {
	background: linear-gradient(transparent 60%, rgba(124, 58, 237, 0.15) 60%);
	padding: 0 2px;
	font-weight: 700;
}

/* ==========================================================================
   箇条書きボックス — 番号なし (mg-list)
   ========================================================================== */

.mg-list {
	background: var(--color-sub, #FAF5FF);
	border: 1px solid var(--color-border, #E5E7EB);
	border-radius: var(--radius, 8px);
	padding: 1.25rem 1.5rem;
	margin: 2rem 0;
}

.mg-list__title {
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-text, #1F2937);
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--color-border, #E5E7EB);
}

.mg-list ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mg-list li {
	position: relative;
	padding-left: 1.5em;
	margin-bottom: 0.5rem;
	font-size: 0.9375rem;
	line-height: 1.7;
}

.mg-list li::before {
	content: "";
	position: absolute;
	left: 0.25em;
	top: 0.6em;
	width: 6px;
	height: 6px;
	background: var(--color-primary, #7C3AED);
	border-radius: 50%;
}

.mg-list li:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   箇条書きボックス — 番号付き (mg-list-ordered)
   ========================================================================== */

.mg-list-ordered {
	background: var(--color-sub, #FAF5FF);
	border: 1px solid var(--color-border, #E5E7EB);
	border-radius: var(--radius, 8px);
	padding: 1.25rem 1.5rem;
	margin: 2rem 0;
}

.mg-list-ordered__title {
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-text, #1F2937);
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--color-border, #E5E7EB);
}

.mg-list-ordered ol {
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: mg-ol;
}

.mg-list-ordered li {
	position: relative;
	padding-left: 2em;
	margin-bottom: 0.5rem;
	font-size: 0.9375rem;
	line-height: 1.7;
	counter-increment: mg-ol;
}

.mg-list-ordered li::before {
	content: counter(mg-ol);
	position: absolute;
	left: 0;
	top: 0.15em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4em;
	height: 1.4em;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	background: var(--color-primary, #7C3AED);
	border-radius: 50%;
}

.mg-list-ordered li:last-child {
	margin-bottom: 0;
}
