:root {
    --tarot-guide-ink: #050710;
    --tarot-guide-paper: #f5f1e8;
    --tarot-guide-gold: #dab434;
    --tarot-guide-blue: #63d4e5;
    --tarot-guide-line: rgba(255, 255, 255, 0.12);
}

html {
    scroll-behavior: smooth;
}

.tarot-guide-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto !important;
    color: var(--tarot-guide-paper);
    font-family: "Outfit", sans-serif;
    background:
        radial-gradient(circle at 78% 8%, rgba(32, 101, 128, 0.2), transparent 34rem),
        radial-gradient(circle at 8% 30%, rgba(218, 180, 52, 0.11), transparent 32rem),
        var(--tarot-guide-ink);
}

.tarot-guide-stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.58;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.76) 0 1px, transparent 1.25px),
        radial-gradient(circle, rgba(218, 180, 52, 0.7) 0 1px, transparent 1.25px);
    background-position: 0 0, 51px 72px;
    background-size: 137px 137px, 211px 211px;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.62) 62%, transparent 100%);
}

.tarot-guide-header {
    position: relative;
    z-index: 30;
    width: min(1380px, calc(100% - 48px));
    margin: 0 auto;
    padding-top: 26px;
}

.tarot-library-main,
.tarot-card-main {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
    padding: 44px 0 90px;
}

.tarot-guide-breadcrumb {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 28px;
    color: rgba(255, 255, 255, 0.44);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tarot-guide-breadcrumb a {
    color: var(--tarot-guide-gold);
    text-decoration: none;
}

.tarot-library-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.05fr);
    gap: clamp(28px, 4vw, 76px);
    align-items: center;
    min-height: min(850px, calc(100svh - 120px));
    padding: 60px 0 90px;
    border-bottom: 1px solid var(--tarot-guide-line);
}

.tarot-library-copy {
    position: relative;
    z-index: 3;
}

.tarot-library-copy > span,
.tarot-library-index > header > span,
.tarot-card-hero-copy > span,
.tarot-card-reading aside > span,
.tarot-card-prose section > span,
.tarot-card-faq header > span,
.tarot-related-cards header > span,
.tarot-guide-cta > div > span {
    color: var(--tarot-guide-gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.tarot-library-copy h1 {
    max-width: 760px;
    margin: 18px 0 28px;
    font-size: clamp(4.2rem, 7.8vw, 8.4rem);
    line-height: 0.84;
    letter-spacing: -0.08em;
    text-wrap: balance;
}

.tarot-library-copy p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(1.04rem, 1.45vw, 1.28rem);
    line-height: 1.7;
}

.tarot-library-copy > a,
.tarot-card-hero-copy > a {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    margin-top: 36px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.tarot-library-copy > a i {
    color: var(--tarot-guide-gold);
    font-size: 1.1rem;
    font-style: normal;
    animation: tarotGuideArrow 1.8s ease-in-out infinite;
}

.tarot-library-deck {
    position: relative;
    min-height: 650px;
    isolation: isolate;
    perspective: 1400px;
}

.tarot-library-deck::before,
.tarot-library-deck::after {
    position: absolute;
    content: "";
    border-radius: 50%;
}

.tarot-library-deck::before {
    inset: 12% 1% 4%;
    z-index: -2;
    border: 1px solid rgba(218, 180, 52, 0.23);
    transform: rotateX(72deg) rotateZ(-8deg);
    box-shadow: 0 0 70px rgba(218, 180, 52, 0.08);
}

.tarot-library-deck::after {
    inset: 21% 13%;
    z-index: -3;
    background: radial-gradient(circle, rgba(77, 174, 195, 0.21), transparent 64%);
    filter: blur(22px);
}

.tarot-library-deck img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(190px, 20vw, 276px);
    aspect-ratio: 4 / 7;
    border-radius: 13px;
    object-fit: cover;
    transform-origin: 50% 90%;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 241, 185, 0.3);
}

.tarot-library-deck img:nth-child(1) {
    z-index: 1;
    transform: translate(-115%, -45%) rotate(-17deg) translateZ(-40px);
    animation: tarotGuideCardLeft 6.8s ease-in-out infinite;
}

.tarot-library-deck img:nth-child(2) {
    z-index: 3;
    transform: translate(-50%, -55%) translateZ(80px);
    animation: tarotGuideCardCenter 5.6s ease-in-out infinite;
}

