@media (max-width: 768px) {
    .wrapper {
        width: 1100px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .sidebar {
        display: none;
    }

    .pagination>li>a {
        border: 1px solid var(--grey-color);
        padding: 7px 13px;
        outline: none;
        cursor: pointer;
        color: var(--grey-color);
    }

    .support-detail {
        width: 100%;
        margin-top: 15px;
    }

    .footer-bottom {
        font-size: 12px;
    }

    .footer-links,
    .support-detail,
    .social-icons-box {
        flex: unset;
    }

    .footer-links {
        width: 100%;
        text-align: center;
    }

    .footer-links ul {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .footer-links ul li {
        width: 50%;
    }

    .social-icons-box {
        width: 100%;
        justify-content: center;
        position: unset;
        margin-top: 15px;
    }

    .secure-logo {
        width: 100%;
    }

    .secure-logo~div {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .footer-links .nav-link {
        padding: 3px;
        text-decoration: underline;
        font-size: 12px;
    }

    .footer-text {
        margin-top: 5px;
        font-size: 12px;
    }

    .modal-body .card32b .col-12 {
        display: flex;
        align-items: center;
        border: 1px solid #ccc;
        padding: 5px;
    }

    .cmertercard {
        width: 23px !important;
    }

    .placebet-run {
        position: absolute;
        width: 100%;
        text-align: center;
        margin-top: 75px;
        top: 0;
    }

    .placebet-run img {
        width: 50px;
    }

    .clspwidth p {
        width: 50px;
    }

    .cc-banner-ball img {
        width: 24px !important;
        margin-right: 5px !important;
    }

    .cc-banner-ball {
        position: absolute;
        top: 157px !important;
        width: 100%;
        text-align: center;
    }

    .cc-banner-container-inner {
        height: 110px !important;
    }

    .cc-banner-container {
        background-color: rgba(0, 0, 0, 0.4);
        position: absolute;
        width: 80% !important;
        height: 110px !important;
        display: flex;
        justify-content: center;
        left: 11% !important;
        top: 9% !important;
        color: #fff;
    }

    .video-tv-popup {
        position: absolute;
        top: 0;
        width: 100%;
    }

    .video-tv-popup .img-fluid {
        max-width: 74%;
        height: 250px;
    }

    .cc-banner-container h4 {
        font-size: 15px !important;
    }

    .cc-banner-container h5 {
        font-size: 12px !important;
        margin-bottom: 0px !important;
    }

    .cc-banner-container span {
        font-family: Digital;
        font-weight: bold;
        font-size: 13px !important;
        line-height: 16px !important;
    }

    .modal-body .card32b .col-12 h4 {
        margin-bottom: 0px;
        font-size: 16px;
        margin-right: 20px;
    }

    .modal-body .card32b .row {
        margin-left: -5px;
        margin-right: -5px;
    }

    .modal-body .card32 .col-12 {
        display: flex;
        align-items: center;
        border: 1px solid #ccc;
        padding: 5px;
    }

    .modal-body .card32 .col-12 h4 {
        margin-bottom: 0px;
        font-size: 16px;
        margin-right: 20px;
    }

    .modal-body .card32 .row {
        margin-left: -5px;
        margin-right: -5px;
    }

    .videoCards img {
        width: 23px !important;
    }

    .opentp .eightplayer {
        width: 100%;
    }

    .opentp .eightplayer .row {
        padding: 0px;
        margin: 0px;
    }

    .opentp .eightplayer .row .sixplayer-image {
        display: flex;
        align-items: center;
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 5px;
    }

    .opentp .eightplayer .row .sixplayer-image h4 {
        font-size: 14px;
        margin-right: 10px;
        margin-left: 20px;
    }

    .card-dtl-mobile {
        width: 100%;
        margin-bottom: 2px !important;
        margin-top: 2px !important;
    }

    .superover .suspended::after {
        width: 80% !important;
    }

    .superover .fancy-tripple .suspended::after {
        width: 40% !important;
    }

    .fancy-tripple-box .suspended::after {
        width: 40% !important;
    }

    .fancy-market .fancy-tripple.suspended::after {
        width: 40% !important;
    }

    .fivewicket .fancy-tripple .suspended::after {
        width: 40% !important;
    }

    .fancy-market .box-6 {
        width: 60%;
        min-width: 60%;
        max-width: 60%;
    }

    .fivewicket .clock2digit {
        bottom: 45px;
    }

    .Superover .clock2digit {
        bottom: 68px;
    }

    .casinoicons .new-launch-casino {
        -webkit-animation: NAME-YOUR-ANIMATION 1s infinite;
        -moz-animation: NAME-YOUR-ANIMATION 1s infinite;
        -o-animation: NAME-YOUR-ANIMATION 1s infinite;
        animation: NAME-YOUR-ANIMATION 1s infinite;
        position: absolute;
        left: 63%;
        top: -15px;
        padding: 5px;
        border-radius: 50%;
        height: 40px;
        width: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        line-height: normal;
        color: #fff;
        font-size: 11px;
    }

    @keyframes NAME-YOUR-ANIMATION {

        0%,
        49% {
            background-color: rgba(215, 43, 43, 0.8);
        }

        50%,
        100% {
            background-color: rgba(0, 15, 255, 0.8);
        }
    }

    .mobilescorcard {
        display: flex;
        padding-left: 24px;
    }

    .mobile-flex {
        display: flex;
        justify-content: space-between;
        padding-left: 10px;
    }

    .mobile-flex span {
        padding: 0px;
        white-space: nowrap;
    }

    .mobile-flex p span:nth-child(1) {
        margin-right: 10px;
    }

    .hands-pattern-container .nav-tabs .nav-item {
        width: 49%;
        background-color: var(--theme1-bg);
    }

    .hands-pattern-container .nav-tabs .nav-link {
        background-color: var(--theme2-bg);
        color: #fff;
    }

    .meter-content img {
        width: 30px;
    }

    .col12p10 {
        padding: 0px 10px;
    }

    .meter-content .col-lg-6 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .hands-pattern-container .bt-action {
        text-align: left;
    }

    .hands-pattern-container .patern-name {
        width: 100%;
    }

    .hands-pattern-container .point {
        float: none;
        text-align: left;
        font-weight: bold;
        font-size: 16px;
        margin-top: 10px;
        display: inline-block;
    }

    .hands-pattern-container .min-max {
        font-size: 11px;
        float: none;
    }

    .search {
        display: flex;
        align-items: center;
    }

    .casino-video-title {
        display: none !important;
    }

    .lucky7card {
        margin-right: 3px;
    }

    .card32 .videoCards img {
        width: 22px !important;
    }

    .card32 .videoCards span {
        font-size: 12px;
    }

    .queen .videoCards img {
        width: 22px !important;
    }

    .queen .videoCards span {
        font-size: 12px;
    }

    .baccarat .player-card img {
        height: 15px;
        margin-top: 5px;
    }

    .baccarat .bet-odds {
        font-size: 11px !important;
    }

    .casino-name {
        background-image: linear-gradient(var(--theme1-bg), var(--theme2-bg));
        color: var(--primary-color);
        padding: 2px;
        position: absolute;
        width: 100%;
        bottom: -15px;
        text-align: center;
        text-transform: uppercase;
        font-weight: bold;
        border-radius: 4px;
        font-size: 8px;
    }

    footer p {
        display: flex;
        align-items: center;
        font-size: 12px;
        justify-content: center;
    }

    .video-overlay img {
        width: 24px !important;
        height: auto;
        margin-right: 2px;
        margin-left: 2px;
    }

    .hidemob {
        display: none !important;
    }

    .ball-runs {
        height: 25px;
        width: 25px;
        font-size: 12px;
        line-height: 25px;
    }

    .aaa-content {
        background-color: #eee;
        padding: 10px !important;
    }

    .result-image img,
    .player-type img,
    .sixplayer-image img,
    .andar-bahar-image {
        width: 35px;
    }

    .logo img {
        height: 27px;
    }

    .card-seven img {
        width: 30px !important;
        cursor: pointer;
    }

    .header-top {
        height: 60px;
        display: flex;
        padding-left: 5px;
    }

    .header-top ul {
        padding-top: 0px;
    }

    .t-underline {
        font-weight: normal;
    }

    .profile-section {
        width: 100%;
        display: flex;
        justify-content: end;
        margin-top: 5px;
        align-items: center;
    }

    .profile-section i {
        font-size: 11px;
    }

    .profile-right-side {
        align-items: self-start;
    }

    .search .fa-search-plus {
        color: var(--primary-color);
        font-size: 24px;
        margin-left: 0px;
        float: right;
        margin-top: 5px;
    }

    .header-top .fa-home {
        font-size: 21px;
    }

    /* d247 parity: mobile search lives in its own full-width row under the
       logo/balance bar. Collapsed to just the + icon until clicked. */
    .header-top .search-box-container.mobile-search-row {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 0 2px;
    }

    .header-top .search-box-container.mobile-search-row .search-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        width: 100%;
    }

    .header-top .search-box-container.mobile-search-row .MuiAutocomplete-root {
        width: 0 !important;
        min-width: 0;
        flex: 0 0 0;
        transition: width 0.4s linear;
    }

    .header-top .search-box-container.mobile-search-row .MuiAutocomplete-root.show {
        width: calc(100% - 34px) !important;
        flex: 1 1 auto;
    }

    .header-top .search-box-container.mobile-search-row .search-input {
        margin-left: 8px;
    }

    .header-top .search-box-container.mobile-search-row .MuiFilledInput-root {
        height: 34px;
    }

    .header-top .search-box-container.mobile-search-row .depowith {
        display: none;
    }

    .favourite ul {
        display: flex;
        width: auto;
    }

    .marqueeheader {
        padding: 0px 10px 10px 10px;
    }

    .support-detail h2 {
        color: #fff;
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 0;
    }

    .header-mobile {
        width: 100%;
    }

    .header-mobile .navbarnav {
        background-color: var(--theme1-bg) !important;
        box-shadow: 0 3px 5px rgba(57, 63, 72, 0.5);
        flex-wrap: nowrap;
        height: 40px !important;
        overflow-x: auto;
        overflow-y: hidden;
        position: relative;
        display: flex;
        padding-left: 0;
        margin-bottom: 0;
        list-style: none;
        align-items: center;
    }

    .header-mobile .nav-item {
        flex: 1 1 auto;
        position: relative;
        text-align: center;
        line-height: 32px;
        white-space: nowrap;
    }

    .header-mobile .nav-item a {
        background-color: var(--theme1-bg) !important;
        border-left: 0 solid #fff !important;
        border-right: 0 solid #fff !important;
        color: #fff;
        font-size: 15px;
        font-weight: 500 !important;
        height: 100%;
        padding: 8px;
        text-transform: uppercase;
        font-family: 'Roboto Condensed';
        line-height: 15px !important;
        text-decoration: none;
    }

    .header-mobile .nav-item a:after {
        content: '|';
        position: absolute;
        right: 0;
        top: 8px;
    }

    .header-mobile .nav-item .active {
        border-top: 2px solid #fff;
    }

    .mobile-header-2 {
        background-color: var(--theme2-bg) !important;
        box-shadow: 0 0.063em 0.25em rgba(37, 50, 55, 0.25);
        z-index: 2;
        top: 0;
        overflow: auto;
        white-space: nowrap;
        display: block;
        box-shadow: 0 0.063em 0.25em rgba(37, 50, 55, 0.25);
        margin-top: 0px !important;
        overflow: auto;
    }

    .mobile-header-2 .active {
        background-color: var(--theme1-bg) !important;
    }

    .mobile-header-2 .nav-tabs .nav-link {
        border-radius: 0;
        color: #fff;
        background-color: var(--theme2-bg);
        border-right: 0px solid var(--theme2-bg) !important;
        border: 0;
    }

    .mobile-header-2 p {
        margin: 5px 0px 0px 0px;
    }

    .pt30 {
        padding-top: 20px;
    }

    .pb30 {
        padding-bottom: 20px;
    }

    .blink_me {
        -webkit-animation: blinker 1s linear infinite;
        animation: blinker 1s linear infinite;
    }

    @keyframes blinker {
        50% {
            opacity: 0;
        }
    }

    .coupon-table-mobile td {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }

    .mobile-match {
        padding: 15px 0px;
        margin: 15px;
    }

    .mobile-match.mobile-match-scroll {
        margin-bottom: 10px;
        background: #fff;
        border-radius: 4px;
    }

    .mobile-home-page {
        padding: 0 15px 16px;
    }

    .mobile-home-page .casino-list {
        margin-top: 0 !important;
    }

    .text-edark {
        color: #000;
    }

    .tx-666 {
        color: #666;
    }

    .game-icons {
        float: none;
        width: 100%;
        text-align: right;
    }

    .game-name a {
        font-weight: bold;
        font-size: 14px;
    }

    .game-name {
        float: none;
        width: 100%;
    }

    .coupon-table-mobile td,
    .table th {
        padding: 0.75rem;
        vertical-align: top;
        border-top: 0px solid #dee2e6;
    }

    .min-h-10 {
        min-height: 5px;
    }

    .border-bottom {
        border-bottom: 1px solid #666;
    }

    .ln10 {
        line-height: 10px;
    }

    .game-icon {
        width: auto;
        text-align: center;
        margin-top: 0px;
        display: inline-block;
        margin-right: 10px;
    }

    .game-icons {
        display: flex;
        align-items: center;
        justify-content: end;
    }

    .game-icon .in-play {
        background-color: #28a745;
        height: 12px;
        width: 12px;
        border-radius: 50%;
    }

    .tx-green {
        color: #28a745;
    }

    .sidebar-right {
        display: none;
    }

    .game-heading .card-header-title {
        font-size: 13px;
        text-transform: uppercase;
    }

    .card-header-date {
        font-size: 12px;
    }

    .nav-tabs {
        background-color: var(--theme2-bg);
        width: 100%;
    }

    .nav-tabs .nav-link {
        border-radius: 0;
        color: var(--secondary-color);
        background-color: var(--theme2-bg);
        border-right: 0px solid var(--theme2-bg) !important;
        border: 0;
        display: block;
        padding: 13px;
    }

    button:focus {
        outline: 1px dotted;
        outline: 0px auto -webkit-focus-ring-color;
    }

    .nav-tabs .nav-item.show .nav-link,
    .nav-tabs .nav-link.active {
        background-color: var(--theme2-bg);
        border-color: #fff;
        color: var(--secondary-color);
        border-bottom: 2px solid #fff;
    }

    .tab-content {
        width: 100%;
    }

    .place-bet {
        position: fixed;
        top: 10%;
        left: 2%;
        right: 2%;
        z-index: 3;
    }

    .backdrop-custom {
        position: fixed;
        /* display: none; */
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 2;
        cursor: pointer;
    }

    .container-main {
        height: 115px !important;
        width: 100%;
        padding: 5px !important;
    }

    .suspended:after {
        position: absolute;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        width: 60%;
        right: 0;
        background-color: rgba(0, 0, 0, 0.6);
        color: var(--white-color);
        text-transform: uppercase;
        font-family: 'Font Awesome 5 Free';
        content: attr(data-title);
        font-weight: 900;
        font-size: 18px;
        top: 0;
        color: red;
    }

    .padding-custom {
        padding: 0px 10px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .ballance,
    .expose,
    .account {
        margin-left: 7px;
        margin-top: 0;
    }

    .mrc-2 {
        margin-right: 2px;
    }
}

/* ============================================================================
   CASINO PAGE COLUMN WIDTH — d247/tridevexch parity for 769px and up.

   THIS FILE IS THE MISSING LAYER. Our copy of d247's responsive.css only ever
   carried the `max-width: 767px` block; d247's own file has 15 media-query
   blocks, and the four that size the page shell were never ported. That is the
   entire reason the casino board was the wrong width between 769 and 1599px.

   d247's model (style.css + responsive.css, captured in
   tmp-browser/d247-assets/css/):

     style.css  .center-main-container { width: calc(100% - 280px); padding: 0 4px }
                .detail-page .center-container { width: calc(100% - 450px) }
     @media <=1199px   .left-sidebar{display:none} .right-sidebar{display:none}
                       .center-main-container{width:100%;padding:0}
                       .casino-page .center-container{width:100%}
     @media 1200-1399  .left-sidebar{width:210px} .right-sidebar{width:350px}
                       .casino-page .center-container{width:calc(100% - 355px)}
     @media 1400-1599  .left-sidebar{width:240px} .right-sidebar{width:400px}
                       .casino-page .center-container{width:calc(100% - 405px)}

   i.e. the board column is `viewport - left sidebar - right sidebar`, with the
   sidebar widths set per band. Verified against tridev's real board width at
   five viewports: 1024->1024, 1366->791, 1600->855, 768->768, 414->414.

   OUR MARKUP differs, so the mapping is not one-to-one:
     .casino-container-box  ==  d247's `.center-container`
     .col-8 / .col-lg-8     ==  the board column (d247 lets it fill 100%)
     .col-4 / .col-lg-4     ==  d247's `.right-sidebar` (our #sidebar-right:
                                PlaceBetBox + CasinoBook + My Bet)
   Our board must therefore be sized as `100% - rightPanelWidth`, where the
   numbers below are row-relative equivalents of d247's, with our 10px
   .center-main-container padding and the row's -5px negative margin taken into
   account (row = viewport - sidebar - 20 + 10).

   One deliberate divergence: at <=1199px d247 `display:none`s its right
   sidebar. We WRAP ours below the board instead — the board width matches
   d247 exactly either way, but hiding it would take the bet slip away from
   tablet users, because our PlaceBetBox currently lives in that panel.

   Scoped with :has() to the casino page so no other screen is touched.
   ========================================================================== */

/* -- 769-1199px: d247 hides the sidebar and gives the casino column 100% of
      the viewport. Padding must go to 0 or the board lands ~22px short. -- */
@media only screen and (min-width: 769px) and (max-width: 1199px) {
    .main-container:has(.casino-container-box)>.center-main-container {
        padding: 0;
    }

    .casino-container-box {
        margin-left: 0;
        margin-right: 0;
    }

    .casino-container-box>.col-8,
    .casino-container-box>.col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /* d247 hides this panel; we keep it usable by dropping it below. */
    .casino-container-box>.col-4,
    .casino-container-box>.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* -- 1200-1399px: d247 left sidebar 210px, board column = row - 345px -- */
@media only screen and (min-width: 1200px) and (max-width: 1399px) {
    .main-container:has(.casino-container-box)>.left-sidebar {
        width: 210px;
        min-width: 210px;
        max-width: 210px;
    }

    .casino-container-box>.col-8,
    .casino-container-box>.col-lg-8 {
        flex: 0 0 calc(100% - 345px);
        max-width: calc(100% - 345px);
    }

    .casino-container-box>.col-4,
    .casino-container-box>.col-lg-4 {
        flex: 0 0 345px;
        max-width: 345px;
    }
}

/* -- 1400-1599px: d247 left sidebar 240px, board column = row - 395px -- */
@media only screen and (min-width: 1400px) and (max-width: 1599px) {
    .main-container:has(.casino-container-box)>.left-sidebar {
        width: 240px;
        min-width: 240px;
        max-width: 240px;
    }

    .casino-container-box>.col-8,
    .casino-container-box>.col-lg-8 {
        flex: 0 0 calc(100% - 395px);
        max-width: calc(100% - 395px);
    }

    .casino-container-box>.col-4,
    .casino-container-box>.col-lg-4 {
        flex: 0 0 395px;
        max-width: 395px;
    }
}

/* -- >=1600px: sidebar 280px (already correct), board column = row - 440px.
      The right panel stays 440px, which is what our col-4 already renders at
      1600px — so this band is pixel-unchanged. -- */
@media only screen and (min-width: 1600px) {

    .casino-container-box>.col-8,
    .casino-container-box>.col-lg-8 {
        flex: 0 0 calc(100% - 440px);
        max-width: calc(100% - 440px);
    }

    .casino-container-box>.col-4,
    .casino-container-box>.col-lg-4 {
        flex: 0 0 440px;
        max-width: 440px;
    }
}

/* ============================================================================
   The 855px caps were inferred from a SINGLE 1600px measurement and had no
   band gating, so below 1600 they clipped the board short of d247's column and
   above 1600 they froze a board that d247 keeps growing.

   d247 has no such cap — 855px is simply what its column renders at a 1600px
   viewport. So: inert below 1600, and above 1600 expressed as `100% - 3px`
   relative to the card body, which reproduces 855px EXACTLY at 1600px (card 860
   - 2px borders = 858 content, - 3px = 855) and scales with the column above.
   Exactness matters here: 1600px is the one band that already passed 45/81
   games, so this band must come out of the change byte-for-byte identical.
   ========================================================================== */
@media only screen and (max-width: 1599px) {

    .teenpatti1day.casino-table,
    .casino-container-box .casino-video,
    .casino-container-box .game-market {
        max-width: none;
    }
}

@media only screen and (min-width: 1600px) {

    .teenpatti1day.casino-table,
    .casino-container-box .casino-video,
    .casino-container-box .game-market {
        max-width: calc(100% - 3px);
    }
}

/* ============================================================================
   Reference mobile home parity.

   tridev / d247 / sonyexch render the mobile home as:
     header -> latest-event ticker -> 48px .sports-tab
     -> full-width .bet-table (250px coupon viewport)
     -> four-column .casino-list (95px tiles at a 390px viewport).

   This block ports that geometry to maaganga without changing the event feed
   or the stale-row filter. The desktop layout is intentionally untouched.
   ========================================================================== */
@media only screen and (max-width: 768px) {
    .home-page.mtc-5 {
        margin-top: 0 !important;
    }

    .mobile-nav-toggle,
    .mobile-home-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        padding: 0;
        margin-right: 8px;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 18px;
        line-height: 1;
        text-decoration: none;
    }

    .mobile-home-toggle:hover,
    .mobile-home-toggle:focus {
        color: #fff;
        text-decoration: none;
    }

    .header-mobile {
        position: relative;
        width: 100%;
    }

    .header-mobile .favourite {
        display: flex;
        align-items: center;
        width: 100%;
        height: 34px;
        overflow: hidden;
        background-color: var(--theme1-bg);
    }

    .header-mobile .favourite ul {
        display: flex;
        align-items: center;
        width: 100%;
        height: 34px;
        margin: 0;
        padding: 0 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .header-mobile .favourite li {
        display: flex;
        align-items: center;
        margin-right: 16px;
        list-style: none;
        white-space: nowrap;
        font-size: 12px;
    }

    /* Reference mobile latest-event strip. This is the component tridev/d247
       show above the seven-item nav: two 50%-wide event tiles visible at once,
       horizontally scrollable, with no ribbon cards. */
    .header-mobile .latest-event.header-mobile-favourite {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 5px 5px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        background-color: var(--theme1-bg) !important;
        white-space: nowrap !important;
        scrollbar-width: none;
    }

    .header-mobile .latest-event.header-mobile-favourite::-webkit-scrollbar {
        display: none;
    }

    .header-mobile .latest-event.header-mobile-favourite .latest-events-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }

    .header-mobile .latest-event.header-mobile-favourite .latest-event-item {
        display: flex !important;
        flex: 0 0 50% !important;
        align-items: center !important;
        justify-content: center !important;
        width: 50% !important;
        min-width: 50% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 4px 0 0 !important;
        padding: 4px !important;
        animation: none !important;
        transform: none !important;
        background-color: var(--theme2-bg) !important;
        color: #fff !important;
        border-radius: 0 !important;
    }

    .header-mobile .latest-event.header-mobile-favourite .latest-event-item a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        color: #fff !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 18px !important;
        text-align: center !important;
    }

    .header-mobile .latest-event.header-mobile-favourite .latest-event-item a span {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .header-mobile .navbarnav.mobile-nav-drawer {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 20;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        height: auto !important;
        overflow: visible;
        padding: 0;
        margin: 0;
        background-color: var(--theme1-bg) !important;
        box-shadow: 0 3px 5px rgba(57, 63, 72, 0.5);
    }

    .header-mobile .navbarnav.mobile-nav-drawer .nav-item {
        width: 100%;
        flex: 0 0 auto;
        text-align: left;
        line-height: normal;
    }

    .header-mobile .navbarnav.mobile-nav-drawer .nav-item a {
        display: block;
        width: 100%;
        height: auto;
        padding: 10px 16px;
        text-align: left;
        line-height: normal !important;
    }

    .header-mobile .navbarnav.mobile-nav-drawer .nav-item a:after {
        content: none;
    }

    .home-page .sports-tab {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        width: 100%;
        height: 48px;
        margin: 0;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        background-color: var(--theme2-bg);
        list-style: none;
    }

    .home-page .sports-tab .nav-item {
        flex: 0 0 auto;
        width: auto;
    }

    .home-page .sports-tab .nav-link {
        display: block;
        height: 48px;
        padding: 8px 16px;
        border: 0;
        border-radius: 0;
        background-color: var(--theme2-bg);
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .home-page .sports-tab .nav-link.active {
        background-color: var(--theme1-bg);
        color: #fff;
    }

    .home-page .sports-tab .nav-link i {
        display: block;
        margin: 0 0 5px;
        font-size: 15px;
    }

    .home-page .sports-tab .nav-link img {
        display: block;
        width: 15px;
        height: 15px;
        margin: 0 auto 5px;
    }

    .home-page .sports-tab .nav-link span {
        display: block;
    }

    .home-page .matchlist.coupon-card-first,
    .home-page .tab-content,
    .home-page .tab-pane {
        margin: 0;
        padding: 0;
        background: transparent;
    }

    .home-page .bet-table {
        width: 100%;
        height: 250px;
        max-height: 250px;
        margin: 0;
        padding: 4px;
        border-radius: 0;
        background-color: #f7f7f7;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .home-page .bet-table-row {
        width: 100%;
    }

    .home-page .home-casino {
        margin-top: 8px;
    }

    .home-page .home-casino .casino-list {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .home-page .home-casino .casino-list-item {
        width: calc(25% - 2px);
        margin: 0 2px 2px 0;
    }

    .home-page .home-casino .casino-list-item .casino-list-item-banner,
    .home-page .home-casino .casino-list-item .casino-list-name {
        border-radius: 0;
    }
}

/* The reference's sport tab is a single horizontal rail. These !important
   declarations are deliberate: the legacy Bootstrap .nav rule and the
   admin stylesheet both set wrapping/height and load after the main sheet. */
@media only screen and (max-width: 768px) {
    .sports-tab {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        width: 100% !important;
        height: 48px !important;
        max-height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        background-color: var(--theme2-bg) !important;
        list-style: none !important;
    }

    .sports-tab .nav-item {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .sports-tab .nav-link {
        display: block !important;
        height: 48px !important;
        padding: 8px 16px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background-color: var(--theme2-bg) !important;
        color: #fff !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: nowrap !important;
    }

    .sports-tab .nav-link.active {
        background-color: var(--theme1-bg) !important;
    }

    .sports-tab .nav-link i {
        display: block !important;
        margin: 0 0 5px !important;
        font-size: 15px !important;
    }

    .sports-tab .nav-link span {
        display: block !important;
    }

    .home-casino .casino-list-item {
        width: calc(25% - 2px) !important;
        margin: 0 2px 2px 0 !important;
    }

    .home-casino .casino-list-item .casino-list-name {
        position: static !important;
        height: 16px !important;
        padding: 2px !important;
        font-size: 11px !important;
        line-height: 16px !important;
        border-radius: 0 !important;
    }

    .home-casino .casino-list-item .casino-list-item-banner {
        border-radius: 0 !important;
    }

    .header-mobile .favourite li {
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }

    .header-mobile .favourite ul {
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    /* Reference mobile main menu: 55px bar between the latest-event strip
       and the 48px sports rail. The reference renders this as
       `ul.nav.nav-tabs.d-xl-none.menu-tabs` with seven items; our desktop
       `.header-bottom` is a different, longer list and is hidden here. */
    .header-mobile .mobile-main-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        width: 100% !important;
        height: 55px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        background-color: #0088cc !important;
        box-shadow: 0 -5px 5px -5px rgba(0, 0, 0, 0.5) !important;
        list-style: none !important;
        scrollbar-width: none;
    }

    .header-mobile .mobile-main-nav::-webkit-scrollbar {
        display: none;
    }

    .header-mobile .mobile-main-nav .nav-item {
        display: flex !important;
        flex: 1 1 auto !important;
        align-items: stretch !important;
        justify-content: center !important;
        width: auto !important;
        height: 55px !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: normal !important;
        white-space: nowrap !important;
    }

    /* The reference bar is 55px tall, but its links do not leave a separate
       10px band above and below the text. Keep the 55px bar and fill its
       height with the link. 14px labels with -1px tracking and 2px side
       gutters are the measured fit for all seven at 390px. */
    .header-mobile .mobile-main-nav .nav-link,
    .header-mobile .mobile-main-nav .nav-link:hover,
    .header-mobile .mobile-main-nav .nav-link:focus {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 55px !important;
        margin: 0 !important;
        padding: 0 4px !important;
        border: 0 !important;
        border-top: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #fffefe !important;
        font-family: 'Roboto Condensed', sans-serif !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        letter-spacing: -1.1px !important;
        line-height: 20px !important;
        text-align: center !important;
        text-transform: uppercase !important;
        white-space: nowrap !important;
        position: relative !important;
    }

    /* Reference separator: 1px white vertical line between the menu entries. */
    .header-mobile .mobile-main-nav .nav-item:not(:last-child) .nav-link::before {
        content: '' !important;
        position: absolute !important;
        top: 50% !important;
        right: 0 !important;
        width: 1px !important;
        height: 20px !important;
        background-color: #ffffff !important;
        transform: translateY(-50%) !important;
        pointer-events: none !important;
    }

    /* The legacy phone drawer uses a `|` separator on every link. The reference
       menu bar has none; only the active item gets its 2px marker. */
    .header-mobile .mobile-main-nav .nav-item a:after {
        content: none !important;
    }

    .header-mobile .mobile-main-nav .nav-link.active:after {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        height: 2px !important;
        background-color: #cccccc !important;
    }

    .header-mobile .mobile-main-nav .nav-link svg {
        width: 24px !important;
        height: 14px !important;
        margin-right: 6px !important;
        vertical-align: middle !important;
    }

    /* d247/tridev put the start date/time on its own line beneath the match
       name on phones. Keep the desktop row unchanged; this file is only
       rendered by the compact home layout. */
    .home-page .bet-nation-name .bet-nation-game-name {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        max-width: calc(100% - 120px) !important;
        overflow: hidden !important;
        white-space: normal !important;
        line-height: 15px !important;
        text-overflow: clip !important;
    }

    .home-page .bet-nation-game-title {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        color: #333 !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 15px !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .home-page .bet-nation-game-date {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        color: #666 !important;
        font-size: 10px !important;
        font-weight: 400 !important;
        line-height: 13px !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* The reference opens the hamburger as a left drawer: search first, then
       the same Racing Sports / Others / All Sports tree as the desktop
       sidebar. Our old drawer was a four-link dropdown under the nav bar. */
    .mobile-sidebar-backdrop {
        position: fixed !important;
        inset: 0 !important;
        z-index: 1990 !important;
        background: rgba(0, 0, 0, 0.55) !important;
    }

    .mobile-sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 2000 !important;
        display: flex !important;
        flex-direction: column !important;
        width: min(86vw, 340px) !important;
        max-width: 340px !important;
        background: #ffffff !important;
        color: #333333 !important;
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.35) !important;
    }

    .mobile-sidebar-header {
        display: flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px !important;
        background: #0088cc !important;
    }

    .mobile-sidebar-search {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .mobile-sidebar-search .MuiAutocomplete-root,
    .mobile-sidebar-search-input {
        display: inline-flex !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    .mobile-sidebar-search .MuiFormControl-root,
    .mobile-sidebar-search .MuiInputBase-root {
        height: 40px !important;
    }

    .mobile-sidebar-search .MuiFilledInput-root {
        background-color: #ffffff !important;
        border-radius: 3px !important;
    }

    /* admin-style.css hides every MUI label. The drawer uses the label as its
       visible search hint, so restore it only here (and keep the focus state
       visible as well). */
    .mobile-sidebar-search .MuiInputLabel-root,
    .mobile-sidebar-search .MuiInputLabel-root.Mui-focused {
        display: block !important;
        color: #555555 !important;
        font-size: 14px !important;
        pointer-events: none !important;
    }

    .mobile-sidebar-search .MuiInputBase-input {
        color: #333333 !important;
    }

    .mobile-sidebar-search .MuiInputBase-input::placeholder {
        color: #555555 !important;
        opacity: 1 !important;
    }

    /* The favourite strip is horizontally scrollable like the reference, but
       its text was dark-on-dark. Two tiles stay visible at a phone width and
       each long event name ellipsises instead of widening the whole bar. */
    .header-mobile .favourite li,
    .header-mobile .favourite li a,
    .header-mobile .favourite li a span {
        color: #ffffff !important;
    }

    .header-mobile .favourite ul {
        padding: 0 5px !important;
    }

    .header-mobile .favourite li {
        flex: 0 0 calc(50% - 10px) !important;
        min-width: 0 !important;
        max-width: calc(50% - 10px) !important;
        margin-right: 8px !important;
        padding: 0 6px !important;
        overflow: hidden !important;
    }

    .header-mobile .favourite li a {
        display: flex !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .header-mobile .favourite li a span {
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* MUI portals suggestions to the body at z-index 1300, below this drawer. */
    .mobile-sidebar-search .MuiAutocomplete-popper,
    .MuiAutocomplete-popper {
        z-index: 2100 !important;
    }

    .mobile-sidebar-close {
        display: inline-flex !important;
        flex: 0 0 32px !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #ffffff !important;
        font-size: 18px !important;
        line-height: 1 !important;
    }

    .mobile-sidebar-body {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #ffffff !important;
        -webkit-overflow-scrolling: touch;
    }

    /* diamond-theme hides .left-sidebar below 1200px; inside the drawer it is
       the visible content, so restore the block and let it fill the drawer. */
    .mobile-sidebar-body .left-sidebar {
        display: block !important;
        position: static !important;
        float: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-sidebar-body .sidebar {
        height: auto !important;
        min-height: 0 !important;
    }

    /* The global phone header rule `.header-mobile .nav-item a` gives every
       anchor `height:100%` for the 55px menu bar. Inside the drawer that made
       each row fill the viewport. Restore the sidebar's compact 26px ladder. */
    .mobile-sidebar .sidebar .nav-item,
    .mobile-sidebar .sidebar .nav-item a,
    .mobile-sidebar .sidebar .dropdown-menu a {
        height: auto !important;
        line-height: 21px !important;
        text-align: left !important;
        text-transform: none !important;
    }

    .mobile-sidebar .sidebar .nav-item {
        flex: none !important;
    }

    .mobile-sidebar .sidebar .nav-link {
        min-height: 26px !important;
        padding: 2px 15px !important;
    }

    .mobile-sidebar .sidebar .nav-link:after {
        content: none !important;
    }
}
