/* ── Lenormand Grand Tableau Plugin ── */

#lenormand-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    font-family: sans-serif;
    color: #555;
    line-height: 1.7;
}

/* ── Headline ── */
.rrd-headline {
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.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;
}

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

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

.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;
}

/* ── Significator selector ── */
.lnr-gender-row {
    margin-bottom: 1.5rem;
}

.lnr-gender-label {
    font-family: Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: #666;
    margin-bottom: 0.75rem;
}

.lnr-gender-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lnr-gender-option {
    cursor: pointer;
}

.lnr-gender-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.lnr-gender-btn {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 1.25rem;
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-width: 0;
}

.lnr-gender-btn:hover {
    border-color: #4169A8;
    background: #fafbff;
}

.lnr-gender-option input[type="radio"]:checked + .lnr-gender-btn {
    border-color: #4169A8;
    border-width: 2px;
    background: #f5f7fb;
}

.lnr-gender-name {
    font-family: Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #444;
    line-height: 1.2;
}

.lnr-gender-sub {
    font-size: 0.75rem;
    color: #888;
    font-family: sans-serif;
    font-style: normal;
}

.lnr-deal-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ── Controls row ── */
.lnr-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.lnr-btn {
    height: 44px;
    padding: 0 1.75rem;
    background: #4169A8;
    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;
    flex-shrink: 0;
}

.lnr-btn:hover   { background: #305090; }
.lnr-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Legend ── */
.lnr-legend {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.lnr-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #666;
    font-family: sans-serif;
}

.lnr-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lnr-legend-dot--sig { background: #4169A8; }
.lnr-legend-dot--key { background: #d4a857; }

/* ── Board wrapper ── */
.lnr-board-wrap {
    background: #fafbff;
    border: 1px solid #e8edf8;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ── Row labels ── */
.lnr-row-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4169A8;
    font-family: sans-serif;
    margin: 0.75rem 0 0.5rem;
}

.lnr-row-label:first-child {
    margin-top: 0;
}

/* ── Grid ── */
.lnr-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 5px;
    margin-bottom: 0.25rem;
}

/* ── Individual card ── */
.lnr-card {
    /* Exact aspect ratio of source images: 300 x 473 */
    aspect-ratio: 300 / 473;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e0e6f0;
    background: #fff;
    position: relative;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    display: block;
    width: 100%;
}

.lnr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(65,105,168,0.18);
    z-index: 2;
}

/* Significator highlight */
.lnr-card--sig {
    box-shadow: 0 0 0 4px #4169A8, 0 0 0 7px rgba(65,105,168,0.35), 0 0 20px 4px rgba(65,105,168,0.4);
    transform: translateY(-4px) scale(1.04);
    z-index: 3;
    position: relative;
}

.lnr-card--sig:hover {
    box-shadow: 0 0 0 4px #4169A8, 0 0 0 7px rgba(65,105,168,0.4), 0 0 24px 6px rgba(65,105,168,0.5);
    transform: translateY(-6px) scale(1.06);
}

/* Key influence highlight */
.lnr-card--key {
    box-shadow: 0 0 0 4px #d4a857, 0 0 0 7px rgba(212,168,87,0.35), 0 0 20px 4px rgba(212,168,87,0.4);
    transform: translateY(-3px) scale(1.03);
    z-index: 2;
    position: relative;
}

.lnr-card--key:hover {
    box-shadow: 0 0 0 4px #d4a857, 0 0 0 7px rgba(212,168,87,0.4), 0 0 24px 6px rgba(212,168,87,0.5);
    transform: translateY(-5px) scale(1.05);
}

/* Card image */
.lnr-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 3px;
}

/* Card back image handled via JS — backcard.jpg */


/* ── Card badges ── */
.lnr-card {
    position: relative;
}

.lnr-card-badge {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.45rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: sans-serif;
    white-space: nowrap;
    z-index: 4;
    pointer-events: none;
}

.lnr-card-badge--sig {
    background: #4169A8;
    color: #fff;
}

.lnr-card-badge--key {
    background: #d4a857;
    color: #fff;
}

/* ── Reading panel ── */
.lnr-reading {
    border-left: 4px solid #4169A8;
    border-top: 1px solid #e8edf8;
    border-right: 1px solid #e8edf8;
    border-bottom: 1px solid #e8edf8;
    border-radius: 0 10px 10px 0;
    background: #fff;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lnr-reading-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4169A8;
    font-family: sans-serif;
}

.lnr-reading-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.lnr-pill {
    display: inline-flex;
    align-items: center;
    background: #f0f4fb;
    border: 1px solid #d0dcf0;
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: 0.78rem;
    font-family: sans-serif;
    color: #4169A8;
}

.lnr-pill--row {
    background: #fdf6e8;
    border-color: #e0c870;
    color: #a07820;
}

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

.lnr-reading-sub {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
    margin: 0;
    font-family: sans-serif;
}

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

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

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

/* ── CTA Strip ── */
.lnr-cta-strip {
    border-left: 4px solid #4169A8;
    border-radius: 0 8px 8px 0;
    background: #f5f7fb;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.lnr-cta-main {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #e8edf8;
}

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

.lnr-cta-main a {
    color: #4169A8;
    text-decoration: none;
    font-weight: 500;
}

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

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

.lnr-free-badge {
    background: #4169A8;
    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;
}

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

.lnr-free-text a {
    color: #4169A8;
    font-weight: 500;
    text-decoration: none;
}

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

.lnr-disclaimer {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.6;
    margin: 0;
    font-family: sans-serif;
}

/* ── Mobile ≤ 768px ── */
@media (max-width: 768px) {
    #lenormand-wrapper {
        padding: 0 20px;
    }

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

    .lnr-controls   { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .lnr-deal-row   { flex-direction: column; align-items: flex-start; }
    .lnr-gender-options { flex-direction: column; }
    .lnr-gender-btn { min-width: 100%; flex-direction: row; gap: 0.75rem; padding: 0.65rem 1rem; }
    .lnr-btn        { width: 100%; }
    .lnr-grid       { gap: 3px; }
    .lnr-lore       { grid-template-columns: 1fr; }
    .lnr-cta-free   { flex-direction: column; align-items: flex-start; }

    .lnr-board-wrap { padding: 0.75rem; }
    .lnr-row-label  { font-size: 0.6rem; }
}

@media (max-width: 480px) {
    .lnr-grid { gap: 2px; }
}