.tarot-library-deck img:nth-child(3) {
    z-index: 2;
    transform: translate(15%, -44%) rotate(17deg) translateZ(-30px);
    animation: tarotGuideCardRight 6.4s ease-in-out infinite;
}

.tarot-library-deck > span {
    position: absolute;
    top: 48%;
    left: 50%;
    width: 180px;
    height: 180px;
    z-index: -1;
    border: 1px solid rgba(99, 212, 229, 0.35);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 80px rgba(99, 212, 229, 0.25), inset 0 0 40px rgba(218, 180, 52, 0.12);
    animation: tarotGuideHalo 4s ease-in-out infinite;
}

.tarot-suit-directory {
    padding: 38px 0 96px;
}

.tarot-suit-directory > header,
.tarot-suit-index > header {
    max-width: 760px;
    margin-bottom: 38px;
}

.tarot-suit-directory > header > span,
.tarot-suit-hero > div > span {
    color: var(--tarot-guide-gold);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tarot-suit-directory h2 {
    margin: 10px 0 0;
    font-size: clamp(2.8rem, 6vw, 5.8rem);
    line-height: 0.92;
    letter-spacing: -0.06em;
}

.tarot-suit-directory > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.tarot-suit-directory a {
    position: relative;
    min-height: 480px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 32px;
    color: #fff;
    background: linear-gradient(155deg, rgba(18, 22, 37, 0.9), rgba(4, 7, 16, 0.96));
    transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.tarot-suit-directory a::after {
    content: '';
    position: absolute;
    inset: 40% -30% -45%;
    background: radial-gradient(circle, rgba(64, 202, 231, 0.15), transparent 65%);
    pointer-events: none;
}

.tarot-suit-directory figure {
    width: min(154px, 68%);
    aspect-ratio: 4 / 7;
    margin: 0 auto 28px;
    transform: rotate(-4deg);
    filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5));
    transition: transform 300ms ease;
}

.tarot-suit-directory img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.tarot-suit-directory a > span { color: var(--tarot-guide-gold); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.tarot-suit-directory h3 { margin: 8px 0 6px; font-size: clamp(1.65rem, 2.7vw, 2.5rem); letter-spacing: -0.04em; }
.tarot-suit-directory p { min-height: 48px; margin: 0; color: rgba(255, 255, 255, 0.58); line-height: 1.5; }
.tarot-suit-directory strong { display: block; margin-top: 22px; color: #fff; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.tarot-suit-directory a:hover { transform: translateY(-7px); border-color: rgba(212, 175, 55, 0.46); box-shadow: 0 26px 64px rgba(0, 0, 0, 0.35); }
.tarot-suit-directory a:hover figure { transform: rotate(0deg) translateY(-5px); }

.tarot-suit-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(440px, 1.12fr);
    align-items: center;
    gap: 40px;
    min-height: 650px;
    padding: 48px 0 70px;
}

.tarot-suit-hero h1 {
    margin: 12px 0 24px;
    font-size: clamp(5rem, 10vw, 10rem);
    line-height: 0.82;
    letter-spacing: -0.085em;
}

.tarot-suit-hero p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.75;
}

.tarot-suit-hero > div > a {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin-top: 34px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tarot-suit-hero figure { position: relative; min-height: 560px; }
.tarot-suit-hero figure::before { content: ''; position: absolute; inset: 5% 0; border: 1px solid rgba(77, 202, 232, 0.16); border-radius: 50%; transform: rotate(-12deg); box-shadow: 0 0 90px rgba(77, 202, 232, 0.08); }
.tarot-suit-hero img { position: absolute; top: 50%; left: 50%; width: min(245px, 38%); border-radius: 12px; box-shadow: 0 34px 72px rgba(0, 0, 0, 0.56); }
.tarot-suit-hero img:nth-child(1) { transform: translate(-112%, -46%) rotate(-16deg); }
.tarot-suit-hero img:nth-child(2) { z-index: 2; transform: translate(-50%, -54%) rotate(-1deg); }
.tarot-suit-hero img:nth-child(3) { transform: translate(14%, -45%) rotate(14deg); }

.tarot-library-index {
    padding: clamp(78px, 10vw, 145px) 0;
}

.tarot-library-index > header {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(320px, 0.6fr);
    column-gap: 70px;
    align-items: end;
    margin-bottom: 54px;
}

.tarot-library-index > header > span {
    grid-column: 1 / -1;
}

.tarot-library-index h2 {
    margin: 14px 0 0;
    font-size: clamp(3.7rem, 7vw, 7.2rem);
    line-height: 0.86;
    letter-spacing: -0.075em;
}

.tarot-library-index > header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.7;
}

