@media (max-width: 820px) {
    html.fz-h5-v2 {
        --h5-bg: #050a11;
        --h5-panel: #0a1625;
        --h5-panel-2: #0d1b2c;
        --h5-line: rgba(62, 111, 151, .42);
        --h5-line-soft: rgba(112, 151, 184, .2);
        --h5-text: #f4f7fb;
        --h5-muted: #9cacbf;
        --h5-gold: #f4bf55;
        --h5-gold-dark: #d99b2d;
        --h5-green: #28d7a2;
        --h5-red: #ef5262;
        --h5-blue: #55aef1;
        --h5-radius: 8px;
        color-scheme: dark;
        background: var(--h5-bg);
        overflow-x: hidden;
    }

    html.fz-h5-v2 *,
    html.fz-h5-v2 *::before,
    html.fz-h5-v2 *::after {
        box-sizing: border-box;
        letter-spacing: 0;
    }

    html.fz-h5-v2 body {
        width: 100%;
        min-width: 0;
        min-height: 100vh;
        margin: 0 !important;
        padding: 0 0 calc(62px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: hidden !important;
        background: var(--h5-bg) !important;
        color: var(--h5-text) !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
        font-size: 14px;
        line-height: 1.5;
    }

    html.fz-h5-v2 body > .header,
    html.fz-h5-v2 body > .head,
    html.fz-h5-v2 body > .mac_header,
    html.fz-h5-v2 .show-pc:not(.fz-channelbar) {
        max-width: 100%;
    }

    html.fz-h5-v2 img,
    html.fz-h5-v2 video,
    html.fz-h5-v2 iframe {
        max-width: 100%;
    }

    html.fz-h5-v2 a {
        -webkit-tap-highlight-color: transparent;
    }

    html.fz-h5-v2 button,
    html.fz-h5-v2 input,
    html.fz-h5-v2 select,
    html.fz-h5-v2 textarea {
        max-width: 100%;
        font: inherit;
    }

    html.fz-h5-v2 button,
    html.fz-h5-v2 [role="button"] {
        touch-action: manipulation;
    }

    html.fz-h5-v2 .fz-topbar {
        position: relative;
        z-index: 100;
        display: block !important;
        width: 100%;
        border-bottom: 1px solid var(--h5-line-soft);
        background: rgba(5, 10, 17, .98);
        box-shadow: none;
    }

    html.fz-h5-v2 .fz-h5-header-only {
        display: block !important;
    }

    html.fz-h5-v2 .fz-topbar-main {
        display: grid !important;
        grid-template-columns: minmax(82px, 108px) minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        width: 100%;
        max-width: none;
        padding: 8px 10px 7px !important;
    }

    html.fz-h5-v2 .fz-user {
        display: none !important;
    }

    html.fz-h5-v2 .fz-logo {
        min-width: 0;
        height: 40px;
        display: flex !important;
        align-items: center;
        gap: 5px;
        overflow: hidden;
        color: var(--h5-text) !important;
    }

    html.fz-h5-v2 .fz-logo-mark {
        flex: 0 0 auto;
        min-width: 28px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        border-radius: 5px;
        background: linear-gradient(135deg, #ff8a2f, #ef4965);
        color: #fff;
        font-size: 9px;
        font-weight: 900;
    }

    html.fz-h5-v2 .fz-logo-text {
        min-width: 0;
        overflow: hidden;
        color: #f5f7fb;
        font-size: 13px;
        font-weight: 850;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html.fz-h5-v2 .fz-search {
        position: relative;
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
        height: 40px;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 56px;
        gap: 0;
        margin: 0 !important;
        overflow: hidden;
        border: 1px solid rgba(87, 124, 159, .35);
        border-radius: 8px;
        background: #111a29;
    }

    html.fz-h5-v2 .fz-search::before {
        content: "\f002";
        position: absolute;
        z-index: 1;
        align-self: center;
        margin-left: 13px;
        color: #8293a7;
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        pointer-events: none;
    }

    html.fz-h5-v2 .fz-search input {
        width: 100%;
        min-width: 0;
        height: 38px;
        padding: 0 10px 0 38px !important;
        border: 0 !important;
        outline: 0;
        background: transparent !important;
        color: var(--h5-text) !important;
        font-size: 14px;
    }

    html.fz-h5-v2 .fz-search input::placeholder {
        color: #8190a3;
        opacity: 1;
    }

    html.fz-h5-v2 .fz-search button {
        width: 56px;
        min-width: 0;
        height: 38px;
        padding: 0 !important;
        border: 0 !important;
        border-left: 1px solid rgba(87, 124, 159, .25) !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: var(--h5-gold) !important;
        font-size: 13px;
        font-weight: 800;
    }

    html.fz-h5-v2 .fz-channelbar {
        width: 100%;
        max-width: none;
        height: 39px;
        display: flex !important;
        align-items: stretch;
        justify-content: flex-start !important;
        gap: 0 !important;
        margin: 0;
        padding: 0 7px !important;
        overflow-x: auto;
        overflow-y: hidden;
        border-top: 0;
        background: rgba(5, 10, 17, .98);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    html.fz-h5-v2 .fz-channelbar::-webkit-scrollbar {
        display: none;
    }

    html.fz-h5-v2 .fz-channelbar a {
        position: relative;
        flex: 0 0 auto;
        min-width: 48px;
        height: 39px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 10px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #aab5c4 !important;
        font-size: 14px;
        font-weight: 650;
        white-space: nowrap;
    }

    html.fz-h5-v2 .fz-channelbar a::after {
        content: "";
        position: absolute;
        right: 13px;
        bottom: 0;
        left: 13px;
        height: 2px;
        border-radius: 2px 2px 0 0;
        background: transparent;
    }

    html.fz-h5-v2 .fz-channelbar a.active,
    html.fz-h5-v2 .fz-channelbar a.is-active {
        color: var(--h5-gold) !important;
    }

    html.fz-h5-v2 .fz-channelbar a.active::after,
    html.fz-h5-v2 .fz-channelbar a.is-active::after {
        background: var(--h5-gold);
    }

    html.fz-h5-v2 .fz-footer {
        display: none !important;
    }

    html.fz-h5-v2 .fz-mobile-tabbar {
        position: fixed !important;
        z-index: 1002;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding: 0 3px env(safe-area-inset-bottom, 0px) !important;
        border-top: 1px solid rgba(65, 103, 139, .48) !important;
        background: rgba(5, 11, 19, .97) !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .36);
        transition: transform .18s ease;
        backdrop-filter: blur(14px);
    }

    html.fz-h5-v2 .fz-mobile-tabbar a {
        min-width: 0;
        height: 58px;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #8e9bae !important;
        font-size: 11px !important;
        font-weight: 650;
        line-height: 1.1;
        white-space: nowrap;
    }

    html.fz-h5-v2 .fz-mobile-tabbar i {
        color: #aab5c4 !important;
        font-size: 18px !important;
        line-height: 1;
    }

    html.fz-h5-v2 .fz-mobile-tabbar a.is-active,
    html.fz-h5-v2 .fz-mobile-tabbar a.is-active i {
        color: var(--h5-gold) !important;
    }

    html.fz-h5-v2 body.fz-h5-keyboard-open .fz-mobile-tabbar,
    html.fz-h5-v2 body.fz-h5-fullscreen .fz-mobile-tabbar,
    html.fz-h5-v2 body.fz-h5-reader-page .fz-mobile-tabbar,
    html.fz-h5-v2 body.fz-h5-simple-page .fz-mobile-tabbar {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-reader-page,
    html.fz-h5-v2 body.fz-h5-simple-page {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }

    html.fz-h5-v2 body.fz-h5-simple-page .fz-topbar,
    html.fz-h5-v2 body.fz-h5-reader-page .fz-topbar {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail {
        height: 100svh;
        padding: 0 !important;
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-topbar,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-mobile-tabbar,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-footer {
        display: none !important;
    }

    html.fz-h5-v2 .m-nav.mobile-nav,
    html.fz-h5-v2 .m-nav:not(.show-pc) {
        min-height: 48px !important;
        display: flex;
        align-items: center;
        padding: 0 12px !important;
        border-bottom: 1px solid var(--h5-line-soft) !important;
        background: rgba(5, 11, 19, .96) !important;
        color: var(--h5-text) !important;
    }

    html.fz-h5-v2 .m-nav .btn-left {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
        color: #cbd5e1 !important;
    }

    html.fz-h5-v2 .m-nav .mb-title {
        min-width: 0;
        overflow: hidden;
        color: var(--h5-text) !important;
        font-size: 16px !important;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html.fz-h5-v2 .fz-page-shell,
    html.fz-h5-v2 .fz-detail,
    html.fz-h5-v2 .fz-player,
    html.fz-h5-v2 .fz-video-page,
    html.fz-h5-v2 .fz-article,
    html.fz-h5-v2 .fz-live-page,
    html.fz-h5-v2 .fz-live-room-page {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    html.fz-h5-v2 .fz-btn,
    html.fz-h5-v2 .mc-btn,
    html.fz-h5-v2 .mac-btn,
    html.fz-h5-v2 button[type="submit"] {
        min-height: 42px;
        border-radius: 6px;
    }

    html.fz-h5-v2 .fz-empty-state,
    html.fz-h5-v2 .fz-grid-empty,
    html.fz-h5-v2 .empty,
    html.fz-h5-v2 .empty-tips {
        width: 100%;
        min-height: 116px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 18px 12px !important;
        border: 1px dashed var(--h5-line-soft);
        border-radius: var(--h5-radius);
        background: rgba(10, 22, 37, .62);
        color: var(--h5-muted);
        text-align: center;
    }

    html.fz-h5-v2 .fz-toast,
    html.fz-h5-v2 .mac-toast,
    html.fz-h5-v2 .layui-layer-msg {
        max-width: calc(100vw - 32px) !important;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 360px) {
    html.fz-h5-v2 .fz-topbar-main {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    html.fz-h5-v2 .fz-logo-mark {
        display: none;
    }
}
