/**
 * 导入微信文章 (Import Articles from WeChat) v1.9.0
 * 公众号文章桌面端排版适配样式
 * 仅自动加载于由本插件导入的文章页面（带 _iafw_imported 标记）
 */

/* ===== 通用基础 ===== */
.iafw-wx-article {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* 图片自适应：防止固定宽度/高度撑破桌面端布局 */
.iafw-wx-article img {
	max-width: 100% !important;
	height: auto !important;
}

/* 视频等媒体元素限宽 */
.iafw-wx-article iframe,
.iafw-wx-article video,
.iafw-wx-article embed {
	max-width: 100% !important;
}

/* 腾讯视频 iframe 按 16:9 比例自适应 */
.iafw-wx-article iframe.video_iframe {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 9;
}

/* 防止内联固定宽度的块级元素溢出内容栏 */
.iafw-wx-article section,
.iafw-wx-article div,
.iafw-wx-article p,
.iafw-wx-article ul,
.iafw-wx-article ol,
.iafw-wx-article table {
	max-width: 100% !important;
}

.iafw-wx-article table {
	table-layout: auto;
}

/* 长链接/长英文强制换行，避免横向滚动条 */
.iafw-wx-article a {
	word-break: break-all;
}

/* ===== 装饰类文章（秀米 / 135编辑器等模板） =====
   装饰元素按手机宽度精确排版，这里保留原样式、
   用 750px 居中容器展示，桌面端效果与手机一致 */
.iafw-wx-article.iafw-wx-decorated {
	max-width: 750px;
	margin-left: auto;
	margin-right: auto;
}

/* ===== 朴素图文文章 =====
   排版交给主题接管，仅做基础段落优化 */
.iafw-wx-article.iafw-wx-plain p {
	margin-bottom: 1.2em;
}
