.lp-screen-gallery,
.lp-review-gallery,
.lp-faq-gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(100% - var(--lp-gallery-peek));
    gap: var(--lp-space-8);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--lp-space-4);
    padding: var(--lp-space-4) var(--lp-space-4) var(--lp-space-8);
    scrollbar-width: none;
}

.lp-screen-gallery::-webkit-scrollbar,
.lp-review-gallery::-webkit-scrollbar,
.lp-faq-gallery::-webkit-scrollbar {
    display: none;
}

.lp-screen-gallery {
    display: flex;
    padding-inline: calc((100% - var(--lp-spotlight-width)) / 2);
    scroll-padding-inline: calc((100% - var(--lp-spotlight-width)) / 2);
    gap: var(--lp-space-6);
}

.lp-review-gallery,
.lp-faq-gallery {
    padding-inline: var(--lp-gallery-edge);
    scroll-padding-inline: var(--lp-gallery-edge);
}

.lp-screen,
.lp-review {
    scroll-snap-align: start;
    margin: 0;
    min-inline-size: 0;
}

.lp-screen {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: var(--lp-spotlight-column);
    inline-size: var(--lp-spotlight-width);
    align-content: start;
    gap: var(--lp-space-8);
    padding: var(--lp-spotlight-padding);
    background: var(--lp-soft);
    border-radius: var(--lp-photo-radius);
    overflow: clip;
    scroll-snap-align: center;
}

.lp-screen[data-active="false"] {
    inline-size: var(--lp-spotlight-collapsed-width);
}

.lp-screen[data-active="false"] .lp-screen-copy {
    visibility: hidden;
    opacity: 0;
}

.lp-screen[data-active="false"] .lp-screen-image {
    translate: calc((var(--lp-spotlight-collapsed-width) - var(--lp-spotlight-width)) / 2) 0;
}

.lp-screen-copy {
    inline-size: var(--lp-spotlight-column);
    max-inline-size: var(--lp-story-copy-width);
    align-self: center;
}

.lp-screen-copy .lp-screen-number {
    color: var(--lp-accent);
    font-size: var(--lp-font-label);
    font-weight: var(--lp-weight-label);
    margin-block-end: var(--lp-space-5);
}

.lp-screen-copy h3 {
    font-size: var(--lp-story-title);
    margin-block-end: var(--lp-space-6);
    text-wrap: balance;
}

.lp-screen-copy p {
    font-size: var(--lp-story-copy-size);
}

.lp-screen-copy p + p {
    margin-block-start: var(--lp-space-4);
}

.lp-screen .lp-screen-image {
    inline-size: min(100%, var(--lp-story-screen-width));
    align-self: center;
}

.lp-gallery-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--lp-space-5);
    margin-block-start: var(--lp-space-6);
}

.lp-gallery-controls[hidden] {
    display: none;
}

.lp-gallery-toggle[hidden],
.lp-gallery-toggle [hidden] {
    display: none;
}

.lp-gallery-toggle {
    position: relative;
}

.lp-reviews .lp-gallery-toggle:not(:focus-visible),
.lp-faq .lp-gallery-toggle:not(:focus-visible) {
    position: absolute;
    inline-size: var(--lp-border);
    block-size: var(--lp-border);
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.lp-gallery-progress {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    fill: none;
    stroke-width: var(--lp-progress-stroke);
    pointer-events: none;
}

.lp-gallery-progress-track {
    stroke: var(--lp-line);
}

.lp-gallery-progress-fill {
    stroke: var(--lp-accent);
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transform: rotate(-90deg);
    transform-origin: center;
}

.lp-faq .lp-gallery-controls,
.lp-reviews .lp-gallery-controls {
    justify-content: center;
}

.lp-faq .lp-gallery-navigation,
.lp-reviews .lp-gallery-navigation {
    margin-inline-start: 0;
}

.lp-gallery-sections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    inline-size: 100%;
    gap: var(--lp-space-1);
    padding: var(--lp-space-1);
    background: var(--lp-soft);
    border-radius: var(--lp-radius);
}

.lp-gallery-section,
.lp-gallery-arrow {
    min-block-size: var(--lp-touch);
    border: 0;
    background: transparent;
    color: var(--lp-body);
    font: inherit;
    font-size: var(--lp-font-small);
    cursor: pointer;
}

.lp-gallery-section {
    min-inline-size: 0;
    padding: var(--lp-space-2) var(--lp-space-3);
    border-radius: var(--lp-radius);
    overflow-wrap: anywhere;
    hyphens: auto;
    text-wrap: balance;
}

.lp-gallery-section[aria-current="true"] {
    background: var(--lp-paper);
    box-shadow: var(--lp-gallery-control-shadow);
    color: var(--lp-accent);
    font-weight: var(--lp-weight-label);
}

.lp-gallery-navigation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--lp-space-3);
    max-inline-size: 100%;
    margin-inline-start: auto;
}

.lp-gallery-status {
    color: var(--lp-muted);
    font-size: var(--lp-font-small);
    margin-inline-end: var(--lp-space-2);
    font-variant-numeric: tabular-nums;
}

