/*
 * Mangazaar neutral liquid navigation
 *
 * The glass treatment is intentionally confined to two small layers. The
 * mobile disclosure animates one short width plus composited transforms and
 * opacity, keeping the effect polished without burdening reader mode.
 */

:root {
    --mz-nav-height: 68px;
    --mz-glass-bg: rgba(18, 19, 22, 0.56);
    --mz-glass-bg-solid: rgba(14, 15, 17, 0.94);
    --mz-glass-border: rgba(255, 255, 255, 0.17);
    --mz-glass-border-strong: rgba(255, 255, 255, 0.27);
    --mz-glass-highlight: rgba(255, 255, 255, 0.14);
    --mz-glass-text: rgba(255, 255, 255, 0.9);
    --mz-glass-muted: rgba(255, 255, 255, 0.62);
    --mz-glass-shadow: 0 6px 18px rgba(0, 0, 0, 0.22),
        0 1px 2px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        inset 0 -1px 0 rgba(255, 255, 255, 0.025);
}

.mz-liquid-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 999 !important;
    height: var(--mz-nav-height);
    padding-top: 9px;
    pointer-events: none;
    background: transparent !important;
    border: 0 !important;
    /* responsive-extra.css paint-contains every nav. On this fixed rail that
       clips composited effects to the old 60px header box, producing a dark
       rectangular band beneath the opened pill. Keep the cheap isolation,
       but allow the glass island to paint to its own rounded boundary. */
    contain: layout style;
}

.mz-liquid-nav__frame {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: none !important;
    height: 50px !important;
    padding-inline: clamp(10px, 2vw, 28px) !important;
    gap: 12px;
}

.mz-liquid-nav__island {
    position: relative;
    flex: 0 0 auto !important;
    width: max-content;
    max-width: calc(100vw - 20px);
    min-width: 0;
    min-height: 50px;
    padding: 3px 8px;
    border: 1px solid var(--mz-glass-border);
    border-radius: 18px;
    background: var(--mz-glass-bg-solid);
    box-shadow: var(--mz-glass-shadow);
    color: var(--mz-glass-text);
    isolation: isolate;
    pointer-events: auto;
}

.mz-liquid-nav__island::before {
    content: '';
    position: absolute;
    pointer-events: none;
}

.mz-liquid-nav__island::after {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
}

.mz-liquid-nav__island::before {
    inset: 0.5px;
    z-index: 0;
    border-radius: inherit;
    background:
        linear-gradient(108deg, rgba(255, 255, 255, 0.13), transparent 18%, transparent 78%, rgba(255, 255, 255, 0.045)),
        radial-gradient(75% 54% at 48% -8%, rgba(255, 255, 255, 0.13), transparent 74%);
    opacity: 0.78;
}

/* Keep content above the optical layers. */
.mz-liquid-nav__island > * {
    z-index: 1;
}

/* liquidGL disables pointer events and clears the visual styles of its target.
   Give it a dedicated, non-semantic plane so the real navigation remains an
   untouched DOM layer above the shared WebGL canvas. z-index 999 is deliberate:
   upstream positions its body-level canvas one layer below the target. */
.mz-liquid-nav__lens {
    position: absolute;
    inset: 0;
    z-index: 999 !important;
    display: block;
    border-radius: inherit;
    pointer-events: none !important;
    contain: strict;
}

/* Defensive: this menu must never become an in-flow flex child, even if the
   compiled utility stylesheet is rebuilt without its `.fixed` helper. */
#adminDropdownMenu {
    position: fixed !important;
}

#typesDropdownMenu,
#genresDropdownMenu {
    position: fixed !important;
}

.mz-liquid-nav__mobile-home {
    display: none !important;
}

@supports ((-webkit-backdrop-filter: blur(16px)) or (backdrop-filter: blur(16px))) {
    .mz-liquid-nav__island {
        background: var(--mz-glass-bg);
        -webkit-backdrop-filter: blur(16px) saturate(118%) contrast(102%);
        backdrop-filter: blur(16px) saturate(118%) contrast(102%);
    }

}

/* WebGL is an optical enhancement, never a layout mode. Until liquidGL has
   produced its first frame, the complete CSS glass treatment above remains.
   Once ready, a quieter tint lets the refracted artwork read through while the
   edge lighting preserves contrast against both bright and dark hero images. */
