/* ===== Chess Symbolic Oracle — Mystic-Modern Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Josefin+Sans:wght@300;400;500;600&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Variables ─── */
:root {
    --bg-deep: #06060f;
    --bg-primary: #0a0a16;
    --bg-card: rgba(16, 14, 30, 0.85);
    --purple: #7c3aed;
    --purple-dark: #5b21b6;
    --purple-light: #a78bfa;
    --purple-glow: rgba(124, 58, 237, 0.35);
    --gold: #d4af37;
    --gold-light: #f0d060;
    --gold-glow: rgba(212, 175, 55, 0.25);
    --text: #e8e6e3;
    --text-dim: #9ca3af;
    --text-muted: #5b6070;
    --border: rgba(124, 58, 237, 0.15);
    --border-gold: rgba(212, 175, 55, 0.25);
    --radius: 14px;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --flip-speed: 0.6s;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Josefin Sans', 'Inter', sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ─── Starfield ─── */
.starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--dur, 3s) ease-in-out infinite;
    opacity: 0;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: var(--peak, 0.6);
        transform: scale(1);
    }
}

/* ─── Ambient Glow ─── */
.ambient {
    position: fixed;
    border-radius: 50%;
    filter: blur(160px);
    pointer-events: none;
    z-index: 0;
}

.ambient.purple {
    width: 500px;
    height: 500px;
    background: var(--purple);
    top: -150px;
    left: -80px;
    opacity: 0.12;
}

.ambient.gold {
    width: 400px;
    height: 400px;
    background: var(--gold);
    bottom: -150px;
    right: -80px;
    opacity: 0.06;
}

/* ─── Container ─── */
.container {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Header ─── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-home {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-home:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateX(-2px);
}

.logo-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 6px var(--gold-glow));
}

.logo-text {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
}

.lang-toggle {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.lang-btn {
    padding: 5px 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.lang-btn.active {
    background: var(--purple);
    color: white;
}

/* ─── Hero ─── */
.hero {
    text-align: center;
    padding: 50px 0 30px;
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--purple-light), var(--gold-light));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 5s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes shimmer {

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

    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    max-width: 420px;
    margin: 0 auto 28px;
}

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 24px var(--purple-glow);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px var(--purple-glow);
}

/* ─── Oracle Section ─── */
.oracle-section {
    display: none;
    animation: fadeIn 0.8s ease;
}

.oracle-section.active {
    display: block;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    text-align: center;
    color: var(--gold);
    margin-bottom: 6px;
}

.instruction {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
    margin-bottom: 28px;
}

/* ─── Position Labels ─── */
.positions {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 12px;
}

.pos-item {
    text-align: center;
}

.pos-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--purple-light);
}

.pos-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    margin: 8px auto 0;
    transition: var(--transition);
}

.pos-dot.filled {
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
}

/* ─── Oracle Card Grid ─── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 520px;
    margin: 0 auto 28px;
}

/* ─── Oracle Card ─── */
.oracle-card {
    aspect-ratio: 2.5 / 3.5;
    perspective: 1200px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.oracle-card:hover:not(.disabled):not(.selected):not(.revealed) {
    transform: translateY(-4px);
}

.oracle-card.disabled {
    pointer-events: none;
    opacity: 0.25;
}

.oracle-card.selected {
    pointer-events: none;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform var(--flip-speed) cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.oracle-card.revealed .card-inner {
    transform: rotateY(180deg);
}

.oracle-card.climax-reveal .card-inner {
    transition: transform 1s cubic-bezier(0.25, 0, 0.15, 1);
}

.oracle-card.climax-reveal.revealed .card-front {
    box-shadow: 0 0 40px var(--gold-glow), 0 0 80px rgba(212, 175, 55, 0.1);
    animation: climaxPulse 2s ease-in-out infinite;
}

@keyframes climaxPulse {

    0%,
    100% {
        box-shadow: 0 0 30px var(--gold-glow), 0 0 60px rgba(212, 175, 55, 0.08);
    }

    50% {
        box-shadow: 0 0 50px var(--gold-glow), 0 0 100px rgba(212, 175, 55, 0.15);
    }
}

.card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ─── Card Back (face-down) ─── */
.card-back {
    background: linear-gradient(145deg, #12102a, #0c0a1a, #18143a);
    border: 1.5px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(124, 58, 237, 0.04);
    overflow: hidden;
}

.card-back::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(124, 58, 237, 0.08);
    border-radius: 10px;
}

.card-back-sigil {
    font-size: 32px;
    color: rgba(124, 58, 237, 0.15);
    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.1));
    transition: var(--transition);
}

