/* Overlay wrapper */
.pwa-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.pwa-overlay.is-open {
    display: block;
}

.pwa-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(2px);
}

/* Modal */
.pwa-modal {
    position: absolute;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(640px, calc(100% - 24px));
    background: #ffffff;
    color: #000000;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
    padding: 16px;
    animation: pwa-slide .22s ease-out;
}

@keyframes pwa-slide {
    from {
        transform: translate(-50%, 16px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.pwa-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: currentColor;
    font-size: 18px;
    cursor: pointer;
}

.pwa-content h3 {
    margin: 8px 0 12px;
    font-size: 16px;
}

.pwa-content p {
    display: flex;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

.pwa-actions {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pwa-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
}

.pwa-primary {
    background: #f37021;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.pwa-ghost {
    background: transparent;
    color: inherit;
    font-size: 12px;
}

.pwa-neutral {
    background: #1f2937;
    color: #fff;
}

.pwa-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 6px;
}

.pwa-step {
    display: grid;
    grid-template-columns: 28px 28px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f8fafc;
}

.pwa-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #111;
    font-size: 12px;
    font-weight: 700;
}

.pwa-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-step p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: flex-start;
}

/* 데스크톱 대응: 중앙 배치 */
@media (min-width: 769px) {
    .pwa-modal {
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
    }
}

/* 스크롤 잠금(오버레이 열렸을 때 body에 붙일 클래스) */
.body-lock {
    overflow: hidden;
    touch-action: none;
}