/* ─── Character Demo Modal ───────────────────────────────────────────────── */
.char-demo-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: charDemoFadeIn 0.25s ease;
}

@keyframes charDemoFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.char-demo-modal {
    position: relative;
    width: 96vw;
    max-width: 1100px;
    height: 92vh;
    background: var(--bg-dark, #121218);
    border-radius: 12px;
    border: 1px solid var(--border-gold, #c9b35e44);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* ─── Top Banner ─────────────────────────────────────────────────────────── */
.char-demo-top-banner {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(90deg, #1a1710, #2a2418 50%, #1a1710);
    border-bottom: 1px solid var(--border-gold, #c9b35e44);
    color: var(--accent-gold, #c9b35e);
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-align: center;
}

.char-demo-top-banner span {
    flex: 1;
}

.char-demo-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
    transition: color 0.2s;
}

.char-demo-close:hover {
    color: #fff;
}

/* ─── Body (dashboard container) ─────────────────────────────────────────── */
.char-demo-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

/* Hide the back button and settings/print buttons in demo mode */
.char-demo-body #csd-back,
.char-demo-body #csd-settings-btn,
.char-demo-body #csd-print-btn {
    display: none !important;
}

/* ─── CTA Overlay (fade-to-dark on close) ────────────────────────────────── */
.char-demo-cta-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    border-radius: 12px;
}

.char-demo-cta-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.char-demo-cta-content {
    text-align: center;
    max-width: 480px;
    padding: 2rem;
    animation: charDemoCtaSlideUp 0.5s ease 0.15s both;
}

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

.char-demo-cta-content h2 {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold, #c9b35e);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.char-demo-cta-content p {
    color: var(--text-secondary, #bbb);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ─── Landing Page CTA Button ────────────────────────────────────────────── */
.char-demo-cta-section {
    text-align: center;
    padding: 1.5rem 1rem 0;
}

.char-demo-cta-section .btn {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .char-demo-modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        border: none;
    }

    .char-demo-top-banner {
        font-size: 0.72rem;
        padding: 0.6rem 0.75rem;
    }

    .char-demo-cta-content h2 {
        font-size: 1.2rem;
    }

    .char-demo-cta-content p {
        font-size: 0.95rem;
    }

    .char-demo-cta-overlay {
        border-radius: 0;
    }
}