.oracle-card:hover:not(.disabled):not(.selected) .card-back {
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: 0 4px 30px var(--purple-glow), inset 0 0 50px rgba(124, 58, 237, 0.06);
}

.oracle-card:hover:not(.disabled):not(.selected) .card-back-sigil {
    color: rgba(124, 58, 237, 0.3);
}

.oracle-card.selected .card-back {
    border-color: var(--gold);
    box-shadow: 0 0 24px var(--gold-glow), 0 8px 32px rgba(0, 0, 0, 0.5);
    transform: translateY(-6px);
}

.oracle-card.selected .card-back-sigil {
    color: rgba(212, 175, 55, 0.4);
}

.card-back-number {
    position: absolute;
    bottom: 10px;
    font-size: 10px;
    color: rgba(124, 58, 237, 0.12);
    font-family: 'Cinzel', serif;
}

/* ─── Selection Order Indicator ─── */
.card-select-order {
    position: absolute;
    top: 10px;
    font-family: 'Cinzel', serif;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: transparent;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.card-select-order.visible {
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold-glow);
}

/* ─── Card Front (face-up) ─── */
.card-front {
    background: linear-gradient(145deg, #14122e, rgba(124, 58, 237, 0.06));
    border: 1.5px solid var(--border-gold);
    transform: rotateY(180deg);
    padding: 12px;
    overflow: hidden;
}

.card-front .piece-svg {
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
    filter: contrast(1.2) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

.card-front.white-piece {
    color: #e8dcc8;
}

.card-front.white-piece .piece-svg {
    filter: contrast(1.15) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 12px rgba(212, 175, 55, 0.35));
}

.card-front.black-piece {
    color: var(--purple-light);
}

.card-front.black-piece .piece-svg {
    filter: contrast(1.15) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 12px rgba(124, 58, 237, 0.35));
}

.card-piece-name {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    color: var(--gold);
    letter-spacing: 1px;
}

.card-position-label {
    position: absolute;
    top: 8px;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--purple-light);
    opacity: 0.7;
}

/* ─── Actions ─── */
.actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.fate-btn,
.reset-btn-sel {
    padding: 10px 24px;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
}

.fate-btn:hover {
    border-color: var(--purple-light);
    color: var(--purple-light);
}

.reset-btn-sel:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.fate-btn[title] {
    position: relative;
}

.counter {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 24px;
}

.counter span {
    color: var(--gold);
    font-weight: 600;
}

/* ─── Result Section ─── */
.result-section {
    display: none;
    padding: 10px 0 50px;
}

.result-section.active {
    display: block;
}

.result-divider {
    width: 50px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 32px;
}

/* ─── Reading Card ─── */
.reading-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reading-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.reading-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.reading-piece-svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.reading-piece-svg.white {
    color: #e8dcc8;
    filter: contrast(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.reading-piece-svg.black {
    color: var(--purple-light);
    filter: contrast(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 10px var(--purple-glow));
}

.reading-position {
    font-family: 'Cinzel', serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--purple-light);
    margin-bottom: 2px;
}

.reading-name {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--gold);
}

.reading-archetype {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.reading-energy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    margin-bottom: 12px;
}

.reading-energy.white {
    background: rgba(232, 220, 200, 0.06);
    color: #d4c8a8;
    border: 1px solid rgba(232, 220, 200, 0.1);
}

.reading-energy.black {
    background: rgba(124, 58, 237, 0.06);
    color: var(--purple-light);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.reading-reveal {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 12px;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
    letter-spacing: 0.3px;
}

.reading-card.visible .reading-reveal {
    opacity: 1;
}

.reading-message {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 0.8s ease 0.8s;
}

.reading-card.visible .reading-message {
    opacity: 0.85;
}

.reading-advice {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(212, 175, 55, 0.05);
    border-left: 2px solid var(--gold);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--gold);
    opacity: 0;
    transition: opacity 0.8s ease 1s;
}

.reading-card.visible .reading-advice {
    opacity: 0.9;
}

.advice-icon {
    margin-right: 4px;
}

.reading-question {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(124, 58, 237, 0.05);
    border-left: 2px solid var(--purple-light);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--purple-light);
    font-style: italic;
    opacity: 0;
    transition: opacity 0.8s ease 1.2s;
}

.reading-card.visible .reading-question {
    opacity: 0.85;
}

.question-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    color: var(--purple-light);
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    margin-right: 6px;
}

/* ─── Climax Reading Card (Future) ─── */
.reading-climax {
    border-color: var(--border-gold);
    background: linear-gradient(145deg, var(--bg-card), rgba(212, 175, 55, 0.03));
}

