html.lillo-scroll-active .lillo-scroll-shell {
    position: fixed !important;
    inset: var(--lillo-admin-offset, 0px) 0 auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    z-index: 99990;
    transform: translateY(calc(-100% - var(--lillo-admin-offset, 0px) - 16px));
    visibility: hidden;
    pointer-events: none;
    transition: transform 220ms ease, visibility 220ms;
}

html.lillo-scroll-active .lillo-scroll-shell.is-visible {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

/* The header is outside the document flow, so remove its following block gap. */
html.lillo-scroll-active .lillo-scroll-shell + * {
    margin-block-start: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    html.lillo-scroll-active .lillo-scroll-shell {
        transition: none;
    }
}

/* Compact mobile header; desktop dimensions stay unchanged. */
@media (max-width: 781px) {
    .lillo-scroll-header > .wp-block-columns {
        padding-inline: 16px !important;
        margin-bottom: 0 !important;
    }
    .lillo-scroll-header .site-header__inner {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 12px;
        padding: 0 !important;
    }
    .lillo-scroll-header .wp-block-site-logo img {
        display: block;
        width: 57px !important;
        height: 57px !important;
        object-fit: contain;
    }
    .lillo-scroll-header .wp-block-buttons {
        margin: 0;
        flex-shrink: 0;
    }
    .lillo-scroll-header .wp-block-button__link {
        padding: 10px 12px;
        font-size: 14px !important;
        line-height: 24px;
    }
}
