:root {
    --div-ink: #12110f;
    --div-charcoal: #1c1b18;
    --div-forest: #183128;
    --div-oxblood: #642c32;
    --div-gold: #c9a64a;
    --div-gold-soft: #e3cf91;
    --div-ivory: #f3efe4;
    --div-smoke: #b8b1a2;
}

.divination-page {
    background: var(--div-ink);
    color: var(--div-ivory);
}

.divination-page .site-nav {
    background: rgba(18, 17, 15, .96);
    border-bottom-color: rgba(227, 207, 145, .2);
}

.divination-page .site-nav .navbar-brand,
.divination-page .site-nav .nav-link,
.divination-page .navbar-toggler {
    color: var(--div-ivory);
}

.divination-page .site-nav .btn-account {
    border-color: rgba(243, 239, 228, .5);
    background: transparent;
    color: var(--div-ivory);
}

.divination-page .site-nav .btn-account:hover,
.divination-page .site-nav .btn-account:focus-visible {
    border-color: var(--div-ivory);
    background: var(--div-ivory);
    color: var(--div-ink);
}

.divination-page .site-nav .nav-link:hover,
.divination-page .site-nav .nav-link.active {
    color: var(--div-gold-soft);
}

.divination-page .brand-mark {
    border-color: var(--div-gold);
    color: var(--div-gold-soft);
}

.divination-page .site-footer {
    background: #0b0b0a;
    border-top: 1px solid rgba(227, 207, 145, .18);
}

.divination-kicker {
    margin: 0 0 1rem;
    color: var(--div-gold-soft);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.section-number {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--div-smoke);
    font: 500 .78rem/1 Manrope, sans-serif;
}

.divination-hero {
    position: relative;
    min-height: min(760px, calc(100svh - 72px));
    overflow: hidden;
    background: var(--div-forest);
    border-bottom: 1px solid rgba(227, 207, 145, .24);
}

.divination-stars {
    position: absolute;
    inset: 0;
    opacity: .28;
    background-image: url('../images/tarot/rws1909/back.jpg');
    background-size: 360px auto;
    background-position: calc(100% + 150px) center;
    background-repeat: no-repeat;
    filter: saturate(.45) contrast(1.1);
}

.divination-stars::after {
    position: absolute;
    inset: 0;
    content: '';
    background: rgba(10, 18, 15, .46);
}

.divination-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: inherit;
    flex-direction: column;
    justify-content: center;
    padding-top: 5rem;
    padding-bottom: 7rem;
}

.divination-hero h1 {
    max-width: 800px;
    margin: 0 0 1.5rem;
    color: var(--div-ivory);
    font: 400 clamp(3.2rem, 8vw, 7.4rem)/.92 'Bodoni Moda', serif;
    letter-spacing: 0;
}

.divination-lead {
    max-width: 610px;
    margin-bottom: 2rem;
    color: #ddd7c8;
    font-size: 1.08rem;
    line-height: 1.8;
}

.btn-ritual,
.btn-ritual-ghost {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    border-radius: 2px;
    padding: .8rem 1.25rem;
    font-weight: 700;
}

.btn-ritual {
    border: 1px solid var(--div-gold);
    background: var(--div-gold);
    color: #15130e;
}

.btn-ritual:hover,
.btn-ritual:focus-visible {
    border-color: var(--div-gold-soft);
    background: var(--div-gold-soft);
    color: #15130e;
}

.btn-ritual-ghost {
    border: 1px solid rgba(243, 239, 228, .45);
    background: transparent;
    color: var(--div-ivory);
}

.btn-ritual-ghost:hover,
.btn-ritual-ghost:focus-visible {
    border-color: var(--div-ivory);
    color: var(--div-ivory);
}

.hero-card-constellation {
    position: absolute;
    right: 2%;
    bottom: -11%;
    display: flex;
    width: min(48vw, 650px);
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
}

.hero-card-constellation img {
    width: 30%;
    aspect-ratio: 520 / 900;
    border: 1px solid rgba(227, 207, 145, .6);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .42);
    object-fit: cover;
}

.hero-card-constellation img:nth-child(1) { transform: rotate(-13deg) translate(24%, 8%); }
.hero-card-constellation img:nth-child(2) { z-index: 2; transform: translateY(-8%); }
.hero-card-constellation img:nth-child(3) { transform: rotate(12deg) translate(-24%, 8%); }

.daily-band {
    background: var(--div-ivory);
    color: var(--div-ink);
}

