html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background: linear-gradient(180deg, #fffaf6 0%, #fff2f8 55%, #ffedf3 100%);
    color: #3f1d3f;
}

body.page-home {
    background: linear-gradient(180deg, #fffaf6 0%, #fff2f8 55%, #ffedf3 100%);
    color: #3f1d3f;
}

.container {
    max-width: 1120px;
}

.festive-navbar {
    background: linear-gradient(90deg, #fff9fc, #ffeef6);
    border-color: #f6c8da !important;
}

.navbar-brand {
    color: #7c2d6d !important;
    font-weight: 700;
}

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.brand-name {
    letter-spacing: 0.01em;
}

.brand-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #f59e0b;
    background: linear-gradient(90deg, #fbbf24, #fb7185);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 0 0 rgba(251, 113, 133, 0.4);
    animation: brand-glow 1.8s ease-in-out infinite;
}

.brand-note {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #be185d;
    letter-spacing: 0.08em;
    animation: brand-note-pop 2.1s ease-in-out infinite;
}

.festive-navbar .nav-link {
    color: #6b2d5b !important;
    font-weight: 600;
}

.festive-navbar .nav-link:hover,
.festive-navbar .nav-link:focus {
    color: #be185d !important;
}

.navbar-toggler {
    border-color: #f4a9c8;
}

.navbar-toggler-icon {
    filter: invert(20%) sepia(24%) saturate(1964%) hue-rotate(286deg) brightness(92%) contrast(93%);
}

.login-status {
    color: #b45309 !important;
}

.login-link {
    color: #7c2d6d !important;
}

.login-link-accent {
    color: #be185d !important;
}

.quest-wrap {
    background: linear-gradient(180deg, #fffdfd, #fff8fb);
    border: 1px solid #f2cad8;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(244, 114, 182, 0.12);
}

.quest-subtitle {
    color: #7d4b72;
}

.quest-card {
    background: #fff;
    border: 1px solid #f3d2dd;
    border-radius: 14px;
}

.quest-card .card-title {
    color: #6e1f5a;
}

.table {
    --bs-table-bg: #fff;
    --bs-table-striped-bg: #fff4f8;
    --bs-table-color: #4a2a43;
    border-color: #f2d6e1;
}

.table thead th {
    color: #7b2c66;
}

form {
    background: linear-gradient(180deg, #fffcfd, #fff7fb);
    border: 1px solid #f1d0dc;
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 8px 18px rgba(244, 114, 182, 0.1);
}

.form-control,
.form-select {
    border-color: #eab6cb;
}

.form-control:focus,
.form-select:focus {
    border-color: #db2777;
    box-shadow: 0 0 0 0.2rem rgba(219, 39, 119, 0.16);
}

#chatContainer {
    border: 1px solid #f0c7d7 !important;
    background: linear-gradient(180deg, #fffefc, #fff9fb) !important;
    box-shadow: inset 0 0 0 1px rgba(252, 231, 243, 0.65);
}

#messages .bg-primary {
    background: #be185d !important;
}

#messages .bg-white {
    background: #fffdfd !important;
    border-color: #efcddd !important;
}

.certificate-wrap {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

.certificate {
    width: min(760px, 100%);
    background: linear-gradient(145deg, #fffbe8, #ffeab7);
    color: #1f2937;
    border: 3px solid #b45309;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.25);
}

.certificate-label {
    letter-spacing: 0.12rem;
    font-weight: 700;
    color: #92400e;
}

.certificate-code {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border: 1px dashed #92400e;
    border-radius: 6px;
    font-weight: 700;
    background: #fef3c7;
}

.festive-footer {
    color: #7a4a6d;
    background: rgba(255, 250, 252, 0.8);
    border-color: #f5cadb !important;
}

@keyframes brand-glow {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(251, 113, 133, 0.2);
    }
    50% {
        transform: translateY(-1px);
        box-shadow: 0 0 14px rgba(251, 113, 133, 0.55);
    }
}

@keyframes brand-note-pop {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

@media (max-width: 767.98px) {
    .brand-wrap {
        gap: 0.3rem;
    }

    .brand-code {
        min-width: 2.7rem;
        padding: 0.06rem 0.34rem;
        font-size: 0.85rem;
    }

    .brand-note {
        display: none;
    }

    form {
        padding: 1rem;
    }

    .quest-wrap,
    .certificate {
        border-radius: 16px;
    }
}