.fs {
    font-family: var(--fnt-m, inherit);
    width: 100%;
    margin: 2rem 0;
    color: var(--lt-txt, #4a5568);
    line-height: 1.5;
    border: 1px solid var(--lt-bdr, #e2e5ea);
    border-radius: 6px;
    overflow: hidden;

    /* -- Header band ---------------------------------------- */

    .fs-hdr {
        padding: 1.5rem 1.75rem 1.25rem;
        background: linear-gradient(135deg, color-mix(in srgb, var(--dk-bg, #1a2744), #000000 25%) 0%, var(--dk-bg, #1a2744) 100%);
    }

    .fs-kicker {
        margin-bottom: .5rem;
        font-size: .65rem;
        font-weight: 700;
        letter-spacing: .15em;
        text-transform: uppercase;
        color: var(--lt-accent, #4359ff);
    }

    .fs-ttl {
        font-family: var(--fnt-t, inherit);
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1.25;
        color: var(--dk-txt, #ffffff);
    }

    .fs-sub {
        margin-top: .5rem;
        font-size: .85rem;
        line-height: 1.55;
        color: rgba(255, 255, 255, .6);
    }

    /* -- Chips ---------------------------------------------- */

    .fs-body {
        padding: 1.25rem 1.75rem;
        background: var(--lt-bg, #ffffff);
    }

    .fs-chips {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        margin: 0;
        padding: 0;
        list-style: none;

        /* Undo content-list styling (theme bullet, indent, li + li spacing), which uses !important */
        > li {
            margin: 0 !important;
            padding: 0 !important;

            &::before {
                content: none !important;
                display: none !important;
            }
        }
    }

    .fs-chip {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        margin: 0;
        padding: .4rem .8rem;
        background: color-mix(in srgb, var(--lt-accent, #4359ff) 8%, #ffffff);
        border: 1px solid var(--lt-bdr, #e2e5ea);
        border-radius: 999px;
        font: inherit;
        font-size: .78rem;
        font-weight: 600;
        line-height: 1.2;
        color: var(--lt-h4, #1a2744);
    }

    .fs-chip-link {
        cursor: pointer;
        border-color: color-mix(in srgb, var(--lt-accent, #4359ff) 45%, var(--lt-bdr, #e2e5ea));
        transition: background-color .2s, border-color .2s, color .2s;

        .fs-chip-icon {
            width: 1rem;
            height: 1rem;
            flex-shrink: 0;
            fill: currentColor;
            opacity: .7;
        }

        &:hover,
        &:focus-visible {
            background: var(--dk-bg, #1a2744);
            border-color: var(--dk-bg, #1a2744);
            color: var(--dk-txt, #ffffff);

            .fs-chip-icon {
                opacity: 1;
            }
        }

        &:focus-visible {
            outline: 2px solid var(--lt-accent, #4359ff);
            outline-offset: 2px;
        }
    }

    .fs-hint {
        margin: .9rem 0 0;
        font-size: .75rem;
        opacity: .75;
    }

    /* -- Lightbox ------------------------------------------- */

    .fs-lb {
        width: min(100% - 2rem, 60rem);
        max-height: calc(100dvh - 2rem);
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: #111111;
        color: #ffffff;
        overflow: hidden;
        /* Rapid arrow clicks register as double/triple clicks and would select the whole dialog */
        user-select: none;
        -webkit-user-select: none;

        &[open] {
            display: flex;
            flex-direction: column;
        }

        &::backdrop {
            background: rgba(0, 0, 0, .8);
        }

        button {
            font: inherit;
            cursor: pointer;
        }

        svg {
            width: 1.5rem;
            height: 1.5rem;
            fill: currentColor;
        }
    }

    .fs-lb-bar {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }

    .fs-lb-ttl {
        font-family: var(--fnt-t, inherit);
        font-size: 1.15rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .fs-lb-count {
        font-size: .75rem;
        opacity: .65;
    }

    .fs-lb-close {
        display: grid;
        place-items: center;
        padding: .35rem;
        background: transparent;
        border: 0;
        border-radius: 50%;
        color: inherit;

        &:hover,
        &:focus-visible {
            background: rgba(255, 255, 255, .15);
            color: #ffffff;
        }
    }

    .fs-lb-set {
        display: flex;
        flex-direction: column;
        min-height: 0;

        &[hidden] {
            display: none;
        }
    }

    .fs-lb-stage {
        display: grid;
        place-items: center;
        padding: 0 3.5rem;

        @media screen and (max-width: 699px) {
            & {
                padding: 0 .75rem;
            }
        }
    }

    .fs-lb-fig {
        margin: 0;
        text-align: center;

        &[hidden] {
            display: none;
        }

        img {
            display: block;
            max-width: 100%;
            height: min(60dvh, 34rem);
            margin: 0 auto;
            object-fit: contain;
        }

        figcaption {
            padding: .6rem 0 0;
            font-size: .85rem;
            opacity: .85;
        }
    }

    .fs-lb-thumbs {
        display: flex;
        gap: .5rem;
        padding: 1rem 1.25rem 1.25rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .fs-lb-thumb {
        flex: 0 0 4.5rem;
        height: 3.25rem;
        padding: 0;
        background: transparent;
        border: 2px solid transparent;
        border-radius: 4px;
        overflow: hidden;
        opacity: .55;
        transition: opacity .2s, border-color .2s;

        img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        &:hover,
        &:focus-visible {
            opacity: .9;
        }

        &[aria-current="true"] {
            border-color: #ffffff;
            opacity: 1;
        }
    }

    .fs-lb-tip {
        margin-top: .15rem;
        font-size: .7rem;
        opacity: .55;
    }

    /* -- Brochure mode: tall pages, click to zoom ----------- */

    .fs-lb-doc {
        .fs-lb-stage {
            display: block;
            max-height: calc(100dvh - 14rem);
            overflow: auto;
            overscroll-behavior: contain;
        }

        .fs-lb-fig {
            img {
                width: auto;
                height: min(calc(100dvh - 17rem), 870px);
                cursor: zoom-in;
            }

            &.is-zoomed img {
                width: 100%;
                max-width: none;
                height: auto;
                cursor: zoom-out;

                @media screen and (max-width: 699px) {
                    & {
                        width: 220%;
                    }
                }
            }
        }

        .fs-lb-thumb {
            flex-basis: 3rem;
            height: 4.2rem;

            img {
                object-position: top;
            }
        }
    }

    .fs-lb-nav {
        position: absolute;
        top: 50%;
        display: grid;
        place-items: center;
        padding: .5rem;
        background: rgba(255, 255, 255, .12);
        border: 0;
        border-radius: 50%;
        color: #ffffff;
        transform: translateY(-50%);

        &:hover,
        &:focus-visible {
            background: rgba(255, 255, 255, .28);
            color: #ffffff;
        }

        &[hidden] {
            display: none;
        }

        @media screen and (max-width: 699px) {
            & {
                display: none;
            }
        }
    }

    .fs-lb-prev {
        left: .6rem;
    }

    .fs-lb-next {
        right: .6rem;
    }
}
