#xlc-catfish[hidden] { display: none !important; }
#xlc-catfish {
    position: fixed; z-index: 890; left: 50%; bottom: var(--xlc-catfish-bottom, 0px);
    transform: translateX(-50%); width: min(100%, 960px); margin: 0; padding: 0;
    border: 0; box-shadow: 0 -2px 12px #0004; line-height: 0; background: #101820; isolation: isolate;
}
#xlc-catfish a, #xlc-catfish img { display: block; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; }
#xlc-catfish img { height: auto; aspect-ratio: 12 / 1; object-fit: contain; }
#xlc-catfish .xlc-catfish-close {
    position: absolute; right: 3px; bottom: 100%; width: 30px; height: 26px;
    padding: 0; border: 1px solid #fff8; border-radius: 5px 5px 0 0;
    background: #182026; color: #fff; font: 24px/24px Arial, sans-serif; cursor: pointer; box-shadow: none;
}
#xlc-catfish .xlc-catfish-close:focus-visible { outline: 3px solid #ffcf40; outline-offset: 2px; }
body.xlc-catfish-active .back-to-top { bottom: calc(var(--xlc-catfish-height, 160px) + var(--xlc-catfish-bottom, 0px) + 12px) !important; }
@media (max-width: 767px) {
    html body.xlc-catfish-active:not(.xlc-mobile-live) { padding-bottom: calc(var(--xlc-catfish-height, 66px) + var(--xlc-catfish-bottom, 32px) + 12px) !important; }
    /* Keep the fixed player/chat layout above the campaigns and quick navigation. */
    body.xlc-mobile-live.xlc-catfish-active { padding-bottom: 0 !important; }
    body.xlc-mobile-live.xlc-catfish-active:not(.xlc-catfish-in-chat) #primary.remote-match-page {
        height: calc(var(--xlcm-height, 100dvh) - var(--xl-header-height, 38px) - var(--xlc-catfish-bottom, 32px) - var(--xlc-catfish-height, 66px)) !important;
    }
    /* The campaign slot covers only the composer; chat keeps its original layout. */
    body.xlc-mobile-live .xlc-theme-catfish-chat.is-active {
        position: relative; min-height: 0; overflow: hidden !important;
    }
    body.xlc-mobile-live .xlc-theme-catfish-chat #xlc-chat-widget .cw-messages {
        position: relative; z-index: 0; box-sizing: border-box;
        flex: 1 1 0 !important; min-height: 0 !important;
        overflow-x: hidden !important; overflow-y: auto !important;
    }
    body.xlc-mobile-live .xlc-theme-catfish-chat #xlc-chat-widget .cw-input-container,
    body.xlc-mobile-live .xlc-theme-catfish-chat #xlc-chat-widget .cw-input-container *,
    body.xlc-mobile-live .xlc-theme-catfish-chat #xlc-chat-widget .cw-login-button,
    body.xlc-mobile-live .xlc-theme-catfish-chat #xlc-chat-widget .cw-info-button {
        visibility: hidden !important; pointer-events: none;
    }
    #xlc-catfish.xlc-catfish--chat {
        position: absolute; left: 0; top: var(--xlc-catfish-compose-top); bottom: 0; transform: none;
        display: grid; grid-template-rows: repeat(2, minmax(0, 1fr));
        width: 100%; max-width: 100%; z-index: 2; overflow: hidden; box-shadow: none;
        border-top: 1px solid #424747; border-bottom: 1px solid #424747; box-sizing: border-box;
    }
    #xlc-catfish.xlc-catfish--chat a { min-height: 0; height: 100%; overflow: hidden; }
    #xlc-catfish.xlc-catfish--chat img { height: 100%; object-fit: contain; }
    #xlc-catfish.xlc-catfish--chat .xlc-catfish-close {
        top: 1px; right: 1px; bottom: auto; z-index: 1;
        width: 24px; height: 24px; border-radius: 3px;
        font-size: 20px; line-height: 22px;
    }
}
@media print { #xlc-catfish { display: none !important; } }