.daily-band-grid {
    display: grid;
    min-height: 680px;
    grid-template-columns: minmax(240px, 430px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(3rem, 9vw, 9rem);
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.daily-card-back {
    position: relative;
    width: min(100%, 340px);
    margin: 0 auto;
}

.daily-card-back::before,
.daily-card-back::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 1px solid rgba(100, 44, 50, .55);
    content: '';
}

.daily-card-back::before { transform: rotate(-6deg); }
.daily-card-back::after { transform: rotate(5deg); }

.daily-card-back img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    aspect-ratio: 520 / 900;
    border: 1px solid var(--div-oxblood);
    object-fit: cover;
    box-shadow: 0 30px 70px rgba(44, 35, 25, .24);
}

.daily-copy h2,
.reading-band h2,
.special-reading-band h2,
.result-actions-band h2 {
    margin: 0 0 1.3rem;
    font: 400 clamp(2.5rem, 5vw, 4.6rem)/1.05 'Bodoni Moda', serif;
    letter-spacing: 0;
}

.daily-copy > p:not(.divination-kicker) {
    max-width: 570px;
    color: #5d584f;
    font-size: 1.05rem;
    line-height: 1.8;
}

.daily-copy .divination-kicker { color: var(--div-oxblood); }

.daily-status-line {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 2rem 0 1rem;
    color: #3d3a34;
    font-weight: 600;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2f7453;
    box-shadow: 0 0 0 5px rgba(47, 116, 83, .13);
}

.status-dot.is-used { background: var(--div-oxblood); box-shadow: 0 0 0 5px rgba(100, 44, 50, .12); }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    border-bottom: 1px solid var(--div-ink);
    color: var(--div-ink);
    font-weight: 700;
    text-decoration: none;
}

.reading-band {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: var(--div-charcoal);
}

.reading-band-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 4rem;
    align-items: end;
    margin-bottom: 4rem;
}

.reading-band-heading > p {
    max-width: 520px;
    color: var(--div-smoke);
    line-height: 1.8;
}

.spread-list { border-top: 1px solid rgba(227, 207, 145, .25); }

.spread-row {
    display: grid;
    min-height: 170px;
    grid-template-columns: 55px 70px minmax(0, 1fr) 150px 52px;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(227, 207, 145, .25);
    transition: background-color .25s ease;
}

