/* Mobile content safeguards for Chanh Phu Hoa website.
   Loaded after style.css; intentionally scoped to article/category content. */
.detail-layout > *, .category-layout > *,
.detail-article, .category-list, .category-item-content { min-width: 0; }

/* Editor-inserted images, video and embeds must not exceed article width. */
.detail-content img, .detail-content video, .detail-content iframe,
.detail-content embed, .detail-content object,
.category-summary img {
    max-width: 100%;
}
.detail-content img, .detail-content video { height: auto; }
.detail-content iframe { display: block; width: 100%; }
.detail-content pre, .detail-content table {
    max-width: 100%;
    overflow-x: auto;
}
.detail-content pre { white-space: pre; }
.detail-content table { display: block; width: max-content; border-collapse: collapse; }
.detail-content td, .detail-content th { overflow-wrap: anywhere; }
.detail-content, .detail-summary, .category-summary,
.category-item-content { overflow-wrap: anywhere; }

@media (max-width: 600px) {
    .detail-content { text-align: left; line-height: 1.75; }
    .detail-content iframe { aspect-ratio: 16 / 9; height: auto; }
    .detail-content table { font-size: 14px; }
    .detail-footer, .detail-actions { flex-wrap: wrap; }
    .category-item-content { min-width: 0; }
    .category-thumb img { max-width: 100%; height: 100%; object-fit: cover; }
}

@media (prefers-reduced-motion: reduce) {
    .detail-content *, .category-content * { scroll-behavior: auto; }
}
