/*
 * Legacy responsive adapter loaded after member-pages.css by existing bundles.
 * New responsive primitives live in member/40-responsive.css; these selectors
 * only bridge older page wrappers that still carry phone-first max-width rules.
 */
@media (min-width: 640px) and (max-width: 1023px) {
    body.member-shell:not(.trading-custom-shell) :is(
        #dash-scroll-root,
        .member-page-shell,
        .member-page-container,
        [class$="-page-scroll"],
        [class*="-page-scroll "],
        .profile-edit-scroll,
        .wallet-pro-app,
        .swap-pro-app,
        .mkts-wrap
    ) {
        width: 100% !important;
        max-width: min(840px, calc(100% - 2rem)) !important;
        margin-inline: auto !important;
    }

    body.member-shell.dashboard-page:not(.trading-custom-shell) #dashboard-main-section > .w-full {
        padding-inline: 1.5rem;
    }

    body.member-shell:not(.trading-custom-shell) .ih-bottom-nav-inner {
        width: min(100%, 640px);
        max-width: 640px !important;
    }
}

@media (max-width: 639px) {
    body.member-shell:not(.trading-custom-shell) :is(
        .member-page-container,
        [class$="-page-scroll"],
        [class*="-page-scroll "]
    ) {
        width: 100% !important;
        max-width: 100% !important;
    }
}
