.dp-popup-layer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dp-popup-layer.open {
    display: flex;
}

.dp-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
}

.dp-popup-notice {
    display: none;
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.dp-popup-notice.active {
    display: block;
}

.dp-popup-counter {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 44px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    text-align: center;
}

.dp-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.46);
    color: #fff;
    font-size: 24px;
    line-height: 32px;
    cursor: pointer;
}

.dp-popup-image-link,
.dp-popup-image-link picture {
    display: block;
}

.dp-popup-notice img {
    display: block;
    width: 100%;
    height: auto;
    border-bottom: 1px solid #E5E7EB;
}

.dp-popup-header {
    padding: 22px 22px 16px;
    border-bottom: 1px solid #E5E7EB;
}

.dp-popup-body {
    padding: 18px 22px;
    background: #FAFBFC;
}

.dp-popup-type {
    margin-bottom: 8px;
    color: #3182F6;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.dp-popup-header h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
}

.dp-popup-body p {
    margin: 0;
    color: #4B5563;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-line;
}

.dp-popup-actions {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid #E5E7EB;
}

.dp-popup-actions button,
.dp-popup-actions a {
    flex: 1;
    min-height: 44px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.dp-popup-secondary {
    border: 1px solid #D1D5DB;
    background: #fff;
    color: #374151;
}

.dp-popup-primary {
    border: 1px solid #3182F6;
    background: #3182F6;
    color: #fff;
}

body.dp-popup-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .dp-popup-layer {
        align-items: flex-end;
        padding: 0;
    }

    .dp-popup-notice {
        width: 100%;
        max-height: min(86vh, calc(100vh - 28px));
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.22);
    }

    .dp-popup-body {
        padding: 16px 18px;
    }

    .dp-popup-header {
        padding: 20px 18px 14px;
    }

    .dp-popup-header h2 {
        font-size: 20px;
    }

    .dp-popup-actions {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    }
}
