body.aea-student-nav-page {
    --aea-nav-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    --aea-nav-space: calc(64px + var(--aea-nav-bottom));
    padding-block-end: var(--aea-nav-space);
}

.aea-student-nav-page #nova-float-menu,
.aea-student-nav-page #nova-sneaky-nav,
.aea-student-nav-page .nova-dost-nav {
    display: none !important;
}

#aea-student-nav {
    position: fixed;
    z-index: 9000;
    inset-inline: 0;
    bottom: var(--aea-nav-bottom);
    box-sizing: border-box;
    width: min(20rem, calc(100% - 48px));
    margin-inline: auto;
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    border: 1px solid #d6e3f5;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 18px #19345414;
    color: #233c62;
    transition: transform 280ms cubic-bezier(.22, .75, .25, 1), opacity 220ms ease;
}

#aea-student-nav.is-scroll-hidden:not(.is-keyboard-focused) {
    transform: translateY(calc(100% + var(--aea-nav-bottom) + 30px));
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    #aea-student-nav { transition: none; }
}

#aea-student-nav > :is(a, button) {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    min-width: 0;
    min-height: 46px;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #53627a;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 140ms ease, color 140ms ease;
}

#aea-student-nav > :is(a, button)::before {
    content: '';
    position: absolute;
    inset-block-start: 0;
    inset-inline: 16%;
    height: 2px;
    border-radius: 999px;
    background: #014aad;
    opacity: 0;
    transform: scaleX(.4);
    transition: opacity 140ms ease, transform 180ms ease;
}

#aea-student-nav > :is(a, button).is-selected,
#aea-student-nav:not(.has-selection) > [aria-current="page"] {
    background: transparent;
    color: #014aad;
}

#aea-student-nav > .is-selected::before,
#aea-student-nav:not(.has-selection) > [aria-current="page"]::before {
    opacity: 1;
    transform: scaleX(1);
}

#aea-student-nav > :is(a, button):active {
    background: #dce9fc;
}

#aea-student-nav > .is-selected svg {
    stroke-width: 2.25;
    fill: currentColor;
    fill-opacity: .1;
}

.aea-student-nav-symbol {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.aea-student-nav-symbol svg {
    width: 22px;
    height: 22px;
}

.aea-student-nav-dost-art {
    position: absolute;
    inset-inline-end: -3px;
    bottom: -2px;
    width: 60px;
    height: 60px;
}

#aea-student-nav > [data-tab="dost"] { border-radius: 999px; }

body.aea-nova-conversation,
body:has(.nova-dost-chat-active) {
    --aea-nav-space: 0px;
    padding-block-end: 0;
}

.aea-nova-conversation :is(#aea-student-nav, #nova-float-menu, #nova-sneaky-nav, #ft-back-to-mis, .nova-dost-nav),
body:has(.nova-dost-chat-active) :is(#aea-student-nav, #nova-float-menu, #nova-sneaky-nav, #ft-back-to-mis, .nova-dost-nav) {
    display: none !important;
}

.aea-student-nav-dost-art img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.04);
}

.aea-student-nav-dost-art::before,
.aea-student-nav-dost-art::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid;
    border-color: #66d5e3 #619ff5 #a58ce8 #d993c1;
    border-radius: 50%;
    box-shadow: 0 0 5px #77b7ed18;
    opacity: 0;
    pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
    .aea-student-nav-dost-art::before,
    .aea-student-nav-dost-art::after {
        animation: aea-dost-connection-wave 4.8s ease-out infinite;
    }
    .aea-student-nav-dost-art::after {
        animation-delay: 2.4s;
    }
    .aea-student-nav-dost-art img {
        animation: aea-dost-presence 4.8s ease-in-out infinite;
    }
    #aea-student-nav.is-scroll-hidden .aea-student-nav-dost-art::before,
    #aea-student-nav.is-scroll-hidden .aea-student-nav-dost-art::after,
    #aea-student-nav.is-scroll-hidden .aea-student-nav-dost-art img {
        animation-play-state: paused;
    }
}

@keyframes aea-dost-connection-wave {
    0% { transform: scale(.88); opacity: 0; }
    22% { opacity: .26; }
    78%, 100% { transform: scale(1.36); opacity: 0; }
}

@keyframes aea-dost-presence {
    0%, 100% { transform: scale(1.04); }
    50% { transform: scale(1.065); }
}

#aea-student-nav > :is(a, button):focus-visible,
.aea-dost-actions > a:focus-visible {
    outline: 2px solid #014aad;
    outline-offset: -2px;
}

