.ppsg-size-guide-wrap {
    margin: 0 0 16px;
}

.ppsg-size-guide-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 11px 18px;
    border: 0 !important;
    border-radius: 6px;
    background: var(--ppsg-button-bg, #000000) !important;
    color: var(--ppsg-button-color, #ffffff) !important;
    font-size: var(--ppsg-button-font-size, 15px) !important;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
    box-shadow: none;
}

.ppsg-size-guide-button:hover,
.ppsg-size-guide-button:focus {
    color: var(--ppsg-button-color, #ffffff) !important;
    text-decoration: none !important;
    opacity: 0.95;
}

html.ppsg-modal-open,
body.ppsg-modal-open {
    overflow: hidden !important;
    overscroll-behavior: contain;
}

.ppsg-modal[hidden] {
    display: none !important;
}

.ppsg-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
}

.ppsg-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.ppsg-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(92vw, 1100px);
    max-height: 90vh;
    padding: 16px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.ppsg-modal__header {
    position: relative;
    margin-bottom: 8px;
    padding-right: 40px;
    min-height: 26px;
}

.ppsg-modal__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    min-height: 1.5em !important;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    color: #111111;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.ppsg-modal__content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ppsg-modal__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(90vh - 108px);
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    .ppsg-size-guide-wrap {
        margin-bottom: 14px;
    }

    .ppsg-size-guide-button {
        width: auto;
        max-width: 100%;
        white-space: normal;
    }

    .ppsg-modal {
        padding: 12px;
    }

    .ppsg-modal__dialog {
        width: min(94vw, 94vw);
        max-height: 88vh;
        padding: 14px;
        border-radius: 8px;
    }

    .ppsg-modal__header {
        margin-bottom: 8px;
        padding-right: 34px;
        min-height: 24px;
    }

    .ppsg-modal__close {
        width: 24px;
        height: 24px;
        font-size: 18px;
    }

    .ppsg-modal__image {
        max-height: calc(88vh - 68px);
    }
}