@media (min-width: 1024px) {
    /* The swap from CSS glass to the WebGL lens happens after page load, so it
       must read as a settle, not a pop: every property that changes is eased
       over the same duration, and the canvas fades in alongside. backdrop-filter
       cannot interpolate to `none`, so the ready state uses a zero-strength
       filter that matches the function list. */
    .mz-liquid-nav__island {
        transition:
            background-color 480ms ease,
            border-color 480ms ease,
            box-shadow 480ms ease,
            -webkit-backdrop-filter 480ms ease,
            backdrop-filter 480ms ease;
    }

    .mz-liquid-nav__island::before,
    .mz-liquid-nav__island::after {
        transition: opacity 480ms ease;
    }

    .mz-liquid-nav__webgl-canvas:not([hidden]) {
        animation: mz-liquid-gl-in 480ms ease both;
    }

    @keyframes mz-liquid-gl-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    html.mz-liquid-gl-ready .mz-liquid-nav__island {
        border-color: rgba(255, 255, 255, 0.22);
        background:
            linear-gradient(112deg, rgba(255, 255, 255, 0.055), transparent 24%, transparent 72%, rgba(255, 255, 255, 0.025)),
            rgba(10, 12, 16, 0.36);
        -webkit-backdrop-filter: blur(0px) saturate(100%) contrast(100%);
        backdrop-filter: blur(0px) saturate(100%) contrast(100%);
        box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.3),
            0 2px 6px rgba(0, 0, 0, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            inset 0 -1px 0 rgba(255, 255, 255, 0.045);
    }

    html.mz-liquid-gl-ready .mz-liquid-nav__island::before {
        opacity: 0.62;
    }

    html.mz-liquid-gl-ready .mz-liquid-nav__island::after {
        opacity: 1;
        background:
            radial-gradient(110% 74% at 50% -28%, rgba(255, 255, 255, 0.16), transparent 58%),
            linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent 12%, transparent 88%, rgba(255, 255, 255, 0.045));
        box-shadow:
            inset 0 0 0 0.5px rgba(255, 255, 255, 0.09),
            inset 0 -8px 16px rgba(0, 0, 0, 0.055);
    }
}

/* Resizing a desktop window into the compact navigation must immediately
   reveal the established CSS/mobile treatment, even while the shared renderer
   remains alive for a possible return to desktop width. */
@media (max-width: 1023.98px) {
    .mz-liquid-nav__webgl-canvas {
        display: none !important;
    }
}

.mz-liquid-nav__primary {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.7vw, 26px) !important;
    padding-inline: 10px 7px;
    justify-content: flex-start;
}

.mz-liquid-nav__utility {
    display: flex;
    align-items: center;
    gap: 3px !important;
    padding-inline: 5px;
}

.mz-liquid-nav__primary .mz-brand-logo {
    height: 42px;
    gap: 7px;
}

.mz-liquid-nav__primary .mz-brand-logo__name {
    font-size: 25px;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.62);
}

.mz-liquid-nav__primary .mz-brand-logo__name::before {
    -webkit-text-stroke-color: rgba(0, 0, 0, 0.46);
}

.mz-liquid-nav__primary .mz-brand-logo__mark {
    width: 42px;
    height: 38px;
    filter: grayscale(0.24) saturate(0.76) drop-shadow(0 5px 9px rgba(0, 0, 0, 0.38));
}

.mz-liquid-nav__primary .mz-brand-logo:hover .mz-brand-logo__mark {
    filter: grayscale(0.08) saturate(0.88) brightness(1.05) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.43));
}

.mz-liquid-nav__primary .mz-brand-logo__mark::before,
.mz-liquid-nav__primary .mz-brand-logo:hover .mz-brand-logo__mark::before {
    display: none;
}

.mz-cart-body {
    position: absolute;
    inset: 0;
    display: block;
    transform-origin: 50% 72%;
}

.mz-cart-wheel {
    display: none;
}

.mz-liquid-nav__primary .hidden.md\:flex > a,
.mz-liquid-nav__primary .hidden.md\:flex button {
    color: var(--mz-glass-muted);
    border-radius: 10px;
    padding: 5px 6px;
    transition: color 160ms ease, background-color 160ms ease;
}

