/* Novel category/search layout tune. Scoped to novel pages only. */
body.body main.article-page {
    margin-top: 12px !important;
}

/* Category chips: 10 columns on desktop, 4 columns on mobile. */
body.body main.article-page .article-categories {
    display: grid !important;
    grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
    gap: 9px !important;
    margin-top: 8px !important;
    margin-bottom: 16px !important;
    padding: 12px !important;
}
body.body main.article-page .article-categories a {
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: 40px;
    padding: 8px 6px !important;
    border-radius: 9px !important;
    text-align: center;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Novel lists: 3 columns desktop, 2 columns on phones. */
body.body main.article-page .article-results {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}
body.body main.article-page .article-result {
    min-width: 0;
    min-height: 62px;
    padding: 14px 16px !important;
}

/* Tighter gap between the feature card and the search/category area. */
body.body .novel-feature-wrap {
    margin-bottom: 8px !important;
}
body.body .novel-feature-wrap + main.article-page {
    margin-top: 8px !important;
}
body.body main.article-page .article-search {
    margin-top: 8px !important;
    margin-bottom: 14px !important;
}

@media (max-width: 900px) {
    body.body main.article-page .article-categories {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    body.body main.article-page .article-results {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    body.body main.article-page {
        margin-top: 8px !important;
    }
    body.body main.article-page .article-categories {
        gap: 7px !important;
        padding: 9px !important;
        margin-bottom: 13px !important;
    }
    body.body main.article-page .article-categories a {
        min-height: 36px;
        padding: 7px 4px !important;
        font-size: 12px !important;
    }
    body.body main.article-page .article-results {
        gap: 9px !important;
    }
    body.body main.article-page .article-result {
        min-height: 56px;
        padding: 11px !important;
    }
    body.body main.article-page .article-result h2 {
        font-size: 13px !important;
        line-height: 1.55;
    }
}
