* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow: hidden;
    height: 100%;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

:root {
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-bright: #f0d060;
    --purple-deep: #0d0b1a;
    --purple-dark: #141025;
    --purple-mid: #1e1640;
    --purple-card: #1a1240;
    --purple-shadow: #0e0a20;
    --purple-accent: #6b4c9a;
    --purple-light: #9b7fcf;
    --crystal: #d4c8f0;
    --text: #c8bfae;
    --text-dim: #8a7e6e;
    --text-soft: #a89e8e;
}

body {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    min-height: 100vh;
    background: var(--purple-deep);
    color: var(--text);
    overflow-x: hidden;
    font-weight: 400;
    font-size: 15px;
}

.nebula {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(107, 76, 154, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(75, 50, 130, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(107, 76, 154, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 40%, rgba(201, 168, 76, 0.04) 0%, transparent 40%);
    animation: nebulaDrift 20s ease-in-out infinite alternate;
}

@keyframes nebulaDrift {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold-light);
    border-radius: 50%;
    animation: float linear infinite;
    opacity: 0;
}

.particle.sparkle {
    width: 4px;
    height: 4px;
    background: var(--gold-bright);
    box-shadow: 0 0 6px var(--gold), 0 0 12px rgba(201, 168, 76, 0.3);
    animation: floatSparkle linear infinite;
}

.particle.dust {
    width: 1px;
    height: 1px;
    background: var(--crystal);
    opacity: 0;
    animation: floatDust linear infinite;
}

@keyframes floatSparkle {
    0% { opacity: 0; transform: translateY(100vh) scale(0) rotate(0deg); }
    10% { opacity: 1; }
    50% { opacity: 0.8; transform: translateY(50vh) scale(1.2) rotate(180deg); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-10vh) scale(0.5) rotate(360deg); }
}

@keyframes floatDust {
    0% { opacity: 0; transform: translateY(80vh) translateX(0); }
    20% { opacity: 0.6; }
    80% { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(-20vh) translateX(40px); }
}

@keyframes float {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.container.opening-active {
    justify-content: flex-start;
    padding-top: 60px;
    padding-bottom: 12px;
    overflow: visible;
}

.container.opening-active header {
    margin-bottom: 0;
    padding: 8px 0;
    flex-shrink: 0;
}

header {
    text-align: center;
    margin-bottom: 25px;
    padding: 12px 0;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.3;
}

.ornament {
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 10px;
    opacity: 0.5;
    animation: ornamentGlow 4s ease-in-out infinite alternate;
}

@keyframes ornamentGlow {
    from { opacity: 0.3; text-shadow: 0 0 4px rgba(201, 168, 76, 0.2); }
    to { opacity: 0.7; text-shadow: 0 0 10px rgba(201, 168, 76, 0.5), 0 0 20px rgba(201, 168, 76, 0.2); }
}

.top-ornament { margin-bottom: 8px; }
.bottom-ornament { margin-top: 8px; }

.title {
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 2.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 30%, #fff 50%, var(--gold-bright) 70%, var(--gold) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: titleGlow 3s ease-in-out infinite alternate, titleShimmer 4s ease-in-out infinite;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.3)); }
    to { filter: drop-shadow(0 0 14px rgba(201, 168, 76, 0.6)); }
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--text-dim);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 3px;
    margin-top: 5px;
}

.section {
    display: none;
    animation: fadeInSection 0.7s ease-out;
}

.section.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#spread-selection.active {
    justify-content: flex-start;
    padding-top: 20px;
}

#pick-section.active {
    justify-content: flex-start;
    padding-top: 30px;
}

#pick-section.active .card-grid {
    max-height: 55vh;
}

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

#spread-selection h2 {
    margin-bottom: 30px;
}

h2 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gold);
    text-align: center;
    letter-spacing: 2px;
}

#pick-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 30%, #fff 50%, var(--gold-bright) 70%, var(--gold) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 3s ease-in-out infinite, titleGlow 2s ease-in-out infinite alternate;
    margin-bottom: 6px;
}

#reading-section h2 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 30%, #fff 50%, var(--gold-bright) 70%, var(--gold) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 3s ease-in-out infinite;
    margin-bottom: 16px;
}

.instruction {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-style: italic;
    font-weight: 300;
    text-align: center;
}