.tarot-library-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(34px, 5vw, 86px);
    border-top: 1px solid var(--tarot-guide-line);
}

.tarot-library-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    min-height: 245px;
    padding: 28px 0;
    border-bottom: 1px solid var(--tarot-guide-line);
    color: #fff;
    text-decoration: none;
}

.tarot-library-item figure {
    position: relative;
    width: 112px;
    aspect-ratio: 4 / 7;
    margin: 0;
    overflow: hidden;
    border-radius: 7px;
    background: #101522;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.42);
    transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 350ms ease;
}

.tarot-library-item figure::after {
    position: absolute;
    inset: 0;
    content: "";
    border: 1px solid rgba(255, 235, 165, 0.25);
    border-radius: inherit;
}

.tarot-library-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tarot-library-item > div > span {
    color: var(--tarot-guide-gold);
    font-family: Georgia, serif;
    font-size: 0.86rem;
}

.tarot-library-item h3 {
    margin: 7px 0 10px;
    font-size: clamp(1.65rem, 2.4vw, 2.55rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.tarot-library-item p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.88rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.tarot-library-item strong {
    display: inline-flex;
    gap: 9px;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tarot-library-item strong i {
    color: var(--tarot-guide-gold);
    font-style: normal;
    transition: transform 180ms ease;
}

.tarot-library-item:hover figure {
    transform: translateY(-8px) rotate(-2deg);
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.58), 0 0 34px rgba(218, 180, 52, 0.11);
}

.tarot-library-item:hover strong i {
    transform: translate(4px, -4px);
}

.tarot-card-hero {
    display: grid;
    grid-template-columns: minmax(410px, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(50px, 8vw, 130px);
    align-items: center;
    min-height: min(900px, calc(100svh - 110px));
    padding: 52px 0 90px;
    border-bottom: 1px solid var(--tarot-guide-line);
}

.tarot-card-image-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 690px;
    perspective: 1200px;
}

.tarot-card-image-stage::before {
    position: absolute;
    inset: 14% 0;
    content: "";
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 150, 174, 0.25), rgba(218, 180, 52, 0.08) 35%, transparent 70%);
    filter: blur(18px);
}

.tarot-card-image-stage figure {
    position: relative;
    z-index: 2;
    width: min(360px, 70%);
    aspect-ratio: 4 / 7;
    margin: 0;
    transform: rotateY(-4deg) rotateX(1deg);
    animation: tarotGuideSingleCard 5.5s ease-in-out infinite;
}

.tarot-card-image-stage figure::before,
.tarot-card-image-stage figure::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.tarot-card-image-stage figure::before {
    inset: -2px;
    z-index: 2;
    border: 1px solid rgba(255, 240, 178, 0.42);
    border-radius: 15px;
    box-shadow: inset 0 0 30px rgba(255, 222, 104, 0.08), 0 35px 85px rgba(0, 0, 0, 0.68);
}

.tarot-card-image-stage figure::after {
    inset: 8% -18% -8%;
    z-index: -1;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.74);
    filter: blur(30px);
}

.tarot-card-image-stage img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 13px;
    object-fit: cover;
}

.tarot-card-image-stage > i {
    position: absolute;
    right: 3%;
    bottom: 12%;
    color: rgba(255, 255, 255, 0.09);
    font-family: Georgia, serif;
    font-size: clamp(6rem, 11vw, 11rem);
    font-style: normal;
    line-height: 1;
}

.tarot-card-orbit {
    position: absolute;
    inset: 12% -4%;
    border: 1px solid rgba(218, 180, 52, 0.2);
    border-radius: 50%;
    transform: rotateX(72deg) rotateZ(-9deg);
    box-shadow: 0 0 54px rgba(218, 180, 52, 0.08);
}

.tarot-card-orbit::before,
.tarot-card-orbit::after {
    position: absolute;
    width: 8px;
    height: 8px;
    content: "";
    border-radius: 50%;
    background: var(--tarot-guide-gold);
    box-shadow: 0 0 18px rgba(218, 180, 52, 0.85);
}

.tarot-card-orbit::before { top: 24%; left: 5%; }
.tarot-card-orbit::after { right: 8%; bottom: 20%; background: var(--tarot-guide-blue); }