.spread-row:hover { background: rgba(243, 239, 228, .035); }
.spread-index { color: var(--div-smoke); font-size: .78rem; }
.spread-symbol { color: var(--div-gold); font-size: 1.7rem; }
.spread-copy p { margin: 0 0 .35rem; color: var(--div-gold-soft); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.spread-copy h3 { margin: 0 0 .5rem; font: 400 2rem/1.1 'Bodoni Moda', serif; letter-spacing: 0; }
.spread-copy span { color: var(--div-smoke); }
.spread-meta { display: grid; gap: .35rem; color: #d8d1c3; font-size: .82rem; }
.spread-action { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(227, 207, 145, .4); color: var(--div-ivory); text-decoration: none; transition: .2s ease; }
.spread-action:hover { background: var(--div-gold); color: var(--div-ink); transform: translateX(4px); }

.special-reading-band {
    padding: 6rem 0;
    background: var(--div-oxblood);
}

.special-reading-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: end;
}

.special-reading-inner > div:last-child p { max-width: 550px; color: #f0dede; line-height: 1.8; }
.coming-label { display: inline-block; padding: .45rem .7rem; border: 1px solid rgba(255, 255, 255, .45); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.ritual-entry {
    position: relative;
    min-height: 900px;
    overflow: hidden;
    background: var(--div-ink);
}

.ritual-entry::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 8px;
    background: var(--div-oxblood);
    content: '';
}

.ritual-entry-inner { position: relative; z-index: 2; padding-top: 3rem; padding-bottom: 7rem; }
.ritual-back { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 4rem; color: var(--div-smoke); text-decoration: none; }
.ritual-back:hover { color: var(--div-ivory); }
.ritual-title-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 4rem; align-items: end; margin-bottom: 4rem; }
.ritual-title-row h1 { margin: 0 0 1rem; font: 400 clamp(3rem, 7vw, 6rem)/.95 'Bodoni Moda', serif; letter-spacing: 0; }
.ritual-title-row > div:first-child > p:last-child { max-width: 690px; color: var(--div-smoke); font-size: 1.05rem; line-height: 1.75; }
.ritual-price { padding-left: 1.5rem; border-left: 1px solid rgba(227, 207, 145, .35); }
.ritual-price span, .ritual-price small { display: block; color: var(--div-smoke); font-size: .8rem; }
.ritual-price strong { display: block; margin: .3rem 0; color: var(--div-gold-soft); font: 400 1.8rem/1.2 'Bodoni Moda', serif; }

.ritual-entry-visual { position: absolute; top: 110px; right: -100px; width: 420px; height: 560px; opacity: .12; pointer-events: none; }
.ritual-deck img { position: absolute; width: 230px; aspect-ratio: 520 / 900; object-fit: cover; }
.ritual-deck img:nth-child(1) { transform: rotate(-24deg) translate(-50px, 80px); }
.ritual-deck img:nth-child(2) { transform: rotate(-8deg) translate(30px, 20px); }
.ritual-deck img:nth-child(3) { transform: rotate(13deg) translate(90px, -20px); }

.ritual-question-form {
    width: min(100%, 900px);
    padding-top: 3rem;
    border-top: 1px solid rgba(227, 207, 145, .28);
}

.question-number { margin-bottom: 1rem; color: var(--div-gold); font-size: .75rem; }
.ritual-question-form > label { display: block; margin-bottom: .7rem; font: 400 clamp(2rem, 4vw, 3.4rem)/1.1 'Bodoni Moda', serif; }
.ritual-question-form > p { color: var(--div-smoke); }
.ritual-question-form textarea { width: 100%; margin-top: 1.5rem; border: 0; border-bottom: 1px solid rgba(227, 207, 145, .6); border-radius: 0; outline: 0; background: transparent; color: var(--div-ivory); font-size: 1.15rem; line-height: 1.8; resize: vertical; }
.ritual-question-form textarea:focus { border-color: var(--div-gold); }
.question-count { margin-top: .5rem; color: var(--div-smoke); text-align: right; font-size: .75rem; }

.position-preview { margin: 2.5rem 0; border-top: 1px solid rgba(227, 207, 145, .2); border-bottom: 1px solid rgba(227, 207, 145, .2); }
.position-preview summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-weight: 700; }
.position-preview ol { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; padding: 0 0 1.5rem 1.2rem; }
.position-preview li { padding-left: .4rem; color: var(--div-gold-soft); }
.position-preview li strong, .position-preview li span { display: block; }
.position-preview li span { margin-top: .25rem; color: var(--div-smoke); font-size: .85rem; line-height: 1.55; }

.ritual-consent { display: grid; gap: .9rem; margin: 2.5rem 0; padding: 1.5rem; border-left: 2px solid var(--div-gold); background: #171612; }
.ritual-consent label { display: flex; align-items: flex-start; gap: .8rem; color: #d8d1c3; line-height: 1.6; }
.ritual-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--div-gold); }
.ritual-consent details { color: var(--div-smoke); font-size: .85rem; }
.ritual-consent details summary { cursor: pointer; color: var(--div-gold-soft); }
.ritual-consent details p { margin: .8rem 0 0; line-height: 1.7; }
.ritual-submit { min-width: 250px; }
.ritual-final-note { margin-top: 1rem; font-size: .8rem; }
.ritual-unavailable, .history-empty { padding: 5rem 1rem; border-top: 1px solid rgba(227, 207, 145, .25); text-align: center; }
.ritual-unavailable i, .history-empty i { display: block; margin-bottom: 1rem; color: var(--div-gold); font-size: 2rem; }
.ritual-unavailable h2, .history-empty h2 { font: 400 2.5rem/1.1 'Bodoni Moda', serif; }
.ritual-unavailable p, .history-empty p { color: var(--div-smoke); }

