.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.10), transparent 28%), radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 22%), linear-gradient(180deg, #0b1120 0%, #0f172a 45%, #111827 100%);
    color: #f8fafc;
}

.header-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-shell {
    position: relative;
    flex: 1;
    padding: 24px 0 48px 0;
    overflow: hidden;
}

.content-shell {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.background-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    opacity: 0.45;
}

.background-glow-1 {
    width: 320px;
    height: 320px;
    top: 40px;
    left: -80px;
    background: rgba(124, 58, 237, 0.18);
}

.background-glow-2 {
    width: 260px;
    height: 260px;
    top: 180px;
    right: -60px;
    background: rgba(245, 158, 11, 0.14);
}

.site-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(8px);
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-brand {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.footer-text {
    color: rgba(255,255,255,0.65);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff7d6;
    color: #3b2f00;
    bottom: 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.85rem 1.25rem 0.95rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
    border-top: 1px solid rgba(0,0,0,0.08);
}

#blazor-error-ui .reload {
    color: #6d28d9;
    font-weight: 600;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.9rem;
    top: 0.55rem;
    font-size: 1.1rem;
}

@media (max-width: 767.98px) {
    .main-shell {
        padding: 16px 0 32px 0;
    }

    .content-shell {
        width: min(100%, calc(100% - 20px));
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.step-cta {
    margin-top: 20px;
}

.step-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 56px;
}

.step-header {
    margin-bottom: 30px;
}

.step-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
    color: #e5e7eb;
}

.step-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-top: 10px;
    margin-bottom: 8px;
    color: #fff;
}

.step-subtitle {
    color: rgba(255,255,255,0.6);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

:where(.step-page) .story-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 25px;
    line-height: 1.8;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(6px);
}

:where(.step-page) .story-label {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 10px;
    text-transform: uppercase;
}

:where(.step-page) .story-block {
    border-left: 3px solid rgba(212, 175, 55, 0.55);
    padding-left: 1rem;
}

:where(.step-page) .narration {
    line-height: 1.9;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.9);
}

:where(.step-page) .btn-next {
    background: linear-gradient(90deg, #7c3aed, #9333ea);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 999px;
    padding: 12px 24px;
    box-shadow: 0 10px 25px rgba(124,58,237,0.4);
    transition: all 0.25s ease;
}

:where(.step-page) .btn-validate {
    min-height: 46px;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 600;
    transition: all 0.2s ease;
}

.faction-reaction {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient( 180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03) );
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    animation: fadeFaction 0.8s ease;
}

.faction-aura {
    position: absolute;
    inset: -40%;
    background: radial-gradient( circle, rgba(251,191,36,0.12), transparent 60% );
    pointer-events: none;
}

.faction-header {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.alea-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.reaction-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.faction-reaction h3 {
    color: #fff;
    margin: 0;
    font-size: 1.3rem;
    font-family: 'Cinzel', serif;
}

.reaction-text {
    margin-top: 18px;
    color: rgba(255,255,255,0.82);
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

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

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