/* ── Spread Selection ── */
.spread-options {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 700px;
    margin: 0 auto;
}

.spread-btn {
    position: relative;
    background: linear-gradient(160deg, var(--purple-mid) 0%, var(--purple-dark) 100%);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 12px;
    padding: 22px 20px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 170px;
    overflow: hidden;
    animation: spreadGlow 3s ease-in-out infinite, floatBtn 4s ease-in-out infinite;
}

.spread-btn:nth-child(2) { animation-delay: 0.5s, 0.5s; }
.spread-btn:nth-child(3) { animation-delay: 1s, 1s; }

@keyframes floatBtn {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.spread-glow {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 120%, rgba(201, 168, 76, 0.12) 0%, transparent 60%);
    transition: opacity 0.4s ease;
    opacity: 0;
}

.spread-btn:hover .spread-glow {
    opacity: 1;
}

.spread-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(201, 168, 76, 0.06), transparent, rgba(155, 127, 207, 0.04), transparent);
    animation: rotateSpreadGlow 6s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.spread-btn:hover::after {
    opacity: 1;
}

@keyframes rotateSpreadGlow {
    to { transform: rotate(360deg); }
}

@keyframes spreadGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(201, 168, 76, 0.08), 0 0 30px rgba(107, 76, 154, 0.05);
        border-color: rgba(201, 168, 76, 0.2);
    }
    50% {
        box-shadow: 0 4px 28px rgba(201, 168, 76, 0.18), 0 0 50px rgba(107, 76, 154, 0.12);
        border-color: rgba(201, 168, 76, 0.4);
    }
}

.spread-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 168, 76, 0.6);
    box-shadow: 0 8px 35px rgba(201, 168, 76, 0.25), 0 0 60px rgba(107, 76, 154, 0.15);
}

.spread-icon {
    font-size: 1.8rem;
    color: var(--gold-bright);
    position: relative;
    z-index: 1;
}

.spread-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.spread-desc {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-style: italic;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* ── Opening Section ── */
.opening-card {
    text-align: center;
    animation: readingPanelIn 0.8s ease-out;
    width: 520px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    padding: 10px 20px 0;
}

.opening-card::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 260px;
    background: radial-gradient(circle,
        rgba(201, 168, 76, 0.10) 0%,
        rgba(155, 127, 207, 0.06) 30%,
        rgba(107, 76, 154, 0.03) 50%,
        transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    animation: orbPulse 4s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

/* ── Crystal Orb ── */
.crystal-orb {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 14px;
    animation: floatIcon 4s ease-in-out infinite;
}

.orb-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, rgba(201, 168, 76, 0.35) 0%, rgba(107, 76, 154, 0.15) 50%, transparent 70%);
    filter: blur(6px);
    animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.orb-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--gold-bright);
    text-shadow:
        0 0 10px rgba(201, 168, 76, 0.8),
        0 0 25px rgba(201, 168, 76, 0.5),
        0 0 50px rgba(201, 168, 76, 0.3);
    animation: orbSpin 8s linear infinite;
    z-index: 2;
}

@keyframes orbSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.orb-sparkle {
    position: absolute;
    font-size: 0.7rem;
    color: var(--gold-light);
    opacity: 0;
    animation: sparkleOrbit 3s ease-in-out infinite;
    z-index: 3;
}

.orb-sparkle.s1 { animation-delay: 0s; }
.orb-sparkle.s2 { animation-delay: 0.75s; }
.orb-sparkle.s3 { animation-delay: 1.5s; }
.orb-sparkle.s4 { animation-delay: 2.25s; }

@keyframes sparkleOrbit {
    0% { opacity: 0; transform: rotate(0deg) translateX(32px) rotate(0deg); }
    15% { opacity: 1; }
    50% { opacity: 0.6; }
    85% { opacity: 1; }
    100% { opacity: 0; transform: rotate(360deg) translateX(32px) rotate(-360deg); }
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


.opening-single-text {
    height: 44px;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.opening-single-text .opening-text {
    font-size: 1rem;
    opacity: 1;
    overflow: visible;
    text-align: center;
    width: fit-content;
    line-height: 1.5;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--gold);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: blinkBorder 0.6s step-end infinite;
}

.opening-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.5;
    font-weight: 300;
    opacity: 0;
    overflow: visible;
    white-space: normal;
    width: auto;
}

