@media (max-width: 820px) {
    html.fz-h5-v2 .fz-live-shell,
    html.fz-h5-v2 .fz-live-room-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 10px 10px 18px !important;
    }

    html.fz-h5-v2 .fz-live-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        padding: 4px 0 12px;
    }

    html.fz-h5-v2 .fz-live-heading > div { min-width: 0; }
    html.fz-h5-v2 .fz-live-heading h1 {
        margin: 0 0 3px;
        font-size: 22px;
    }
    html.fz-h5-v2 .fz-live-heading p {
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    html.fz-h5-v2 .fz-live-outline-btn {
        min-height: 34px;
        padding: 0 10px;
        align-self: center;
    }
    html.fz-h5-v2 .fz-live-types {
        gap: 6px;
        padding: 10px 0;
    }
    html.fz-h5-v2 .fz-live-types button {
        min-height: 34px;
        padding: 0 13px;
    }
    html.fz-h5-v2 .fz-live-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        min-height: 120px;
    }
    html.fz-h5-v2 .fz-live-card {
        display: block;
        border-radius: 7px;
    }
    html.fz-h5-v2 .fz-live-card-cover {
        min-height: 0;
        aspect-ratio: 3 / 4;
    }
    html.fz-h5-v2 .fz-live-card-status,
    html.fz-h5-v2 .fz-live-card-online {
        bottom: 7px;
        padding: 3px 6px;
        font-size: 10px;
    }
    html.fz-h5-v2 .fz-live-card-status { left: 7px; }
    html.fz-h5-v2 .fz-live-card-online { right: 7px; }
    html.fz-h5-v2 .fz-live-card-body { padding: 8px; }
    html.fz-h5-v2 .fz-live-card-body h2 {
        margin-bottom: 0;
        font-size: 14px;
    }
    html.fz-h5-v2 .fz-live-card-access {
        right: 6px;
        bottom: 6px;
        padding: 3px 5px;
        font-size: 9px;
    }
    html.fz-h5-v2 .fz-live-card-meta { font-size: 11px; }

    html.fz-h5-v2 .fz-live-room-page {
        padding: 0 0 12px !important;
        background: #02050a;
    }
    html.fz-h5-v2 .fz-live-room-layout {
        position: relative;
        display: block;
        margin: 0;
    }
    html.fz-h5-v2 .fz-live-stage-panel {
        position: relative;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: #000;
    }
    html.fz-h5-v2 .fz-live-stage {
        height: min(68svh, 640px);
        min-height: 390px;
        aspect-ratio: auto;
        border-radius: 0;
        background: #000;
    }
    html.fz-h5-v2 .fz-live-stage > .video-js,
    html.fz-h5-v2 .fz-live-stage .vjs-tech {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    html.fz-h5-v2 .fz-live-poster {
        opacity: .7;
        object-fit: cover;
    }
    html.fz-h5-v2 .fz-live-anchor-hud {
        top: 9px;
        right: 9px;
        left: 9px;
        gap: 7px;
        padding: 0;
    }
    html.fz-h5-v2 .fz-live-anchor-hud > img {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
    html.fz-h5-v2 .fz-live-anchor-hud > div {
        padding: 3px 0;
        background: transparent;
        text-shadow: 0 1px 5px #000, 0 0 8px #000;
        backdrop-filter: none;
    }
    html.fz-h5-v2 .fz-live-anchor-hud strong { font-size: 13px; }
    html.fz-h5-v2 .fz-live-anchor-hud .fz-live-room-state { display: none; }
    html.fz-h5-v2 .fz-live-anchor-hud button {
        width: 36px;
        height: 36px;
    }

    html.fz-h5-v2 .fz-live-gate,
    html.fz-h5-v2 .fz-live-confirm,
    html.fz-h5-v2 .fz-live-stage-alert {
        padding: 14px;
    }
    html.fz-h5-v2 .fz-live-gate h2,
    html.fz-h5-v2 .fz-live-confirm h2,
    html.fz-h5-v2 .fz-live-stage-alert h2 {
        font-size: 19px;
    }
    html.fz-h5-v2 .fz-live-gate {
        padding: 18px;
        background: radial-gradient(circle at center, rgba(18,34,53,.26), rgba(2,7,13,.72) 66%);
    }
    html.fz-h5-v2 .fz-live-gate-card {
        width: min(300px, 100%);
        gap: 7px;
        padding: 19px 18px 16px;
        border-radius: 16px;
        background: linear-gradient(155deg, rgba(9,24,41,.95), rgba(2,9,16,.93));
        box-shadow: 0 16px 45px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.06), 0 0 24px rgba(242,189,82,.08);
    }
    html.fz-h5-v2 .fz-live-gate-eyebrow { font-size: 10px; }
    html.fz-h5-v2 .fz-live-gate h2 { font-size: 21px; }
    html.fz-h5-v2 .fz-live-gate-price {
        padding: 8px 12px;
        border-radius: 10px;
    }
    html.fz-h5-v2 .fz-live-gate-price b { font-size: 28px; }
    html.fz-h5-v2 .fz-live-gate p { font-size: 12px; }
    html.fz-h5-v2 .fz-live-gate button {
        min-height: 44px;
        border-radius: 9px;
    }
    html.fz-h5-v2 .fz-live-gate-hint { font-size: 10px; }
    html.fz-h5-v2 .fz-live-confirm-panel,
    html.fz-h5-v2 .fz-live-stage-alert-panel {
        padding: 18px 14px;
        border-radius: 8px;
    }
    html.fz-h5-v2 .fz-live-stage-alert-icon {
        min-width: 0;
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
    }
    html.fz-h5-v2 .fz-live-stage-alert-actions {
        grid-template-columns: 1fr 1.15fr 1fr;
        gap: 6px;
        margin-top: 15px;
    }
    html.fz-h5-v2 .fz-live-stage-alert-actions a,
    html.fz-h5-v2 .fz-live-stage-alert-actions button {
        min-height: 38px;
        padding: 0 5px;
        font-size: 12px;
    }
    html.fz-h5-v2 .fz-live-viewer-summary {
        grid-template-columns: 30px minmax(0, 1fr) auto 30px;
        gap: 6px;
        margin-top: 10px;
        padding: 6px;
    }
    html.fz-h5-v2 .fz-live-viewer-summary > img {
        width: 30px;
        height: 30px;
    }
    html.fz-h5-v2 .fz-live-viewer-summary > button {
        width: 30px;
        min-height: 30px;
        padding: 0;
        justify-content: center;
    }
    html.fz-h5-v2 .fz-live-viewer-summary > button span { display: none; }

    html.fz-h5-v2 .fz-live-side {
        position: absolute;
        z-index: 4;
        top: 42%;
        right: 8px;
        bottom: 58px;
        left: 8px;
        height: auto;
        min-height: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        pointer-events: none;
    }
    html.fz-h5-v2 .fz-live-side-title { display: none; }
    html.fz-h5-v2 .fz-live-chat {
        height: 100%;
        background: transparent;
    }
    html.fz-h5-v2 .fz-live-chat-list {
        padding: 0 48px 7px 0;
        overflow-y: auto;
        -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 100%);
        mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 100%);
        pointer-events: auto;
        scrollbar-width: none;
    }
    html.fz-h5-v2 .fz-live-chat-list::-webkit-scrollbar { display: none; }
    html.fz-h5-v2 .fz-live-chat-empty { display: none !important; }
    html.fz-h5-v2 .fz-live-chat-item {
        display: flex;
        align-items: flex-start;
        gap: 6px;
        width: fit-content;
        max-width: 92%;
        padding: 3px 0;
        color: #fff;
        text-shadow: 0 1px 4px #000, 0 0 7px #000;
    }
    html.fz-h5-v2 .fz-live-chat-avatar {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
        border-color: rgba(255,255,255,.55);
        background: rgba(10,20,33,.5);
    }
    html.fz-h5-v2 .fz-live-chat-meta { gap: 4px; }
    html.fz-h5-v2 .fz-live-chat-meta strong { font-size: 11px; }
    html.fz-h5-v2 .fz-live-chat-meta time { display: none; }
    html.fz-h5-v2 .fz-live-chat-badge {
        padding: 0 3px;
        font-size: 8px;
    }
    html.fz-h5-v2 .fz-live-chat-item p {
        margin-top: 0;
        color: #fff;
        font-size: 12px;
        line-height: 1.35;
    }
    html.fz-h5-v2 .fz-live-chat-gift-event,
    html.fz-h5-v2 .fz-live-chat-gift-event.is-premium {
        width: fit-content;
        max-width: 92%;
        margin: 3px 0;
        padding: 3px 0;
        border: 0;
        background: transparent;
        color: #ffe29a;
        text-shadow: 0 1px 5px #000, 0 0 8px #000;
        box-shadow: none;
    }
    html.fz-h5-v2 .fz-live-chat-unread {
        right: 0;
        bottom: 48px;
        min-height: 26px;
        border-radius: 13px;
        pointer-events: auto;
    }
    html.fz-h5-v2 .fz-live-chat-feedback {
        position: absolute;
        right: 0;
        bottom: 45px;
        left: 0;
        padding: 5px 8px;
        border: 0;
        background: rgba(3,8,14,.65);
        text-shadow: 0 1px 4px #000;
        pointer-events: none;
    }
    html.fz-h5-v2 .fz-live-chat-form {
        flex: 0 0 auto;
        padding: 5px 0 0;
        border: 0;
        background: transparent;
        pointer-events: auto;
    }
    html.fz-h5-v2 .fz-live-chat-compose {
        grid-template-columns: 34px minmax(0, 1fr) 38px;
        gap: 5px;
    }
    html.fz-h5-v2 .fz-live-chat-compose input,
    html.fz-h5-v2 .fz-live-chat-compose button {
        height: 36px;
        border-color: rgba(155,180,205,.42);
        background: rgba(6,14,24,.68);
        backdrop-filter: blur(8px);
    }
    html.fz-h5-v2 .fz-live-chat-compose button[type='submit'] {
        border-color: var(--live-gold);
        background: var(--live-gold);
    }
    html.fz-h5-v2 .fz-live-emoji-panel {
        right: 0;
        bottom: 45px;
        grid-template-columns: repeat(6, 30px);
        background: rgba(7,15,25,.94);
    }

    html.fz-h5-v2 .fz-live-toolbar {
        position: relative;
        z-index: 6;
        min-height: 52px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
        padding: 7px 9px;
        border-top-color: rgba(68,99,128,.5);
        background: #07111e;
    }
    html.fz-h5-v2 .fz-live-tools {
        min-width: 0;
        gap: 8px;
    }
    html.fz-h5-v2 .fz-live-tools button,
    html.fz-h5-v2 .fz-live-gift-open {
        min-height: 34px;
        padding: 0 9px;
        border: 1px solid var(--live-line);
        border-radius: 6px;
        background: #0d1a2a;
        color: #eaf2fb;
    }
    html.fz-h5-v2 .fz-live-gift-open {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-color: rgba(242,189,82,.65);
        color: var(--live-gold);
    }
    html.fz-h5-v2 .fz-live-gift-open[hidden] { display: none; }
    html.fz-h5-v2 .fz-live-notice { display: none; }
    html.fz-h5-v2 .fz-live-connection {
        min-width: 0;
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    html.fz-h5-v2 .fz-live-gift-tickers {
        top: 50%;
        width: calc(100% - 20px);
    }
    html.fz-h5-v2 .fz-live-gift-ticker {
        max-width: 220px;
        background: transparent;
    }
    html.fz-h5-v2 .fz-live-gift-queue-status {
        bottom: 22%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        text-shadow: 0 1px 5px #000, 0 0 8px #000;
        box-shadow: none;
    }
    html.fz-h5-v2 .fz-live-room-copy {
        display: none;
    }
    html.fz-h5-v2 .fz-live-toast {
        top: 50%;
        bottom: auto;
        width: min(320px, calc(100vw - 28px));
        justify-content: center;
        text-align: center;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 380px) {
    html.fz-h5-v2 .fz-live-stage { min-height: 360px; }
    html.fz-h5-v2 .fz-live-stage-alert-actions { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page {
        position: fixed !important;
        z-index: 10000;
        inset: 0;
        width: 100vw !important;
        max-width: none !important;
        height: 100svh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
        background: #000;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-layout,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage-panel,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage {
        position: relative;
        width: 100%;
        height: 100svh !important;
        min-height: 0 !important;
        margin: 0;
        overflow: hidden;
        border: 0;
        background: #000;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage > .video-js,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage .vjs-tech,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-poster,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-iframe-wrap,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-iframe-wrap iframe {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .video-js .vjs-control-bar {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player {
        position: absolute;
        z-index: 21;
        top: auto;
        right: auto;
        bottom: 52px;
        left: 50%;
        width: 50%;
        min-width: 150px;
        max-width: 240px;
        height: 32px;
        display: grid;
        grid-template-columns: 22px 34px minmax(42px, 1fr);
        align-items: center;
        gap: 3px;
        padding: 0 7px 0 3px;
        border: 1px solid rgba(255,255,255,.2);
        border-radius: 16px;
        background: rgba(3,8,14,.32);
        color: #fff;
        text-shadow: 0 1px 4px #000;
        backdrop-filter: blur(5px);
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, 5px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
        pointer-events: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player[hidden] { display: none; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
        pointer-events: auto;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player button {
        width: 22px;
        height: 22px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 12px;
        line-height: 1;
        cursor: pointer;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player span {
        font-size: 10px;
        font-variant-numeric: tabular-nums;
        text-align: center;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player input {
        width: 100%;
        height: 14px;
        margin: 0;
        appearance: none;
        -webkit-appearance: none;
        background: transparent;
        cursor: pointer;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player input::-webkit-slider-runnable-track {
        height: 3px;
        border-radius: 2px;
        background: linear-gradient(90deg, #fff var(--live-progress, 0%), rgba(255,255,255,.36) var(--live-progress, 0%));
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player input::-webkit-slider-thumb {
        width: 9px;
        height: 9px;
        margin-top: -3px;
        border: 0;
        border-radius: 50%;
        -webkit-appearance: none;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,.7);
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player input::-moz-range-track {
        height: 3px;
        border-radius: 2px;
        background: rgba(255,255,255,.36);
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player input::-moz-range-progress { height: 3px; background: #fff; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-mini-player input::-moz-range-thumb {
        width: 9px;
        height: 9px;
        border: 0;
        border-radius: 50%;
        background: #fff;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-side {
        z-index: 12;
        top: 42%;
        right: 8px;
        bottom: calc(100px + env(safe-area-inset-bottom, 0px));
        left: 8px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-list {
        padding-bottom: 5px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-copy {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-confirm,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage-alert {
        z-index: 60;
        padding: 14px;
        pointer-events: auto;
        background: rgba(0, 4, 10, .82);
        backdrop-filter: blur(7px);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage-alert {
        z-index: 61;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-confirm-panel,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage-alert-panel {
        width: min(100%, 390px);
        max-height: calc(100svh - 28px);
        overflow-y: auto;
        padding: 20px 16px 16px;
        border: 1px solid rgba(244, 190, 75, .72);
        border-radius: 10px;
        background: linear-gradient(180deg, rgba(10, 25, 43, .98), rgba(5, 13, 24, .98));
        box-shadow: 0 22px 70px rgba(0, 0, 0, .72), 0 0 24px rgba(244, 190, 75, .1);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-confirm-icon,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage-alert-icon {
        width: 46px;
        height: 46px;
        min-width: 46px;
        margin-bottom: 10px;
        border-radius: 50%;
        color: var(--live-gold);
        font-size: 19px;
        background: rgba(244, 190, 75, .1);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-confirm p,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage-alert p {
        font-size: 13px;
        line-height: 1.6;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-viewer-summary {
        grid-template-columns: 34px minmax(0, 1fr) auto 34px;
        margin-top: 12px;
        padding: 8px;
        border-radius: 7px;
        background: rgba(4, 13, 24, .72);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-confirm-actions {
        gap: 8px;
        margin-top: 14px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-confirm-actions button {
        min-height: 42px;
        border-radius: 7px;
        touch-action: manipulation;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-live-modal-open .fz-live-anchor-hud,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-live-modal-open .fz-live-side,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-live-modal-open .fz-live-toolbar,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-live-modal-open .fz-live-gift-dock,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-live-modal-open .fz-live-chat-form {
        pointer-events: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-feedback {
        position: fixed;
        z-index: 31;
        right: 8px;
        bottom: calc(54px + env(safe-area-inset-bottom, 0px));
        left: 8px;
        border-radius: 5px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-emoji-panel {
        position: fixed;
        z-index: 33;
        right: 8px;
        bottom: calc(54px + env(safe-area-inset-bottom, 0px));
        left: 8px;
        width: auto;
    }
}

@media (max-width: 820px) {
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud {
        top: 10px;
        right: auto;
        left: 10px;
        width: auto;
        max-width: calc(100vw - 62px);
        gap: 5px;
        padding: 3px 4px;
        border: 1px solid rgba(255,255,255,.26);
        border-radius: 23px;
        background: rgba(3,8,14,.46);
        box-shadow: 0 5px 18px rgba(0,0,0,.26);
        backdrop-filter: blur(8px);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > img {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        cursor: pointer;
        pointer-events: auto;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > .fz-live-anchor-meta {
        max-width: 118px;
        padding: 2px 3px;
        cursor: pointer;
        pointer-events: auto;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > .fz-live-anchor-meta strong,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > .fz-live-anchor-meta span {
        max-width: 112px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > button[data-follow-btn] {
        width: 36px;
        min-width: 36px;
        height: 36px;
        margin-left: 0;
        font-size: 0;
        box-shadow: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > button[data-follow-btn] i { display: none; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > button[data-follow-btn]::before {
        content: '+';
        color: #171106;
        font-size: 25px;
        font-weight: 500;
        line-height: 1;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-anchor-hud > button[data-follow-btn].active::before {
        content: '\2713';
        color: #042b20;
        font-size: 18px;
        font-weight: 800;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-exit {
        position: fixed;
        z-index: 26;
        top: 11px;
        right: 10px;
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fff;
        font-size: 30px;
        font-weight: 300;
        text-shadow: 0 1px 5px #000;
        backdrop-filter: none;
        touch-action: manipulation;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-exit-mark {
        display: block;
        line-height: 1;
        transform: translateY(-1px);
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-exit-label { display: none; }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-toolbar {
        position: fixed;
        z-index: 22;
        right: 0;
        bottom: 0;
        left: 0;
        min-height: calc(38px + env(safe-area-inset-bottom, 0px));
        height: calc(38px + env(safe-area-inset-bottom, 0px));
        padding: 0;
        border: 0;
        background: transparent;
        backdrop-filter: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-tools {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-lines,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-notice,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-connection,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-fullscreen {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-toolbar-actions {
        position: absolute;
        z-index: 24;
        right: 8px;
        bottom: env(safe-area-inset-bottom, 0px);
        margin: 0;
        pointer-events: auto;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--live-gold);
        font-size: 20px;
        filter: drop-shadow(0 1px 5px #000);
        box-shadow: none;
        backdrop-filter: none;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open i { font-size: 23px; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open span { display: none; }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-side {
        top: auto;
        right: 8px;
        bottom: calc(52px + env(safe-area-inset-bottom, 0px));
        left: 8px;
        height: min(30svh, 260px);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-list {
        padding: 0 46px 4px 0;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-form,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-form {
        position: fixed;
        z-index: 23;
        right: 52px;
        bottom: env(safe-area-inset-bottom, 0px);
        left: calc(14px + clamp(112px, 30vw, 220px));
        padding: 0;
        pointer-events: auto;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-compose {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 38px;
        gap: 5px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose input {
        border: 1px solid rgba(255,255,255,.3);
        border-radius: 20px;
        background: transparent;
        color: #fff;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose input::placeholder { color: rgba(255,255,255,.7); }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose button,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose button[type='submit'] {
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #fff;
        font-size: 19px;
        box-shadow: none;
        backdrop-filter: none;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose button[type='submit'] {
        color: var(--live-gold);
        filter: drop-shadow(0 1px 4px rgba(0,0,0,.75));
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-emoji,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose button[type='submit'],
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-emoji,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-compose button[type='submit'] {
        display: block;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-tools,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-toolbar-actions {
        opacity: 1;
        pointer-events: auto;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-live-modal-open .fz-live-exit {
        pointer-events: none !important;
    }
}

@media (max-width: 820px) {
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage {
        height: calc(100svh - 50px - env(safe-area-inset-bottom, 0px)) !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-toolbar {
        min-height: calc(50px + env(safe-area-inset-bottom, 0px));
        height: calc(50px + env(safe-area-inset-bottom, 0px));
        background: rgba(2,7,13,.96);
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-toolbar-actions {
        width: 40px;
        height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        right: 5px;
        bottom: calc(5px + env(safe-area-inset-bottom, 0px));
        overflow: visible;
        opacity: 1 !important;
        visibility: visible !important;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255,205,91,.78);
        border-radius: 50%;
        background: linear-gradient(145deg, rgba(255,194,62,.98), rgba(226,139,18,.98));
        color: #251604;
        filter: none;
        box-shadow: 0 3px 12px rgba(0,0,0,.42), 0 0 0 2px rgba(255,210,105,.12);
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open:not([hidden]) {
        display: inline-flex !important;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open i {
        display: inline-block;
        font-size: 20px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-side {
        right: 8px;
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        left: 8px;
        height: min(29svh, 250px);
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-list { padding: 0 4px 4px 0; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-item {
        max-width: 96%;
        font-size: 14px;
        transition: opacity .28s ease, transform .28s ease;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-item.is-leaving {
        opacity: 0;
        transform: translateY(-8px);
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-meta strong { font-size: 13px; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-item p {
        font-size: 14px;
        line-height: 1.42;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-feedback {
        position: fixed;
        z-index: 24;
        right: 12px;
        bottom: calc(99px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        width: auto;
        min-height: 18px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent !important;
        color: #ffe29a;
        font-size: 12px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
        text-shadow: 0 1px 4px rgba(0,0,0,.96), 0 0 7px rgba(0,0,0,.82);
        box-shadow: none;
        pointer-events: none;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-feedback.is-success { color: #49e7a2; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-feedback.is-loading { color: #ffe29a; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-feedback.is-error {
        color: #ff9cab;
        background: transparent !important;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-form,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-form {
        right: 8px;
        bottom: calc(55px + env(safe-area-inset-bottom, 0px));
        left: 8px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose input {
        border-color: rgba(255,255,255,.28);
        background: rgba(3,8,14,.22);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

}

@keyframes fz-live-gift-combo-update {
    0% { transform: scale(1); }
    48% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.fz-live-gift-ticker.is-combo-updated {
    animation: fz-live-gift-combo-update .18s ease both;
}

/* 直播详情最终布局：聊天覆盖视频，礼物固定在视频下方同一行。 */
@media (max-width: 820px) {
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-layout,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage-panel {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-stage {
        position: relative;
        width: 100%;
        height: calc(100svh - 50px - env(safe-area-inset-bottom, 0px)) !important;
        min-height: 0 !important;
        overflow: hidden;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-side {
        position: absolute !important;
        z-index: 12;
        top: auto !important;
        right: 8px !important;
        bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
        left: 8px !important;
        width: auto !important;
        height: min(65svh, 720px) !important;
        min-height: 170px !important;
        overflow: visible;
        border: 0;
        background: transparent;
        pointer-events: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat {
        position: relative;
        height: 100%;
        min-height: 0;
        display: block;
        background: transparent;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-list {
        position: absolute;
        inset: 0 0 44px;
        padding: 0 45px 7px 0;
        overflow-y: auto;
        -webkit-mask-image: linear-gradient(to bottom,transparent,#000 17%,#000 100%);
        mask-image: linear-gradient(to bottom,transparent,#000 17%,#000 100%);
        pointer-events: auto;
        scrollbar-width: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-list::-webkit-scrollbar { display: none; }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page:not(.is-chat-compose-open) .fz-live-chat-list,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page:not(.is-chat-compose-open) .fz-live-chat-unread,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page:not(.is-chat-compose-open) .fz-live-chat-feedback {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-form {
        position: absolute !important;
        z-index: 3;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 38px !important;
        padding: 0 !important;
        border: 0;
        background: transparent;
        box-shadow: none;
        pointer-events: auto;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-form {
        right: 0 !important;
        left: 0 !important;
        width: auto !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-feedback {
        position: absolute !important;
        z-index: 4;
        right: 0 !important;
        bottom: 42px !important;
        left: 0 !important;
        width: auto !important;
        min-height: 17px;
        padding: 0 !important;
        border: 0;
        background: transparent !important;
        line-height: 17px;
        pointer-events: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose {
        display: grid !important;
        grid-template-columns: 38px;
        gap: 0;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-compose {
        grid-template-columns: 32px minmax(0,1fr) 38px;
        gap: 5px;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page:not(.is-chat-compose-open) .fz-live-chat-compose .fz-live-chat-emoji,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page:not(.is-chat-compose-open) .fz-live-chat-compose input {
        display: none !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-compose .fz-live-chat-emoji,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-chat-compose-open .fz-live-chat-compose input {
        display: block !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose input,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose button {
        height: 36px;
        border-color: rgba(255,255,255,.3);
        background: rgba(3,8,14,.3);
        color: #fff;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose input { border-radius: 18px; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose button { border-radius: 50%; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-chat-compose button[type='submit'] {
        border-color: rgba(255,205,91,.88);
        background: transparent;
        color: #ffc84e;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-toolbar {
        position: relative !important;
        z-index: 20;
        width: 100%;
        min-height: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
        height: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 0;
        padding: 0 4px env(safe-area-inset-bottom, 0px) !important;
        border: 0;
        background: #02070d;
        pointer-events: auto !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-tools,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-notice,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-fullscreen { display: none !important; }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-dock {
        position: relative !important;
        z-index: 1;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: 50px !important;
        max-height: 50px !important;
        min-width: 0;
        flex: 1 1 auto;
        margin: 0 !important;
        overflow: hidden;
        border: 0;
        background: transparent;
        pointer-events: auto !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-head { display: none !important; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-list {
        width: 100%;
        height: 50px !important;
        max-height: 50px !important;
        display: flex;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 3px;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 2px 0 !important;
        background: transparent;
        scrollbar-width: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-list::-webkit-scrollbar { display: none; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift {
        flex: 0 0 48px !important;
        width: 48px !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 1px !important;
        border-radius: 8px;
        background: rgba(14,27,43,.72);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift::before {
        content: '\1F381';
        width: 27px;
        height: 27px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        font-size: 21px;
        line-height: 1;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift.has-gift-image::before { display: none; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift img { width: 27px; height: 27px; margin: 0 auto; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift strong { font-size: 8px; line-height: 1.1; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift span { display: none; }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift-dock {
        position: absolute !important;
        z-index: 30;
        right: 0 !important;
        bottom: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        max-height: min(46svh, 380px) !important;
        flex: none;
        overflow: hidden;
        border: 1px solid rgba(242,189,82,.55);
        border-radius: 12px 12px 0 0;
        background: rgba(4,12,22,.98);
        box-shadow: 0 -18px 45px rgba(0,0,0,.52);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift-head {
        min-height: 40px;
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 0 10px;
        border-bottom: 1px solid rgba(45,76,105,.7);
        color: #d9e4f0;
        font-size: 11px;
        text-shadow: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift-head em { margin-left: auto; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift-head button {
        width: 30px;
        height: 30px;
        border: 0;
        background: transparent;
        color: #fff;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift-list {
        height: auto !important;
        max-height: calc(min(46svh, 380px) - 41px) !important;
        display: grid;
        grid-template-columns: repeat(5,minmax(0,1fr));
        gap: 5px;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding: 7px !important;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift {
        width: auto !important;
        height: 66px !important;
        min-height: 66px !important;
        padding: 4px 2px !important;
        border: 1px solid rgba(49,80,108,.6);
        border-radius: 8px;
        background: rgba(13,29,47,.88);
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift img,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift::before { width: 34px; height: 34px; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift strong { font-size: 10px; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift span {
        display: block;
        color: var(--live-gold);
        font-size: 8px;
        line-height: 1.1;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-toolbar-actions {
        position: static !important;
        z-index: 2;
        width: 44px !important;
        height: 50px !important;
        display: flex !important;
        flex: 0 0 44px;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
        overflow: visible;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #ffc84e;
        filter: drop-shadow(0 1px 5px rgba(0,0,0,.9));
        box-shadow: none;
    }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open[hidden] { display: none !important; }

    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open i,
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open span { display: none !important; }
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-gift-open::before {
        content: '';
        display: block;
        width: 24px;
        height: 24px;
        background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffc84e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='13' rx='1'/%3E%3Cpath d='M12 8v13M2 8h20v5H2zM12 8H8.5A2.5 2.5 0 1 1 11 5.5zm0 0h3.5A2.5 2.5 0 1 0 13 5.5z'/%3E%3C/svg%3E");
    }

}

@media (max-width: 380px) {
    html.fz-h5-v2 body.fz-h5-live-detail .fz-live-room-page.is-gift-open .fz-live-gift-list {
        grid-template-columns: repeat(4,minmax(0,1fr));
    }
}