.tarot-card-hero-copy {
    position: relative;
    z-index: 3;
}

.tarot-card-hero-copy h1 {
    max-width: 820px;
    margin: 18px 0 28px;
    font-size: clamp(5rem, 9.2vw, 10rem);
    line-height: 0.78;
    letter-spacing: -0.09em;
    word-spacing: 0.08em;
    text-wrap: balance;
}

.tarot-card-hero-copy > p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1.08rem, 1.6vw, 1.38rem);
    line-height: 1.7;
}

.tarot-card-hero-copy ul {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.tarot-card-hero-copy li {
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 0.78rem;
}

.tarot-card-hero-copy > a span {
    color: var(--tarot-guide-gold);
}

.tarot-card-reading {
    display: grid;
    grid-template-columns: 260px minmax(0, 760px);
    justify-content: space-between;
    gap: clamp(60px, 10vw, 150px);
    padding: clamp(85px, 11vw, 150px) 0;
}

.tarot-card-reading aside {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 17px;
    align-self: start;
    padding-top: 8px;
}

.tarot-card-reading aside strong {
    color: rgba(255, 255, 255, 0.83);
    font-size: 1.02rem;
    line-height: 1.6;
}

.tarot-card-reading aside small {
    padding-top: 20px;
    border-top: 1px solid var(--tarot-guide-line);
    color: rgba(255, 255, 255, 0.43);
    line-height: 1.55;
}

.tarot-card-prose {
    display: grid;
    gap: 88px;
}

.tarot-card-prose section {
    scroll-margin-top: 40px;
}

.tarot-card-prose h2 {
    margin: 14px 0 24px;
    font-size: clamp(2.6rem, 5vw, 5rem);
    line-height: 0.9;
    letter-spacing: -0.065em;
    text-wrap: balance;
}

.tarot-card-prose p,
.tarot-card-faq p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.08rem;
    line-height: 1.8;
}

.tarot-orientation-readings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 10px 0 24px;
    border-block: 1px solid var(--tarot-guide-line);
}

.tarot-orientation-readings > div {
    padding: 28px 26px 24px 0;
}

.tarot-orientation-readings > div + div {
    padding-left: 26px;
    border-left: 1px solid var(--tarot-guide-line);
}

.tarot-orientation-readings strong {
    display: block;
    margin-bottom: 14px;
    color: var(--tarot-guide-gold);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tarot-orientation-readings p {
    margin: 0;
    font-size: 1rem;
}

.tarot-reading-note {
    padding-left: 20px;
    border-left: 2px solid rgba(218, 180, 52, 0.55);
    color: rgba(255, 255, 255, 0.52) !important;
    font-size: 0.96rem !important;
}

.tarot-reflection-section blockquote {
    margin: 36px 0 0;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgba(218, 180, 52, 0.24);
    border-radius: 2px;
    background: linear-gradient(135deg, rgba(218, 180, 52, 0.08), rgba(52, 130, 151, 0.08));
    color: #fff;
    font-family: Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 2.7rem);
    line-height: 1.32;
}

.tarot-reflection-section blockquote small {
    display: block;
    margin-bottom: 18px;
    color: var(--tarot-guide-gold);
    font-family: "Outfit", sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.tarot-card-faq {
    width: min(900px, 100%);
    margin-left: auto;
    padding: 20px 0 clamp(90px, 11vw, 150px);
}

.tarot-card-faq header,
.tarot-related-cards header {
    margin-bottom: 24px;
}

.tarot-card-faq details {
    border-top: 1px solid var(--tarot-guide-line);
}

.tarot-card-faq details:last-child {
    border-bottom: 1px solid var(--tarot-guide-line);
}

.tarot-card-faq summary {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 24px 0;
    cursor: pointer;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 700;
    list-style: none;
}

.tarot-card-faq summary::-webkit-details-marker { display: none; }
.tarot-card-faq summary i { color: var(--tarot-guide-gold); font-style: normal; transition: transform 220ms ease; }
.tarot-card-faq details[open] summary i { transform: rotate(45deg); }
.tarot-card-faq p { max-width: 720px; padding: 0 50px 22px 0; }

.tarot-related-cards {
    padding: clamp(60px, 8vw, 100px) 0;
    border-top: 1px solid var(--tarot-guide-line);
}

.tarot-related-cards > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 4vw, 50px);
}

