/* Card Library (browse + detail). Reuses the mystical purple/gold palette
   established in Home.css/subscription.css -- hardcoded here rather than
   sharing those custom properties, since neither stylesheet is guaranteed
   loaded on this page. */
:root {
    --lib-purple-600: #6b3fa0;
    --lib-purple-700: #4a2d6b;
    --lib-gold-500: #d4af37;
    --lib-cream-50: #fffdf8;
    --lib-lavender-50: #f5f2fa;
    --lib-ink: #3a2f4d;
    --lib-ink-light: #6b5e78;
}

.library-header {
    text-align: center;
    margin: 32px 0 40px;
}

    .library-header h1 {
        font-family: 'Playfair Display', Georgia, serif;
        color: var(--lib-purple-700);
        margin-bottom: 8px;
    }

    .library-header p {
        color: var(--lib-ink-light);
        max-width: 560px;
        margin: 0 auto;
    }

.library-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--lib-purple-700);
    font-size: 1.3rem;
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--lib-gold-500);
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.library-card {
    display: block;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: var(--lib-cream-50);
    border: 1px solid rgba(107, 63, 160, 0.15);
    border-radius: 10px;
    padding: 10px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

    .library-card:hover {
        box-shadow: 0 8px 18px rgba(107, 63, 160, 0.18);
        transform: translateY(-2px);
        color: inherit;
        text-decoration: none;
    }

    .library-card img {
        width: 100%;
        border-radius: 6px;
        margin-bottom: 8px;
    }

    .library-card span {
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--lib-ink);
    }

/* Card detail page */
.card-detail-wrapper {
    max-width: 900px;
    margin: 32px auto;
}

.card-detail-back {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--lib-purple-600);
    font-weight: 600;
    text-decoration: none;
}

    .card-detail-back:hover {
        color: var(--lib-purple-700);
        text-decoration: underline;
    }

.card-detail-main {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 32px;
}

.card-detail-image img {
    width: 220px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(107, 63, 160, 0.2);
}

.card-detail-title h1 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--lib-purple-700);
    margin-bottom: 4px;
}

.card-detail-title .card-detail-arcana {
    color: var(--lib-ink-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.card-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.card-fact {
    background: var(--lib-lavender-50);
    border-radius: 8px;
    padding: 10px 14px;
}

    .card-fact .card-fact-label {
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--lib-purple-600);
        margin-bottom: 2px;
    }

    .card-fact .card-fact-value {
        color: var(--lib-ink);
        font-size: 0.92rem;
    }

.card-detail-section {
    margin-bottom: 28px;
}

    .card-detail-section h3 {
        font-family: 'Playfair Display', Georgia, serif;
        color: var(--lib-purple-700);
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .card-detail-section p {
        color: var(--lib-ink);
        line-height: 1.6;
        margin-bottom: 0;
    }

.card-meaning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
