.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 16px;
}

.footer-links #script_seo_links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.footer-links a {
    color: inherit;
}
.chigua-player {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 360px;
    border: 0;
    background: #000;
}

/* The upstream page marks its phone layout with body.mobile. Keep these
   constraints active even when a mobile WebView reports a desktop-like CSS
   viewport during its first paint. */
body.mobile #wrap,
body.mobile .container,
body.mobile .content-wrapper,
body.mobile #index,
body.mobile #archive,
body.mobile #index article,
body.mobile #archive article,
body.mobile .post-card-container {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body.mobile .container > .row,
body.mobile .container-fluid > .row {
    margin-right: 0;
    margin-left: 0;
}

body.mobile #index article .post-card-container,
body.mobile #archive article .post-card-container,
body.mobile #index article .post-card-title,
body.mobile #archive article .post-card-title,
body.mobile #index article .post-card-info,
body.mobile #archive article .post-card-info {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.mobile #index article .post-card-container,
body.mobile #archive article .post-card-container {
    overflow: hidden;
}

body.mobile .content-wrapper,
body.mobile #index,
body.mobile #archive {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

@media (max-width: 767px) {
    .chigua-player {
        min-height: 0;
    }

    html,
    body,
    #wrap {
        max-width: 100%;
    }

    /* Bootstrap's negative row gutters and upstream card minimum widths push
       the feed outside narrow screens. Keep the gutter inside the viewport. */
    body > .container,
    #wrap > .container,
    .container.pt125,
    .content-wrapper,
    #index,
    #archive,
    #index article,
    #archive article,
    .post-card-container {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .container > .row,
    .container-fluid > .row {
        margin-right: 0;
        margin-left: 0;
    }

    #index article .post-card-container,
    #archive article .post-card-container {
        overflow: hidden;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    #index article .post-card-title,
    #archive article .post-card-title,
    #index article .post-card-info,
    #archive article .post-card-info {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    #index article img,
    #archive article img,
    .post-card-container img {
        max-width: 100%;
        height: auto;
    }

    /* The upstream card grid can retain desktop column offsets after its
       mobile script switches body classes. Rebuild the feed as a true
       single-column grid so neither cards nor overlays can start off-screen. */
    body.card #index,
    body.card #archive {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.5rem !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    body.card #index > *,
    body.card #archive > *,
    body.card #index article,
    body.card #archive article {
        position: relative !important;
        left: auto !important;
        float: none !important;
        flex: none !important;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        transform: none !important;
    }

    #index article .post-card,
    #archive article .post-card,
    #index article .post-card-mask,
    #archive article .post-card-mask {
        position: relative;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        box-sizing: border-box;
        overflow: hidden;
        transform: none !important;
    }

    #index article .post-card-container,
    #archive article .post-card-container {
        right: 0 !important;
        left: 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        white-space: normal !important;
        overflow: hidden !important;
        transform: none !important;
    }

    #index article .post-card-title,
    #archive article .post-card-title,
    #index article .post-card-info,
    #archive article .post-card-info {
        position: static !important;
        right: auto !important;
        left: auto !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        white-space: normal !important;
        transform: none !important;
    }
}

.chigua-content-image-crop {
    display: block;
    width: 100%;
    overflow: hidden;
}

.chigua-content-image-crop > img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    cursor: default;
}
