/* Liquid glass lens (js/liquid-glass.js). A clear lens that floats above its items: a tinted body,
 * a specular rim whose bright side faces the pointer (--la), a soft highlight under the pointer
 * (--lx / --ly) and a contact shadow. In Chromium the script adds an SVG refraction filter as the
 * backdrop, so the content under the rim bends. JS sets size and transform; nothing here animates
 * position. */
.glass {
    --la: 135deg;
    --lx: 50%;
    --ly: 0%;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    border-radius: 12px;
    pointer-events: none;
    transform-origin: 50% 50%;
    will-change: transform, width, height;
    background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(47, 91, 234, .04) 60%, rgba(47, 91, 234, .08));
    box-shadow:
        inset 0 0 0 1px rgba(47, 91, 234, .12),
        inset 0 1px 1px rgba(255, 255, 255, .95),
        inset 0 -1px 1px rgba(255, 255, 255, .6),
        inset 0 -10px 18px -10px rgba(47, 91, 234, .22),
        0 1px 2px rgba(20, 40, 100, .10),
        0 10px 26px -8px rgba(20, 40, 100, .26);
    transition: opacity .22s ease, box-shadow .22s ease;
}
.glass.on { display: block; }
/* Highlight pooled under the pointer */
.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(120% 100% at var(--lx) var(--ly), rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 60%);
    opacity: .55;
}
/* Specular rim: a 1.5px ring, brightest on the side facing the pointer and the opposite edge */
.glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(var(--la), #fff, rgba(255, 255, 255, .15) 38%, rgba(47, 91, 234, .18) 62%, rgba(255, 255, 255, .85));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}
.hovering > .glass {
    box-shadow:
        inset 0 0 0 1px rgba(47, 91, 234, .16),
        inset 0 1px 1px #fff,
        inset 0 -1px 1px rgba(255, 255, 255, .7),
        inset 0 -12px 20px -10px rgba(47, 91, 234, .28),
        0 2px 4px rgba(20, 40, 100, .10),
        0 16px 34px -10px rgba(20, 40, 100, .32);
}
@media (prefers-reduced-transparency: reduce) {
    /* A solid lens would hide the label, so it sits behind it instead */
    .glass { z-index: -1; background: rgba(238, 243, 255, .92); }
    .glass::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .glass { transition: none; }
}
