:root {
        --popup-max-width: 320px;
        --popup-radius: 18px;
        --popup-bg: rgba(28, 28, 30, 0.72);
        --popup-border: rgba(255, 255, 255, 0.12);
        --popup-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    .ios-popup-backdrop {
        position: fixed;
        inset: 0;
        display: grid;
        place-items: center;
        background: rgba(0, 0, 0, 0.28);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        z-index: 9999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease;
    }
    .ios-popup-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .ios-popup {
        width: calc(100% - 48px);
        max-width: var(--popup-max-width);
        border-radius: var(--popup-radius);
        background: var(--popup-bg);
        border: 1px solid var(--popup-border);
        box-shadow: var(--popup-shadow);
        color: #fff;
        padding: 18px 16px 16px;
        transform: translateY(8px) scale(0.98);
        opacity: 0.98;
        -webkit-backdrop-filter: blur(22px) saturate(140%);
        backdrop-filter: blur(22px) saturate(140%);
        transition: transform 180ms ease, opacity 180ms ease;
    }
    .ios-popup-backdrop.is-open .ios-popup {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .ios-popup__title {
        font-size: 17px;
        font-weight: 600;
        letter-spacing: -0.01em;
        margin-bottom: 8px;
    }

    .ios-popup__body {
        font-size: 14px;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.88);
        margin: 4px 0 10px;
    }

    /* Fixed indeterminate sliding bar */
/* Track */
.ios-popup__progress {
    position: relative;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    overflow: hidden;
}

/* Slider segment */
.ios-popup__progress::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -26%;
    width: 22%;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.85);
    transform-origin: center;
    animation: indeterminateBounce 1.6s ease-in-out infinite alternate;
    will-change: left, transform;
}

/* Full-width bounce with grow-shrink at edges */
@keyframes indeterminateBounce {
    0% {
        left: -26%;
    }
    100% {
        left: 106%;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ios-popup__progress::before {
        animation-duration: 2.4s;
    }
}
