:root {
    --navy: #071634;
    --navy-2: #0b2452;
    --ink: #18233a;
    --gold: #f0a71d;
    --gold-deep: #c77800;
    --cream: #fffaf0;
    --paper: #ffffff;
    --muted: #6b7280;
    --line: #e7dfd0;
    --shadow: 0 24px 70px rgba(7, 22, 52, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 5%, rgba(240,167,29,.12), transparent 28rem),
        linear-gradient(180deg, #fffdf8 0%, #f7f3ea 100%);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

button, input, textarea { font: inherit; }

.reading-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 76px;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid rgba(7,22,52,.08);
    backdrop-filter: blur(15px);
}

.reading-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #111827;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
}
.reading-brand img { width: 43px; height: 43px; object-fit: contain; }
.header-link {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(7,22,52,.15);
    padding: .65rem 1rem;
    border-radius: 999px;
}
.header-link:hover { color: var(--gold-deep); border-color: rgba(199,120,0,.4); }

.reading-main { padding: 3rem 0 4.5rem; }
.reading-container { max-width: 1120px; }

.reading-intro { max-width: 760px; margin: 0 auto 2.2rem; }
.eyebrow, .upgrade-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--gold-deep);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.reading-intro h1, .result-header h1, .result-header h2, .panel-heading h2, .table-heading h2, .upgrade-card h2 {
    font-family: 'Playfair Display', serif;
}
.reading-intro h1 {
    color: var(--navy);
    font-size: clamp(2.3rem, 6vw, 4.4rem);
    line-height: 1.05;
    font-weight: 700;
    margin: .75rem 0 .8rem;
}
.reading-intro p { color: #596477; font-size: 1.08rem; margin: 0; }

.reading-progress {
    position: relative;
    max-width: 760px;
    margin: 0 auto 2.25rem;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.reading-progress::before {
    content: '';
    position: absolute;
    top: 19px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: #ded8cc;
}
.reading-progress li { z-index: 1; display: grid; justify-items: center; gap: .55rem; color: #8b93a0; text-align: center; }
.reading-progress li > span {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #f4f0e7;
    border: 2px solid #ded8cc;
    font-weight: 700;
}
.reading-progress li small { font-size: .76rem; font-weight: 600; }
.reading-progress li.is-current > span {
    color: white;
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 0 7px rgba(240,167,29,.12);
}
.reading-progress li.is-current small { color: var(--navy); }
.reading-progress li.is-complete > span { background: var(--navy); border-color: var(--navy); color: white; }
.reading-progress li.is-complete small { color: #4f596b; }

.reading-alert { max-width: 880px; margin: 0 auto 1.25rem; border-radius: 14px; }
.reading-panel {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3.3rem);
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(199,120,0,.15);
    border-radius: 26px;
    box-shadow: var(--shadow);
}
.panel-heading { max-width: 620px; margin: 0 auto 2.3rem; }
.step-kicker {
    display: inline-block;
    color: var(--gold-deep);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: .45rem;
}
.step-kicker.light { color: #ffc758; }
.panel-heading h2, .table-heading h2 {
    color: var(--navy);
    font-size: clamp(1.7rem, 4vw, 2.65rem);
    font-weight: 700;
    margin: 0 0 .55rem;
}
.panel-heading p { color: var(--muted); margin: 0; }

.reading-form .form-label { color: #263248; font-weight: 700; margin-bottom: .55rem; }
.reading-form .form-control {
    min-height: 54px;
    padding: .85rem 1rem;
    border: 1px solid #d8d2c7;
    border-radius: 13px;
    background: #fffefb;
    color: var(--ink);
    box-shadow: none;
}
.reading-form textarea.form-control { min-height: 112px; resize: vertical; }
.reading-form .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(240,167,29,.12);
}
.form-text { color: #7c8492; font-size: .8rem; margin-top: .5rem; }

.consent-box {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid #e1dacd;
    background: #fffcf5;
    border-radius: 13px;
    color: #4d5667;
    font-size: .9rem;
    line-height: 1.5;
    cursor: pointer;
}
.consent-box input { margin-top: .22rem; width: 18px; height: 18px; accent-color: var(--gold-deep); }

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .9rem;
    flex-wrap: wrap;
}
.btn-mystic, .btn-quiet, .btn-shuffle, .table-back {
    border: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-mystic {
    min-height: 52px;
    padding: .85rem 1.35rem;
    color: white;
    background: linear-gradient(135deg, #ffb82f 0%, #dc8a00 100%);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(199,120,0,.22);
}
.btn-mystic:hover { color: white; transform: translateY(-2px); box-shadow: 0 16px 30px rgba(199,120,0,.3); }
.btn-quiet {
    min-height: 46px;
    padding: .7rem 1rem;
    color: #525d70;
    background: #f2efe8;
    border-radius: 11px;
}
.btn-quiet:hover { color: var(--navy); background: #e9e4d9; }
.micro-note { color: #858c98; font-size: .76rem; margin: 1rem 0 0; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}
.category-choice { position: relative; cursor: pointer; }
.category-choice input { position: absolute; opacity: 0; pointer-events: none; }
.category-card {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1rem;
    text-align: center;
    color: #445066;
    border: 1px solid #ddd7ca;
    background: #fffdf8;
    border-radius: 16px;
    transition: .22s ease;
}
.category-card i { color: var(--gold-deep); font-size: 1.65rem; }
.category-card strong { font-size: .93rem; }
.category-choice:hover .category-card { border-color: rgba(199,120,0,.5); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(7,22,52,.08); }
.category-choice input:checked + .category-card {
    color: var(--navy);
    border: 2px solid var(--gold);
    background: #fff8e7;
    box-shadow: 0 0 0 4px rgba(240,167,29,.11);
}
.category-choice input:focus-visible + .category-card { outline: 3px solid rgba(11,92,173,.35); outline-offset: 3px; }
.question-box-wrap { margin-top: 1.6rem; }

.tarot-table {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-radius: 28px;
    background-color: #061531;
    background-image: url('tarot-mat.webp');
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    box-shadow: 0 28px 80px rgba(4,14,35,.28);
    isolation: isolate;
}
.table-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2,11,31,.18), rgba(2,11,31,.24));
}
.table-content { min-height: 650px; padding: clamp(1.5rem, 4vw, 2.8rem); color: white; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.table-heading { max-width: 690px; margin: 0 auto .55rem; }
.table-heading h2 { color: white; text-shadow: 0 4px 20px rgba(0,0,0,.35); }
.table-heading p { color: rgba(255,255,255,.82); margin: 0; }

.deck-stage { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; gap: .35rem; }
.tarot-table.is-pile-mode .deck-stage { min-height: auto; gap: .15rem; }
.tarot-table.is-pile-mode .deck-stack,
.tarot-table.is-pile-mode .btn-shuffle { display: none; }
.deck-stack {
    position: relative;
    width: 142px;
    height: 236px;
    margin: 1rem auto 2rem;
    perspective: 1000px;
}
.deck-layer, .deck-face, .pile-stack > span, .pile-face, .card-back-design, .revealed-card-back {
    border: 2px solid #d99a26;
    background:
        radial-gradient(circle at 50% 50%, transparent 0 19%, rgba(240,167,29,.7) 20% 21%, transparent 22% 36%, rgba(240,167,29,.35) 37% 38%, transparent 39%),
        linear-gradient(135deg, rgba(240,167,29,.15), transparent 35%),
        #071a45;
    box-shadow: inset 0 0 0 5px #071a45, inset 0 0 0 6px rgba(240,167,29,.65);
}
.deck-layer {
    position: absolute;
    inset: 0;
    border-radius: 9px;
    transform: translate(calc(var(--layer) * .045px), calc(var(--layer) * -.13px));
}
.deck-face {
    position: absolute;
    inset: -10px 0 10px;
    z-index: 90;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #f8bd4d;
    text-align: center;
}
.deck-face .back-symbol { font-size: 3.7rem; line-height: 1; text-shadow: 0 0 18px rgba(240,167,29,.4); }
.deck-face small { position: absolute; bottom: 1rem; font-size: .52rem; letter-spacing: .22em; }
.deck-stack.is-shuffling .deck-face { animation: deckPulse 2.7s ease-in-out both; }
.deck-stack.is-shuffling .deck-layer:nth-child(4n + 1) { animation: shuffleLeft 2.6s cubic-bezier(.4,0,.2,1) both; }
.deck-stack.is-shuffling .deck-layer:nth-child(4n + 2) { animation: shuffleRight 2.6s cubic-bezier(.4,0,.2,1) both; }
.deck-stack.is-shuffling .deck-layer:nth-child(4n + 3) { animation: shuffleLift 2.6s cubic-bezier(.4,0,.2,1) both; }
@keyframes shuffleLeft {
    0%,100% { transform: translate(0, calc(var(--layer) * -.13px)); }
    22% { transform: translate(-74px, -14px) rotate(-8deg); }
    46% { transform: translate(38px, 8px) rotate(4deg); }
    72% { transform: translate(-20px, -4px) rotate(-2deg); }
}
@keyframes shuffleRight {
    0%,100% { transform: translate(0, calc(var(--layer) * -.13px)); }
    20% { transform: translate(72px, -11px) rotate(8deg); }
    48% { transform: translate(-34px, 10px) rotate(-4deg); }
    74% { transform: translate(18px, -4px) rotate(2deg); }
}
@keyframes shuffleLift {
    0%,100% { transform: translate(0, calc(var(--layer) * -.13px)); }
    28% { transform: translate(0, -34px) rotate(1deg); }
    56% { transform: translate(0, 15px) rotate(-1deg); }
}
@keyframes deckPulse { 0%,100% { transform: scale(1); } 42% { transform: scale(1.04) rotate(-1deg); } 70% { transform: scale(.98) rotate(1deg); } }

.btn-shuffle {
    color: #0a1732;
    background: #f6b83d;
    padding: .9rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(0,0,0,.3);
}
.btn-shuffle:hover { transform: translateY(-2px); background: #ffc85c; }
.btn-shuffle:disabled { opacity: .65; cursor: wait; }
.shuffle-status { min-height: 24px; color: rgba(255,255,255,.82); font-size: .9rem; margin: .9rem 0 0; text-align: center; }
.tarot-table.is-pile-mode .shuffle-status { margin: -.15rem 0 .35rem; font-size: 1rem; }

.pile-stage {
    width: 100%;
    max-width: 820px;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    transition: opacity .6s ease, transform .6s ease;
}
.pile-stage.is-ready { opacity: 1; transform: none; pointer-events: auto; height: auto; overflow: visible; }
.choose-instruction { text-align: center; color: #ffd67d; font-weight: 700; font-size: 1.08rem; margin: .05rem 0 .8rem; }
.pile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; max-width: 940px; margin: 0 auto; }
.pile-button {
    border: 0;
    color: white;
    background: rgba(4,15,40,.28);
    border-radius: 18px;
    padding: 1.15rem .75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    transition: .22s ease;
}
.pile-button:hover { transform: translateY(-8px); background: rgba(4,15,40,.52); box-shadow: 0 16px 28px rgba(0,0,0,.22); }
.pile-button:focus-visible { outline: 3px solid #ffd16a; outline-offset: 4px; }
.pile-button strong { margin-top: .8rem; font-size: 1.05rem; }
.pile-button small { color: rgba(255,255,255,.65); }
.pile-stack { position: relative; width: 118px; height: 194px; }
.pile-stack > span, .pile-face { position: absolute; inset: 0; border-radius: 9px; transform: translate(calc(var(--pile-layer) * 1px), calc(var(--pile-layer) * -1.5px)); }
.pile-face { z-index: 10; display: grid; place-items: center; color: #ffc24e; font-size: 2.6rem; transform: translate(7px,-10px); }

.table-back-form { margin-top: auto; padding-top: 1.2rem; }
.table-back { color: rgba(255,255,255,.78); background: transparent; padding: .4rem; }
.table-back:hover { color: white; }

.card-spread-table { min-height: 760px; }
.card-spread-table .table-content { min-height: 760px; }
.fan-form { width: 100%; }
.card-fan { position: relative; height: 360px; max-width: 900px; margin: .3rem auto 0; }
.fan-card {
    position: absolute;
    left: 50%;
    top: 47%;
    width: 103px;
    height: 172px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    transform-origin: 50% 145%;
    transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--angle));
    z-index: calc(10 + var(--order));
    transition: transform .22s ease, filter .22s ease;
}
.fan-card:hover, .fan-card:focus-visible {
    z-index: 100;
    transform: translate(-50%, -50%) translate(var(--x), calc(var(--y) - 34px)) rotate(var(--angle)) scale(1.06);
    filter: drop-shadow(0 18px 18px rgba(0,0,0,.35));
    outline: none;
}
.card-back-design { position: absolute; inset: 0; border-radius: 9px; display: grid; place-items: center; color: #f6b842; }
.card-back-design b { font-size: 2.4rem; text-shadow: 0 0 16px rgba(240,167,29,.4); }
.card-back-design small { position: absolute; bottom: .65rem; font-size: .42rem; letter-spacing: .16em; }
.selection-note { color: rgba(255,255,255,.76); font-size: .82rem; text-align: center; margin: .2rem 0 0; }

.result-panel {
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(1.4rem, 4vw, 3rem);
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(199,120,0,.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}
.result-header h2 { color: #5e6878; font-size: 1.2rem; margin: .8rem 0 .2rem; }
.result-header h1 { color: var(--navy); font-size: clamp(2.25rem, 6vw, 4.4rem); line-height: 1; margin: 0 0 .6rem; }
.reading-reference { color: #8a9099; font-size: .75rem; }
.result-grid { display: grid; grid-template-columns: minmax(210px, 300px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; margin-top: 2.2rem; }
.revealed-card-wrap { text-align: center; }
.revealed-card { width: min(100%, 270px); aspect-ratio: 3 / 5; margin: 0 auto; perspective: 1200px; }
.revealed-card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.revealed-card.is-revealed .revealed-card-inner { transform: rotateY(180deg); }
.revealed-card-back, .revealed-card-front { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; overflow: hidden; box-shadow: 0 24px 45px rgba(7,22,52,.22); }
.revealed-card-back { color: #f5b83e; display: grid; place-items: center; }
.revealed-card-back span { font-size: 4.5rem; }
.revealed-card-back small { position: absolute; bottom: 1.2rem; letter-spacing: .25em; font-size: .55rem; }
.revealed-card-front { transform: rotateY(180deg); background: #f7f2ea; }
.revealed-card-front img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-keywords { margin-top: 1rem; color: #6f7682; font-size: .82rem; font-style: italic; }

.reading-message section { padding: 0 0 1.2rem; margin-bottom: 1.2rem; border-bottom: 1px solid #eee8dc; }
.reading-message section:last-of-type { border-bottom: 0; }
.reading-message h3 { color: var(--navy); font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.35rem; margin: 0 0 .55rem; }
.reading-message p { color: #4d5768; line-height: 1.8; margin: 0; }
.reading-message blockquote {
    margin: .3rem 0 0;
    padding: 1.15rem 1.25rem;
    color: #27334a;
    background: #fff8e7;
    border-left: 4px solid var(--gold);
    border-radius: 0 12px 12px 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.08rem;
}
.reading-message blockquote span { display: block; color: var(--gold-deep); font-family: 'Inter', sans-serif; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .35rem; }
.automation-note { margin: 2rem auto 0; max-width: 760px; color: #7f8793; text-align: center; font-size: .74rem; }

.upgrade-card {
    margin-top: 2.4rem;
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border-radius: 22px;
    color: white;
    background:
        radial-gradient(circle at 90% 0%, rgba(240,167,29,.24), transparent 23rem),
        linear-gradient(135deg, #071634 0%, #0c2a5b 100%);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
}
.upgrade-card h2 { color: white; font-size: clamp(1.6rem, 4vw, 2.35rem); margin: .4rem 0 .65rem; }
.upgrade-card p { color: rgba(255,255,255,.76); line-height: 1.7; max-width: 680px; }
.upgrade-card ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .55rem; }
.upgrade-card li { display: flex; gap: .6rem; align-items: flex-start; color: rgba(255,255,255,.9); }
.upgrade-card li i { color: #ffc14d; margin-top: .1rem; }
.upgrade-action { display: flex; flex-direction: column; align-items: center; gap: .7rem; min-width: 235px; text-align: center; }
.upgrade-action small { max-width: 240px; color: rgba(255,255,255,.6); font-size: .72rem; line-height: 1.5; }
.result-actions { display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; margin-top: 1.6rem; }

.reading-footer { padding: 2rem 0 2.4rem; color: #77808d; font-size: .76rem; }
.reading-footer p { margin: 0 0 .55rem; }
.reading-footer a { color: #5d6675; text-decoration: none; }
.reading-footer span { margin: 0 .5rem; }

@media (max-width: 900px) {
    .category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .pile-grid { grid-template-columns: repeat(2, minmax(0,1fr)); max-width: 620px; margin: 0 auto; }
    .result-grid { grid-template-columns: 230px 1fr; gap: 2rem; }
    .upgrade-card { grid-template-columns: 1fr; }
    .upgrade-action { align-items: flex-start; text-align: left; }
}

@media (max-width: 680px) {
    .reading-header { min-height: 66px; }
    .reading-brand { font-size: 1.25rem; }
    .reading-brand img { width: 37px; height: 37px; }
    .header-link { padding: .55rem .75rem; font-size: .76rem; }
    .reading-main { padding-top: 2rem; }
    .reading-progress li small { font-size: .62rem; }
    .reading-progress li > span { width: 34px; height: 34px; }
    .reading-progress::before { top: 16px; }
    .reading-panel { border-radius: 20px; }
    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn-mystic, .form-actions .btn-quiet { width: 100%; }
    .category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
    .category-card { min-height: 112px; padding: .75rem .55rem; }
    .category-card strong { font-size: .78rem; }
    .tarot-table, .table-content { min-height: 640px; }
    .tarot-table { border-radius: 20px; background-position: center; background-size: 100% 100%; }
    .table-content { padding: 1.5rem .95rem; }
    .pile-grid { gap: .65rem; }
    .pile-stack { width: 94px; height: 154px; }
    .card-fan { height: 320px; transform: scale(.78); transform-origin: center top; width: 128%; margin-left: -14%; }
    .result-panel { border-radius: 20px; padding: 1.2rem; }
    .result-grid { grid-template-columns: 1fr; }
    .revealed-card { width: 220px; }
    .upgrade-card { padding: 1.35rem; border-radius: 17px; }
    .upgrade-action, .upgrade-action .btn-mystic { width: 100%; }
    .upgrade-action { align-items: stretch; text-align: center; }
}

@media (max-width: 410px) {
    .category-grid { grid-template-columns: 1fr; }
    .category-card { min-height: 84px; flex-direction: row; justify-content: flex-start; padding: .8rem 1rem; text-align: left; }
    .category-card i { width: 32px; text-align: center; }
    .pile-grid { grid-template-columns: repeat(2, 1fr); }
    .pile-button { padding-left: .3rem; padding-right: .3rem; }
    .card-fan { transform: scale(.66); width: 150%; margin-left: -25%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .pile-stage { opacity: 1; transform: none; height: auto; overflow: visible; pointer-events: auto; }
}


/* Phase 2: clearer result artwork and direct continuation journey */
.revealed-card-front { background: transparent !important; padding: 0 !important; }
.revealed-card-front img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    image-rendering: auto;
}
.continuation-note {
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-left: 3px solid var(--gold);
    background: rgba(255,255,255,.07);
    border-radius: 0 10px 10px 0;
    font-size: .92rem;
}
.service-choice-wrap { width: 100%; margin-top: 1.4rem; }
.service-choice-wrap h3 { font-family: 'Playfair Display', serif; font-size: 1.55rem; margin: 0 0 .35rem; }
.service-choice-intro { margin: 0 0 1rem; opacity: .9; }
.continuation-services { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.continuation-service {
    display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
    padding: 1.15rem; border-radius: 16px; background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.14);
}
.continuation-service h4 { margin: 0 0 .45rem; font-size: 1.05rem; }
.continuation-service p { margin: 0; font-size: .88rem; line-height: 1.55; }
.continuation-service-footer { display: grid; gap: .25rem; }
.continuation-service-footer strong { font-size: 1.3rem; color: #ffc758; }
.continuation-service-footer span { font-size: .76rem; opacity: .78; margin-bottom: .55rem; }
.continuation-service .btn-mystic { width: 100%; padding-inline: .75rem; font-size: .86rem; }
.service-unavailable { padding: 1rem; background: rgba(255,255,255,.08); border-radius: 12px; }
.pile-button small { display: none !important; }
@media (max-width: 850px) { .continuation-services { grid-template-columns: 1fr; } }

/* Phase 3: refined card artwork and a clearer continuation offer */
.revealed-card-front {
    background: #fff !important;
    padding: 0 !important;
    border-radius: 16px;
}
.revealed-card-front img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #fff;
    border-radius: 16px;
    image-rendering: auto;
}

.upgrade-card {
    display: block;
    padding: clamp(1.5rem, 4vw, 2.7rem);
}
.upgrade-copy {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.upgrade-card .upgrade-copy > p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.upgrade-card ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem 1rem;
    max-width: 900px;
    margin: 1.25rem auto 0;
}
.upgrade-card li {
    justify-content: center;
    text-align: left;
    padding: .75rem .85rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}
.upgrade-card li span { line-height: 1.5; }
.continuation-note {
    max-width: 820px !important;
    margin: 1.3rem auto 0 !important;
    text-align: left;
}

.service-choice-wrap {
    margin-top: 2.2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.14);
}
.service-choice-heading {
    max-width: 760px;
    margin: 0 auto 1.3rem;
    text-align: center;
}
.service-choice-kicker {
    display: inline-block;
    color: #ffc758;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin-bottom: .45rem;
}
.service-choice-wrap h3 {
    color: #fff;
    font-size: clamp(1.55rem, 3vw, 2rem);
    margin-bottom: .4rem;
}
.service-choice-intro {
    margin: 0 auto !important;
    max-width: 650px !important;
}

.continuation-services {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.continuation-services.service-count-1 {
    grid-template-columns: minmax(280px, 520px);
    justify-content: center;
}
.continuation-services.service-count-2 {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    max-width: 900px;
    margin: 0 auto;
}
.continuation-service {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.15rem;
    min-height: 100%;
    padding: 1.45rem;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.07));
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 14px 30px rgba(0,0,0,.12);
}
.continuation-service h4 {
    color: #fff;
    margin: 0;
    padding-right: 5.8rem;
    font-size: 1.1rem;
    line-height: 1.4;
}
.continuation-service-header {
    display: grid;
    gap: .35rem;
}
.continuation-service-label {
    margin: 0;
    color: #ffc758;
    font-size: .84rem;
    font-weight: 700;
}
.continuation-service-focus {
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: .88rem;
    line-height: 1.55;
}
.continuation-discount {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 30px;
    padding: .35rem .6rem;
    border-radius: 8px;
    color: #fff;
    background: #e73545;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: 0 8px 16px rgba(231,53,69,.24);
}
.continuation-badge-featured {
    background: #12316b;
    box-shadow: 0 8px 16px rgba(18,49,107,.22);
}
.continuation-badge-soft {
    background: #e4b11b;
    color: #10234e;
    box-shadow: 0 8px 16px rgba(228,177,27,.22);
}
.continuation-service-featured {
    border-color: rgba(255, 199, 88, .35);
    box-shadow: 0 18px 34px rgba(0,0,0,.16);
}
.continuation-trust {
    display: grid;
    gap: .55rem;
    padding: .9rem 0;
    border-top: 1px solid rgba(255,255,255,.12);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.continuation-trust span {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: rgba(255,255,255,.9);
    font-size: .82rem;
}
.continuation-trust i {
    color: #ffc758;
    font-size: 1rem;
}
.continuation-service-footer {
    display: grid;
    gap: .45rem;
}
.continuation-price {
    display: flex;
    align-items: baseline;
    gap: .55rem;
}
.continuation-price strong {
    color: #ffc758;
    font-size: 1.55rem;
    line-height: 1;
}
.continuation-old-price {
    color: rgba(255,255,255,.55);
    font-size: .94rem;
    text-decoration: line-through;
}
.focused-question-label {
    display: block;
    color: rgba(255,255,255,.72);
    font-size: .76rem;
    margin-bottom: .45rem;
}
.continuation-service .btn-mystic {
    width: 100%;
    min-height: 48px;
    justify-content: center;
}

@media (max-width: 850px) {
    .upgrade-card ul { grid-template-columns: 1fr; }
    .continuation-services,
    .continuation-services.service-count-1,
    .continuation-services.service-count-2 {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .continuation-service h4 { padding-right: 5.2rem; }
}

@media (max-width: 480px) {
    .upgrade-copy { text-align: left; }
    .upgrade-copy .upgrade-kicker,
    .upgrade-copy h2 { text-align: left; }
    .upgrade-card .upgrade-copy > p { text-align: left; }
    .service-choice-heading { text-align: left; }
    .continuation-note { padding: .85rem .9rem; }
    .continuation-service { padding: 1.2rem; }
    .continuation-discount { top: .85rem; right: .85rem; }
}


/* Phase 4: context-aware reading and compact, viewport-friendly card game */
.reading-game-mode .reading-main {
    padding: .75rem 0 1.15rem;
}
.reading-game-mode .reading-intro,
.reading-game-mode .reading-progress {
    display: none;
}
.reading-game-mode .reading-container {
    max-width: 1180px;
}
.reading-game-mode .tarot-table {
    width: 100%;
    height: clamp(560px, calc(100svh - 100px), 700px);
    min-height: 560px;
    border-radius: 22px;
}
.reading-game-mode .table-content {
    height: 100%;
    min-height: 0;
    padding: clamp(.9rem, 2vw, 1.55rem) clamp(.8rem, 3vw, 2.35rem);
}
.reading-game-mode .table-heading {
    max-width: 720px;
    margin: 0 auto .55rem;
}
.reading-game-mode .table-heading h2 {
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    margin-bottom: .3rem;
}
.reading-game-mode .table-heading p {
    font-size: clamp(.82rem, 1.4vw, .98rem);
    line-height: 1.45;
}
.reading-game-mode .step-kicker {
    margin-bottom: .2rem;
}
.reading-game-mode .deck-stage {
    flex: 1;
    min-height: 0;
    justify-content: center;
}
.reading-game-mode .deck-stack {
    width: 106px;
    height: 177px;
    margin: .25rem auto .85rem;
}
.reading-game-mode .deck-face {
    inset: -7px 0 7px;
}
.reading-game-mode .deck-face .back-symbol {
    font-size: 2.9rem;
}
.reading-game-mode .btn-shuffle {
    min-width: 185px;
    min-height: 48px;
    padding: .72rem 1.1rem;
}
.reading-game-mode .shuffle-status {
    margin-top: .55rem;
}
.reading-game-mode .pile-stage {
    max-width: 760px;
}
.reading-game-mode .pile-grid {
    gap: .75rem;
}
.reading-game-mode .pile-button {
    min-height: 176px;
    padding: .7rem .5rem .65rem;
    border-radius: 14px;
}
.reading-game-mode .pile-stack {
    width: 70px;
    height: 117px;
}
.reading-game-mode .pile-button strong {
    margin-top: .45rem;
    font-size: .92rem;
}
.reading-game-mode .choose-instruction {
    margin: 0 0 .75rem;
}
.reading-game-mode .table-back-form {
    padding-top: .45rem;
}
.shuffle-table.is-pile-mode .deck-stage {
    display: none;
}
.shuffle-table.is-pile-mode .pile-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.shuffle-table.is-pile-mode .table-heading {
    margin-bottom: .2rem;
}

.reading-fan-mode .card-spread-table .table-content {
    justify-content: flex-start;
}
.reading-fan-mode .card-spread-table .table-heading {
    margin-bottom: .1rem;
}
.reading-fan-mode .fan-form {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
}
.fan-scroll {
    width: 100%;
    overflow: visible;
    scrollbar-width: thin;
    scrollbar-color: rgba(240,167,29,.75) rgba(255,255,255,.08);
}
.reading-fan-mode .card-fan {
    width: 100%;
    max-width: 860px;
    height: clamp(245px, 43svh, 315px);
    margin: 0 auto;
    transform: none;
}
.reading-fan-mode .fan-card {
    width: clamp(76px, 7.1vw, 92px);
    height: auto;
    aspect-ratio: 3 / 5;
}
.reading-fan-mode .selection-note {
    margin: 0;
}
.reading-fan-mode .table-back-form {
    margin-top: .25rem;
}

@media (max-width: 760px) {
    .reading-game-mode .tarot-table {
        height: calc(100svh - 78px);
        min-height: 560px;
        border-radius: 16px;
    }
    .reading-game-mode .table-content {
        padding: .85rem .65rem;
    }
    .reading-game-mode .table-heading p {
        max-width: 560px;
    }
    .reading-game-mode .pile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 430px;
    }
    .reading-game-mode .pile-button {
        min-height: 150px;
    }
    .reading-game-mode .pile-stack {
        width: 61px;
        height: 102px;
    }
    .fan-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        padding: .35rem 0 .7rem;
    }
    .reading-fan-mode .card-fan {
        width: 760px;
        max-width: none;
        height: 280px;
        margin: 0;
    }
    .reading-fan-mode .fan-card {
        width: 82px;
    }
    .reading-fan-mode .selection-note {
        font-size: .74rem;
    }
}

@media (max-height: 650px) and (min-width: 761px) {
    .reading-game-mode .tarot-table {
        height: calc(100svh - 88px);
        min-height: 520px;
    }
    .reading-game-mode .deck-stack {
        width: 92px;
        height: 153px;
    }
    .reading-game-mode .pile-button {
        min-height: 150px;
    }
    .reading-game-mode .pile-stack {
        width: 61px;
        height: 102px;
    }
    .reading-fan-mode .card-fan {
        height: 240px;
    }
}

/* Phase 8: preserve one physical card size across deck, piles and spread */
.reading-game-mode {
    --ritual-card-width: 106px;
    --ritual-card-height: 177px;
}

.reading-game-mode .deck-stack,
.reading-game-mode .pile-stack {
    width: var(--ritual-card-width) !important;
    height: var(--ritual-card-height) !important;
}

.reading-game-mode .pile-grid {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    gap: clamp(.9rem, 2.2vw, 1.5rem);
    align-items: start;
}

.reading-game-mode .pile-button {
    min-height: 224px;
    padding: .75rem .45rem .8rem;
    justify-content: flex-start;
    background: rgba(4,15,40,.22);
}

.reading-game-mode .pile-stack > span,
.reading-game-mode .pile-face {
    border-radius: 10px;
}

.reading-game-mode .pile-face {
    transform: translate(7px, -10px);
    display: grid;
    place-items: center;
    color: #f8bd4d;
    text-align: center;
}

.reading-game-mode .pile-face .back-symbol {
    font-size: 2.9rem;
    line-height: 1;
    text-shadow: 0 0 18px rgba(240,167,29,.4);
}

.reading-game-mode .pile-face small {
    position: absolute;
    bottom: .78rem;
    font-size: .42rem;
    letter-spacing: .18em;
}

.reading-game-mode .pile-button strong {
    margin-top: .65rem;
    font-size: .98rem;
}

.shuffle-table.is-pile-mode .pile-stage {
    justify-content: flex-start;
    padding-top: .15rem;
}

.shuffle-table.is-pile-mode .table-heading {
    margin-bottom: .1rem;
}

.reading-game-mode .choose-instruction {
    margin: .05rem 0 .55rem;
}

@media (max-width: 760px) {
    .reading-game-mode {
        --ritual-card-width: 82px;
        --ritual-card-height: 137px;
    }

    .reading-game-mode .pile-grid {
        max-width: 390px;
        gap: .75rem 1rem;
    }

    .reading-game-mode .pile-button {
        min-height: 184px;
    }

    .reading-game-mode .pile-face .back-symbol {
        font-size: 2.35rem;
    }
}

@media (max-height: 650px) and (min-width: 761px) {
    .reading-game-mode {
        --ritual-card-width: 92px;
        --ritual-card-height: 153px;
    }

    .reading-game-mode .pile-button {
        min-height: 198px;
    }
}

/* Phase 9: make the pile top cards visibly identical to the original deck back */
.reading-game-mode .pile-face small {
    display: block !important;
    bottom: .82rem !important;
    color: #f8bd4d !important;
    opacity: 1 !important;
    font-size: .48rem !important;
    font-weight: 700 !important;
    letter-spacing: .2em !important;
    line-height: 1 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,.55);
}

.reading-game-mode .pile-face .back-symbol {
    color: #f8bd4d;
}

/* Instant feedback while the server prepares the personalised interpretation. */
.reading-generation-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(2, 10, 28, .86);
    backdrop-filter: blur(8px);
}
.reading-generation-card {
    width: min(92vw, 430px);
    padding: 2rem 1.6rem;
    text-align: center;
    color: white;
    border: 1px solid rgba(240, 167, 29, .48);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(7, 22, 52, .98), rgba(11, 36, 82, .98));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .4);
}
.reading-generation-card h2 {
    margin: .8rem 0 .55rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
}
.reading-generation-card p {
    margin: 0;
    color: rgba(255,255,255,.76);
    line-height: 1.6;
}
.reading-generation-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border: 3px solid rgba(255,255,255,.18);
    border-top-color: #f0a71d;
    border-radius: 50%;
    animation: readingSpin .8s linear infinite;
}
@keyframes readingSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .reading-generation-spinner { animation-duration: 1.6s; }
}
