.journey-wizard {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.journey-wizard[hidden] {
    display: none !important;
}

.journey-wizard__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.journey-wizard__dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: min(90vh, 640px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
    padding: 1.75rem 1.5rem 1.5rem;
    animation: journeyWizardIn 0.35s ease;
}

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

@media (prefers-reduced-motion: reduce) {
    .journey-wizard__dialog {
        animation: none;
    }
}

.journey-wizard__close,
.journey-wizard__back {
    position: absolute;
    top: 0.75rem;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.journey-wizard__close {
    right: 0.75rem;
}

.journey-wizard__back {
    left: 0.75rem;
}

[dir="rtl"] .journey-wizard__close {
    right: auto;
    left: 0.75rem;
}

[dir="rtl"] .journey-wizard__back {
    left: auto;
    right: 0.75rem;
}

.journey-wizard__close:hover,
.journey-wizard__back:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.journey-wizard__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 2rem 0.5rem 0;
    line-height: 1.35;
}

[dir="rtl"] .journey-wizard__title {
    margin: 0 0 0.5rem 2rem;
}

.journey-wizard__subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.journey-wizard__message {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.journey-wizard__grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.journey-wizard__card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    text-align: start;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.journey-wizard__card:hover {
    border-color: #8a356a;
    background: #fdf8fb;
    box-shadow: 0 4px 12px rgba(138, 53, 106, 0.08);
}

.journey-wizard__card--outline {
    border-style: dashed;
    border-color: #cbd5e1;
}

.journey-wizard__icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.journey-wizard__card-text {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.4;
}

.journey-wizard__btn-primary {
    width: 100%;
    background: #8a356a;
    border-color: #8a356a;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-weight: 600;
}

.journey-wizard__btn-primary:hover {
    background: #6f2a55;
    border-color: #6f2a55;
}

.journey-wizard__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.journey-wizard__link-secondary {
    text-align: center;
    font-size: 0.9rem;
    color: #8a356a;
    text-decoration: underline;
}

.journey-wizard__dialog--step2 {
    max-width: 560px;
    max-height: min(92vh, 720px);
}

.journey-wizard__step-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a356a;
    background: #fdf2f8;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.5rem;
}

.journey-wizard__panel {
    display: none;
}

.journey-wizard__panel.is-active {
    display: block;
}

.journey-wizard__grid--levels .journey-wizard__card {
    padding: 0.75rem 1rem;
}

.journey-wizard__level-num {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #f1f5f9;
    color: #8a356a;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.journey-wizard__level-badge {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8a356a;
    margin-top: 0.25rem;
}
