.vive-size-guide {
    display: inline-flex;
}

.vive-size-guide__trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2a321d;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: opacity .2s ease;
}

.vive-size-guide__trigger:hover {
    opacity: .7;
}

.vive-size-guide__modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.vive-size-guide__modal.is-open {
    display: flex;
}

.vive-size-guide__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, .62);
    backdrop-filter: blur(2px);
}

.vive-size-guide__dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
    animation: viveGuideIn .22s ease-out;
}

.vive-size-guide__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid #eceae5;
}

.vive-size-guide__header h2 {
    margin: 0;
    color: #2a321d;
    font-family: inherit;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
}

.vive-size-guide__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f1ec;
    color: #2a321d;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.vive-size-guide__tabs {
    display: flex;
    gap: 4px;
    padding: 14px 24px 0;
    overflow-x: auto;
    border-bottom: 1px solid #eceae5;
}

.vive-size-guide__tab {
    position: relative;
    flex: 0 0 auto;
    padding: 12px 16px 14px;
    border: 0;
    background: transparent;
    color: #6f706a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.vive-size-guide__tab::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: -1px;
    left: 12px;
    height: 2px;
    background: transparent;
}

.vive-size-guide__tab.is-active {
    color: #2a321d;
}

.vive-size-guide__tab.is-active::after {
    background: #2a321d;
}

.vive-size-guide__content {
    max-height: calc(100vh - 190px);
    overflow: auto;
    padding: 24px;
    background: #faf9f7;
}

.vive-size-guide__panel {
    display: none;
}

.vive-size-guide__panel.is-active {
    display: block;
}

.vive-size-guide__image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 245px);
    margin: 0 auto;
    object-fit: contain;
}

.vive-size-guide__empty {
    padding: 50px 20px;
    border: 1px dashed #c9c5bb;
    border-radius: 8px;
    color: #77756f;
    text-align: center;
}

body.vive-size-guide-open {
    overflow: hidden;
}

@keyframes viveGuideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 767px) {
    .vive-size-guide__modal {
        align-items: flex-end;
        padding: 0;
    }

    .vive-size-guide__dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .vive-size-guide__header {
        padding: 18px 18px 14px;
    }

    .vive-size-guide__header h2 {
        font-size: 20px;
    }

    .vive-size-guide__tabs {
        padding: 8px 12px 0;
    }

    .vive-size-guide__tab {
        padding-right: 12px;
        padding-left: 12px;
        font-size: 13px;
    }

    .vive-size-guide__content {
        max-height: calc(92vh - 140px);
        padding: 14px;
    }

    .vive-size-guide__image {
        max-height: calc(92vh - 175px);
    }
}