.tarot-related-cards a {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 22px 0;
    border-block: 1px solid var(--tarot-guide-line);
    color: #fff;
    text-decoration: none;
}

.tarot-related-cards img {
    width: 92px;
    aspect-ratio: 4 / 7;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5);
    transition: transform 260ms ease;
}

.tarot-related-cards a span {
    position: absolute;
    top: 26px;
    left: 112px;
    color: var(--tarot-guide-gold);
    font-family: Georgia, serif;
    font-size: 0.74rem;
}

.tarot-related-cards strong {
    padding-top: 20px;
    font-size: clamp(1.25rem, 2vw, 1.9rem);
    line-height: 1;
}

.tarot-related-cards a:hover img {
    transform: translateY(-6px) rotate(-2deg);
}

.tarot-guide-cta {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: end;
    padding: clamp(55px, 8vw, 100px) 0;
    border-top: 1px solid rgba(218, 180, 52, 0.24);
}

.tarot-guide-cta h2 {
    max-width: 780px;
    margin: 13px 0 0;
    font-size: clamp(3.2rem, 6vw, 7rem);
    line-height: 0.85;
    letter-spacing: -0.075em;
}

.tarot-guide-cta > a {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    min-height: 58px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--tarot-guide-gold);
    color: #090a10;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

@keyframes tarotGuideCardLeft {
    0%, 100% { transform: translate(-115%, -45%) rotate(-17deg) translateZ(-40px); }
    50% { transform: translate(-115%, -48%) rotate(-15deg) translateZ(-20px); }
}

@keyframes tarotGuideCardCenter {
    0%, 100% { transform: translate(-50%, -55%) translateZ(80px); }
    50% { transform: translate(-50%, -59%) translateZ(100px); }
}

@keyframes tarotGuideCardRight {
    0%, 100% { transform: translate(15%, -44%) rotate(17deg) translateZ(-30px); }
    50% { transform: translate(15%, -48%) rotate(15deg) translateZ(-10px); }
}

@keyframes tarotGuideSingleCard {
    0%, 100% { transform: translateY(0) rotateY(-4deg) rotateX(1deg); }
    50% { transform: translateY(-12px) rotateY(1deg) rotateX(0); }
}

@keyframes tarotGuideHalo {
    0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(0.88); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

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

@media (max-width: 1020px) {
    .tarot-library-hero { grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr); }
    .tarot-library-deck { min-height: 560px; }
    .tarot-card-hero { grid-template-columns: minmax(330px, 0.8fr) minmax(0, 1.2fr); }
    .tarot-card-image-stage { min-height: 590px; }
    .tarot-related-cards > div { grid-template-columns: 1fr; }
    .tarot-suit-directory > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tarot-suit-hero { grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr); }
}