.opening-text.visible {
    opacity: 1;
    animation: typing 1.2s steps(30, end) forwards, blinkBorder 0.6s step-end infinite;
}

.opening-text.done {
    border-right: none;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkBorder {
    from, to { border-color: var(--gold); }
    50% { border-color: transparent; }
}

.opening-btn {
    flex-shrink: 0;
    margin: 70px auto 8px;
}

.disclaimer {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(180, 170, 150, 0.8);
    font-style: italic;
    max-width: 450px;
    margin: 8px auto 0;
    line-height: 1.4;
    flex-shrink: 0;
}

.site-footer {
    text-align: center;
    padding: 10px;
    font-size: 0.72rem;
    color: rgba(180, 170, 150, 0.8);
    letter-spacing: 1px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ── Loader Section ── */
.loader-orb-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-top-color: rgba(201, 168, 76, 0.6);
    border-right-color: rgba(155, 127, 207, 0.3);
    animation: loaderSpin 3s linear infinite;
}

.loader-ring::after {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 1px dashed rgba(201, 168, 76, 0.12);
    border-bottom-color: rgba(201, 168, 76, 0.35);
    animation: loaderSpin 5s linear infinite reverse;
}

@keyframes loaderSpin {
    to { transform: rotate(360deg); }
}

.loader-orb {
    position: relative;
    z-index: 1;
    font-size: 2.8rem;
}

.loader-orb .orb-glow {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.25) 0%, rgba(155, 127, 207, 0.1) 40%, transparent 70%);
    animation: orbPulse 2.5s ease-in-out infinite;
}

.loader-orb .orb-symbol {
    font-size: 2.8rem;
    animation: floatIcon 3s ease-in-out infinite;
}

.loader-orb .orb-sparkle {
    animation-duration: 3s;
}

.loader-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--text);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
    min-height: 1.5em;
    border-right: 2px solid var(--gold);
    animation: blinkBorder 0.6s step-end infinite;
    padding-right: 3px;
}

body.no-scroll,
body.no-scroll .container {
    overflow: hidden;
    height: 100vh;
}

/* ── Shuffle Section ── */
.shuffle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    perspective: 800px;
    margin-bottom: 15px;
    margin-top: 40px;
}

.deck {
    position: relative;
    width: 110px;
    height: 180px;
}

.shuffle-card {
    position: absolute;
    width: 110px;
    height: 180px;
    border-radius: 0;
    background: linear-gradient(145deg, var(--purple-card) 0%, var(--purple-shadow) 100%);
    border: 2px solid var(--gold);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.6),
        inset 0 0 15px rgba(201, 168, 76, 0.05);
}

.shuffle-card::before {
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 0;
}

.shuffle-card::after {
    content: '✦';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    color: var(--gold);
    opacity: 0.7;
    text-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

@keyframes shuffleLeft {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    30% { transform: translateX(-70px) rotate(-6deg); }
    70% { transform: translateX(70px) rotate(6deg); }
}

@keyframes shuffleRight {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    30% { transform: translateX(70px) rotate(6deg); }
    70% { transform: translateX(-70px) rotate(-6deg); }
}

@keyframes shuffleUp {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-28px) scale(1.05); }
}

/* ── Pick Section ── */
.pick-header {
    text-align: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 20px;
}

#pick-count-display {
    color: var(--gold);
    font-weight: 600;
}

.pick-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 4px;
}

.pick-progress-text {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 2px;
}

.pick-progress-bar {
    width: 160px;
    height: 3px;
    background: rgba(201, 168, 76, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.pick-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright));
    border-radius: 2px;
    transition: width 0.4s ease;
}

.card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 8px;
    padding: 12px 20px 20px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.card-grid::-webkit-scrollbar {
    display: none;
}

.grid-card {
    width: 100px;
    aspect-ratio: 2/3;
    perspective: 600px;
    cursor: pointer;
    opacity: 0;
    animation: gridCardIn 0.4s ease-out forwards;
    flex-shrink: 0;
    transition: transform 0.35s ease, z-index 0s;
}

.grid-card:hover {
    transform: translateY(-16px) scale(1.08);
    z-index: 10;
}

.grid-card.selected {
    transform: translateY(-20px) scale(1.1);
    z-index: 20;
}

.grid-card .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.grid-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.grid-card .card-front,
.grid-card .card-back-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0;
    overflow: hidden;
}