.mz-liquid-nav__primary .hidden.md\:flex > a:hover,
.mz-liquid-nav__primary .hidden.md\:flex button:hover,
.mz-liquid-nav__primary .hidden.md\:flex button[aria-expanded='true'] {
    color: var(--mz-glass-text);
    background: rgba(255, 255, 255, 0.065);
}

.mz-liquid-nav__icon,
.mz-liquid-nav__admin,
.mz-liquid-nav__account,
.mz-liquid-nav__logout,
.mz-liquid-nav__wallet,
.mz-liquid-nav__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    color: var(--mz-glass-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease !important;
}

.mz-liquid-nav__icon {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 12px !important;
}

.mz-liquid-nav__admin {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 12px !important;
}

.mz-liquid-nav__wallet,
.mz-liquid-nav__account,
.mz-liquid-nav__logout,
.mz-liquid-nav__login {
    min-height: 36px;
    border-radius: 12px !important;
    padding: 0 10px !important;
}

.mz-liquid-nav__wallet {
    direction: ltr;
    font-variant-numeric: tabular-nums;
    color: var(--mz-glass-text) !important;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.045) !important;
}

.mz-liquid-nav__login {
    min-width: 112px;
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.075) !important;
}

.mz-liquid-nav__icon:hover,
.mz-liquid-nav__admin:hover,
.mz-liquid-nav__account:hover,
.mz-liquid-nav__logout:hover,
.mz-liquid-nav__wallet:hover,
.mz-liquid-nav__login:hover,
.mz-liquid-nav__icon:focus-visible,
.mz-liquid-nav__admin:focus-visible,
.mz-liquid-nav__account:focus-visible,
.mz-liquid-nav__logout:focus-visible,
.mz-liquid-nav__wallet:focus-visible,
.mz-liquid-nav__login:focus-visible {
    color: #fff !important;
    border-color: var(--mz-glass-border-strong);
    background: rgba(255, 255, 255, 0.09) !important;
    outline: none;
}

.mz-liquid-nav__utility #headerLoggedInMenu {
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Keep the authenticated state compact: the icon meaning is reinforced by
   accessible labels and browser tooltips, so persistent text is redundant. */
.mz-liquid-nav__account,
.mz-liquid-nav__logout {
    width: 36px;
    padding-inline: 0 !important;
}

.mz-liquid-nav__account span,
.mz-liquid-nav__logout span {
    display: none;
}

@media (max-width: 1100px) {
    .mz-liquid-nav__primary {
        gap: 11px !important;
    }

    .mz-liquid-nav__primary .hidden.md\:flex {
        gap: 7px !important;
        font-size: 12px;
    }

}

/* The compiled utility classes reveal the full desktop menu at 768px. A
   two-island layout needs a little more room, so tablet keeps the brand and
   utility controls while deferring the catalogue links to desktop widths. */
@media (min-width: 768px) and (max-width: 1023px) {
    .mz-liquid-nav__primary > .hidden.md\:flex {
        display: none !important;
    }

    .mz-liquid-nav__account,
    .mz-liquid-nav__logout {
        width: 36px;
        padding-inline: 0 !important;
    }
}

