.rld-draw,
.rld-draw * {
    box-sizing: border-box;
}

.rld-draw {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 16px 78px;
    color: #211d1b;
    font-family: inherit;
}

.rld-hero {
    max-width: 820px;
    margin: 0 auto 14px;
    text-align: center;
}

.rld-eyebrow {
    margin: 0 0 8px;
    color: #2f6f68;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: uppercase;
}

.rld-hero h2 {
    margin: 0;
    color: #8f2742;
    font-size: 56px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.06;
}

.rld-hero p:not(.rld-eyebrow) {
    max-width: 700px;
    margin: 12px auto 0;
    color: #423936;
    font-size: 18px;
    line-height: 1.65;
}

.rld-stage {
    position: relative;
    margin-top: 8px;
}

.rld-grid {
    position: relative;
    display: block;
    max-width: 620px;
    min-height: 330px;
    margin: 0 auto;
    padding: 10px 0 8px;
    perspective: 1400px;
}

.rld-card {
    --rld-card-rotate: 0deg;
    --rld-card-y: 0px;
    --rld-card-x: 0px;
    position: absolute;
    bottom: 0;
    left: 50%;
    display: block;
    width: 190px;
    padding: 0;
    border: 0;
    aspect-ratio: 3 / 4.16;
    background: transparent;
    cursor: pointer;
    transform: translateX(calc(-50% + var(--rld-card-x))) translateY(var(--rld-card-y)) rotate(var(--rld-card-rotate));
    transform-origin: 50% 105%;
    transform-style: preserve-3d;
    transition: transform 220ms ease, opacity 220ms ease, filter 220ms ease;
}

.rld-card:nth-child(1) {
    --rld-card-x: -168px;
    --rld-card-rotate: -22deg;
    --rld-card-y: 34px;
}

.rld-card:nth-child(2) {
    --rld-card-x: -84px;
    --rld-card-rotate: -11deg;
    --rld-card-y: 10px;
}

.rld-card:nth-child(3) {
    --rld-card-x: 0px;
    --rld-card-rotate: 0deg;
    --rld-card-y: 0px;
}

.rld-card:nth-child(4) {
    --rld-card-x: 84px;
    --rld-card-rotate: 11deg;
    --rld-card-y: 10px;
}

.rld-card:nth-child(5) {
    --rld-card-x: 168px;
    --rld-card-rotate: 22deg;
    --rld-card-y: 34px;
}

.rld-card:hover,
.rld-card:focus-visible {
    outline: none;
    transform: translateX(calc(-50% + var(--rld-card-x))) translateY(calc(var(--rld-card-y) - 14px)) rotate(var(--rld-card-rotate));
}

.rld-card:focus-visible .rld-card-inner {
    box-shadow: 0 0 0 4px rgba(47, 111, 104, 0.2), 0 24px 44px rgba(72, 35, 48, 0.2);
}

.rld-card-inner {
    position: absolute;
    inset: 0;
    display: block;
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(72, 35, 48, 0.18);
    transform-style: preserve-3d;
    transition: transform 760ms cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 220ms ease;
}

.rld-card:hover .rld-card-inner {
    box-shadow: 0 26px 46px rgba(72, 35, 48, 0.24);
}

.rld-card-face {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(143, 39, 66, 0.24);
    border-radius: 8px;
    background: #f7d9df;
    backface-visibility: hidden;
}

.rld-card-face img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rld-card-front {
    transform: rotateY(180deg);
}

.rld-card.is-selected {
    z-index: 4;
    transform: translateX(calc(-50% + var(--rld-card-x))) translateY(calc(var(--rld-card-y) - 22px)) rotate(0deg) scale(1.12);
}

.rld-card.is-selected .rld-card-inner {
    box-shadow: 0 32px 64px rgba(72, 35, 48, 0.28);
    transform: rotateY(180deg);
}

.rld-card.is-flying-source,
.rld-card.is-picked-away {
    pointer-events: none;
    visibility: hidden;
}

.rld-draw.has-selection .rld-card:not(.is-selected) {
    filter: brightness(0.34) contrast(1.08) saturate(0.8);
}

.rld-flying-image {
    position: absolute;
    z-index: 1000000;
    pointer-events: none;
    transform-origin: top left;
    will-change: transform;
}

.rld-flying-image img {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(143, 39, 66, 0.24);
    border-radius: 8px;
    box-shadow: 0 34px 70px rgba(72, 35, 48, 0.32);
    object-fit: contain;
}

.rld-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #8f2742;
    border-radius: 8px;
    background: #8f2742;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.rld-button:hover,