.grid-card .card-front {
    transform: rotateY(180deg);
}

.grid-card .card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.grid-card .card-back-face {
    background: linear-gradient(155deg, var(--purple-card) 0%, var(--purple-dark) 100%);
    border: 1.5px solid rgba(201, 168, 76, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-card .card-back-face::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border: 1px solid rgba(201, 168, 76, 0.12);
    border-radius: 0;
    pointer-events: none;
}

.grid-card .card-back-face::after {
    content: '✦';
    font-size: 1.3rem;
    color: var(--gold);
    opacity: 0.4;
    text-shadow: 0 0 8px rgba(201, 168, 76, 0.3);
    pointer-events: none;
}

@keyframes gridCardIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.grid-card:hover:not(.flipped):not(.selected) .card-back-face {
    border-color: rgba(201, 168, 76, 0.6);
    box-shadow: 0 0 16px rgba(201, 168, 76, 0.15), 0 3px 12px rgba(0, 0, 0, 0.5);
}

.grid-card.selected .card-back-face {
    border-color: var(--gold-bright);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.3), 0 0 40px rgba(201, 168, 76, 0.1);
    animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(201, 168, 76, 0.3), 0 0 40px rgba(201, 168, 76, 0.1); }
    50% { box-shadow: 0 0 30px rgba(201, 168, 76, 0.5), 0 0 60px rgba(201, 168, 76, 0.2), 0 0 80px rgba(155, 127, 207, 0.1); }
}

.grid-card.selected .card-back-face::after {
    content: '★';
    opacity: 0.9;
    font-size: 1.6rem;
    color: var(--gold-bright);
    text-shadow: 0 0 12px rgba(240, 208, 96, 0.6), 0 0 25px rgba(240, 208, 96, 0.3);
    animation: starGlow 1.5s ease-in-out infinite alternate;
}

@keyframes starGlow {
    from { text-shadow: 0 0 8px rgba(240, 208, 96, 0.4); filter: brightness(0.9); }
    to { text-shadow: 0 0 16px rgba(240, 208, 96, 0.8), 0 0 30px rgba(240, 208, 96, 0.3); filter: brightness(1.1); }
}

.grid-card:not(.flipped):not(.selected) {
    pointer-events: auto;
}

.grid-card.flipped,
.grid-card:not(:hover):not(.selected) .card-back-face {
    pointer-events: none;
}

.pick-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.pick-actions .btn {
    min-width: 200px;
    text-align: center;
}

/* ── Buttons ── */
.btn {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    padding: 10px 28px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 50%, var(--gold) 100%);
    background-size: 200% 200%;
    color: var(--purple-deep);
    box-shadow: 0 3px 12px rgba(201, 168, 76, 0.3), 0 0 20px rgba(201, 168, 76, 0.1);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.4), 0 0 40px rgba(201, 168, 76, 0.15);
    animation: shimmer 2s ease-in-out infinite;
}

.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(201, 168, 76, 0.3);
}

.btn-secondary:hover {
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(201, 168, 76, 0.15), 0 0 30px rgba(201, 168, 76, 0.05);
    transform: translateY(-2px);
}

/* ── Reading Section ── */
.reading-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.reading-card {
    text-align: center;
    animation: fadeInUp 0.7s ease-out forwards;
    opacity: 0;
}

.reading-card .position-label {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.reading-card img {
    width: 120px;
    height: 195px;
    object-fit: cover;
    border-radius: 0;
    border: 2px solid var(--gold);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.2), 0 0 40px rgba(107, 76, 154, 0.1);
    margin-bottom: 8px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: cardAura 4s ease-in-out infinite alternate;
}

.reading-card:nth-child(2) img { animation-delay: 0.5s; }
.reading-card:nth-child(3) img { animation-delay: 1s; }
.reading-card:nth-child(4) img { animation-delay: 1.5s; }
.reading-card:nth-child(5) img { animation-delay: 2s; }
.reading-card:nth-child(6) img { animation-delay: 2.5s; }