.result-header { padding: 5rem 0 3rem; background: var(--div-forest); border-bottom: 1px solid rgba(227, 207, 145, .25); }
.result-header-row { display: flex; align-items: end; justify-content: space-between; gap: 3rem; }
.result-header h1 { margin: 0 0 1rem; font: 400 clamp(3rem, 7vw, 6.2rem)/.95 'Bodoni Moda', serif; letter-spacing: 0; }
.result-header-row > div:first-child > p:last-child { max-width: 700px; color: #c9c4b8; }
.result-progress { display: flex; align-items: baseline; gap: .35rem; color: var(--div-gold-soft); white-space: nowrap; }
.result-progress span { font: 400 3rem/1 'Bodoni Moda', serif; }
.result-progress small { color: #c9c4b8; }
.question-seal { max-width: 900px; margin-top: 3rem; padding: 1.5rem 0 0; border-top: 1px solid rgba(227, 207, 145, .25); }
.question-seal > span { color: var(--div-gold-soft); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.question-seal p { margin: .7rem 0; color: var(--div-ivory); font: 400 1.35rem/1.6 'Bodoni Moda', serif; }
.question-seal small { color: #aaa497; }

.reading-table-section { padding: clamp(4rem, 8vw, 8rem) 0; background: #10100e; }
.tarot-layout { position: relative; display: grid; width: 100%; align-items: start; justify-content: center; gap: clamp(.5rem, 1.4vw, 1.1rem); }
.tarot-layout-daily { grid-template-columns: minmax(170px, 250px); }
.tarot-layout-love, .tarot-layout-career { grid-template-columns: repeat(7, minmax(100px, 150px)); }
.tarot-layout-love .tarot-card-slot:nth-child(2), .tarot-layout-love .tarot-card-slot:nth-child(6), .tarot-layout-career .tarot-card-slot:nth-child(2), .tarot-layout-career .tarot-card-slot:nth-child(6) { margin-top: 2rem; }
.tarot-layout-love .tarot-card-slot:nth-child(3), .tarot-layout-love .tarot-card-slot:nth-child(5), .tarot-layout-career .tarot-card-slot:nth-child(3), .tarot-layout-career .tarot-card-slot:nth-child(5) { margin-top: 4rem; }
.tarot-layout-love .tarot-card-slot:nth-child(4), .tarot-layout-career .tarot-card-slot:nth-child(4) { margin-top: 6rem; }
.tarot-layout-fate { grid-template-columns: repeat(5, minmax(70px, 130px)); grid-template-rows: repeat(5, minmax(90px, 120px)); align-items: center; }
.tarot-layout-fate .tarot-card-slot { z-index: 2; }
.tarot-layout-fate .tarot-card-slot:nth-child(1) { grid-area: 1 / 3; }
.tarot-layout-fate .tarot-card-slot:nth-child(2) { grid-area: 2 / 5; }
.tarot-layout-fate .tarot-card-slot:nth-child(3) { grid-area: 4 / 5; }
.tarot-layout-fate .tarot-card-slot:nth-child(4) { grid-area: 3 / 3; }
.tarot-layout-fate .tarot-card-slot:nth-child(5) { grid-area: 5 / 3; }
.tarot-layout-fate .tarot-card-slot:nth-child(6) { grid-area: 4 / 1; }
.tarot-layout-fate .tarot-card-slot:nth-child(7) { grid-area: 2 / 1; }

.hexagram-lines, .hexagram-lines::before {
    position: absolute;
    inset: 7% 16%;
    z-index: 0;
    background: rgba(201, 166, 74, .1);
    clip-path: polygon(50% 0, 100% 88%, 0 88%);
    content: '';
}
.hexagram-lines::before { inset: 3px; background: #10100e; }
.hexagram-lines::after { position: absolute; inset: 0; background: rgba(201, 166, 74, .1); clip-path: polygon(0 12%, 100% 12%, 50% 100%); content: ''; }

.tarot-card-slot { position: relative; width: 100%; border: 0; background: transparent; color: var(--div-ivory); perspective: 1000px; }
.tarot-card-position { display: block; min-height: 42px; margin-bottom: .65rem; color: var(--div-smoke); font-size: .68rem; line-height: 1.35; text-align: center; }
.tarot-card-flip { position: relative; display: block; width: 100%; aspect-ratio: 520 / 900; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.tarot-card-face { position: absolute; inset: 0; overflow: hidden; border: 1px solid rgba(227, 207, 145, .55); backface-visibility: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.tarot-card-face img { width: 100%; height: 100%; object-fit: cover; }
.tarot-card-front { transform: rotateY(180deg); }
.tarot-card-slot.is-revealed .tarot-card-flip { transform: rotateY(180deg); }
.tarot-card-slot.is-revealed .tarot-card-face { box-shadow: 0 0 0 1px rgba(227,207,145,.2), 0 24px 55px rgba(0,0,0,.48); }
.tarot-card-slot:focus-visible { outline: 2px solid var(--div-gold); outline-offset: 6px; }
.is-reversed { transform: rotate(180deg); }
.reveal-control { display: grid; justify-items: center; gap: .8rem; margin-top: 5rem; text-align: center; }
.reveal-control p { margin: 0; color: var(--div-smoke); font-size: .8rem; }

.card-meanings-section { padding: 7rem 0; background: var(--div-ivory); color: var(--div-ink); }
.meaning-section-heading { margin-bottom: 3rem; }
.meaning-section-heading .divination-kicker { color: var(--div-oxblood); }
.meaning-section-heading h2 { font: 400 clamp(2.6rem, 5vw, 4.7rem)/1 'Bodoni Moda', serif; letter-spacing: 0; }
.meaning-list { border-top: 1px solid #cfc7b7; }
.meaning-row { display: grid; grid-template-columns: 90px minmax(180px, .7fr) minmax(0, 1.3fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; min-height: 235px; border-bottom: 1px solid #cfc7b7; opacity: .34; transition: opacity .5s ease; }
.meaning-row.is-revealed { opacity: 1; }
.meaning-card-mini img { width: 76px; aspect-ratio: 520 / 900; object-fit: cover; box-shadow: 0 12px 30px rgba(34,30,24,.18); }
.meaning-position > span { color: var(--div-oxblood); font-size: .75rem; }
.meaning-position h3 { margin: .6rem 0; font: 400 1.65rem/1.15 'Bodoni Moda', serif; letter-spacing: 0; }
.meaning-position p, .meaning-copy > p:last-child { color: #5f5a51; line-height: 1.7; }
.orientation-label { margin-bottom: .35rem; color: var(--div-oxblood); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.meaning-copy h4 { margin: 0 0 .65rem; font-size: 1.05rem; }

.result-actions-band { padding: 7rem 0; background: var(--div-oxblood); }
.result-actions-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 5rem; align-items: center; }
.result-actions-inner > div:first-child > p:last-child { max-width: 600px; color: #f0dede; }
.result-actions { display: grid; gap: .8rem; }
.share-canvas { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.share-preview { grid-column: 1 / -1; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.25); }
.share-preview img { display: block; width: min(100%, 540px); margin: 0 auto 1rem; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.share-preview .btn { display: flex; width: fit-content; margin: 0 auto; }

.history-header { padding: 6rem 0 4rem; background: var(--div-forest); border-bottom: 1px solid rgba(227,207,145,.25); }
.history-header h1 { margin: 0 0 1rem; font: 400 clamp(3rem, 7vw, 6rem)/1 'Bodoni Moda', serif; letter-spacing: 0; }
.history-header > .container > p:last-child { color: #c9c4b8; }
.history-list-section { min-height: 520px; padding: 5rem 0 7rem; }
.history-list { border-top: 1px solid rgba(227,207,145,.25); }
.history-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 2rem; align-items: center; min-height: 150px; border-bottom: 1px solid rgba(227,207,145,.25); }
.history-row.is-deleted { opacity: .45; }
.history-date { display: grid; justify-items: center; color: var(--div-smoke); }
.history-date strong { color: var(--div-ivory); font: 400 2.1rem/1 'Bodoni Moda', serif; }
.history-date span, .history-date small { font-size: .68rem; text-transform: uppercase; }
.history-row > div:nth-child(2) p { margin: 0 0 .25rem; color: var(--div-gold-soft); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.history-row h2 { margin: 0 0 .35rem; font: 400 1.8rem/1.2 'Bodoni Moda', serif; }
.history-row > div:nth-child(2) span { color: var(--div-smoke); font-size: .78rem; }
.history-actions { display: flex; align-items: center; gap: .5rem; }
.history-actions form { margin: 0; }
.history-actions .btn-link { color: #cf9ea3; text-decoration: none; }

@media (max-width: 991.98px) {
    .hero-card-constellation { right: -12%; width: 58vw; opacity: .7; }
    .daily-band-grid, .reading-band-heading, .special-reading-inner, .result-actions-inner { grid-template-columns: 1fr; }
    .daily-band-grid { gap: 4rem; }
    .spread-row { grid-template-columns: 40px 45px minmax(0,1fr) 50px; padding: 1.5rem 0; }
    .spread-meta { grid-column: 3; grid-row: 2; grid-template-columns: auto auto; justify-content: start; }
    .spread-action { grid-column: 4; grid-row: 1 / span 2; }
    .ritual-title-row { grid-template-columns: 1fr; gap: 2rem; }
    .ritual-price { max-width: 320px; }
    .tarot-layout-love, .tarot-layout-career { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
    .tarot-layout-love .tarot-card-slot:nth-child(n), .tarot-layout-career .tarot-card-slot:nth-child(n) { margin-top: 0; }
    .tarot-layout-fate { grid-template-columns: repeat(5, minmax(55px, 1fr)); grid-template-rows: repeat(5, 90px); }
}

@media (max-width: 767.98px) {
    .divination-hero { min-height: 720px; }
    .divination-hero-inner { justify-content: flex-start; padding-top: 5rem; }
    .divination-hero h1 { font-size: 3.6rem; }
    .hero-card-constellation { right: -18%; bottom: -3%; width: 92vw; opacity: .58; }
    .daily-band-grid { grid-template-columns: 1fr; }
    .daily-card-back { width: min(70vw, 300px); }
    .spread-row { grid-template-columns: 32px minmax(0,1fr) 46px; gap: 1rem; }
    .spread-symbol { display: none; }
    .spread-copy { grid-column: 2; }
    .spread-meta { grid-column: 2; }
    .spread-action { grid-column: 3; }
    .ritual-entry::before { width: 4px; }
    .ritual-entry-visual { display: none; }
    .position-preview ol { grid-template-columns: 1fr; }
    .tarot-layout-love, .tarot-layout-career { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .tarot-layout-fate { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); grid-template-rows: auto; }
    .tarot-layout-fate .tarot-card-slot:nth-child(n) { grid-area: auto; }
    .hexagram-lines { display: none; }
    .result-header-row { align-items: flex-start; flex-direction: column; }
    .meaning-row { grid-template-columns: 62px minmax(0, 1fr); gap: 1rem; padding: 1.5rem 0; }
    .meaning-card-mini img { width: 54px; }
    .meaning-copy { grid-column: 2; }
    .history-row { grid-template-columns: 60px minmax(0,1fr); padding: 1.5rem 0; }
    .history-actions { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
    .tarot-card-flip, .spread-action, .meaning-row { transition: none; }
    .hero-card-constellation img { transform: none !important; }
}

/* Ritual motion layer */
.divination-hero {
    --div-pointer-x: 0px;
    --div-pointer-y: 0px;
    --div-tilt: 0deg;
}

.hero-card-constellation {
    transform: translate3d(var(--div-pointer-x), var(--div-pointer-y), 0) rotate(var(--div-tilt));
    transform-origin: 50% 70%;
    transition: transform 520ms cubic-bezier(.2, .75, .2, 1);
    will-change: transform;
}

.hero-card-constellation::after {
    position: absolute;
    right: 12%;
    bottom: -8%;
    left: 12%;
    height: 1px;
    background: rgba(227, 207, 145, .38);
    content: "";
    transform: scaleX(.35);
    animation: constellationLine 5.4s ease-in-out infinite;
}

.hero-card-constellation img {
    transition: filter 420ms ease, box-shadow 420ms ease;
}

.divination-hero:hover .hero-card-constellation img {
    filter: saturate(1.06) contrast(1.03);
    box-shadow: 0 34px 70px rgba(0, 0, 0, .5), 0 0 0 1px rgba(227, 207, 145, .28);
}

@keyframes constellationLine {
    50% { opacity: .32; transform: scaleX(1); }
}

.daily-card-back {
    transform: perspective(1000px) rotateX(var(--daily-tilt-x, 0deg)) rotateY(var(--daily-tilt-y, 0deg)) translateY(0);
    transform-style: preserve-3d;
    transition: transform 380ms cubic-bezier(.2, .75, .2, 1), filter 380ms ease;
    will-change: transform;
}

.daily-card-back:hover {
    filter: saturate(1.08) contrast(1.03);
    transform: perspective(1000px) rotateX(var(--daily-tilt-x, 0deg)) rotateY(var(--daily-tilt-y, 0deg)) translateY(-12px);
}

.ritual-deck {
    animation: ritualDeckDrift 7s ease-in-out infinite;
}

@keyframes ritualDeckDrift {
    50% { transform: translate3d(-12px, 15px, 0) rotate(-1.5deg); }
}

.ritual-question-form textarea {
    transition: border-color 260ms ease, box-shadow 260ms ease;
}

.ritual-question-form textarea:focus {
    box-shadow: 0 14px 0 -13px rgba(227, 207, 145, .48);
}

.ritual-transition {
    position: fixed;
    z-index: 1800;
    inset: 0;
    display: grid;
    overflow: hidden;
    place-items: center;
    background: #0b1411;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 420ms ease, transform 620ms cubic-bezier(.2, .75, .2, 1), visibility 0s linear 620ms;
    visibility: hidden;
}

.ritual-transition::before,
.ritual-transition::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.ritual-transition::before {
    inset: 26px;
    border: 1px solid rgba(227, 207, 145, .3);
    transform: scale(.96);
    transition: transform 900ms cubic-bezier(.2, .75, .2, 1);
}

.ritual-transition::after {
    top: 26px;
    bottom: 26px;
    left: 50%;
    width: 1px;
    background: rgba(227, 207, 145, .18);
    transform: scaleY(0);
    transform-origin: center top;
}

.ritual-transition.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
    visibility: visible;
}

.ritual-transition.is-active::before {
    transform: scale(1);
}

.ritual-transition.is-active::after {
    animation: ritualAxis 2.8s cubic-bezier(.2, .75, .2, 1) both;
}

.ritual-transition-inner {
    position: relative;
    z-index: 2;
    display: grid;
    width: min(100% - 48px, 560px);
    justify-items: center;
    text-align: center;
}

.ritual-transition-inner .divination-kicker {
    margin-bottom: 2rem;
}

.ritual-shuffle-deck {
    position: relative;
    width: 176px;
    height: 304px;
    margin: 0 auto 2.2rem;
    perspective: 1200px;
}

.ritual-shuffle-deck img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(227, 207, 145, .58);
    object-fit: cover;
    box-shadow: 0 34px 80px rgba(0, 0, 0, .52);
    transform-origin: center bottom;
}

.ritual-transition.is-active .ritual-shuffle-deck img:nth-child(1) { animation: ritualShuffleLeft 720ms ease-in-out 80ms 3 alternate; }
.ritual-transition.is-active .ritual-shuffle-deck img:nth-child(2) { animation: ritualShuffleRight 760ms ease-in-out 140ms 3 alternate; }
.ritual-transition.is-active .ritual-shuffle-deck img:nth-child(3) { animation: ritualShuffleCenter 680ms ease-in-out 40ms 3 alternate; }
.ritual-transition.is-active .ritual-shuffle-deck img:nth-child(4) { animation: ritualShuffleLeft 800ms ease-in-out 200ms 3 alternate-reverse; }
.ritual-transition.is-active .ritual-shuffle-deck img:nth-child(5) { animation: ritualShuffleRight 700ms ease-in-out 230ms 3 alternate-reverse; }

.ritual-transition.is-sealed .ritual-shuffle-deck img {
    animation: ritualSeal 720ms cubic-bezier(.2, .75, .2, 1) both !important;
}

.ritual-transition.is-drawing .ritual-shuffle-deck img:not(:nth-child(3)) {
    opacity: .12;
    transition: opacity 520ms ease;
}

.ritual-transition.is-drawing .ritual-shuffle-deck img:nth-child(3) {
    animation: ritualDrawCard 900ms cubic-bezier(.2, .75, .2, 1) both !important;
}

.ritual-transition-phase {
    min-height: 34px;
    margin: 0;
    color: var(--div-ivory);
    font: 400 clamp(1.7rem, 4vw, 2.5rem)/1.15 'Bodoni Moda', serif;
}

.ritual-transition-progress {
    display: block;
    width: min(280px, 70vw);
    height: 1px;
    margin-top: 1.4rem;
    overflow: hidden;
    background: rgba(227, 207, 145, .2);
}

.ritual-transition-progress i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--div-gold-soft);
    transform: scaleX(0);
    transform-origin: left center;
}

.ritual-transition.is-active .ritual-transition-progress i {
    animation: ritualProgress 3.05s linear both;
}

.ritual-transition-active {
    overflow: hidden;
}

@keyframes ritualAxis {
    0% { opacity: 0; transform: scaleY(0); }
    35%, 70% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(1); }
}

@keyframes ritualShuffleLeft {
    to { transform: translate3d(-70px, -10px, 18px) rotate(-8deg); }
}

@keyframes ritualShuffleRight {
    to { transform: translate3d(70px, 8px, 12px) rotate(8deg); }
}

@keyframes ritualShuffleCenter {
    to { transform: translate3d(0, -32px, 34px) rotateX(3deg); }
}

@keyframes ritualSeal {
    to { transform: translate3d(0, 0, 0) rotate(0); }
}

@keyframes ritualDrawCard {
    0% { transform: translate3d(0, 0, 0) rotate(0); }
    55% { transform: translate3d(0, -80px, 80px) rotate(1deg); }
    100% { transform: translate3d(0, -40px, 120px) rotateY(90deg) scale(1.08); }
}

@keyframes ritualProgress {
    to { transform: scaleX(1); }
}

.reading-table-section {
    position: relative;
    isolation: isolate;
}

.reading-table-section > .container {
    position: relative;
    z-index: 3;
}

.reading-focus-veil {
    position: absolute;
    z-index: 2;
    inset: 0;
    background: rgba(5, 8, 7, .72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 420ms ease;
}

.reading-table-section.has-card-focus .reading-focus-veil {
    opacity: 1;
}

.reading-deal-origin {
    display: grid;
    width: 96px;
    gap: .75rem;
    justify-items: center;
    margin: 0 auto 3rem;
    color: var(--div-smoke);
    font-size: .66rem;
    text-transform: uppercase;
    transition: opacity 520ms ease, transform 720ms cubic-bezier(.2, .75, .2, 1), height 520ms ease, margin 520ms ease;
}

.reading-deal-origin img {
    width: 74px;
    aspect-ratio: 520 / 900;
    border: 1px solid rgba(227, 207, 145, .52);
    object-fit: cover;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .38);
}

.reading-deal-origin.is-active img {
    animation: dealOriginPulse 1.5s ease-in-out infinite;
}

.reading-deal-origin.is-finished {
    height: 0;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(-28px) scale(.8);
}

@keyframes dealOriginPulse {
    50% { transform: translateY(-8px); box-shadow: 0 28px 55px rgba(0, 0, 0, .52), 0 0 0 1px rgba(227, 207, 145, .2); }
}

.divination-motion-ready .tarot-card-slot:not(.is-dealt) {
    opacity: 0;
    transform: translate3d(0, -64px, 0) scale(.72);
}

.tarot-card-slot {
    transition: opacity 720ms ease, transform 920ms cubic-bezier(.2, .75, .2, 1), filter 420ms ease;
    will-change: opacity, transform;
}

.tarot-card-slot.is-dealt {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.tarot-card-slot.is-next:not(.is-revealed) {
    animation: ritualCardAwait 2.8s ease-in-out infinite;
}

.tarot-card-slot.is-revealing {
    z-index: 8;
    animation: ritualCardLift 1.12s cubic-bezier(.2, .75, .2, 1) both;
}

.reading-table-section.has-card-focus .tarot-card-slot:not(.is-revealing) {
    opacity: .24;
    filter: saturate(.45);
}

.tarot-card-flip {
    transition: transform 1.04s cubic-bezier(.2, .72, .18, 1), filter 420ms ease;
}

.tarot-card-slot.is-revealing .tarot-card-flip,
.tarot-card-slot.is-revealed .tarot-card-flip {
    transform: rotateY(180deg);
}

.tarot-card-slot.is-revealing .tarot-card-face {
    box-shadow: 0 0 0 1px rgba(227, 207, 145, .45), 0 36px 85px rgba(0, 0, 0, .68);
}

.tarot-card-front::after {
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(255, 255, 255, .38);
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms ease 520ms;
}

.tarot-card-slot.is-revealed .tarot-card-front::after {
    opacity: 1;
}

@keyframes ritualCardAwait {
    50% { transform: translateY(-8px); filter: drop-shadow(0 12px 20px rgba(201, 166, 74, .16)); }
}

@keyframes ritualCardLift {
    0% { transform: translateY(0) scale(1); }
    34% { transform: translateY(-30px) scale(1.035); }
    78% { transform: translateY(-24px) scale(1.035); }
    100% { transform: translateY(0) scale(1); }
}

.meaning-row.is-revealed {
    animation: meaningOpen 820ms cubic-bezier(.2, .75, .2, 1) both;
}

@keyframes meaningOpen {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767.98px) {
    .ritual-transition::before { inset: 14px; }
    .ritual-shuffle-deck { width: 132px; height: 228px; }
    .ritual-transition-phase { font-size: 1.75rem; }
    .reading-focus-veil { display: none; }
    .reading-table-section.has-card-focus .tarot-card-slot:not(.is-revealing) { opacity: .58; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card-constellation,
    .daily-card-back,
    .ritual-deck,
    .ritual-transition,
    .ritual-transition::before,
    .ritual-transition::after,
    .ritual-shuffle-deck img,
    .ritual-transition-progress i,
    .reading-deal-origin,
    .reading-deal-origin img,
    .tarot-card-slot,
    .tarot-card-flip,
    .meaning-row {
        animation: none !important;
        transition: none !important;
    }

    .divination-motion-ready .tarot-card-slot:not(.is-dealt) {
        opacity: 1;
        transform: none;
    }
}