.rld-button:focus-visible {
    border-color: #732038;
    background: #732038;
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.rld-button-light {
    border-color: #2f6f68;
    background: #fff;
    color: #2f6f68;
}

.rld-button-light:hover,
.rld-button-light:focus-visible {
    border-color: #285d58;
    background: #eef7f5;
    color: #285d58;
}

.rld-result {
    margin-top: 86px;
    padding-top: 64px;
    border-top: 1px solid #e5d8d4;
    animation: rldResultIn 520ms ease both;
}

.rld-result[hidden],
.rld-reading[hidden] {
    display: none;
}

.rld-reading {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 42px;
    align-items: start;
}

.rld-reading-media {
    overflow: hidden;
    border: 1px solid rgba(143, 39, 66, 0.22);
    border-radius: 8px;
    box-shadow: 0 20px 42px rgba(72, 35, 48, 0.16);
    transition: opacity 180ms ease, transform 180ms ease;
}

.rld-reading.is-receiving-card .rld-reading-media {
    opacity: 0;
    transform: translateY(8px);
}

.rld-reading-media img {
    display: block;
    width: 100%;
    height: auto;
}

.rld-reading-copy h3,
.rld-email h3 {
    margin: 0;
    color: #8f2742;
    font-size: 36px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.16;
}

.rld-reading-copy h4,
.rld-buy h4 {
    margin: 26px 0 10px;
    color: #211d1b;
    font-size: 20px;
    line-height: 1.25;
}

.rld-reading-copy .rld-challenge-heading {
    margin-top: 34px;
    color: #2f6f68;
    font-size: 36px;
    font-weight: 500;
    line-height: 1.16;
}

.rld-reading-copy p,
.rld-reading-copy li,
.rld-email p,
.rld-buy p {
    color: #3f3532;
    font-size: 17px;
    line-height: 1.72;
}

.rld-reading-copy p {
    margin: 14px 0 0;
}

.rld-reading-copy ul,
.rld-reading-copy ol {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    padding-left: 22px;
}

.rld-reading-copy blockquote {
    margin: 22px 0 0;
    padding: 16px 18px;
    border-left: 4px solid #2f6f68;
    border-radius: 0 8px 8px 0;
    background: #eef7f5;
    color: #285d58;
    font-size: 20px;
    line-height: 1.45;
}

.rld-email {
    max-width: 860px;
    margin: 44px auto 0;
    padding: 28px;
    border: 1px solid #f0c8d2;
    border-radius: 8px;
    background: #fff3f6;
    box-shadow: 0 18px 46px rgba(143, 39, 66, 0.1);
}

.rld-email > p {
    margin: 12px 0 0;
}

.rld-form {
    margin-top: 18px;
}

.rld-form form,
.rld-form p {
    margin: 0;
}

.rld-form .wpcf7-form-control-wrap {
    display: block;
}

.rld-form input[type="email"],
.rld-form input[type="text"],
.rld-form input[type="tel"],
.rld-form input[type="url"],
.rld-form select,
.rld-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #cdbfbb;
    border-radius: 8px;
    background: #fff;
    color: #211d1b;
    font: inherit;
}

.rld-form textarea {
    min-height: 112px;
    resize: vertical;
}

.rld-form input:focus,
.rld-form select:focus,
.rld-form textarea:focus {
    border-color: #2f6f68;
    box-shadow: 0 0 0 3px rgba(47, 111, 104, 0.16);
    outline: none;
}

.rld-form input[type="submit"],
.rld-form button[type="submit"] {
    min-height: 48px;
    margin-top: 10px;
    padding: 10px 18px;
    border: 1px solid #8f2742;
    border-radius: 8px;
    background: #8f2742;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.rld-form input[type="submit"]:hover,
.rld-form button[type="submit"]:hover {
    border-color: #732038;
    background: #732038;
    transform: translateY(-1px);
}

.rld-form .wpcf7-not-valid-tip {
    margin-top: 6px;
    color: #8f2742;
    font-size: 14px;
}

.rld-form .wpcf7-response-output {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
}

.rld-form-note {
    color: #635956;
    font-size: 14px;
}

.rld-unlocked {
    padding: 12px 14px;
    border-radius: 8px;
    background: #eef7f5;
    color: #285d58;
    font-weight: 800;
    animation: rldResultIn 420ms ease both;
}

.rld-buy {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e5d8d4;
}

.rld-buy p {
    margin: 8px 0 16px;
}

.rld-product-modal[hidden] {
    display: none;
}

.rld-product-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    padding: 20px;
    place-items: center;
}

.rld-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 20, 18, 0.58);
}

.rld-product-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(920px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(143, 39, 66, 0.18);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 34px 90px rgba(24, 20, 18, 0.32);
    animation: rldModalIn 220ms ease both;
}

