/* ── Three Card Tarot Reader ── */

.tctr-reader {
    --tctr-brand:   #4169A8;
    --tctr-brand-d: #305090;
    --tctr-ink:     #444444;
    --tctr-muted:   #666666;
    --tctr-border:  #e8edf8;
    --tctr-bg:      #fafbff;
    --tctr-white:   #ffffff;
    --tctr-rose:    #4169A8;
    --tctr-gold:    #4169A8;
    font-family: sans-serif;
    color: var(--tctr-ink);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ── Headline Block ── */
.tctr-reader .rrd-headline {
    margin-bottom: 2.5rem;
}

.tctr-reader .rrd-headline-category {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666666;
    margin-bottom: 1.2rem;
    font-family: sans-serif;
}

.tctr-reader .rrd-headline-title {
    font-family: Georgia, serif;
    font-size: 51.2px;
    font-weight: 700;
    color: #666666;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

.tctr-reader .rrd-headline-title em {
    font-size: 51.2px;
    font-style: italic;
    font-weight: 700;
    color: #666666;
    display: block;
}

.tctr-reader .rrd-headline-subtitle p {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 400;
    color: #666666;
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

/* ── Shell ── */
.tctr-shell {
    background: var(--tctr-white);
    border: 1px solid var(--tctr-border);
    border-radius: 0 0 12px 12px;
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 2.5rem;
}

/* ── Header row — hidden, rrd-headline handles this ── */
.tctr-header {
    display: none;
}

.tctr-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tctr-brand);
    margin: 0 0 0.4rem;
    font-family: sans-serif;
}

.tctr-header h2 {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #444;
    margin: 0;
    line-height: 1.2;
}

/* ── Deal button ── */
.tctr-deal-button {
    height: 44px;
    padding: 0 1.5rem;
    background: var(--tctr-brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s;
    font-family: sans-serif;
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 1.5rem auto 0;
}

.tctr-deal-button:hover,
.tctr-deal-button:focus-visible {
    background: var(--tctr-brand-d);
    outline: none;
}

/* ── Board ── */
.tctr-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1.5rem;
}

.tctr-card-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Position label ── */
.tctr-position {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tctr-muted);
    margin: 0 0 0.6rem;
    text-align: center;
    font-family: sans-serif;
}

/* ── Card ── */
.tctr-card {
    /* Fixed size so all three cards are always identical */
    width: 100%;
    max-width: 160px;
    aspect-ratio: 5 / 8;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    perspective: 1100px;
    position: relative;
    display: block;
    border-radius: 8px;
}

.tctr-card-inner {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 580ms cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 8px;
}

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

