.scap-mask {
    position: fixed;
    inset: 0;
    z-index: 19891100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: scap-fade .18s ease-out;
}

.scap-box {
    width: 352px;
    max-width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.08), 0 8px 10px rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
    -webkit-user-select: none;
    user-select: none;
}

.scap-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
}

.scap-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(142, 142, 147, 0.12);
    color: #6e6e73;
    font-size: 18px;
    line-height: 28px;
    cursor: pointer;
}

.scap-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #eef1f5;
}

.scap-bg {
    display: block;
    width: 100%;
    height: 100%;
}

.scap-piece {
    position: absolute;
    left: 0;
    top: 0;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.55));
    pointer-events: none;
}

.scap-loading,
.scap-msg {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
}

.scap-loading {
    top: 50%;
    transform: translateY(-50%);
    color: #6e6e73;
}

.scap-msg {
    bottom: 0;
    padding: 6px 0;
    color: #fff;
    transform: translateY(100%);
    transition: transform .2s;
}

.scap-msg.show {
    transform: translateY(0);
}

.scap-msg.ok {
    background: rgba(52, 199, 89, 0.9);
}

.scap-msg.err {
    background: rgba(255, 59, 48, 0.9);
}

.scap-bar {
    position: relative;
    height: 44px;
    margin-top: 12px;
    border-radius: 22px;
    background: #f2f3f5;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.scap-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 44px;
    font-size: 13px;
    color: #8e8e93;
    pointer-events: none;
}

.scap-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 22px;
    background: rgba(0, 122, 255, 0.12);
}

.scap-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #007aff;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.35);
    color: #fff;
    font-size: 20px;
    line-height: 44px;
    text-align: center;
    cursor: grab;
    touch-action: none;
}

.scap-handle.dragging {
    cursor: grabbing;
    background: #0051d5;
}

.scap-bar.ok .scap-handle {
    background: #34c759;
}

.scap-bar.err .scap-handle {
    background: #ff3b30;
}

.scap-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.scap-refresh {
    border: 0;
    background: none;
    color: #007aff;
    font-size: 13px;
    cursor: pointer;
}

.scap-shake {
    animation: scap-shake .3s;
}

@keyframes scap-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scap-shake {
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