@media (max-width: 767.98px) {
    :root {
        --mz-nav-height: 60px;
    }

    .mz-liquid-nav {
        height: var(--mz-nav-height);
        padding-top: 6px;
    }

    .mz-liquid-nav__frame {
        height: 46px !important;
        padding-inline: 8px !important;
        gap: 8px;
    }

    .mz-liquid-nav__island {
        min-height: 46px;
        border-radius: 16px;
    }

    .mz-liquid-nav__primary {
        position: absolute;
        top: 0;
        right: 8px;
        z-index: 3;
        width: 48px;
        padding-inline: 5px;
        gap: 0 !important;
        overflow: hidden;
        transition:
            width 410ms cubic-bezier(0.4, 0, 0.2, 1),
            border-radius 330ms ease,
            box-shadow 330ms ease;
    }

    .mz-liquid-nav--menu-open .mz-liquid-nav__primary {
        width: calc(100% - 16px);
        border-radius: 17px;
        transition-duration: 570ms, 440ms, 440ms;
        transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1), ease, ease;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.15),
            inset 0 -1px 0 rgba(255, 255, 255, 0.035);
    }

    /* During the opening pass the cart temporarily becomes a viewport-level
       actor: it draws the rail leftward, exits past the left edge, then loops
       invisibly and docks again from the right. Its flex basis stays in place,
       so the navigation never reflows when the cart returns to the island. */
    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary {
        overflow: visible;
        animation: mz-mobile-rail-follow 1320ms linear both;
    }

    /* The glass stays a few pixels ahead while paving the route. Once it has
       reached full width, its rounded boundary becomes the mask while the cart
       continues moving through the stationary rail and returns from the right. */
    .mz-liquid-nav--menu-opening.mz-liquid-nav--menu-clipped .mz-liquid-nav__primary {
        overflow: hidden;
    }

    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary .mz-brand-logo__mark {
        position: fixed;
        /* Match the mark's normal flex position exactly so entering and
           leaving the temporary fixed-motion layer cannot produce a jump. */
        top: 4.3333px;
        right: 5px;
        z-index: 5;
        width: 38px;
        height: 36px;
        animation: mz-mobile-cart-journey 1320ms linear both;
    }

    .mz-liquid-nav--menu-opening .mz-cart-body {
        animation: mz-mobile-cart-chassis 1320ms linear both;
    }

    .mz-liquid-nav--menu-opening .mz-cart-wheel {
        display: block;
        position: absolute;
        top: 23.5px;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background-image: url('../images/mangazar-cart-base.png');
        background-repeat: no-repeat;
        background-size: 36px 36px;
        animation: mz-mobile-cart-wheels 1320ms linear both;
    }

    .mz-liquid-nav--menu-opening .mz-cart-wheel--left {
        left: 6.7px;
        background-position: -5.7px -23.5px;
    }

    .mz-liquid-nav--menu-opening .mz-cart-wheel--right {
        left: 21.9px;
        background-position: -20.9px -23.5px;
    }

    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary .mz-brand-logo__lantern {
        animation: mz-mobile-cart-lantern-journey 1320ms ease-in-out both;
    }

    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary::before {
        transform-origin: right center;
        animation: mz-mobile-glass-follow 770ms cubic-bezier(0.22, 0.72, 0.2, 1) both;
    }

    .mz-liquid-nav--menu-opening::before,
    .mz-liquid-nav--menu-opening::after {
        content: '';
        position: fixed;
        z-index: 4;
        width: 3px;
        height: 3px;
        border-radius: 50%;
        pointer-events: none;
        background: rgba(176, 169, 157, 0.68);
        opacity: 0;
    }

    .mz-liquid-nav--menu-opening::before {
        top: 40px;
        right: 38px;
        box-shadow: 6px -3px 0 -0.5px rgba(176, 169, 157, 0.55), 11px 2px 0 -1px rgba(176, 169, 157, 0.42), 3px 5px 0 -1px rgba(176, 169, 157, 0.34);
        animation: mz-mobile-dust-start 360ms 40ms ease-out both;
    }

    .mz-liquid-nav--menu-opening::after {
        top: 40px;
        left: 39px;
        box-shadow: 5px -4px 0 -0.5px rgba(176, 169, 157, 0.5), 12px 1px 0 -1px rgba(176, 169, 157, 0.4), 7px 6px 0 -1px rgba(176, 169, 157, 0.3);
        animation: mz-mobile-dust-stop 400ms 720ms ease-out both;
    }

    .mz-liquid-nav__primary .mz-brand-logo {
        flex: 0 0 38px;
        height: 38px;
        cursor: pointer;
    }

    .mz-liquid-nav__primary .mz-brand-logo:focus {
        outline: none;
    }

    .mz-liquid-nav__primary .mz-brand-logo:focus-visible {
        border-radius: 12px;
        outline: 2px solid rgba(255, 255, 255, 0.58);
        outline-offset: -2px;
    }

    .mz-liquid-nav__primary .mz-brand-logo__name {
        display: none;
    }

    .mz-liquid-nav__primary .mz-brand-logo__mark {
        width: 38px;
        height: 36px;
    }

    .mz-liquid-nav__primary > #mzMobileNavLinks {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        min-width: 0;
        height: 38px;
        margin-inline-start: 3px;
        gap: 2px !important;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transform: translateX(14px);
        pointer-events: none;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 100%);
        transition:
            opacity 190ms ease,
            transform 320ms cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0s linear 320ms;
    }

    .mz-liquid-nav__primary > #mzMobileNavLinks::-webkit-scrollbar {
        display: none;
    }

    .mz-liquid-nav--menu-open .mz-liquid-nav__primary > #mzMobileNavLinks {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
        transition-duration: 230ms, 430ms, 0s;
        transition-timing-function: ease, cubic-bezier(0.16, 1, 0.3, 1), linear;
        transition-delay: 190ms, 135ms, 0s;
    }

    /* Each control appears in sequence behind the passing cart. */
    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
        transition: none;
    }

    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks > * {
        opacity: 0;
        transform: translateX(12px) scale(0.96);
        animation: mz-mobile-link-trail 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks > :nth-child(1) { animation-delay: 110ms; }
    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks > :nth-child(2) { animation-delay: 180ms; }
    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks > :nth-child(3) { animation-delay: 250ms; }
    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks > :nth-child(4) { animation-delay: 320ms; }
    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks > :nth-child(5) { animation-delay: 390ms; }
    .mz-liquid-nav--menu-opening .mz-liquid-nav__primary > #mzMobileNavLinks > :nth-child(6) { animation-delay: 460ms; }

    .mz-liquid-nav__primary > #mzMobileNavLinks > *,
    .mz-liquid-nav__primary > #mzMobileNavLinks > a,
    .mz-liquid-nav__primary > #mzMobileNavLinks > div > button {
        flex: 0 0 auto;
    }

    .mz-liquid-nav__primary > #mzMobileNavLinks > a,
    .mz-liquid-nav__primary > #mzMobileNavLinks > div > button {
        min-height: 32px;
        padding: 5px 7px;
        font-size: 11px;
    }

    .mz-liquid-nav__primary > #mzMobileNavLinks .mz-liquid-nav__mobile-home {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 32px;
        padding: 0 !important;
    }

    .mz-liquid-nav__utility {
        position: absolute;
        top: 0;
        left: 8px;
        z-index: 2;
        margin: 0;
        transition: opacity 180ms ease, transform 260ms ease, visibility 0s linear 260ms;
    }

    .mz-liquid-nav--menu-open .mz-liquid-nav__utility {
        opacity: 0;
        visibility: hidden;
        transform: translateX(-14px) scale(0.96);
        pointer-events: none;
        transition-delay: 0s;
    }

    @keyframes mz-mobile-rail-follow {
        0%,
        8% {
            width: 48px;
        }
        58%,
        100% {
            width: calc(100% - 16px);
        }
    }

    @keyframes mz-mobile-cart-journey {
        0% {
            opacity: 1;
            transform: translateX(0);
        }
        8% {
            opacity: 1;
            transform: translateX(-15px);
        }
        58% {
            opacity: 1;
            transform: translateX(calc(-100vw + 71px));
        }
        64% {
            opacity: 1;
            transform: translateX(calc(-100vw + 65px));
        }
        69% {
            opacity: 1;
            transform: translateX(calc(-100vw - 73px));
        }
        69.1% {
            opacity: 0;
            transform: translateX(64px);
        }
        76% {
            opacity: 0;
            transform: translateX(58px);
        }
        81% {
            opacity: 1;
            transform: translateX(38px);
        }
        93%,
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes mz-mobile-cart-chassis {
        0%,
        2% { transform: translateY(0) rotate(0) scale(1); }
        4% { transform: translateY(-0.7px) rotate(-0.55deg) scale(1.006, 0.995); }
        7% { transform: translateY(0.35px) rotate(0.28deg) scale(0.997, 1.004); }
        11% { transform: translateY(-0.25px) rotate(-0.18deg) scale(1); }
        18% { transform: translateY(-0.75px) rotate(-0.45deg) scale(1); }
        26% { transform: translateY(0.65px) rotate(0.38deg) scale(1); }
        35% { transform: translateY(-0.55px) rotate(-0.3deg) scale(1); }
        44% { transform: translateY(0.75px) rotate(0.42deg) scale(1); }
        52% { transform: translateY(-0.6px) rotate(-0.34deg) scale(1); }
        58% { transform: translateY(1.35px) rotate(1.15deg) scale(0.992, 1.012); }
        61% { transform: translateY(-1px) rotate(-0.85deg) scale(1.008, 0.994); }
        64% { transform: translateY(0.35px) rotate(0.25deg) scale(1); }
        69% { transform: translateY(-0.8px) rotate(-0.55deg) scale(1); }
        69.1%,
        76% { transform: translateY(0) rotate(0) scale(1); }
        81% { transform: translateY(1.2px) rotate(0.8deg) scale(0.99, 1.01); }
        86% { transform: translateY(-0.85px) rotate(-0.6deg) scale(1.006, 0.995); }
        92% { transform: translateY(0.5px) rotate(0.34deg) scale(1); }
        97% { transform: translateY(-0.25px) rotate(-0.18deg) scale(1); }
        100% { transform: translateY(0) rotate(0) scale(1); }
    }

    @keyframes mz-mobile-cart-wheels {
        0% { transform: rotate(0); }
        3% { transform: rotate(-5deg); }
        8% { transform: rotate(-85deg); }
        16% { transform: rotate(-390deg); }
        24% { transform: rotate(-735deg); }
        33% { transform: rotate(-1110deg); }
        41% { transform: rotate(-1480deg); }
        50% { transform: rotate(-1900deg); }
        58% { transform: rotate(-2440deg); }
        61% { transform: rotate(-2495deg); }
        64% { transform: rotate(-2530deg); }
        69% { transform: rotate(-2880deg); }
        69.1%,
        76% { transform: rotate(-2880deg); }
        81% { transform: rotate(-2960deg); }
        88% { transform: rotate(-3180deg); }
        93% { transform: rotate(-3330deg); }
        97% { transform: rotate(-3390deg); }
        100% { transform: rotate(-3400deg); }
    }

    @keyframes mz-mobile-glass-follow {
        0% {
            opacity: 0.34;
            transform: scaleX(0.12) translateX(10px);
        }
        38% {
            opacity: 0.58;
            transform: scaleX(0.48) translateX(5px);
        }
        72% {
            opacity: 0.9;
            transform: scaleX(1.018) translateX(-1px);
        }
        100% {
            opacity: 0.78;
            transform: scaleX(1) translateX(0);
        }
    }

    @keyframes mz-mobile-cart-lantern-journey {
        0% { transform: rotate(0); }
        18% { transform: rotate(-8deg); }
        42% { transform: rotate(4deg); }
        64% { transform: rotate(-3deg); }
        78% { transform: rotate(0); }
        86% { transform: rotate(-7deg); }
        95% { transform: rotate(2.5deg); }
        100% { transform: rotate(0); }
    }

    @keyframes mz-mobile-link-trail {
        0% {
            opacity: 0;
            transform: translateX(12px) scale(0.96);
        }
        72% {
            opacity: 1;
            transform: translateX(-1px) scale(1.008);
        }
        100% {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
    }

    @keyframes mz-mobile-dust-start {
        0% {
            opacity: 0;
            transform: translate(0, 0) scale(0.55);
        }
        18% {
            opacity: 0.72;
        }
        58% {
            opacity: 0.42;
            transform: translate(8px, 2px) scale(1.28);
        }
        100% {
            opacity: 0;
            transform: translate(18px, 7px) scale(1.75);
        }
    }

    @keyframes mz-mobile-dust-stop {
        0% {
            opacity: 0;
            transform: translate(0, 0) scale(0.5);
        }
        20% {
            opacity: 0.66;
        }
        62% {
            opacity: 0.36;
            transform: translate(9px, 1px) scale(1.35);
        }
        100% {
            opacity: 0;
            transform: translate(18px, 6px) scale(1.9);
        }
    }

    .mz-liquid-nav__login {
        min-width: 0;
        padding-inline: 11px !important;
    }

    .mz-liquid-nav__icon,
    .mz-liquid-nav__admin {
        width: 34px;
        height: 34px;
    }

    .mz-liquid-nav__wallet,
    .mz-liquid-nav__account,
    .mz-liquid-nav__logout,
    .mz-liquid-nav__login {
        min-height: 34px;
        border-radius: 11px !important;
    }
}

@media (max-width: 390px) {
    .mz-liquid-nav__frame {
        gap: 6px;
    }

    .mz-liquid-nav__island {
        padding-inline: 5px;
    }

    .mz-liquid-nav__login {
        font-size: 10px;
        padding-inline: 9px !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .mz-liquid-nav__island {
        background: var(--mz-glass-bg-solid);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mz-liquid-nav *,
    .mz-liquid-nav *::before,
    .mz-liquid-nav *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Desktop: the frosted CSS glass (blur) is the base; once liquidGL has drawn
   its first frame, html.mz-liquid-gl-ready swaps in the refracted WebGL lens
   (rules above). The earlier "static glass only" override was removed
   2026-09-26 to re-trial the full effect; backup in
   .mz-fix-backups/liquid-nav-20260926/. */

/* ------------------------------------------------------------------
 * Drag-down-on-cart → home droplet (mobile, ribbon closed).
 * Driven from header.php. The drip is the island's own glass pulled out of
 * its bottom edge: an HTML layer masked by a per-frame clip-path (so it can
 * carry the same backdrop blur as the island), an open SVG rim that matches
 * the island border without drawing a line across the join, and a bead face
 * holding the highlight + house. Lives on <body> because the closed island
 * clips with overflow:hidden. Only exists while the finger is down.
 * ------------------------------------------------------------------ */
@media (max-width: 767.98px) {
    .mz-liquid-nav__primary #mzMobileNavToggle {
        touch-action: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

.mz-home-drop {
    position: fixed;
    z-index: 1001;
    pointer-events: none;
    /* Never set opacity/filter here: it would cut the children's backdrop. */
}

.mz-home-drop__goo {
    position: absolute;
    inset: 0;
    background: var(--mz-glass-bg-solid);
    clip-path: inset(0 0 100% 0);
}

.mz-home-drop__rim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    fill: none;
    stroke: var(--mz-glass-border);
    stroke-width: 1;
}

.mz-home-drop__bead {
    position: absolute;
    top: 0;
    left: 50%;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%) scale(0.3);
    will-change: transform;
}

.mz-home-drop__jelly {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: var(--mz-glass-text);
    /* Specular glint + a soft lower lens shade, like a bead of glass. */
    background:
        radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.3) 0, rgba(255, 255, 255, 0.06) 22%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 55%);
}

.mz-home-drop__jelly svg {
    width: 17px;
    height: 17px;
    opacity: 0;
    filter: none;
}

/* Once pinched off, the bead carries its own glass body and rim. */
.mz-home-drop.is-free .mz-home-drop__jelly {
    background:
        radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.3) 0, rgba(255, 255, 255, 0.06) 22%, rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 55%),
        var(--mz-glass-bg-solid);
    box-shadow:
        inset 0 0 0 1px var(--mz-glass-border),
        0 6px 14px rgba(0, 0, 0, 0.26);
}