#aea-student-nav [hidden] { display: none; }
.aea-student-nav-badge {
    position: absolute;
    inset-block-start: 3px;
    inset-inline-end: calc(50% - 26px);
    min-width: 18px;
    height: 18px;
    padding-inline: 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e8414c;
    color: #fff;
    font: 700 10px/14px system-ui, sans-serif;
    text-align: center;
}

#aea-student-notifications {
    box-sizing: border-box;
    width: min(460px, calc(100% - 24px));
    max-height: calc(100dvh - 120px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: auto auto calc(80px + env(safe-area-inset-bottom, 0px));
    padding: 18px;
    border: 1px solid #d6e3f5;
    border-radius: 23px;
    background: #fff;
    color: #233c62;
    box-shadow: 0 14px 50px #173d6a33;
    overscroll-behavior: contain;
}

#aea-student-notifications::backdrop { background: #10233c55; }
.aea-notice-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aea-notice-header h2 { margin: 0; font: 700 21px/1.3 system-ui, sans-serif; color: #173968; }
#aea-student-notifications button {
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 12px;
    background: #edf4ff;
    color: #014aad;
    font: inherit;
    cursor: pointer;
}
#aea-student-notifications [hidden] { display: none; }
#aea-student-notifications button:focus-visible,
.aea-notice-item:focus-visible { outline: 2px solid #014aad; outline-offset: 2px; }
#aea-student-notifications button:disabled { opacity: .5; cursor: default; }
#aea-student-notifications [data-notice-close] { font-size: 25px; line-height: 1; }
#aea-student-notifications .aea-notice-read { margin-block: 12px; }
.aea-notice-items { display: grid; gap: 8px; }
.aea-notice-item {
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid #e3eaf4;
    border-radius: 15px;
    color: #254268;
    background: #fff;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.aea-notice-item.is-unread { background: #edf4ff; border-color: #c5d9f7; }
.aea-notice-item strong { font-size: 14px; color: #143567; }
.aea-notice-item span { font-size: 13px; line-height: 1.5; }
.aea-notice-item small { font-size: 11px; color: #637792; }
#aea-student-notifications [data-notice-status] { font-size: 13px; line-height: 1.5; }
#aea-student-notifications [data-notice-status]:empty { display: none; }
.aea-notice-device { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e3eaf4; }
.aea-notice-device p { margin: 8px 0 0; color: #637792; font-size: 12px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
    #aea-student-nav > :is(a, button),
    #aea-student-nav > :is(a, button)::before,
    .aea-student-nav-symbol { transition: none; }
}

.aea-dost-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 12px;
}

.aea-dost-actions > a {
    padding: 10px 14px;
    border: 1px solid #d6e3f5;
    border-radius: 10px;
    background: #f2f7ff;
    color: #014aad;
    font-weight: 700;
    text-decoration: none;
}

.aea-student-nav-chat .nova-root .nova-dost-root.nova-dost-chat-active {
    height: calc(100vh - var(--aea-nav-space) - var(--aea-app-top, 0px)) !important;
    height: calc(100dvh - var(--aea-nav-space) - var(--aea-app-top, 0px)) !important;
    max-height: calc(100vh - var(--aea-nav-space) - var(--aea-app-top, 0px)) !important;
    max-height: calc(100dvh - var(--aea-nav-space) - var(--aea-app-top, 0px)) !important;
}

.aea-nova-status-backdrop {
    display: none;
}

@media (display-mode: standalone) {
    body.aea-nova-app {
        --aea-app-top: env(safe-area-inset-top, 0px);
        padding-top: var(--aea-app-top);
    }

    .aea-nova-status-backdrop {
        display: block;
        position: fixed;
        z-index: 2147483001;
        inset: 0 0 auto;
        height: var(--aea-app-top);
        background: #f5f8fc;
        pointer-events: none;
    }

    .aea-nova-app .nova-hub-spotlight {
        padding-top: 24px;
    }

    .aea-nova-app .nova-dost-list-head {
        top: var(--aea-app-top);
    }

    .aea-nova-app .nova-root .nova-dost-root.nova-dost-chat-scene > .nova-dost-chat-head {
        padding-top: 12px;
    }

    .aea-nova-app:has(.nova-cafe-room) #nova-shell-main,
    .aea-nova-app .nova-cafe-room {
        height: calc(100vh - var(--aea-app-top));
        height: calc(100dvh - var(--aea-app-top));
    }
}

@media (max-width: 600px) {
    .aea-student-nav-chat:has(.nova-dost-composer input:focus, .nova-dost-composer textarea:focus) {
        --aea-nav-space: 0px;
    }

    .aea-student-nav-chat:has(.nova-dost-composer input:focus, .nova-dost-composer textarea:focus) #aea-student-nav {
        display: none;
    }
}
