.tool-page {
    position: relative;
    padding: 9.5rem 0 5rem;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 12%, rgba(208, 168, 101, 0.16), transparent 22%),
        radial-gradient(circle at 20% 30%, rgba(212, 65, 142, 0.07), transparent 20%),
        radial-gradient(circle at 80% 28%, rgba(208, 168, 101, 0.08), transparent 18%),
        linear-gradient(180deg, #fbfaf7 0%, #f7f1ea 100%);
}

.tool-page::before,
.tool-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.45;
}

.tool-page::before {
    width: 240px;
    height: 240px;
    background: rgba(208, 168, 101, 0.18);
    top: 110px;
    left: -60px;
}

.tool-page::after {
    width: 280px;
    height: 280px;
    background: rgba(212, 65, 142, 0.10);
    top: 160px;
    right: -80px;
}

.tool-container {
    max-width: 860px;
    position: relative;
    z-index: 2;
}

.tool-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: rgba(208, 168, 101, 0.12);
    color: var(--clr-primary-hover);
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(208, 168, 101, 0.14);
}

.tool-title {
    font-size: clamp(2.8rem, 6vw, 4.4rem);
    line-height: 1.02;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.tool-intro {
    max-width: 760px;
    margin: 0 auto 2rem;
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--clr-text-muted);
}

.card-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.tarot-card-shell {
    position: relative;
    display: inline-block;
    animation: cardFloat 5s ease-in-out infinite;
    perspective: 1200px;
}

.tarot-card-shell::before {
    content: "";
    position: absolute;
    inset: -24px;
    border-radius: 34px;
    background: radial-gradient(circle, rgba(208, 168, 101, 0.22), transparent 62%);
    filter: blur(14px);
    z-index: 0;
}

.tarot-card {
    width: 280px;
    height: 480px;
    position: relative;
    z-index: 1;
}

.tarot-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s ease;
    transform-style: preserve-3d;
}

.tarot-card.is-revealed .tarot-card-inner {
    transform: rotateY(180deg);
}

.tarot-card-face {
    position: absolute;
    inset: 0;
    border-radius: 26px;
    overflow: hidden;
    backface-visibility: hidden;
    border: 1px solid rgba(47, 27, 65, 0.08);
    box-shadow:
        0 18px 40px rgba(47, 27, 65, 0.12),
        0 6px 18px rgba(47, 27, 65, 0.06);
    background: var(--clr-white);
}

.tarot-card-back {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 40%),
        linear-gradient(145deg, #2f1b41 0%, #4b2d68 55%, #2f1b41 100%);
}

.tarot-card-back::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 18px;
    border: 1px solid rgba(208, 168, 101, 0.35);
}

.tarot-card-back::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    opacity: 0.8;
}

.card-back-symbol {
    font-size: 4.6rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.tarot-card-front {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fffdfb 0%, #fff 100%);
}

.card-image-wrap {
    height: 348px;
    background: linear-gradient(180deg, #f5efe6 0%, #efe6db 100%);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
    padding: 0.1rem 0.1rem 0 0.1rem;
}

.card-front-content {
    padding: 1.15rem 1rem 1.3rem;
    background: linear-gradient(180deg, #fffdfa 0%, #faf6f0 100%);
    border-top: 1px solid rgba(47, 27, 65, 0.06);
}

.card-arcana {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--clr-primary);
    font-weight: 700;
}

.card-name {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.05;
}

.draw-btn {
    min-width: 260px;
    padding: 0.95rem 1.6rem;
    font-size: 1rem;
    box-shadow: 0 10px 20px rgba(208, 168, 101, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(208, 168, 101, 0.24);
}

.draw-btn:disabled {
    opacity: 0.9;
    cursor: default;
    transform: none;
    box-shadow: 0 8px 18px rgba(208, 168, 101, 0.14);
}

.card-reading {
    max-width: 700px;
    margin-top: 0.65rem;
    padding: 1.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(47, 27, 65, 0.08);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(47, 27, 65, 0.05);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.card-reading.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reading-date {
    font-size: 0.95rem;
    color: var(--clr-primary-hover);
    font-weight: 600;
    margin-bottom: 0.9rem;
}

.card-meaning,
.card-reflection {
    font-size: 1.04rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.card-reflection {
    margin-bottom: 0;
}

.tool-seo-copy {
    padding: 4rem 0 5rem;
}

.tool-copy-container {
    max-width: 820px;
}

.tool-copy-container h2 {
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.tool-cta-box {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--clr-bg-secondary);
    border-radius: 20px;
    border: 1px solid rgba(47, 27, 65, 0.06);
}

@keyframes cardFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .tool-page {
        padding: 8rem 0 4rem;
    }

    .tool-title {
        font-size: clamp(2.4rem, 11vw, 3.4rem);
    }

    .tool-intro {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .tarot-card {
        width: 220px;
        height: 378px;
    }

    .card-image-wrap {
        height: 274px;
    }

    .card-name {
        font-size: 1.65rem;
    }

    .draw-btn {
        width: 100%;
        max-width: 320px;
    }

    .card-reading {
        text-align: left;
        padding: 1.25rem 1.1rem;
    }

    .tool-cta-box {
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tarot-card-shell {
        animation: none;
    }

    .tarot-card-inner,
    .card-reading,
    .draw-btn {
        transition: none;
    }
}