.lp-gallery-arrow {
    flex: 0 0 var(--lp-touch);
    inline-size: var(--lp-touch);
    border-radius: var(--lp-gallery-control-radius);
    background: var(--lp-soft);
    color: var(--lp-ink);
}

.lp-reviews .lp-gallery-arrow,
.lp-faq .lp-gallery-arrow {
    background: var(--lp-paper);
}

.lp-gallery-arrow[aria-disabled="true"] {
    color: var(--lp-muted);
    cursor: default;
}

.lp-gallery-section:focus-visible,
.lp-gallery-arrow:focus-visible,
.lp-gallery-dot:focus-visible,
.lp-review-gallery:focus-visible {
    outline: var(--lp-focus) solid var(--lp-accent);
    outline-offset: var(--lp-space-1);
}

.lp-gallery-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--lp-space-1);
}

.lp-gallery-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: var(--lp-touch);
    block-size: var(--lp-touch);
    padding: 0;
    border: 0;
    border-radius: var(--lp-radius);
    background: transparent;
    cursor: pointer;
}

.lp-gallery-dot > span {
    position: relative;
    display: block;
    inline-size: var(--lp-dot-size);
    block-size: var(--lp-dot-size);
    border-radius: var(--lp-gallery-control-radius);
    background: var(--lp-muted);
    overflow: hidden;
}

.lp-gallery-dot[aria-current="true"] > span {
    inline-size: var(--lp-dot-active-size);
    background: var(--lp-accent-light);
}

.lp-gallery-dot-progress {
    position: absolute;
    inset: 0;
    display: block;
    background: var(--lp-accent);
    transform: scaleX(0);
    transform-origin: left;
}

.lp-gallery-dot:not([aria-current="true"]) .lp-gallery-dot-progress {
    visibility: hidden;
}

.lp-review-gallery {
    grid-auto-columns: min(var(--lp-review-mobile-width), var(--lp-review-width));
    scroll-snap-type: none;
    scroll-behavior: auto;
    overflow-anchor: none;
}

.lp-review {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: var(--lp-space-8);
    padding: var(--lp-space-6);
    border-radius: var(--lp-card-radius);
    background: var(--lp-paper);
}

.lp-review-rating {
    display: flex;
    gap: var(--lp-space-1);
    color: var(--lp-review-star);
}

.lp-review blockquote p {
    color: var(--lp-ink);
    font-size: var(--lp-review-quote-size);
    line-height: var(--lp-review-leading);
}

.lp-review figcaption h3 {
    font-size: var(--lp-font-body);
    margin-block-end: var(--lp-space-1);
}

.lp-review figcaption p {
    color: var(--lp-body);
    font-size: var(--lp-font-small);
}

.lp-review-category {
    margin-block-start: var(--lp-space-5);
}

.lp-review-category i {
    margin-inline-end: var(--lp-space-2);
    color: var(--lp-accent);
}

@media (min-width: 48rem) {
    .lp-gallery-sections {
        display: flex;
        flex-wrap: wrap;
        inline-size: auto;
    }

    .lp-screen-gallery {
        --lp-spotlight-column: calc((var(--lp-spotlight-width) - 2 * var(--lp-spotlight-padding) - var(--lp-space-12)) / 2);
    }

    .lp-screen {
        grid-template-columns: repeat(2, var(--lp-spotlight-column));
        gap: var(--lp-space-12);
        min-block-size: var(--lp-spotlight-height);
    }

    .lp-screen .lp-screen-image {
        grid-column: 1;
        grid-row: 1;
    }

    .lp-screen-copy {
        grid-column: 2;
        grid-row: 1;
    }

    .lp-screen[data-active="false"] .lp-screen-image {
        translate: calc((var(--lp-spotlight-collapsed-width) - 2 * var(--lp-spotlight-padding) - var(--lp-spotlight-column)) / 2) 0;
    }

    .lp-review {
        padding: var(--lp-space-8);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lp-gallery-dot > span {
        transition: inline-size var(--lp-card-motion) var(--lp-hover-ease), background-color var(--lp-card-motion) ease;
    }
    [data-gallery-ready="true"] .lp-screen {
        transition: inline-size calc(var(--lp-spotlight-duration) * 1ms) var(--lp-reveal-ease);
    }

    .lp-screen-copy {
        transition: opacity var(--lp-card-motion) ease, visibility var(--lp-card-motion) ease;
    }
    .lp-screen-gallery {
        scroll-behavior: smooth;
    }

    .lp-screen[data-active="false"] .lp-screen-image {
        scale: var(--lp-gallery-image-scale);
    }

    .lp-screen[data-active="true"] .lp-screen-image {
        scale: 1;
    }

    .lp-screen[data-active="true"][data-reveal-state="visible"] .lp-screen-copy > * {
        animation: lp-story-copy-enter var(--lp-reveal-duration) var(--lp-reveal-ease) backwards;
        animation-delay: calc(var(--lp-copy-order, 0) * var(--lp-reveal-stagger));
    }
}

@keyframes lp-story-copy-enter {
    from {
        opacity: 0;
        translate: 0 var(--lp-space-6);
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-gallery-dot[aria-current="true"] .lp-gallery-dot-progress {
        transform: scaleX(1) !important;
    }
}