.rld-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5d8d4;
    border-radius: 999px;
    background: #fff;
    color: #211d1b;
    cursor: pointer;
    font: inherit;
    font-size: 26px;
    line-height: 1;
}

.rld-modal-close:hover,
.rld-modal-close:focus-visible {
    border-color: #8f2742;
    color: #8f2742;
    outline: none;
}

.rld-product-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.rld-product-copy {
    padding-right: 22px;
}

.rld-product-copy h3 {
    margin: 0;
    color: #8f2742;
    font-size: 38px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.12;
}

.rld-product-copy p:not(.rld-eyebrow) {
    margin: 14px 0 20px;
    color: #3f3532;
    font-size: 17px;
    line-height: 1.65;
}

.rld-product-button {
    min-width: 220px;
}

body.rld-modal-open {
    overflow: hidden;
}

@keyframes rldResultIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rldModalIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1024px) {
    .rld-grid {
        max-width: 700px;
        min-height: 310px;
    }

    .rld-card {
        width: 170px;
    }

    .rld-card:nth-child(1) {
        --rld-card-x: -148px;
    }

    .rld-card:nth-child(2) {
        --rld-card-x: -74px;
    }

    .rld-card:nth-child(4) {
        --rld-card-x: 74px;
    }

    .rld-card:nth-child(5) {
        --rld-card-x: 148px;
    }
}

@media (max-width: 720px) {
    .rld-draw {
        padding: 20px 12px 70px;
    }

    .rld-grid {
        display: block;
        max-width: 340px;
        min-height: 220px;
        padding-top: 0;
    }

    .rld-hero h2 {
        font-size: 38px;
    }

    .rld-hero p:not(.rld-eyebrow) {
        font-size: 16px;
    }

    .rld-card,
    .rld-card:nth-child(1),
    .rld-card:nth-child(2),
    .rld-card:nth-child(3),
    .rld-card:nth-child(4),
    .rld-card:nth-child(5) {
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 118px;
        min-width: 0;
        max-width: 118px;
        transform: translateX(calc(-50% + var(--rld-card-x))) translateY(var(--rld-card-y)) rotate(var(--rld-card-rotate));
    }

    .rld-card:nth-child(1) {
        --rld-card-x: -100px;
        --rld-card-rotate: -22deg;
        --rld-card-y: 22px;
    }

    .rld-card:nth-child(2) {
        --rld-card-x: -50px;
        --rld-card-rotate: -11deg;
        --rld-card-y: 7px;
    }

    .rld-card:nth-child(3) {
        --rld-card-x: 0px;
        --rld-card-rotate: 0deg;
        --rld-card-y: 0px;
    }

    .rld-card:nth-child(4) {
        --rld-card-x: 50px;
        --rld-card-rotate: 11deg;
        --rld-card-y: 7px;
    }

    .rld-card:nth-child(5) {
        --rld-card-x: 100px;
        --rld-card-rotate: 22deg;
        --rld-card-y: 22px;
    }

    .rld-card:hover,
    .rld-card:focus-visible {
        transform: translateX(calc(-50% + var(--rld-card-x))) translateY(calc(var(--rld-card-y) - 10px)) rotate(var(--rld-card-rotate));
    }

    .rld-card.is-selected {
        transform: translateX(calc(-50% + var(--rld-card-x))) translateY(calc(var(--rld-card-y) - 14px)) rotate(0deg) scale(1.1);
    }

    .rld-result {
        margin-top: 64px;
        padding-top: 44px;
    }

    .rld-form input[type="submit"],
    .rld-form button[type="submit"],
    .rld-button {
        width: 100%;
    }

    .rld-reading {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .rld-reading-media {
        max-width: 260px;
        margin: 0 auto;
    }

    .rld-reading-copy h3,
    .rld-email h3 {
        font-size: 28px;
    }

    .rld-reading-copy .rld-challenge-heading {
        font-size: 28px;
    }

    .rld-reading-copy p,
    .rld-reading-copy li,
    .rld-email p,
    .rld-buy p {
        font-size: 16px;
    }

    .rld-reading-copy blockquote {
        font-size: 18px;
    }

    .rld-email {
        padding: 20px;
    }

    .rld-product-dialog {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 22px;
    }

    .rld-product-media {
        max-width: 260px;
        margin: 0 auto;
    }

    .rld-product-copy {
        padding-right: 0;
    }

    .rld-product-copy h3 {
        font-size: 30px;
    }

    .rld-product-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rld-card,
    .rld-card-inner,
    .rld-result,
    .rld-unlocked,
    .rld-product-dialog {
        animation: none;
        transition: none;
    }
}
