/* ==========================================================================
   MangoFlow 响应式样式
   断点：桌面 ≥1200 / 平板 768-1199 / 手机 <768
   ========================================================================== */

/* 大屏：5列 */
@media (min-width: 1500px) {
	.mf-masonry { column-count: 5; }
}

/* 平板 */
@media (max-width: 1199px) {
	:root { --mf-sidebar-w: 160px; --mf-rightbar-w: 260px; }

	.mf-masonry { column-count: 3; }

	.mf-header-inner { padding: 0 16px; }
	.mf-main { padding: 16px; }

	.mf-rightbar { padding: 16px 16px 16px 0; }

	.mf-single { max-width: 100%; }
}

/* 平板竖屏 / 大手机：隐藏右侧栏，侧边栏变抽屉 */
@media (max-width: 991px) {
	.mf-body-wrap.mf-has-rightbar .mf-rightbar { display: none; }

	.mf-masonry { column-count: 2; }

	/* 左侧导航变抽屉 */
	.mf-sidebar {
		position: fixed;
		top: var(--mf-header-h);
		left: 0;
		bottom: 0;
		width: 260px;
		height: calc(100vh - var(--mf-header-h));
		z-index: 200;
		transform: translateX(-100%);
		transition: transform .3s cubic-bezier(.4,0,.2,1);
		box-shadow: 4px 0 24px rgba(0,0,0,.12);
	}
	.mf-sidebar.is-open { transform: translateX(0); }
	.mf-sidebar-toggle { display: flex; }
	.mf-sidebar-overlay {
		display: none;
		position: fixed;
		inset: var(--mf-header-h) 0 0 0;
		background: rgba(0,0,0,.4);
		z-index: 199;
	}
	.mf-sidebar-overlay.is-visible { display: block; }

	.mf-search { max-width: none; }

	.mf-hero-img { height: 220px; }

	.mf-single-gallery { grid-template-columns: 1fr; }
}

/* 手机 */
@media (max-width: 767px) {
	:root { --mf-header-h: 56px; }

	body.mf-body { font-size: 13px; }

	.mf-masonry { column-count: 2; column-gap: 10px; }
	.mf-card { margin-bottom: 10px; }
	.mf-card-body { padding: 10px 12px 12px; }
	.mf-card-title { font-size: 14px; }

	/* 新布局手机端适配 */
	.mf-community { max-width: 100%; }
	.mf-community-card { padding: 16px; border-radius: 12px; }
	.mf-community-card .mf-cc-title { font-size: 15px; }
	.mf-community-card .mf-cc-excerpt { -webkit-line-clamp: 2; }
	.mf-community-card .mf-cc-thumb { border-radius: 8px; }
	.mf-community-card .mf-cc-actions { gap: 16px; }
	.list-card { flex-direction: column; }
	.mf-list-card .mf-lt-content { padding: 14px 16px; }
	.mf-list-card h3 { font-size: 15px; }
	.mf-list-card .mf-lt-excerpt { -webkit-line-clamp: 1; }
	.mf-grid-card .mf-gd-content { padding: 10px 12px; }
	.mf-grid-card h3 { font-size: 14px; }
	.mf-grid-card .mf-gd-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
	.mf-cover-card .mf-cv-overlay { padding: 36px 12px 12px; }
	.mf-cover-card h3 { font-size: 13px; }
	.mf-cover-card .mf-cv-tag { font-size: 11px; padding: 3px 10px; }
	.mf-cover-card .mf-cv-count { font-size: 10px; }

	.mf-header-inner { padding: 0 12px; gap: 10px; }
	.mf-logo-text { font-size: 18px; }
	.mf-search-btn { width: 32px; height: 32px; }

	.mf-main { padding: 12px; }

	.mf-hero { margin-bottom: 12px; }
	.mf-hero-img { height: 180px; }
	.mf-hero-caption { padding: 24px 16px 12px; }
	.mf-hero-caption h2 { font-size: 16px; }

	.mf-filter-tabs { gap: 8px; padding-bottom: 14px; }
	.mf-filter-tab { padding: 7px 12px; font-size: 12px; }

	.mf-single-header { flex-direction: column; }
	.mf-single-title { font-size: 20px; }
	.mf-single-meta { gap: 12px; font-size: 12px; }

	.mf-content { font-size: 15px; }

	.mf-action-bar { gap: 10px; padding: 18px 0; }
	.mf-action-btn { padding: 8px 14px; min-width: 64px; }
	.mf-action-btn .mf-action-label { display: none; }

	.mf-post-nav { flex-direction: column; }
	.mf-post-next { text-align: left; }

	.mf-comment .children { padding-left: 28px; }
	.mf-comment-body { gap: 8px; }
	.mf-comment-avatar .mf-avatar { width: 36px; height: 36px; }
	.mf-comment-form-guest { grid-template-columns: 1fr; }
	.mf-comment-form-actions { flex-direction: column; align-items: stretch; gap: 10px; }
	.mf-comment-form-actions .mf-btn { width: 100%; }

	.mf-uc-profile { flex-wrap: wrap; }
	.mf-uc-level { max-width: 100%; }
	.mf-uc-tabs { gap: 16px; overflow-x: auto; }
	.mf-uc-tab { white-space: nowrap; }
	.mf-uc-setting-row { flex-wrap: wrap; }
	.mf-uc-setting-label { width: auto; }

	.mf-modal-dialog { max-width: 100%; }
	.mf-modal-body { padding: 20px; }

	.mf-footer-inner { flex-direction: column; text-align: center; }
	.mf-footer-copy p { text-align: center; }

	.mf-backtop { right: 16px; bottom: 16px; width: 40px; height: 40px; }

	.mf-unlock-wechat-body { flex-direction: column; }
	.mf-wechat-qrcode { width: 80px; height: 80px; }

	.mf-404-code { font-size: 72px; }
}

/* 小屏手机：单列可选（默认2列保持瀑布流感，更小屏回到2列紧凑） */
@media (max-width: 380px) {
	.mf-card-title { font-size: 13px; -webkit-line-clamp: 1; }
	.mf-card-excerpt { display: none; }
	.mf-card-meta { gap: 8px; }
}

/* 视网膜/高分辨率优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	.mf-card-img, .mf-hero-img, .mf-gallery-img {
		image-rendering: -webkit-optimize-contrast;
	}
}

/* 打印 */
@media print {
	.mf-sidebar, .mf-rightbar, .mf-header-actions, .mf-action-bar, .mf-comments, .mf-backtop, .mf-filter-tabs { display: none !important; }
	.mf-main { padding: 0; }
	.mf-card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
}
