/* ==========================================================================
   FBGroup Child — Single Post（文章單頁樣式）
   依 brief §6
   ========================================================================== */

.fb-single { background: #fff; }

/* ==========================================================================
   1. Post Header — brief §6.2
   ========================================================================== */
.fb-post__header {
	padding-top: 22px;
	padding-bottom: 0;
	max-width: var(--container-max);
}
.fb-post__cats {
	display: flex;
	gap: 6px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.fb-post__title {
	font-size: var(--fs-h1-post);
	font-weight: 500;
	color: var(--color-primary);
	line-height: 1.4;
	margin: 0 0 12px;
}
.fb-post__meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 0.5px solid var(--color-border);
}
.fb-post__avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-gold-deep));
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-accent-gold-text);
	font-size: 12px;
	font-weight: 500;
	flex-shrink: 0;
}
.fb-post__meta {
	font-size: 11px;
	color: var(--color-text-secondary);
}
.fb-post__thumb-wrap {
	margin-bottom: 16px;
}
.fb-post__thumb {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius-card);
}

/* ==========================================================================
   2. 雙欄佈局 — brief §6.3
   ========================================================================== */
.fb-post__layout {
	display: grid;
	grid-template-columns: 130px minmax(0, var(--content-max));
	gap: 32px;
	padding-top: 8px;
	padding-bottom: 32px;
	justify-content: center;
}

/* ToC 容器 */
.fb-post__toc-wrap {
	position: relative;
}
.fb-post-toc {
	position: sticky;
	top: 70px;
	background: var(--color-bg-cream-light);
	border-left: 2px solid var(--color-accent-gold);
	padding: 10px 12px;
	font-size: 10px;
	max-height: calc(100vh - 90px);
	overflow-y: auto;
}
.fb-post-toc__title {
	font-weight: 500;
	color: var(--color-primary);
	margin-bottom: 8px;
	font-size: 11px;
}
.fb-post-toc__list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.fb-post-toc__item { margin-bottom: 4px; line-height: 1.6; }
.fb-post-toc__item a {
	display: block;
	color: var(--color-text-secondary);
	text-decoration: none;
	transition: color 0.2s ease;
}
.fb-post-toc__item.is-h3 a { padding-left: 10px; font-size: 10px; }
.fb-post-toc__item.is-h3 a::before { content: '‧ '; }
.fb-post-toc__item.is-h2 a::before { content: '→ '; }
.fb-post-toc__item a:hover,
.fb-post-toc__item a.is-active {
	color: var(--color-primary);
	font-weight: 500;
}

/* ==========================================================================
   3. 內文排版 — brief §6.3
   ========================================================================== */
.fb-post__content {
	max-width: var(--content-max);
	font-size: var(--fs-body);
	line-height: var(--lh-content);
	color: var(--color-text-primary);
}
.fb-post__content p {
	font-size: var(--fs-body);
	line-height: var(--lh-content);
	color: var(--color-text-primary);
	margin: 0 0 14px;
}
.fb-post__content h2 {
	font-size: var(--fs-h2-content);
	font-weight: 500;
	color: var(--color-primary);
	margin-top: 22px;
	margin-bottom: 10px;
	line-height: 1.5;
	scroll-margin-top: 70px;
}
.fb-post__content h3 {
	font-size: var(--fs-h3);
	font-weight: 500;
	color: var(--color-primary);
	margin-top: 18px;
	margin-bottom: 8px;
	line-height: 1.5;
	scroll-margin-top: 70px;
}
.fb-post__content blockquote {
	border-left: 3px solid var(--color-accent-gold);
	background: var(--color-bg-cream-light);
	padding: 10px 14px;
	font-style: italic;
	color: var(--color-text-secondary);
	margin: 14px 0;
}
.fb-post__content blockquote p:last-child { margin-bottom: 0; }
.fb-post__content pre {
	background: var(--color-primary);
	color: #fff;
	padding: 12px;
	border-radius: var(--radius-button);
	font-family: var(--font-mono);
	font-size: var(--fs-code);
	line-height: 1.7;
	overflow-x: auto;
	margin: 14px 0;
}
.fb-post__content code {
	background: var(--color-bg-cream-light);
	color: var(--color-primary);
	padding: 0 4px;
	border-radius: 3px;
	font-family: var(--font-mono);
	font-size: 0.92em;
}
.fb-post__content pre code {
	background: transparent;
	color: inherit;
	padding: 0;
}
.fb-post__content a {
	color: var(--color-primary-light);
	text-decoration: none;
}
.fb-post__content a:hover { text-decoration: underline; }
.fb-post__content mark,
.fb-post__content .highlight {
	background: var(--color-accent-gold);
	color: var(--color-accent-gold-text);
	padding: 2px 4px;
	border-radius: 2px;
}
.fb-post__content img,
.fb-post__content figure img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-button);
	margin: 14px auto;
	display: block;
}
.fb-post__content figcaption {
	font-size: 11px;
	color: var(--color-text-muted);
	text-align: center;
	margin-top: -8px;
	margin-bottom: 14px;
}
.fb-post__content ul,
.fb-post__content ol {
	margin: 0 0 14px;
	padding-left: 24px;
}
.fb-post__content li {
	font-size: var(--fs-body);
	line-height: var(--lh-content);
	margin-bottom: 4px;
}

