/* Decorative interaction layer; existing content, layout and controls remain authoritative. */
body.spx-enabled { --spx-accent: #28b8f5; }

.spx-page-progress {
    position: fixed;
    z-index: 1500;
    inset: 0 0 auto;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}
.spx-page-progress > span,
.spx-gallery-progress > span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--spx-accent);
    transform: scaleX(0);
    transform-origin: left center;
}
.spx-media-host { position: relative; }
.spx-gallery-progress {
    position: absolute;
    z-index: 3;
    inset: auto 0 0;
    height: 2px;
    overflow: hidden;
    background: rgb(255 255 255 / 12%);
    pointer-events: none;
}
.spx-gallery-progress > span { transition: transform 280ms ease; }
.spx-media-scan {
    position: absolute;
    z-index: 2;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    contain: strict;
}
.spx-media-scan::before,
.spx-media-scan::after {
    position: absolute;
    content: "";
    opacity: 0;
    pointer-events: none;
}
.spx-media-scan::before {
    inset: 0 0 auto;
    height: 12%;
    background: linear-gradient(transparent, var(--spx-accent), transparent);
    transform: translateY(-110%);
}
.spx-media-scan::after {
    top: 58%;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 8%, var(--spx-accent) 28%, transparent 64%);
}
.spx-scanning > .spx-media-scan::before { animation: spx-scan 460ms cubic-bezier(.2,.65,.25,1) both; }
.spx-scanning > .spx-media-scan::after { animation: spx-interface-tick 240ms 100ms ease-out both; }
@keyframes spx-scan {
    0% { opacity: 0; transform: translateY(-110%); }
    18% { opacity: .12; }
    72% { opacity: .09; }
    100% { opacity: 0; transform: translateY(950%); }
}
@keyframes spx-interface-tick {
    0%, 100% { opacity: 0; transform: translateX(0); }
    28% { opacity: .25; transform: translateX(-5px); }
    52% { opacity: .14; transform: translateX(4px); }
    78% { opacity: .09; transform: translateX(0); }
}
@media (max-width: 767px) {
    .spx-scanning > .spx-media-scan::before { animation-duration: 360ms; }
    .spx-scanning > .spx-media-scan::after { animation-duration: 180ms; }
}
@media (prefers-reduced-motion: reduce) {
    .spx-media-scan { display: none !important; }
    .spx-gallery-progress > span { transition: none !important; }
}