@supports ((-webkit-backdrop-filter: blur(16px)) or (backdrop-filter: blur(16px))) {
    .mz-home-drop__goo {
        background: var(--mz-glass-bg);
        -webkit-backdrop-filter: blur(16px) saturate(118%) contrast(102%);
        backdrop-filter: blur(16px) saturate(118%) contrast(102%);
    }

    .mz-home-drop.is-free .mz-home-drop__jelly {
        background:
            radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.3) 0, rgba(255, 255, 255, 0.06) 22%, rgba(255, 255, 255, 0) 42%),
            radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 55%),
            var(--mz-glass-bg);
        -webkit-backdrop-filter: blur(16px) saturate(118%) contrast(102%);
        backdrop-filter: blur(16px) saturate(118%) contrast(102%);
    }
}

.mz-home-drop__jelly.is-wobble {
    animation: mz-home-drop-wobble 600ms cubic-bezier(0.3, 0.7, 0.4, 1) both;
}

.mz-home-drop__jelly.is-go {
    animation: mz-home-drop-go 240ms cubic-bezier(0.3, 0, 0.6, 1) both;
}

/* Pinch-off: stretched up by the snapping thread, then settles round. */
@keyframes mz-home-drop-wobble {
    0%   { transform: scale(0.86, 1.16); }
    26%  { transform: scale(1.12, 0.88); }
    50%  { transform: scale(0.95, 1.05); }
    74%  { transform: scale(1.02, 0.98); }
    100% { transform: scale(1, 1); }
}

@keyframes mz-home-drop-go {
    0%   { transform: scale(1); opacity: 1; }
    45%  { transform: scale(1.22); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-transparency: reduce) {
    .mz-home-drop__goo,
    .mz-home-drop.is-free .mz-home-drop__jelly {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .mz-home-drop__goo { background: var(--mz-glass-bg-solid); }
}

@media (prefers-reduced-motion: reduce) {
    .mz-home-drop__jelly.is-wobble,
    .mz-home-drop__jelly.is-go {
        animation: none;
    }
}