.reading-climax .reading-reveal {
    font-size: 17px;
    text-shadow: 0 0 12px var(--gold-glow);
}

/* ─── Combined Card ─── */
.combined-card {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.06), rgba(212, 175, 55, 0.03));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.combined-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.combined-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 16px;
}

.combined-text {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-dim);
    max-width: 550px;
    margin: 0 auto;
}

/* ─── Deep Analysis Card ─── */
.deep-analysis-card {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.04), rgba(30, 25, 50, 0.8));
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.deep-analysis-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.deep-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--purple-light);
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.deep-sub-title {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: var(--gold);
    margin-top: 20px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.deep-sub-title:first-of-type {
    margin-top: 0;
}

.deep-text {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.deep-synthesis {
    background: rgba(212, 175, 55, 0.04);
    border-left: 2px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin-top: 8px;
    color: var(--text);
    font-style: italic;
}

/* ─── Combo Card ─── */
.combo-section {
    margin-top: 12px;
}

.section-label {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--purple-light);
    text-align: center;
    margin-bottom: 12px;
}

.combo-card {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.08), rgba(212, 175, 55, 0.04));
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 14px;
    text-align: center;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.combo-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.combo-label {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    color: var(--gold);
    margin-bottom: 10px;
}

.combo-text {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-dim);
    max-width: 500px;
    margin: 0 auto;
}

/* ─── Balance Card ─── */
.balance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.balance-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.balance-title {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.balance-meter {
    margin-bottom: 16px;
}

.balance-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 6px;
}

.balance-white {
    background: linear-gradient(90deg, #e8dcc8, #d4af37);
    transition: width 0.8s ease;
}

.balance-black {
    background: linear-gradient(90deg, var(--purple-dark), var(--purple));
    transition: width 0.8s ease;
}

.balance-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
}

.balance-w-label {
    color: #d4c8a8;
}

.balance-b-label {
    color: var(--purple-light);
}

.balance-label-name {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 8px;
}

.balance-text {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-dim);
    max-width: 500px;
    margin: 0 auto;
}

/* ─── Result Actions ─── */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}

.share-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gold), #b8941e);
    color: #0a0a14;
    border: none;
    border-radius: 50px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--gold-glow);
}

.reset-btn-final {
    padding: 12px 28px;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.reset-btn-final:hover {
    border-color: var(--purple-light);
    color: var(--purple-light);
}

/* ─── Ending Message ─── */
.ending-message {
    text-align: center;
    padding: 24px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease, transform 1s ease;
}

.ending-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.ending-text {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--gold);
    font-style: italic;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* ─── Disclaimer ─── */
.disclaimer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
    opacity: 0.7;
}

/* ─── Toast ─── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-card);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 13px;
    z-index: 1000;
    transition: transform 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ─── Footer ─── */
.footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid rgba(124, 58, 237, 0.08);
    margin-top: 32px;
}

.footer-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Animations ─── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 36px 0 24px;
    }

    .card-grid {
        gap: 8px;
        max-width: 360px;
    }

    .positions {
        gap: 24px;
    }

    .reading-card {
        padding: 20px;
    }

    .combined-card {
        padding: 24px;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .card-back-sigil {
        font-size: 24px;
    }

    .history-panel {
        padding: 16px;
    }

    .history-entry {
        padding: 10px;
    }
}

/* ─── Typewriter Cursor ─── */
.reading-reveal {
    min-height: 1.5em;
}

.tw-cursor {
    display: inline;
    color: var(--gold);
    font-weight: 300;
    animation: tw-blink 0.7s ease-in-out infinite;
}

.tw-cursor-done {
    animation: tw-fade 1.5s ease forwards;
}

@keyframes tw-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes tw-fade {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ─── Bright Stars ─── */
.star-bright {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.9) 0%, rgba(255, 255, 255, 0.8) 40%, transparent 70%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.5), 0 0 12px rgba(124, 58, 237, 0.2);
}

/* ─── History Button ─── */
.history-toggle-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 20px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid var(--border);
    border-radius: 24px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.history-toggle-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--gold);
    border-color: var(--border-gold);
}

/* ─── History Panel ─── */
.history-panel {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.5s ease;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.history-title {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    color: var(--gold);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.history-entry {
    padding: 12px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.08);
    transition: background 0.3s ease;
}

.history-entry:last-child {
    border-bottom: none;
}

.history-entry:hover {
    background: rgba(124, 58, 237, 0.04);
}

.history-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.history-pieces {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.history-balance {
    font-size: 11px;
    color: var(--purple-light);
    margin-top: 3px;
    font-style: italic;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Reduced Motion (Accessibility) ─── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}