/* Kisure v530 — global mobile viewport stability
 * Mobile-only containment for late-loaded ads, social embeds and other third-party
 * content. Desktop/tablet layouts are deliberately untouched.
 */
@media (max-width: 767.98px) {
    html,
    body.site-body {
        inline-size: 100%;
        max-inline-size: 100%;
        min-inline-size: 0;
        overflow-x: clip !important;
        overscroll-behavior-x: none;
    }

    body.site-body {
        position: relative;
    }

    .site-main,
    .site-main > *,
    .site-shell,
    .site-shell--wide,
    .content-grid,
    .stack-grid,
    .article-shell,
    .article-main-section,
    .news-view-page,
    .home-news-layout,
    .category-news-layout,
    .tag-news-layout,
    .football-page,
    .football-layout,
    .football-main-grid,
    .football-content-grid,
    .football-section,
    .football-fixtures-page,
    .football-standings-page,
    .football-match-page,
    .sports-desk-page,
    .sports-desk-layout,
    .site-header,
    .site-header__inner,
    .site-header__bar,
    .site-footer,
    .footer-panel {
        min-inline-size: 0 !important;
        max-inline-size: 100% !important;
        box-sizing: border-box !important;
    }

    .site-main,
    .site-header,
    .site-footer {
        overflow-x: clip !important;
    }

    /* AdSense is loaded after window.load on every public surface. Contain its
       intrinsic inline size so a late 728/970px creative can never resize the
       mobile document after first paint. */
    .ad-slot,
    .ad-slot-content,
    .football-ad-panel,
    .football-sidebar-ad-slot,
    .ks-desk-ad,
    .kisure-safe-ad-slot,
    [data-kisure-safe-ad-slot],
    .kisure-safe-ad-primary,
    .kisure-internal-ad-rotation,
    .kisure-internal-ad-item,
    .google-auto-placed,
    ins.adsbygoogle {
        inline-size: 100% !important;
        max-inline-size: 100% !important;
        min-inline-size: 0 !important;
        box-sizing: border-box !important;
    }

    .ad-slot,
    .ad-slot-content,
    .football-ad-panel,
    .football-sidebar-ad-slot,
    .ks-desk-ad,
    .kisure-safe-ad-slot,
    [data-kisure-safe-ad-slot] {
        overflow: hidden !important;
        contain: inline-size;
    }

    .ad-slot *,
    .football-sidebar-ad-slot *,
    .ks-desk-ad *,
    .kisure-safe-ad-slot *,
    [data-kisure-safe-ad-slot] * {
        max-inline-size: 100% !important;
        box-sizing: border-box !important;
    }

    .ad-slot iframe,
    .football-sidebar-ad-slot iframe,
    .ks-desk-ad iframe,
    .kisure-safe-ad-slot iframe,
    [data-kisure-safe-ad-slot] iframe,
    iframe[id^="google_ads_iframe_"],
    iframe[id^="aswift_"],
    ins.adsbygoogle {
        inline-size: 100% !important;
        max-inline-size: 100% !important;
        min-inline-size: 0 !important;
        margin-inline: auto !important;
    }

    /* The same rule protects late social/video transforms on articles, match
       pages, category cards and any future public surface without forcing the
       desktop/tablet presentation to change. */
    iframe,
    object,
    embed,
    video,
    canvas,
    .article-social-embed,
    .social-embed-wrap,
    .video-embed-wrap,
    .twitter-tweet,
    .twitter-tweet-rendered,
    .instagram-media,
    .tiktok-embed,
    .fb-post,
    .fb-video,
    .fb-page,
    .fb-comments {
        max-inline-size: 100% !important;
        box-sizing: border-box !important;
    }

    .article-social-embed,
    .social-embed-wrap,
    .video-embed-wrap,
    .twitter-tweet-rendered,
    .instagram-media,
    .tiktok-embed {
        min-inline-size: 0 !important;
        overflow: hidden;
    }

    img,
    svg {
        max-inline-size: 100%;
    }

    /* Preserve deliberate horizontal rails/tables inside their own scrollport;
       they may be wider internally, but can no longer widen the document. */
    [data-kisure-drag-scroll],
    .football-fixture-strip--scroll,
    .football-home-board__cards-row,
    .football-header-ticker__track,
    .football-header-ticker__marquee,
    .football-header-ticker__set,
    .football-section-tabs,
    .football-leaderboard-tabs,
    .football-table-wrap,
    .table-responsive {
        max-inline-size: 100% !important;
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }
}

/* v531 runtime companion: classes are applied only when a late-loaded element
   actually escapes the mobile viewport. */
@media (max-width: 767.98px) {
    html.kisure-mobile-viewport-guard,
    body.kisure-mobile-viewport-guard {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: clip !important;
    }

    .kisure-mobile-overflow-clamp {
        max-inline-size: 100% !important;
        min-inline-size: 0 !important;
        box-sizing: border-box !important;
    }

    iframe.kisure-mobile-overflow-clamp,
    object.kisure-mobile-overflow-clamp,
    embed.kisure-mobile-overflow-clamp,
    ins.adsbygoogle.kisure-mobile-overflow-clamp,
    .google-auto-placed.kisure-mobile-overflow-clamp,
    .twitter-tweet.kisure-mobile-overflow-clamp,
    .twitter-tweet-rendered.kisure-mobile-overflow-clamp,
    .instagram-media.kisure-mobile-overflow-clamp,
    .tiktok-embed.kisure-mobile-overflow-clamp,
    .fb-post.kisure-mobile-overflow-clamp,
    .fb-video.kisure-mobile-overflow-clamp,
    .fb-page.kisure-mobile-overflow-clamp,
    .fb-comments.kisure-mobile-overflow-clamp {
        inline-size: 100% !important;
        width: 100% !important;
        margin-inline: 0 !important;
    }
}
