@media (max-width: 767.98px) {
    html:has(.mf-chart-index),
    body:has(.mf-chart-index),
    html:has(.mf-chart-detail),
    body:has(.mf-chart-detail) {
        max-width: 100%;
        overflow-x: hidden;
    }

    .mf-chart-index {
        width: 100%;
        max-width: 100%;
        margin-top: 64px;
        overflow-x: clip;
        background: linear-gradient(180deg, #f9f7ff 0%, #fff 24%);
    }

    .mf-chart-index > .w-full {
        width: 100%;
        max-width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .mf-chart-index > .w-full:first-child {
        padding-top: 5px;
    }

    .mf-chart-index > .w-full:first-child > div {
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
        overflow: visible;
        border-radius: 16px;
        background: transparent;
    }

    .mf-chart-index > .w-full:first-child button {
        width: min(100%, 280px);
        min-height: 48px;
        margin-top: 8px !important;
        border-radius: 24px;
        font-size: 14px;
    }

    .mf-chart-index > .w-full > .bg-pink {
        margin-top: 18px;
        margin-bottom: 10px;
        padding: 12px;
        border-radius: 13px;
        background: linear-gradient(105deg, #4b2188, #c72e89);
        box-shadow: 0 7px 18px rgba(75, 33, 136, .18);
        font-size: 15px;
        letter-spacing: .8px;
    }

    .mf-chart-index .gameNameRow {
        min-height: 48px;
        height: auto;
        margin: 7px 0;
        border: 1px solid rgba(75, 33, 136, .12);
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 4px 13px rgba(52, 28, 91, .07);
        font-size: 14px;
        line-height: 1.25;
    }

    .mf-chart-index .gameNameRow a {
        min-height: 48px;
        padding: 10px 14px;
    }

    .mf-chart-detail {
        width: 100%;
        max-width: 100%;
        margin-top: 74px;
        padding: 0 8px 16px;
        overflow-x: clip;
        background: linear-gradient(180deg, #f8f5ff 0%, #fff 160px);
    }

    .mf-chart-detail > .divTable {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border: 1px solid rgba(75, 33, 136, .16);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(45, 23, 77, .1);
    }

    .mf-chart-detail > .divTable > .bg-gray-200 {
        padding: 14px 12px;
        background: linear-gradient(135deg, #f3ecff, #fff3fa);
    }

    .mf-chart-detail .gameNameChart {
        color: #4b2188 !important;
        font-size: 19px;
        font-weight: 800;
        line-height: 1.2;
        text-align: center;
        text-shadow: none !important;
        filter: none !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .mf-chart-detail .gameNameDesc {
        margin-top: 5px;
        color: #5f5668;
        font-size: 11px;
        line-height: 1.45;
        text-align: center;
    }

    .mf-chart-detail .gameNameDesc + .pb-2,
    .mf-chart-detail .gameNameDesc + .pb-2.visible {
        text-align: center;
    }

    .mf-chart-detail .gameNameDesc + .pb-2 button {
        min-height: 34px;
        height: auto;
        border-radius: 17px;
    }

    .mf-chart-detail .divResultsTable {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .mf-jodi-detail .divResultsTable table {
        width: 100%;
        min-width: 100%;
        table-layout: fixed;
    }

    .mf-jodi-detail .divResultsTable td {
        width: 14.285%;
        min-width: 0;
        padding-right: 2px;
        padding-left: 2px;
        overflow-wrap: anywhere;
    }

    .mf-pana-detail .divResultsTable table {
        width: 100%;
        min-width: 100%;
        table-layout: fixed;
    }

    .mf-pana-detail .divResultsTable td {
        width: 11.71%;
        min-width: 0;
        padding: 2px 1px;
        font-size: 9px;
        line-height: 1.15;
        overflow: hidden;
    }

    .mf-pana-detail .divResultsTable td:first-child {
        width: 18%;
        padding-right: 1px;
        padding-left: 1px;
    }

    .mf-pana-detail .divResultsTable {
        overflow-x: hidden;
    }

    .mf-pana-detail .divResultsTable .tdresultnew,
    .mf-pana-detail .divResultsTable .divPana {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .mf-pana-detail .divResultsTable .tdresultclosenew,
    .mf-pana-detail .divResultsTable .lining-nums {
        font-size: 9px;
        line-height: 1.15;
        letter-spacing: -.2px;
    }

    .mf-pana-detail .divResultsTable td > .flex {
        min-width: 0;
        font-size: 7px;
        line-height: 1.15;
        white-space: normal;
        word-break: break-word;
    }

    .mf-pana-detail .divResultsTable td > .flex .whitespace-pre {
        white-space: normal;
    }

    .mf-pana-detail .divResultsTable .pt-3 {
        padding-top: 5px;
    }

    .mf-pana-detail .divResultsTable .pb-3 {
        padding-bottom: 5px;
    }

    .mf-chart-detail .divBottomButtons {
        margin: 14px 0 16px;
        padding: 0 10px;
    }

    .mf-chart-detail .divBottomButtons button {
        min-height: 34px;
        height: auto;
        border-radius: 17px;
    }

    .chart-page {
        max-width: 100%;
        margin: 16px 0 26px;
        padding: 18px 15px;
        overflow-wrap: anywhere;
        border: 1px solid rgba(75, 33, 136, .13);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 9px 28px rgba(51, 24, 91, .09);
    }

    .chart-page > :first-child {
        margin-top: 0;
    }

    .chart-page h1,
    .chart-page h2,
    .chart-page h3 {
        color: #38205d;
        line-height: 1.3;
    }

    .chart-page p,
    .chart-page li {
        line-height: 1.65;
    }

    .chart-page ul,
    .chart-page ol {
        padding-left: 20px;
    }

    .chart-page img,
    .chart-page iframe,
    .chart-page video {
        max-width: 100%;
        height: auto;
    }

    .footer-sec {
        padding: 28px 20px 24px !important;
        background: linear-gradient(145deg, #47207f 0%, #32165e 100%);
    }

    .footer-sec > div {
        display: flex;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        text-align: center;
    }

    .footer-sec > div > a {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .footer-sec > div > a img {
        width: auto;
        max-width: 180px;
        height: auto;
        margin: 0 auto 16px !important;
    }

    .footer-sec > div > span {
        display: block;
        width: 100%;
        color: rgba(255, 255, 255, .88);
    }

    .footer-sec > div > span p {
        margin: 0 !important;
        padding: 0 4px;
        color: #fff !important;
        font-size: 13px;
        line-height: 1.55;
        text-align: center;
    }

    .footer-sec > div > span > div {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 12px !important;
    }

    .footer-sec > div > span > div a {
        margin: 0 !important;
        padding: 6px 9px;
        border: 1px solid rgba(255, 255, 255, .2);
        border-radius: 15px;
        font-size: 12px;
        line-height: 1.2;
    }

    .footer-sec > div > div {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        margin-top: 18px !important;
    }

    .footer-sec > div > div > div {
        display: flex;
        align-items: center;
        justify-content: center !important;
        gap: 22px;
    }

    .footer-sec > div > div a {
        display: inline-flex;
        width: 34px;
        height: 34px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, .1);
    }

    .footer-sec > div > div img {
        width: 18px;
        height: 18px;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .mf-chart-index > .w-full {
        max-width: 820px;
        padding-right: 24px;
        padding-left: 24px;
    }

    .mf-chart-detail {
        width: 100%;
        padding-right: 20px;
        padding-left: 20px;
    }

    .mf-chart-detail > .divTable {
        width: 100%;
        max-width: 920px;
    }
}