@keyframes cardAura {
    0% { box-shadow: 0 6px 24px rgba(201, 168, 76, 0.2), 0 0 30px rgba(107, 76, 154, 0.1); }
    50% { box-shadow: 0 6px 24px rgba(201, 168, 76, 0.35), 0 0 50px rgba(107, 76, 154, 0.2), 0 0 80px rgba(201, 168, 76, 0.1), 0 0 100px rgba(155, 127, 207, 0.05); }
    100% { box-shadow: 0 6px 24px rgba(201, 168, 76, 0.25), 0 0 35px rgba(107, 76, 154, 0.15), 0 0 60px rgba(201, 168, 76, 0.08); }
}

.reading-card img:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 10px 32px rgba(201, 168, 76, 0.4), 0 0 60px rgba(107, 76, 154, 0.25), 0 0 100px rgba(201, 168, 76, 0.1);
    animation: none;
}

.reading-card h3 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--gold-light);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

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

@keyframes readingPanelIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.97); }
    60% { opacity: 1; transform: translateY(-2px) scale(1.005); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes titleReveal {
    0% { opacity: 0; letter-spacing: 10px; filter: blur(4px); }
    100% { opacity: 1; letter-spacing: 2px; filter: blur(0); }
}

.click-hint {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-dim);
    text-align: center;
    margin: 10px 0 4px;
    letter-spacing: 1px;
    animation: hintPulse 2.5s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.reading-actions {
    text-align: center;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Card Popup Overlay ── */
.card-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.card-popup-overlay.visible {
    opacity: 1;
}

.card-popup {
    background: linear-gradient(160deg, var(--purple-mid) 0%, var(--purple-dark) 100%);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    scrollbar-width: none;
    animation: readingPanelIn 0.5s ease-out;
}

.card-popup::-webkit-scrollbar {
    display: none;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--gold) !important;
    -webkit-text-fill-color: var(--gold) !important;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    line-height: 1;
    padding: 4px 8px;
}

.popup-close:hover {
    color: var(--gold-bright);
    text-shadow: 0 0 12px rgba(240, 208, 96, 0.5), 0 0 30px rgba(240, 208, 96, 0.2);
    transform: scale(1.2);
}

.popup-card-img {
    text-align: center;
    margin-bottom: 16px;
}

.popup-card-img img {
    width: 120px;
    height: 195px;
    object-fit: cover;
    border-radius: 0;
    border: 2px solid var(--gold);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.3), 0 0 40px rgba(107, 76, 154, 0.15);
}

.popup-title {
    font-family: 'Cinzel Decorative', serif;
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.popup-info {
    text-align: center;
    font-style: italic;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.12);
}

.popup-keywords {
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.popup-keywords strong {
    color: var(--gold);
    font-weight: 600;
}

.popup-keywords span {
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.12);
    padding: 2px 10px;
    border-radius: 16px;
    margin-right: 4px;
    display: inline-block;
    margin-bottom: 4px;
    font-style: italic;
    font-size: 0.82rem;
}

.popup-meaning {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.popup-meaning strong {
    color: var(--gold);
    font-weight: 600;
}

.meaning-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
}

.meaning-list li {
    padding: 6px 10px 6px 22px;
    position: relative;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 4px;
    background: rgba(201, 168, 76, 0.04);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    line-height: 1.5;
}

.meaning-list li::before {
    content: '✦';
    position: absolute;
    left: 6px;
    color: var(--gold-bright);
    font-size: 0.7rem;
    top: 8px;
}

.card-archetype,
.card-astrology,
.card-elemental,
.card-affirmation {
    font-size: 0.85rem;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    line-height: 1.5;
}

.card-archetype {
    background: linear-gradient(135deg, rgba(155, 127, 207, 0.12), rgba(155, 127, 207, 0.04));
    border-left: 3px solid rgba(155, 127, 207, 0.5);
    color: #c4b5e0;
}

.card-astrology {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0.04));
    border-left: 3px solid rgba(96, 165, 250, 0.5);
    color: #93c5fd;
}

.card-elemental {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(52, 211, 153, 0.04));
    border-left: 3px solid rgba(52, 211, 153, 0.5);
    color: #6ee7b7;
}

.card-affirmation {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.03));
    border-left: 3px solid rgba(251, 191, 36, 0.5);
    color: var(--gold-bright);
    font-style: italic;
}

.card-affirmation strong {
    color: var(--gold);
}

.card-archetype strong,
.card-astrology strong,
.card-elemental strong {
    color: var(--gold);
}

.card-question {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 4px;
}

.card-questions-list {
    list-style: none;
    padding: 0;
    margin: 0 0 6px;
}