/* ==========================================================================
   4. 標籤雲 + 分享列 — brief §6.5
   ========================================================================== */
.fb-post__footer {
	background: var(--color-bg-cream-light);
	padding: 14px 0;
	border-top: 0.5px solid var(--color-border);
	border-bottom: 0.5px solid var(--color-border);
}
.fb-post__footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.fb-post__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-tag-chip {
	display: inline-block;
	background: #fff;
	border: 0.5px solid var(--color-border-cream);
	border-radius: 12px;
	padding: 3px 8px;
	font-size: 11px;
	color: var(--color-text-secondary);
	text-decoration: none;
}
.fb-tag-chip:hover {
	background: var(--color-primary);
	color: #fff;
	text-decoration: none;
}
.fb-post__share { display: flex; gap: 6px; }
.fb-share {
	width: 22px; height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 500;
	color: #fff;
	border: 0;
	cursor: pointer;
	text-decoration: none;
}
.fb-share--fb   { background: #1877F2; }
.fb-share--line { background: #06C755; }
.fb-share--copy { background: var(--color-text-secondary); }
.fb-share:hover { transform: translateY(-1px); text-decoration: none; color: #fff; }

/* ==========================================================================
   5. 作者卡片 — brief §6.6
   ========================================================================== */
.fb-author-card {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 16px var(--container-padding);
	background: linear-gradient(135deg, #FFFAEF, #FAEEDA);
	display: flex;
	gap: 14px;
	align-items: center;
}
.fb-author-card__avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--color-accent-gold), var(--color-accent-gold-deep));
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-accent-gold-text);
	font-size: 22px;
	font-weight: 500;
	flex-shrink: 0;
}
.fb-author-card__body { flex: 1; }
.fb-author-card__name {
	font-size: 13px;
	font-weight: 500;
	color: var(--color-primary);
	margin-bottom: 2px;
}
.fb-author-card__bio {
	font-size: 11px;
	color: var(--color-text-secondary);
	line-height: 1.6;
	margin: 0 0 6px;
}
.fb-author-card__ctas {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

/* ==========================================================================
   6. 相關文章
   ========================================================================== */
.fb-related { padding: 32px 0; }

/* ==========================================================================
   7. 行動版 — brief §15.1
   ========================================================================== */
@media (max-width: 1023px) {
	.fb-post__layout {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.fb-post-toc {
		position: static;
		max-height: none;
	}
}
@media (max-width: 767px) {
	.fb-post__header { padding-left: 18px; padding-right: 18px; }
	.fb-post__title { font-size: var(--fs-h1-post); }
	.fb-post__footer-inner { flex-direction: column; align-items: stretch; }
	.fb-author-card { flex-direction: column; text-align: center; padding: 16px 18px; }
}
