.gf-mobile-header,
.gf-mobile-nav,
.gf-mobile-resume {
    display: none;
}

html.gf-desktop .gf-mobile-resume {
    display: block;
    position: fixed;
    inset: auto 12px 12px auto;
    z-index: 109;
    border: 1px solid #076eae;
    border-radius: 5px;
    background: #fff;
    color: #076eae;
    font-size: 15px;
    padding: 10px 14px;
    cursor: pointer;
}

@media (max-width: 767px) {
    html:not(.gf-desktop) {
        overflow-x: clip;
    }

    html:not(.gf-desktop) body.gf-mobile-ready {
        min-width: 0;
        margin: 0;
        padding: 0 0 calc(66px + env(safe-area-inset-bottom));
        background: #f0f3f6;
        color: #213041;
        overflow-wrap: anywhere;
        overflow-x: clip;
    }

    .gf-mobile-ready .gf-mobile-header,
    .gf-mobile-ready .gf-mobile-nav {
        box-sizing: border-box;
        font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
    }

    html:not(.gf-desktop) .gf-mobile-ready .gf-mobile-header {
        display: block;
        width: 100%;
        padding: env(safe-area-inset-top) 12px 10px;
        border-top: 4px solid #0788d7;
        border-bottom: 1px solid #d8e4ed;
        background: #fff;
    }

    .gf-mobile-topbar,
    .gf-mobile-account,
    .gf-mobile-search {
        display: flex;
        align-items: center;
    }

    .gf-mobile-topbar {
        justify-content: space-between;
        min-height: 54px;
        gap: 10px;
    }

    .gf-mobile-topbar img {
        display: block;
        object-fit: contain;
        max-width: 100%;
    }

    .gf-mobile-account {
        gap: 10px;
        white-space: nowrap;
    }

    .gf-mobile-account a {
        display: inline-grid;
        align-items: center;
        min-height: 44px;
        color: #076eae;
        font-size: 14px;
        font-weight: 650;
    }

    .gf-mobile-search {
        gap: 7px;
    }

    .gf-mobile-search input,
    .gf-mobile-search button {
        box-sizing: border-box;
        min-height: 44px;
        border: 1px solid #ccd9e4;
        border-radius: 5px;
        padding: 8px 12px;
        font-size: 16px;
    }

    .gf-mobile-search input {
        flex: 1;
        min-width: 0;
        background: #fff;
    }

    .gf-mobile-search button {
        flex-shrink: 0;
        background: #076eae;
        color: #fff;
        font-weight: 650;
    }

    html:not(.gf-desktop) .gf-mobile-ready .gf-mobile-nav {
        position: fixed;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        z-index: 109;
        inset: auto auto 0 0;
        width: 100vw;
        min-height: 53px;
        padding-bottom: env(safe-area-inset-bottom);
        border-top: 1px solid #d8e4ed;
        background: #fff;
    }

    .gf-mobile-nav a,
    .gf-mobile-nav button {
        display: grid;
        place-content: center;
        min-height: 51px;
        margin: 0;
        border: 0;
        background: transparent;
        color: #086ca8;
        font: 600 14px/1.25 system-ui, sans-serif;
        text-align: center;
        cursor: pointer;
    }

    .gf-mobile-nav a[href*="publish"] {
        background: #e9f5fd;
    }

    html:not(.gf-desktop) .gf-mobile-ready :is(.rtj1009_header, .ren-fixed-header, #hd, #mu, #toptb, #scrolltop, .ren-forum-left, #sd_bdl, .ren-main-right, .ren-forum-right, .ren-index-right-box, .ren_list_post, #p_btn, #f_pst, .rtj_bzn, .a_h, .a_pt, .a_pb) {
        display: none !important;
    }

    html:not(.gf-desktop) .gf-mobile-ready :is(#wp, #ct, .wp, #rtj_forumdisplay, .ren-forum-index, .ren-list-zuo, .ren-main-left, .rtj1009_view, .ren-forum-wrap, .ren-forum-mn, .ren_view_wp, .ren_view_mn, #postlist, #postlistreply, #threadlist, .ren-forum-mnlist, .ren-forum-box, .rtj1009_dibu, #ft) {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
        float: none;
    }

    html:not(.gf-desktop) .gf-mobile-ready :is(.ren-forum-index, .ren-list-boardnav, #rtj1009_viewthread) {
        min-width: 0;
        margin: 0;
        padding: 8px;
    }

    html:not(.gf-desktop) .gf-mobile-ready .ren-reward-list-li {
        padding: 0;
    }

    html:not(.gf-desktop) .gf-mobile-ready .ren-reward-list-box {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 11px 9px;
        border-bottom: 1px solid #e2e9ef;
        background: #fff;
        min-height: 66px;
    }

    html:not(.gf-desktop) .gf-mobile-ready .ren-list-summary {
        box-sizing: border-box;
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        margin: 0;
        padding: 0;
        float: none;
    }

    html:not(.gf-desktop) .gf-mobile-ready .ren-list-summary h2,
    html:not(.gf-desktop) .gf-mobile-ready .ren-list-summary h2 a {
        height: auto;
        overflow: visible;
        white-space: normal;
        font-size: 15px;
        font-weight: 650;
        line-height: 1.4;
    }

    html:not(.gf-desktop) .gf-mobile-ready .ren-list-rank {
        display: flex;
        gap: 4px;
        width: auto;
        margin: 0;
        float: none;
    }

    html:not(.gf-desktop) .gf-mobile-ready .ren-list-rank :is(.views, .replies) {
        box-sizing: border-box;
        width: auto;
        min-width: 37px;
        height: auto;
        padding: 4px 3px;
        margin: 0 !important;
        font-size: 12px;
        line-height: 1.15;
        white-space: nowrap;
    }

    html:not(.gf-desktop) .gf-mobile-ready :is(#rtj_typesm, .pg, #pt) {
        box-sizing: border-box;
        max-width: 100%;
        overflow: auto;
    }

    html:not(.gf-desktop) .gf-mobile-ready :is(.ren-th-box, #head_z, #threadlisttableid, .ren-forum-list-ul, .ren-list-th .tf) {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0;
    }

    html:not(.gf-desktop) .gf-mobile-ready .ren-list-th .tf {
        overflow-x: auto;
        white-space: nowrap;
    }

    html:not(.gf-desktop) .gf-mobile-ready #rtj_typesm {
        display: flex;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    html:not(.gf-desktop) .gf-mobile-ready #rtj_typesm li {
        flex-shrink: 0;
        float: none;
    }

    html:not(.gf-desktop) .gf-mobile-ready .pg {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
        float: none;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist :is(table, .plc, .pct, .pcb, .t_fsz) {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist table.plhin {
        table-layout: fixed;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist .pls {
        display: none;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist :is(.plc, .ren_vw_bt) {
        padding: 10px 11px;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist h1,
    html:not(.gf-desktop) .gf-mobile-ready #postlist .t_f {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist h1 {
        font-size: 20px;
        line-height: 1.35;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist .t_f {
        font-size: 16px;
        line-height: 1.6;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist :is(.t_f img, .pattl, .attnm, .pattl img, iframe, video) {
        max-width: 100% !important;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist .t_f img {
        height: auto;
    }

    html:not(.gf-desktop) .gf-mobile-ready #postlist .pattl a {
        overflow-wrap: anywhere;
        line-height: 1.5;
    }

    html:not(.gf-desktop) .gf-mobile-ready #ft {
        overflow-wrap: anywhere;
        padding-inline: 10px;
    }

    html:not(.gf-desktop) .gf-mobile-ready #ft :is(.ren_footerz, .ren_footery) {
        width: 100%;
        min-width: 0;
        float: none;
        margin: 6px 0;
        text-align: left;
    }

    html:not(.gf-desktop) .gf-mobile-ready :is(a, button, input):focus-visible {
        outline: 2px solid #076eae;
        outline-offset: 2px;
    }
}