@media (max-width: 820px) {
    .tarot-guide-header,
    .tarot-library-main,
    .tarot-card-main { width: min(100% - 28px, 1320px); }

    .tarot-guide-header {
        display: flex;
        gap: 8px;
        align-items: center;
        width: calc(100% - 28px);
        max-width: calc(100% - 28px);
    }

    .tarot-guide-header .logo {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        font-size: clamp(1rem, 5.3vw, 1.35rem);
        text-overflow: ellipsis;
    }

    .tarot-guide-header .header-quick-actions {
        display: grid;
        grid-template-columns: 44px 44px;
        flex: 0 0 96px;
        width: 96px;
        min-width: 96px;
        max-width: 96px;
        margin-left: auto;
    }

    .tarot-guide-header .auth-nav-slot--desktop { display: none !important; }

    .tarot-guide-header .mobile-menu-toggle {
        display: grid !important;
        flex: 0 0 44px;
    }

    .tarot-guide-header .header-actions {
        right: 0;
        max-width: min(284px, calc(100vw - 28px));
    }

    .tarot-library-main,
    .tarot-card-main { padding-top: 28px; }

    .tarot-guide-breadcrumb {
        overflow: hidden;
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .tarot-guide-breadcrumb span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tarot-library-hero,
    .tarot-card-hero,
    .tarot-suit-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .tarot-suit-hero { padding: 72px 0 58px; }
    .tarot-suit-hero h1 { font-size: clamp(4.5rem, 20vw, 7rem); }
    .tarot-suit-hero figure { min-height: 500px; margin-inline: -18px; }

    .tarot-library-hero { padding: 74px 0 54px; }
    .tarot-library-copy h1 { font-size: clamp(3.6rem, 16vw, 6.4rem); }
    .tarot-library-deck { min-height: 520px; margin-inline: -14px; }
    .tarot-library-deck img { width: min(46vw, 210px); }

    .tarot-library-index > header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tarot-library-list { grid-template-columns: 1fr; }
    .tarot-suit-directory > div { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tarot-suit-directory a { min-height: 350px; padding: 18px; border-radius: 24px; }
    .tarot-suit-directory figure { width: min(126px, 80%); margin-bottom: 20px; }
    .tarot-suit-directory p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 0.82rem; }
    .tarot-library-item { grid-template-columns: 104px minmax(0, 1fr); min-height: 220px; }
    .tarot-library-item figure { width: 104px; }

    .tarot-card-hero {
        padding: 58px 0 65px;
    }

    .tarot-card-image-stage {
        min-height: 520px;
        order: 2;
    }

    .tarot-card-image-stage figure { width: min(280px, 68vw); }
    .tarot-card-hero-copy { order: 1; }
    .tarot-card-hero-copy h1 { font-size: clamp(4.2rem, 19vw, 7rem); }

    .tarot-card-reading {
        grid-template-columns: 1fr;
        gap: 55px;
        padding: 72px 0;
    }

    .tarot-card-reading aside {
        position: relative;
        top: auto;
        grid-template-columns: 1fr;
    }

    .tarot-card-prose { gap: 64px; }
    .tarot-orientation-readings { grid-template-columns: 1fr; }
    .tarot-orientation-readings > div { padding: 24px 0; }
    .tarot-orientation-readings > div + div { padding-left: 0; border-top: 1px solid var(--tarot-guide-line); border-left: 0; }
    .tarot-related-cards { padding: 58px 0 68px; }
    .tarot-related-cards > div {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(148px, 38vw);
        gap: 12px;
        margin-inline: -14px;
        padding: 4px 14px 18px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: none;
    }
    .tarot-related-cards > div::-webkit-scrollbar { display: none; }
    .tarot-related-cards a {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        min-height: 0;
        padding: 10px 10px 15px;
        overflow: hidden;
        border: 1px solid rgba(218, 180, 52, 0.16);
        border-radius: 20px;
        background: linear-gradient(160deg, rgba(19, 23, 38, 0.92), rgba(5, 8, 17, 0.97));
        scroll-snap-align: start;
    }
    .tarot-related-cards img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 7;
        border-radius: 12px;
        object-fit: cover;
        box-shadow: 0 16px 28px rgba(0, 0, 0, 0.42);
    }
    .tarot-related-cards a span {
        position: static;
        display: inline-flex;
        align-self: flex-start;
        margin-top: 12px;
        padding: 4px 8px;
        border: 1px solid rgba(218, 180, 52, 0.22);
        border-radius: 999px;
        background: rgba(218, 180, 52, 0.08);
    }
    .tarot-related-cards strong {
        padding-top: 9px;
        font-size: 1rem;
        line-height: 1.15;
    }
    .tarot-guide-cta { display: grid; align-items: start; }
    .tarot-guide-cta > a { justify-content: center; width: 100%; }
}

@media (max-width: 480px) {
    .tarot-library-deck { min-height: 430px; }
    .tarot-library-deck img { width: min(47vw, 180px); }
    .tarot-library-item { grid-template-columns: 88px minmax(0, 1fr); gap: 17px; min-height: 196px; }
    .tarot-library-item figure { width: 88px; }
    .tarot-library-item p { -webkit-line-clamp: 2; }
    .tarot-card-image-stage { min-height: 460px; }
    .tarot-card-prose h2 { font-size: clamp(2.45rem, 12vw, 3.7rem); }
    .tarot-related-cards > div { grid-auto-columns: 142px; }
    .tarot-suit-directory > div { grid-template-columns: 1fr; }
    .tarot-suit-directory a { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 18px; min-height: 210px; }
    .tarot-suit-directory figure { grid-row: 1 / span 5; width: 104px; margin: 0; }
    .tarot-suit-directory a > span { align-self: end; }
    .tarot-suit-directory h3 { margin: 4px 0; }
    .tarot-suit-directory strong { margin-top: 10px; }
    .tarot-suit-hero figure { min-height: 410px; }
    .tarot-suit-hero img { width: min(190px, 43%); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .tarot-library-deck img,
    .tarot-library-deck > span,
    .tarot-card-image-stage figure,
    .tarot-library-copy > a i { animation: none; }
}
