/* Tarot pages only — all selectors scoped under .tarot-page */

.tarot-page {
    --tarot-gold: #d4af37;
    --tarot-gold-light: #f3e5ab;
    --tarot-navy: #1e1b4b;
    --tarot-navy-light: #312e81;
    --tarot-bg: #ffffff;
}

.tarot-page .tarot-shell {
    background: #fff;
    min-height: 100vh;
    padding-bottom: 6rem;
}

/* --- Surfaces --- */
.tarot-page .daily-surface {
    background: linear-gradient(180deg, #fdf4ff 0%, #fae8ff 100%);
    border-radius: 1.5rem;
    padding: 2rem 1rem 2.5rem;
    text-align: center;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.tarot-page .tarot-surface {
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
    border-radius: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: 1.5rem 1rem;
    position: relative;
    overflow: hidden;
}

.tarot-page .tarot-surface--green {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(22, 163, 74, 0.1);
}

.tarot-page .tarot-surface--plain {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    overflow: visible;
}

/* --- Toolbar --- */
.tarot-page .tarot-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .tarot-page .tarot-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.tarot-page .tarot-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tarot-page .tarot-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .tarot-page .tarot-section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.tarot-page .tarot-cta-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .tarot-page .tarot-cta-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* --- Deck --- */
.tarot-page .tarot-deck {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    padding: 3rem 0.25rem 4rem;
}

/* --- Result cards (horizontal layout) --- */
.tarot-page .tarot-result-card {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
    animation: tarot-deal 0.6s ease-out backwards;
}

.tarot-page .tarot-result-card--highlight {
    background: #fffbeb;
    border: 2px solid #fbbf24;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.tarot-page .tarot-result-card-inner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.tarot-page .tarot-result-card-image {
    width: 5rem;
    flex-shrink: 0;
}

.tarot-page .tarot-result-card-image .tarot-card-img-wrap {
    aspect-ratio: 2 / 3;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.tarot-page .tarot-result-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tarot-page .tarot-result-card-body {
    min-width: 0;
    flex: 1 1 0%;
}

.tarot-page .tarot-result-position {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    word-break: break-word;
    line-height: 1.35;
}

.tarot-page .tarot-result-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 0.125rem;
    word-break: break-word;
}

.tarot-page .tarot-result-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-top: 0.375rem;
    word-break: break-word;
    line-height: 1.35;
}

.tarot-page .tarot-result-meaning {
    font-size: 14px;
    line-height: 1.625;
    color: #374151;
    margin-top: 0.375rem;
    word-break: break-word;
    text-align: left;
}

.tarot-page .tarot-reading-box,
.tarot-page .tarot-summary-box {
    word-break: break-word;
}

/* --- Engine reveal cards --- */
@keyframes tarot-deal {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tarot-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.tarot-page .tarot-3d { perspective: 1200px; }

.tarot-page .tarot-3d-inner {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.tarot-page .tarot-3d.is-flipped .tarot-3d-inner {
    transform: rotateY(180deg);
}

.tarot-page .tarot-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    position: absolute;
    inset: 0;
}

.tarot-page .tarot-face-front { transform: rotateY(180deg); }
.tarot-page .tarot-face-back { transform: rotateY(0deg); }

.tarot-page .tarot-engine-result {
    animation: tarot-deal 0.6s ease-out backwards;
}

.tarot-page .tarot-engine-result-header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.tarot-page .tarot-engine-card-display {
    width: 5rem;
    flex-shrink: 0;
    aspect-ratio: 3 / 5;
    position: relative;
    border-radius: 0.75rem;
    background: #fff;
}

.tarot-page .tarot-engine-result-meta {
    min-width: 0;
    flex: 1 1 0%;
}

.tarot-page .tarot-meaning-section {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.tarot-page .tarot-meaning-section p {
    word-break: break-word;
}

.tarot-page .tarot-reveal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* --- Topic buttons --- */
.tarot-page .tarot-topic-btn {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    text-align: left;
}

.tarot-page .tarot-topic-btn--bordered {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
}

.tarot-page .font-serif-display {
    font-family: "Playfair Display", Georgia, serif;
}