.tctr-card-face {
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(65, 105, 168, 0.15);
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Card back — brand-toned */
.tctr-card-back {
    background:
        linear-gradient(45deg,
            rgba(255,255,255,0.07) 25%, transparent 25% 50%,
            rgba(255,255,255,0.07) 50% 75%, transparent 75%) 0 0 / 20px 20px,
        radial-gradient(circle at 50% 38%,
            transparent 0 29%,
            rgba(255,255,255,0.5) 30% 31%,
            transparent 32%),
        linear-gradient(135deg, #2a4a7f, #4169A8 55%, #305090);
    border: 5px solid rgba(255,255,255,0.2);
}

.tctr-card-back::before,
.tctr-card-back::after {
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    content: "";
    position: absolute;
    inset: 18%;
}

.tctr-card-back::after {
    border-color: rgba(255,255,255,0.6);
    inset: 32%;
}

/* Card front */
.tctr-card-front {
    background: #f0f0f0;
    transform: rotateY(180deg);
}

.tctr-card-front img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.tctr-card-front img.is-missing {
    display: none;
}

/* Reversed image */
.tctr-card.is-reversed .tctr-card-front img {
    transform: rotate(180deg);
}

/* Fallback text if image fails */
.tctr-card-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    height: 100%;
    width: 100%;
    font-family: Georgia, serif;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 700;
    color: var(--tctr-ink);
    text-align: center;
    background: linear-gradient(#f0ead8, #ddd0b0);
    border: 5px solid var(--tctr-brand);
}

.tctr-card-front img.is-missing + .tctr-card-fallback {
    display: flex;
}

/* ── Card metadata ── */
.tctr-card-title {
    font-family: Georgia, serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #444;
    text-align: center;
    margin: 0.75rem 0 0.2rem;
    line-height: 1.3;
}

.tctr-card-orientation {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tctr-brand);
    text-align: center;
    margin: 0 0 0.6rem;
    font-family: sans-serif;
}

/* ── Meaning box ── */
.tctr-meaning {
    width: 100%;
    background: var(--tctr-bg);
    border: 1px solid var(--tctr-border);
    border-radius: 6px;
    color: #555;
    font-size: 0.82rem;
    line-height: 1.6;
    padding: 0.75rem 0.9rem;
    margin: 0;
    font-family: sans-serif;
    text-align: left;
}

/* ── Reading summary ── */
.tctr-reading {
    border-left: 4px solid var(--tctr-brand);
    border-top: 1px solid var(--tctr-border);
    border-right: 1px solid var(--tctr-border);
    border-bottom: 1px solid var(--tctr-border);
    border-radius: 0 10px 10px 0;
    background: var(--tctr-white);
    padding: 1.25rem 1.5rem;
    margin-top: 0.5rem;
}

.tctr-reading h3 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tctr-brand);
    margin: 0 0 0.6rem;
    font-family: sans-serif;
    font-style: normal;
}

.tctr-reading p {
    font-family: Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: #444;
    line-height: 1.7;
    margin: 0;
}

/* ── CTA Strip ── */
.tctr-cta-strip {
    border-left: 4px solid var(--tctr-brand);
    border-radius: 0 8px 8px 0;
    background: var(--tctr-bg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.tctr-cta-main {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--tctr-border);
}

.tctr-cta-main p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
    font-family: sans-serif;
}

.tctr-cta-main a {
    color: var(--tctr-brand);
    text-decoration: none;
    font-weight: 500;
}

.tctr-cta-main a:hover { text-decoration: underline; }

.tctr-cta-free {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tctr-free-badge {
    background: var(--tctr-brand);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: sans-serif;
}

.tctr-free-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    flex: 1;
    margin: 0;
    font-family: sans-serif;
}

.tctr-free-text a {
    color: var(--tctr-brand);
    font-weight: 500;
    text-decoration: none;
}

.tctr-free-text a:hover { text-decoration: underline; }

/* ── Lore grid ── */
.tctr-lore {
    border-top: 1px solid var(--tctr-border);
    padding-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.tctr-lore-block strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 0.4rem;
}

.tctr-lore-block p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
    font-family: sans-serif;
}

/* ── Disclaimer ── */
.tctr-disclaimer {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.6;
    margin: 0;
    font-family: sans-serif;
}

/* ── Mobile ≤ 760px ── */
@media (max-width: 760px) {
    .tctr-reader {
        padding: 0 20px;
    }

    .tctr-reader .rrd-headline-title { font-size: 2.4rem; }
    .tctr-reader .rrd-headline-title em { font-size: 32px; }
    .tctr-reader .rrd-headline-subtitle p { font-size: 1rem; }

    .tctr-header {
        flex-direction: column;
        align-items: stretch;
    }

    .tctr-deal-button { max-width: 100%; }

    .tctr-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    /* Keep cards proportional on mobile — no single column */
    .tctr-card {
        max-width: 100%;
    }

    .tctr-card-title { font-size: 0.78rem; }
    .tctr-meaning { font-size: 0.78rem; }

    .tctr-lore { grid-template-columns: 1fr; }

    .tctr-cta-free { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .tctr-card-title { font-size: 0.72rem; }
    .tctr-meaning { font-size: 0.75rem; padding: 0.6rem 0.75rem; }
}
