#tarot-collection {
    --tarot-paper: #fff1d9;
    --tarot-gold: #ffdda1;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
    grid-template-areas: "heading spread" "reading spread";
    align-items: center;
    gap: 2rem clamp(1.5rem, 4vw, 4rem);
    padding: clamp(1.55rem, 4.7vw, 4.15rem);
    overflow: hidden;
    color: var(--tarot-paper);
    border: 1px solid #b8876675;
    border-radius: clamp(1rem, 2vw, 1.65rem);
    background: radial-gradient(ellipse at 80% 48%, #432135, #190e20 75%);
}
.tarot-home::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(91deg, #150c1a 4%, #1b0e1deb 32%, #26142322 67%, #150b1640),
                linear-gradient(0deg, #160d1c8c, transparent 45%);
    pointer-events: none;
}
.tarot-home-backdrop {
    position: absolute;
    z-index: -2;
    inset: 0;
    pointer-events: none;
}
.tarot-home-backdrop img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 67% center;
}
.tarot-home-heading { grid-area: heading; align-self: end; }
.tarot-home-heading h2 {
    margin: 0;
    color: var(--tarot-paper);
    font-size: clamp(2.6rem, 5.4vw, 5.8rem);
    font-weight: 750;
    line-height: .99;
    letter-spacing: -.045em;
    text-wrap: balance;
}
.tarot-home-heading h2 em { color: var(--tarot-gold); }
.tarot-home-heading p {
    max-width: 35ch;
    margin: 1.15rem 0;
    color: #e4cfd8;
    font-size: clamp(1.03rem, 1.6vw, 1.25rem);
    line-height: 1.5;
}
.tarot-home-heading .eyebrow {
    margin: 0 0 .72rem;
    color: var(--tarot-gold);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.tarot-home a {
    color: var(--tarot-gold);
    text-underline-offset: .25em;
}
.tarot-home .tarot-home-deck {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: fit-content;
    min-height: 2.8rem;
    padding: .55rem .95rem;
    border: 1px solid #edbd84;
    border-radius: .42rem;
    background: #f9d29a;
    color: #261425;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s;
}
.tarot-home .tarot-home-deck:hover { background: #ffe8bb; }
.tarot-home-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .65rem;
}
.tarot-home .tarot-home-draw {
    border-color: #edbd8480;
    background: #211323a6;
    color: var(--tarot-gold);
}
.tarot-home .tarot-home-draw:hover { background: #442536; }
.tarot-home .tarot-home-draw[aria-busy="true"] { opacity: .72; cursor: progress; }
.tarot-home a:focus-visible,
.tarot-home-stage input:focus-visible + .tarot-home-card {
    outline: 2px solid #fff4d9;
    outline-offset: .3rem;
}
.tarot-home-reading {
    grid-area: reading;
    display: grid;
    align-self: start;
    min-height: 8.2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #dfb78855;
}
.tarot-home-reading h3 {
    margin: 0;
    color: var(--tarot-paper);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    line-height: 1.2;
}
.tarot-home-reading p {
    margin: .35rem 0 .55rem;
    color: #e4cfd8;
    line-height: 1.45;
}
.tarot-home-reading a { font-weight: 650; }
.tarot-home-reading article { grid-area: 1 / 1; visibility: hidden; }
#tarot-collection:has(#tarot-home-strength:checked) [data-tarot-home-reading="strength"],
#tarot-collection:has(#tarot-home-the-star:checked) [data-tarot-home-reading="the-star"],
#tarot-collection:has(#tarot-home-the-moon:checked) [data-tarot-home-reading="the-moon"] {
    visibility: visible;
    animation: tarot-home-note .35s ease-out both;
}
@supports not selector(:has(*)) {
    .tarot-home-reading { display: block; }
    .tarot-home-reading article { visibility: visible; margin-bottom: 1rem; }
}
.tarot-home-stage {
    grid-area: spread;
    position: relative;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}
.tarot-home-spread {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: .35rem;
    min-height: clamp(16rem, 33vw, 27rem);
    padding-block: 1.5rem;
}
.tarot-home-spread::before {
    content: '';
    position: absolute;
    inset: 3% -5% 15%;
    background: radial-gradient(ellipse, #ffcb9b3b, #eaa4bf19 40%, transparent 69%);
    pointer-events: none;
    transform: translate(var(--tarot-light-x, 0), var(--tarot-light-y, 0));
    transition: transform .5s ease-out;
}
.tarot-home-stage input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    clip-path: inset(50%);
    white-space: nowrap;
    overflow: hidden;
}
.tarot-home-card {
    --tilt: 0deg;
    position: relative;
    display: grid;
    justify-items: center;
    gap: 1.35rem;
    min-width: 0;
    padding: .45rem .2rem;
    border-radius: .65rem;
    color: var(--tarot-paper);
    font-size: clamp(.9rem, 1.45vw, 1.1rem);
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.tarot-home-card[for="tarot-home-strength"] { --tilt: -12deg; }
.tarot-home-card[for="tarot-home-the-moon"] { --tilt: 12deg; }
.tarot-home-face {
    position: relative;
    display: block;
    width: min(90%, 10.2rem);
    overflow: hidden;
    border-radius: .48rem;
    border: 1px solid #e3b878b8;
    background: #392235;
    box-shadow: 0 1rem 1.5rem #0b050bc0, 0 .2rem 0 #946a4a73;
    opacity: .86;
    transform: translateY(.35rem) rotate(var(--tilt)) scale(.96);
    transition: transform .55s cubic-bezier(.19,.71,.2,1), box-shadow .5s, opacity .35s;
}
.tarot-home-face img { display: block; width: 100%; height: auto; }
.tarot-home-card > span:last-child {
    display: inline-grid;
    place-items: center;
    min-height: 2.25rem;
    max-width: 100%;
    padding: .4rem .88rem .3rem;
    border: 1px solid transparent;
    border-radius: 99rem;
    background: #1c1021a8;
    line-height: 1.25;
}
.tarot-home-card:is(:hover, :focus-visible) .tarot-home-face,
.tarot-home-stage input:focus-visible + .tarot-home-card .tarot-home-face {
    opacity: 1;
    transform: translateY(-.32rem) rotate(var(--tilt));
}
.tarot-home-stage input:checked + .tarot-home-card { z-index: 1; }
.tarot-home-stage input:checked + .tarot-home-card .tarot-home-face {
    transform: translateY(-.85rem) rotate(0) scale(1.08);
    opacity: 1;
    border-color: #ffe0a8;
    box-shadow: 0 .85rem 1.6rem #0b050bc7, 0 0 2rem #f9b77b5c;
}
.tarot-home-stage input:checked + .tarot-home-card > span:last-child {
    color: var(--tarot-gold);
    border-color: #d5a574aa;
    background: #251528;
}
.tarot-home-stage input:checked + .tarot-home-card .tarot-home-face::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(113deg, transparent 30%, #fff2c47a 47%, transparent 66%);
    animation: tarot-home-glint .9s ease-out both;
    pointer-events: none;
}
.tarot-home.is-arriving .tarot-home-card { animation: tarot-home-deal .85s ease-out both; }
.tarot-home.is-arriving .tarot-home-card[for="tarot-home-the-star"] { animation-delay: .11s; }
.tarot-home.is-arriving .tarot-home-card[for="tarot-home-the-moon"] { animation-delay: .23s; }
@keyframes tarot-home-deal { from { opacity: .55; transform: translateY(1.15rem) scale(.94); } }
@keyframes tarot-home-note { from { opacity: .5; transform: translateY(.25rem); } }
@keyframes tarot-home-glint {
    from { transform: translateX(-110%); }
    to { transform: translateX(110%); }
}
@media (max-width: 48rem) {
    #tarot-collection {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "heading" "spread" "reading";
        gap: 1.2rem;
    }
    .tarot-home::before { background: linear-gradient(180deg, #160b1bea, #220e2026 52%, #180e1de8); }
    .tarot-home-spread { min-height: 0; padding-block: .55rem .2rem; }
    .tarot-home-card { gap: .85rem; }
    .tarot-home-face { width: min(86%, 8.5rem); }
    .tarot-home-reading { min-height: 7.7rem; padding-top: 1rem; }
}
@media (max-width: 25rem) {
    .tarot-home-card { padding-inline: 0; }
    .tarot-home-card > span:last-child { padding-inline: .46rem; }
}
@media (prefers-reduced-motion: reduce) {
    #tarot-collection *, #tarot-collection *::after { animation: none; transition: none; }
    .tarot-home-spread::before { transform: none; transition: none; }
}
:is(.reduced-motion,.client-reduced-motion,.a11y-reduce-motion,.a11y-pause-motion) #tarot-collection *,
:is(.reduced-motion,.client-reduced-motion,.a11y-reduce-motion,.a11y-pause-motion) #tarot-collection *::after {
    animation: none;
    transition: none;
}
:is(.reduced-motion,.client-reduced-motion,.a11y-reduce-motion,.a11y-pause-motion) .tarot-home-spread::before {
    transform: none;
    transition: none;
}
