.custom-tinder-swipe {
    --stack-width: 29cqi;
    --stack-height: calc(var(--stack-width) * 1.2);
    --bg: transparent;
    --ink: #151515;
    --line: rgba(21, 21, 21, 0.18);
    position: relative;
    display: grid;
    justify-items: center;
    gap: 18px;
    width: 100%;
    padding: 20px 12px 8px;
    background: var(--bg);
    contain: layout paint;
    
}

.custom-tinder-swipe__deck {
    position: relative;
    width: var(--stack-width);
    height: var(--stack-height);
    container: polaroid / inline-size;
    user-select: none;
    
}

.custom-tinder-swipe__card {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform-origin: 50% 115%;
    transition: transform 540ms cubic-bezier(0.2, 0.72, 0.16, 1), opacity 540ms ease;
    backface-visibility: hidden;
}

.custom-tinder-swipe__card.is-active {
    z-index: 3;
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-2.8deg) scale(1);
    pointer-events: auto;
    touch-action: none;
    cursor: grab;
    will-change: transform, opacity;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);

    & ~ .custom-tinder-swipe__card:nth-child(1) .custom-tinder-swipe__paper,
    & ~ .custom-tinder-swipe__card:nth-child(2) .custom-tinder-swipe__paper,
    & ~ .custom-tinder-swipe__card:nth-child(3) .custom-tinder-swipe__paper{
        box-shadow: 0 17px 34px rgba(0, 0, 0, 0.1);
    }
}

.custom-tinder-swipe__card.is-next {
    z-index: 2;
    opacity: 0.98;
    transform: translate3d(0, 16px, 0) rotate(1.8deg) scale(0.965);
    will-change: transform, opacity;
}

.custom-tinder-swipe__card.is-queued {
    z-index: 1;
    opacity: 0.9;
    transform: translate3d(0, 32px, 0) rotate(-0.8deg) scale(0.93);
}

.custom-tinder-swipe__card.is-exit-right {
    opacity: 0;
    transform: translate3d(145%, -12%, 0) rotate(23deg) scale(0.9);
    will-change: transform, opacity;
}

.custom-tinder-swipe__card.is-exit-left {
    opacity: 0;
    transform: translate3d(-145%, -10%, 0) rotate(-23deg) scale(0.9);
    will-change: transform, opacity;
}

.custom-tinder-swipe__card.is-gone {
    opacity: 0;
    transform: translate3d(0, 44px, 0) rotate(0deg) scale(0.86);
}

.custom-tinder-swipe__card.is-dragging {
    cursor: grabbing;
}

.custom-tinder-swipe__card--final {
    z-index: 0;
    opacity: 0;
    transform: translate3d(0, 30px, 0) rotate(-1deg) scale(0.93);
    pointer-events: none;
}

.custom-tinder-swipe__card--final.is-visible {
    z-index: 4;
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-1deg) scale(1);
    pointer-events: auto;
}

.custom-tinder-swipe__paper {
    display: grid;
    grid-template-rows: 1fr auto;
    height: 100%;
    padding: 5cqi 5cqi 6cqi;
    background: #FFF;
    border: 1px solid #d5d5d5;
}

.custom-tinder-swipe__photo-wrap {
    overflow: hidden;
    background: #e5e5e5;
}

.custom-tinder-swipe__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.custom-tinder-swipe__photo-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #cfcfcf 0%, #e9e9e9 100%);
}

.custom-tinder-swipe__photo-wrap--join {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #f0f0f0 0%, #dddddd 100%);
}

.custom-tinder-swipe__join-silhouettes {
    position: relative;
    width: clamp(120px, 48%, 220px);
    height: clamp(130px, 54%, 240px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(10px, 3.4cqi, 24px);
}

.custom-tinder-swipe__silhouette {
    position: relative;
    display: block;
    width: clamp(44px, 18cqi, 84px);
    height: clamp(84px, 36cqi, 156px);
    border-radius: 46% 46% 30% 30%;
    background: #252525;
}

.custom-tinder-swipe__silhouette::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(-1 * clamp(25px, 9cqi, 48px));
    width: clamp(32px, 12cqi, 58px);
    height: clamp(32px, 12cqi, 58px);
    border-radius: 50%;
    background: #252525;
}

.custom-tinder-swipe__silhouette--female {
    width: clamp(46px, 18.5cqi, 86px);
    border-radius: 48% 48% 28% 28%;
}

.custom-tinder-swipe__silhouette--female::before {
    width: clamp(34px, 12.5cqi, 60px);
    height: clamp(34px, 12.5cqi, 60px);
}

.custom-tinder-swipe__silhouette--male {
    width: clamp(48px, 19cqi, 88px);
    border-radius: 44% 44% 30% 30%;
}

.custom-tinder-swipe__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.custom-tinder-swipe__name {
    font-size: clamp(20px, 2.25vw, 38px);
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-family: 'DIN Condensed';
}

.custom-tinder-swipe__role {
    font-size: clamp(15px, 1.25vw, 28px);
    font-weight: 600;
    color: #262626;
    line-height: 1.1;
    text-align: right;
}

.custom-tinder-swipe__meta--join {
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.custom-tinder-swipe__name--join {
    text-align: center;
}

.custom-tinder-swipe__apply-btn {
    color: #000!important;
    border-radius: 900px;

}

.custom-tinder-swipe__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: -8px;
    z-index: 10;
}

.custom-tinder-swipe__btn {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1;
    font-size: 31px;
    transition: transform 220ms ease, filter 220ms ease, opacity 220ms ease;
    padding: 11px;
    span, img{
        display: block!important;
    }
}

.custom-tinder-swipe__btn--no {
    background: #36eaf6;
    color: #101010;
}

.custom-tinder-swipe__btn--yes {
    background: #36eaf6;
    color: #ff4187;
    padding: 8px;
}

.custom-tinder-swipe__btn:hover {
    transform: translateY(-2px) scale(1.04);
    filter: saturate(1.08);
}

.custom-tinder-swipe__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.55);
}

.custom-tinder-swipe__repeat-btn {
    margin-top: -2px;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    color:#000;
    cursor: pointer;
    text-decoration: underline;
    background: transparent;
    color: #000;
    transition: transform 180ms ease, opacity 180ms ease;
}

.custom-tinder-swipe__repeat-btn:hover {
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .custom-tinder-swipe__btn{
        width: 56px;
        height: 56px;
    }

    .custom-tinder-swipe {
        --stack-width: 82cqi;
    }

    .custom-tinder-swipe__meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-tinder-swipe__role {
        text-align: left;
    }
}