.card-questions-list li {
    padding: 5px 10px 5px 20px;
    position: relative;
    font-size: 0.83rem;
    color: var(--text);
    font-style: italic;
    margin-bottom: 3px;
    background: rgba(201, 168, 76, 0.04);
    border-radius: 6px;
}

.card-questions-list li::before {
    content: '?';
    position: absolute;
    left: 6px;
    color: var(--purple-light);
    font-weight: 700;
    font-size: 0.8rem;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .container {
        padding: 14px 12px 30px;
    }

    header {
        margin-top: 70px;
    }

    .title {
        font-size: 1.8rem;
        letter-spacing: 3px;
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    h2 {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .instruction {
        font-size: 0.85rem;
    }

    .spread-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 12px;
        max-width: 360px;
        margin: 0 auto;
    }

    .spread-options .spread-btn:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: 60%;
    }

    .spread-btn {
        width: 100%;
        max-width: 170px;
        padding: 18px 16px;
    }

    #shuffle-section.active {
        justify-content: flex-start;
        padding-top: 30px;
    }

    .shuffle-container {
        height: 160px;
    }

    .deck {
        width: 90px;
        height: 150px;
    }

    .shuffle-card {
        width: 90px;
        height: 150px;
    }

    .card-grid {
        padding: 10px 8px 18px;
        gap: 10px 6px;
        max-height: 50vh;
    }

    .grid-card {
        width: 85px;
    }

    .reading-card img {
        width: 90px;
        height: 147px;
    }

    .reading-card h3 {
        font-size: 0.7rem;
    }

    .btn {
        font-size: 0.65rem;
        padding: 9px 22px;
        letter-spacing: 1.5px;
    }

    .pick-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .opening-card {
        padding: 20px 20px 16px;
    }

    .opening-btn {
        margin-top: 120px;
    }

    .opening-text {
        font-size: 0.9rem;
    }

    .crystal-orb {
        width: 110px;
        height: 110px;
        margin-bottom: 10px;
        margin-top: -30px;
    }

    .orb-symbol {
        font-size: 2.2rem;
    }

    .loader-orb-wrap {
        width: 160px;
        height: 160px;
    }

    .loader-orb .orb-symbol {
        font-size: 2.2rem;
    }

    .loader-text {
        font-size: 0.9rem;
    }

    .opening-text-area {
        min-height: 70px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    h2 {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .spread-btn {
        width: 92%;
        padding: 16px 14px;
        min-width: 0;
    }

    .spread-icon {
        font-size: 1.5rem;
    }

    .spread-name {
        font-size: 0.78rem;
    }

    .spread-desc {
        font-size: 0.72rem;
    }

    .card-grid {
        padding: 10px 4px 18px;
        gap: 8px 4px;
        max-height: 45vh;
    }

    .grid-card {
        width: 70px;
    }

    .reading-cards {
        gap: 12px;
        margin-bottom: 18px;
    }

    .reading-card img {
        width: 75px;
        height: 122px;
    }

    .reading-card .position-label {
        font-size: 0.55rem;
    }

    .reading-card h3 {
        font-size: 0.65rem;
    }

    .opening-card {
        padding: 18px 16px 14px;
    }

    .opening-btn {
        margin-top: 120px;
    }

    .opening-text {
        font-size: 0.85rem;
    }

    .crystal-orb {
        width: 100px;
        height: 100px;
        margin-bottom: 8px;
        margin-top: -25px;
    }

    .orb-symbol {
        font-size: 1.8rem;
    }

    .loader-orb-wrap {
        width: 130px;
        height: 130px;
    }

    .loader-orb .orb-symbol {
        font-size: 1.8rem;
    }

    .loader-text {
        font-size: 0.85rem;
    }

    .btn {
        font-size: 0.6rem;
        padding: 8px 20px;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .card-grid {
        max-height: 55vh;
    }

    .shuffle-container {
        height: 140px;
    }

    .deck, .shuffle-card {
        width: 80px;
        height: 130px;
    }

    header {
        margin-top: 70px;
        margin-bottom: 10px;
        padding: 6px 0;
    }

    .title {
        font-size: 1.5rem;
    }

    .opening-card {
        padding: 16px 20px 12px;
    }

    .opening-icon {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .opening-text-area {
        min-height: 55px;
    }
}
