.cl-mask {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-page, #f8fafc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cl-mask.cl-visible {
    opacity: 1;
}

.cl-mask.cl-hide {
    opacity: 0;
    pointer-events: none;
}

.cl-inner {
    width: min(460px, 76vw);
    text-align: center;
}

.cl-track {
    position: relative;
    height: 56px;
    padding: 0 22px;
}

.cl-rail {
    position: absolute;
    top: 40px;
    left: 22px;
    right: 22px;
    height: 6px;
    border-radius: 3px;
    background-color: var(--color-border-muted, rgba(15, 23, 42, 0.10));
    overflow: hidden;
}

.cl-fill {
    position: absolute;
    top: 40px;
    left: 22px;
    width: 0;
    height: 6px;
    border-radius: 3px;
    background-color: var(--theme-primary, #2db48a);
    transition: width 0.25s linear;
}

.cl-rider {
    position: absolute;
    top: 8px;
    left: 22px;
    width: 52px;
    height: 36px;
    margin-left: -22px;
    transition: left 0.25s linear;
}

.cl-rider svg {
    display: block;
    width: 52px;
    height: 36px;
}

.cl-rider .cl-frame {
    stroke: var(--theme-primary, #2db48a);
}

.cl-rider .cl-tire {
    stroke: var(--color-text-secondary, #5f6e5a);
    fill: none;
}

.cl-rider .cl-spoke {
    stroke: var(--color-border-secondary, #b4c0a9);
    fill: none;
}

.cl-rider .cl-seat {
    fill: var(--color-text-primary, #1e293b);
}

.cl-rider .cl-ink {
    stroke: var(--color-text-primary, #1e293b);
    fill: none;
}

.cl-rider .cl-pack {
    fill: var(--color-text-info, #378add);
}

.cl-rider .cl-head {
    fill: #f0b96b;
}

.cl-text {
    margin: 10px 0 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--color-text-secondary, #64748b);
}

.cl-pct {
    color: var(--theme-primary, #2db48a);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cl-stage {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--color-text-muted, #94a3b8);
    font-variant-numeric: tabular-nums;
}

@keyframes cl-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes cl-bob {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-1.4px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .cl-rider .cl-wheel {
        transform-box: fill-box;
        transform-origin: center;
        animation: cl-spin 0.62s linear infinite;
    }

    .cl-rider .cl-body {
        animation: cl-bob 0.5s ease-in-out infinite alternate;
    }
}

[data-mode="dark"] .cl-mask,
[data-theme="dark"] .cl-mask {
    background-color: var(--color-bg-page, #0d1420);
}

[data-mode="dark"] .cl-rail,
[data-theme="dark"] .cl-rail {
    background-color: rgba(255, 255, 255, 0.12);
}

body.printing .cl-mask {
    display: none;
}
