.mp-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 16px;
    background: rgba(0, 0, 0, .55);
}
.mp-modal[hidden] { display: none !important; }
.mp-dialog {
    --mp-stage-h: min(480px, calc(100dvh - 120px));
    position: relative;
    box-sizing: border-box;
    width: min(420px, calc(100vw - 112px));
    max-height: min(640px, calc(100dvh - 32px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.mp-stage {
    position: relative;
    height: var(--mp-stage-h);
    max-height: var(--mp-stage-h);
    overflow: hidden;
    background: #fff;
    border-radius: 16px 16px 0 0;
}
.mp-swiper,
.mp-swiper .swiper-wrapper,
.mp-swiper .swiper-slide,
.mp-fit,
.mp-fit a {
    width: 100%;
    height: 100%;
}
.mp-swiper { overflow: hidden; }
.mp-fit {
    display: block;
    background: #fff;
}
.mp-fit img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: fill;
}
.mp-dialog .swiper-button-prev,
.mp-dialog .swiper-button-next {
    position: absolute;
    top: calc(var(--mp-stage-h) / 2);
    z-index: 4;
    width: 36px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 26px;
    transform: translateY(-50%);
    filter: none;
    cursor: pointer;
}
.mp-dialog .swiper-button-prev {
    left: -46px;
    right: auto;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M0 22L22 0l2.1 2.1L4.2 22l19.9 19.9L22 44 0 22z' fill='%23c8cdd4'/%3E%3C/svg%3E");
}
.mp-dialog .swiper-button-next {
    right: -46px;
    left: auto;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M27 22L5 44l-2.1-2.1L22.8 22 2.9 2.1 5 0l22 22z' fill='%23c8cdd4'/%3E%3C/svg%3E");
}
.mp-stage .swiper-pagination {
    position: absolute;
    top: 14px;
    bottom: auto;
    left: 0;
    width: 100%;
    z-index: 3;
}
.mp-stage .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    margin: 0 3px;
    background: #fff;
    opacity: .55;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.mp-stage .swiper-pagination-bullet-active {
    width: 16px;
    border-radius: 4px;
    opacity: 1;
    background: #fff;
}
.mp-single .swiper-button-prev,
.mp-single .swiper-button-next,
.mp-single .swiper-pagination { display: none; }
.mp-foot {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 14px;
    background: #fff;
    border-radius: 0 0 16px 16px;
}
.mp-foot button {
    height: 42px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}
.mp-reject {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    background: #e7f2ff;
    color: #2f6fed;
    font-weight: 600;
}
.mp-close {
    flex: 0 0 auto;
    padding: 0 16px;
    background: transparent;
    color: #8b919a;
}
@media (max-width: 480px), (max-height: 520px) {
    .mp-modal { padding: 10px; }
    .mp-dialog {
        --mp-stage-h: min(480px, calc(100dvh - 108px));
        width: min(420px, calc(100vw - 96px));
        max-height: min(640px, calc(100dvh - 20px));
        border-radius: 14px;
    }
    .mp-stage { border-radius: 14px 14px 0 0; }
    .mp-foot { border-radius: 0 0 14px 14px; }
    .mp-dialog .swiper-button-prev { left: -40px; }
    .mp-dialog .swiper-button-next { right: -40px; }
    .mp-foot { padding: 10px 12px 12px; }
    .mp-foot button { height: 38px; font-size: 13px; }
}
