/* Nova — PNG-mascotte (sitebreed) */

.nova-png {
    display: block;
    width: var(--nova-size, 118px);
    height: auto;
    max-width: none;
    object-fit: contain;
    object-position: center bottom;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none;
    user-select: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Geen mask/filter op img — scherper in Edge/Chrome bij downscale */
    -webkit-mask-image: none;
    mask-image: none;
    filter: none;
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}

/* Hoogte proportioneel — alle mascottes */
.nova-png {
    height: var(--luli-display-h, auto);
    max-height: var(--luli-display-h, none);
}

/* Luli & Isabella: native PNG — grootte via inline --nova-size / --luli-display-h */
.luli-png,
.isabella-png {
    image-rendering: auto;
    height: var(--luli-display-h, auto);
    max-height: var(--luli-display-h, none);
}

.nova-png--landing:not(.luli-png) {
    --nova-size: 148px;
    max-width: min(148px, 36vw);
}

.nova-png--landing.luli-png {
    --nova-size: 112px;
    max-width: min(112px, 32vw);
}

.nova-mascot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--nova-bubble-gap, 0.9rem);
    margin: 0 auto 0.5rem;
    transform: rotate(var(--nova-wrap-tilt, 0deg));
    transform-origin: center bottom;
}

.nova-mascot {
    display: block;
    width: var(--nova-size, 168px);
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 10px 22px rgba(15, 107, 86, 0.14));
}

.nova-mascot__float {
    transform-origin: 110px 200px;
    animation: nova-float 3.6s ease-in-out infinite;
}

.nova-mascot__tail {
    transform-origin: 58px 168px;
    animation: nova-tail-wag 2.2s ease-in-out infinite;
}

.nova-mascot__ear-l {
    transform-origin: 78px 62px;
    animation: nova-ear-twitch 4.5s ease-in-out infinite;
}

.nova-mascot__ear-r {
    transform-origin: 142px 62px;
    animation: nova-ear-twitch 4.5s ease-in-out 0.6s infinite;
}

.nova-mascot__paw-wave {
    transform-origin: 158px 138px;
    animation: nova-wave 1.8s ease-in-out infinite;
}

.nova-mascot__book {
    transform-origin: 110px 175px;
    animation: nova-book-bob 3.2s ease-in-out infinite;
}

.nova-mascot__eye {
    transform-origin: center;
    animation: nova-blink 4.8s ease-in-out infinite;
}

.nova-mascot__sparkle {
    transform-origin: center;
    animation: nova-sparkle 2.4s ease-in-out infinite;
}

.nova-mascot__pose {
    display: none;
}

.nova-mascot--welcome .nova-mascot__pose--welcome,
.nova-mascot--celebrate .nova-mascot__pose--celebrate,
.nova-mascot--think .nova-mascot__pose--think {
    display: block;
}

.nova-mascot--celebrate .nova-mascot__float {
    animation: nova-float 2.4s ease-in-out infinite, nova-celebrate-bounce 0.55s ease-in-out infinite;
}

.nova-mascot--celebrate .nova-mascot__paw-wave {
    animation: nova-celebrate-arms 0.7s ease-in-out infinite;
}

.nova-mascot--think .nova-mascot__float {
    animation: nova-float 4.2s ease-in-out infinite;
}

.nova-mascot__bubble {
    position: relative;
    max-width: 16rem;
    margin: 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text, #1a2e28);
    text-align: center;
    background: #fff;
    border: 2px solid rgba(18, 137, 109, 0.35);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 107, 86, 0.1);
}

.nova-mascot__bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    background: #fff;
    border-right: 2px solid rgba(18, 137, 109, 0.35);
    border-bottom: 2px solid rgba(18, 137, 109, 0.35);
    transform: rotate(45deg);
}

.landing-hero__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.landing-hero__top .nova-mascot-wrap {
    margin-left: auto;
    margin-right: auto;
}

.landing-hero__top .nova-mascot {
    --nova-size: 176px;
}

.landing-hero__top .app-logo--welcome {
    margin: 0;
}

@media (min-width: 640px) {
    .landing-hero__top {
        gap: 0.75rem;
    }

    .landing-hero__top .nova-mascot {
        --nova-size: 188px;
    }
}

@keyframes nova-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes nova-tail-wag {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(14deg); }
}

@keyframes nova-ear-twitch {
    0%, 88%, 100% { transform: rotate(0deg); }
    92% { transform: rotate(-6deg); }
    96% { transform: rotate(4deg); }
}

@keyframes nova-wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-22deg); }
    75% { transform: rotate(16deg); }
}

@keyframes nova-book-bob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(-2deg); }
}

@keyframes nova-blink {
    0%, 44%, 48%, 100% { transform: scaleY(1); }
    46% { transform: scaleY(0.12); }
}

@keyframes nova-sparkle {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes nova-celebrate-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes nova-celebrate-arms {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

/* Accessoires */
.nova-mascot__acc {
    display: none;
    pointer-events: none;
}

.nova-mascot--acc-party .nova-mascot__acc--party,
.nova-mascot--acc-beanie .nova-mascot__acc--beanie,
.nova-mascot--acc-star .nova-mascot__acc--star,
.nova-mascot--acc-sleep-mask .nova-mascot__acc--sleep-mask,
.nova-mascot--acc-headphones .nova-mascot__acc--headphones,
.nova-mascot--acc-glasses .nova-mascot__acc--glasses,
.nova-mascot--acc-flower .nova-mascot__acc--flower,
.nova-mascot--acc-bow .nova-mascot__acc--bow,
.nova-mascot--acc-confetti .nova-mascot__acc--confetti {
    display: block;
}

.nova-mascot--celebrate .nova-mascot__acc--party {
    display: block;
}

.nova-mascot--acc-party .nova-mascot__acc--party,
.nova-mascot--celebrate .nova-mascot__acc--party {
    transform-origin: 110px 30px;
    animation: nova-hat-wobble 1.6s ease-in-out infinite;
}

.nova-mascot--acc-headphones .nova-mascot__acc--headphones {
    animation: nova-headphones-bob 1.8s ease-in-out infinite;
}

.nova-mascot--acc-sleep-mask .nova-mascot__zzz {
    animation: nova-zzz-float 2.4s ease-in-out infinite;
}

.nova-mascot--acc-confetti .nova-mascot__confetti--1 {
    animation: nova-confetti-1 2.2s ease-in-out infinite;
}

.nova-mascot--acc-confetti .nova-mascot__confetti--2 {
    animation: nova-confetti-2 2.6s ease-in-out infinite;
}

.nova-mascot--acc-confetti .nova-mascot__confetti--3 {
    animation: nova-confetti-3 2s ease-in-out infinite;
}

.nova-mascot--acc-confetti .nova-mascot__confetti--4 {
    animation: nova-confetti-4 2.8s ease-in-out infinite;
}

.nova-mascot--acc-confetti .nova-mascot__confetti--5 {
    animation: nova-confetti-5 2.4s ease-in-out infinite;
}

.nova-mascot-wrap .nova-mascot {
    animation: nova-shimmy 4.8s ease-in-out infinite;
}

.nova-mascot-wrap:hover {
    animation: nova-wiggle-pop 0.55s ease-in-out;
}

@keyframes nova-hat-wobble {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(6deg); }
}

@keyframes nova-headphones-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes nova-zzz-float {
    0%, 100% { opacity: 0.35; transform: translateY(0); }
    50% { opacity: 0.75; transform: translateY(-6px); }
}

@keyframes nova-confetti-1 {
    0%, 100% { transform: rotate(20deg) translateY(0); opacity: 0.7; }
    50% { transform: rotate(35deg) translateY(-8px); opacity: 1; }
}

@keyframes nova-confetti-2 {
    0%, 100% { transform: rotate(-15deg) translateY(0); }
    50% { transform: rotate(-28deg) translateY(-10px); }
}

@keyframes nova-confetti-3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes nova-confetti-4 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-9px) scale(1.15); }
}

@keyframes nova-confetti-5 {
    0%, 100% { transform: rotate(35deg) translateY(0); }
    50% { transform: rotate(50deg) translateY(-6px); }
}

@keyframes nova-jump-pop {
    0% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(0) scale(1); }
    35% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(-14px) scale(1.04); }
    65% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(-4px) scale(1.01); }
    100% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(0) scale(1); }
}

@keyframes nova-wiggle-pop {
    0%, 100% { transform: rotate(var(--nova-figure-tilt, 0deg)); }
    20% { transform: rotate(calc(var(--nova-figure-tilt, 0deg) - 7deg)); }
    40% { transform: rotate(calc(var(--nova-figure-tilt, 0deg) + 7deg)); }
    60% { transform: rotate(calc(var(--nova-figure-tilt, 0deg) - 5deg)); }
    80% { transform: rotate(calc(var(--nova-figure-tilt, 0deg) + 4deg)); }
}

@keyframes nova-pop-in {
    0% { transform: rotate(var(--nova-figure-tilt, 0deg)) scale(0.92); opacity: 0.85; }
    60% { transform: rotate(var(--nova-figure-tilt, 0deg)) scale(1.05); }
    100% { transform: rotate(var(--nova-figure-tilt, 0deg)) scale(1); opacity: 1; }
}

@keyframes nova-stretch-body {
    0%, 100% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(2px) scale(0.98, 1); }
    40% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(-2px) scale(1.02, 0.96); }
    70% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(0) scale(1, 1); }
}

@keyframes nova-peek-body {
    0%, 100% { transform: rotate(calc(var(--nova-figure-tilt, 0deg) - 6deg)) translateX(-3px); }
    50% { transform: rotate(calc(var(--nova-figure-tilt, 0deg) + 6deg)) translateX(3px); }
}

@keyframes nova-hop-body {
    0%, 100% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(0); }
    30% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(-10px); }
    55% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(-2px); }
    75% { transform: rotate(var(--nova-figure-tilt, 0deg)) translateY(-7px); }
}

@keyframes nova-shimmy {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(-1.5deg); }
    75% { transform: translateY(-4px) rotate(1.5deg); }
}

/* Fallback vertaling zonder Nova-stack (zeldzaam) */
.lesson-mobile-tr-bubble {
    position: fixed;
    z-index: 10080;
    left: max(8px, env(safe-area-inset-left, 0px));
    top: max(5.5rem, env(safe-area-inset-top, 0px) + 3.5rem);
    margin: 0;
    padding: 0.5rem 0.6rem;
    max-width: min(16rem, calc(100vw - 4.25rem));
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.38;
    color: var(--text, #1a2e28);
    text-align: left;
    background: #fff;
    border-radius: 12px;
    border: 2px solid rgba(18, 137, 109, 0.35);
    box-shadow: 0 8px 24px rgba(15, 107, 86, 0.16);
    pointer-events: none;
}

.lesson-mobile-tr-bubble[hidden] {
    display: none !important;
}

/* @deprecated — gebruik .nova-companion__bubble boven Nova */
.nova-body-bubble {
    position: fixed;
    z-index: 10080;
    left: max(8px, env(safe-area-inset-left, 0px));
    bottom: calc(
        var(--aanvul-submit-h, 3.5rem) + var(--aanvul-rec-h, 2.85rem) + 0.45rem
    );
    margin: 0;
    padding: 0.5rem 0.6rem;
    max-width: min(16rem, calc(100vw - 4.25rem));
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.38;
    color: var(--text, #1a2e28);
    text-align: left;
    background: #fff;
    border-radius: 12px;
    border: 2px solid rgba(18, 137, 109, 0.35);
    box-shadow: 0 8px 24px rgba(15, 107, 86, 0.16);
    pointer-events: none;
    translate: no;
}

.nova-body-bubble[hidden] {
    display: none !important;
}

.nova-body-bubble::after {
    content: "";
    position: absolute;
    left: 1.15rem;
    bottom: -8px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 2px solid rgba(18, 137, 109, 0.35);
    border-bottom: 2px solid rgba(18, 137, 109, 0.35);
    transform: rotate(45deg);
}

/* ——— Zwevende companion (sleepbaar) ——— */

.nova-companion {
    position: fixed;
    z-index: 10050;
    left: 12px;
    top: auto;
    bottom: auto;
    width: auto;
    max-width: none;
    pointer-events: none;
    touch-action: none;
}

.nova-companion--boot {
    opacity: 0;
    pointer-events: none;
}

/* Aanvul- en woordenschatlessen op mobiel: compacte Nova (positie via JS) */
@media (max-width: 768px) {
    body.lesson-player-page .nova-companion.nova-companion--mobile-lesson.is-expanded .nova-companion__stack,
    body:has(.lesson-player--aanvul-layout) .nova-companion.nova-companion--mobile-lesson.is-expanded .nova-companion__stack,
    body:has(.lesson-player--vocab-mobile) .nova-companion.nova-companion--mobile-lesson.is-expanded .nova-companion__stack {
        transform: scale(0.78);
        transform-origin: bottom left;
    }

    body.lesson-player-page .nova-companion__figure .nova-companion__svg,
    body.lesson-player-page .nova-companion__figure .nova-mascot,
    body:has(.lesson-player--aanvul-layout) .nova-companion__figure .nova-companion__svg,
    body:has(.lesson-player--aanvul-layout) .nova-companion__figure .nova-mascot,
    body:has(.lesson-player--vocab-mobile) .nova-companion__figure .nova-companion__svg,
    body:has(.lesson-player--vocab-mobile) .nova-companion__figure .nova-mascot {
        width: 76px !important;
        max-width: 76px;
        height: auto !important;
    }

    body.lesson-player-page .nova-companion__anchor,
    body:has(.lesson-player--aanvul-layout) .nova-companion__anchor,
    body:has(.lesson-player--vocab-mobile) .nova-companion__anchor {
        --nova-bubble-gap: 0.5rem;
        margin: 0;
    }

    body.lesson-player-page .nova-companion__peek,
    body:has(.lesson-player--aanvul-layout) .nova-companion__peek,
    body:has(.lesson-player--vocab-mobile) .nova-companion__peek {
        width: 46px;
        height: 46px;
        border-width: 1.5px;
    }

    body.lesson-player-page .nova-companion__peek-svg,
    body:has(.lesson-player--aanvul-layout) .nova-companion__peek-svg,
    body:has(.lesson-player--vocab-mobile) .nova-companion__peek-svg {
        width: 38px;
    }
}

/* @deprecated breakpoint — behouden voor oudere viewports */
@media (max-width: 720px) {
    body:has(.lesson-player--aanvul-layout) .nova-companion,
    body:has(.lesson-player--aanvul-layout) .nova-companion.nova-companion--mobile-lesson {
        left: max(6px, env(safe-area-inset-left, 0px)) !important;
        right: auto !important;
        top: max(4.5rem, env(safe-area-inset-top, 0px) + 3rem) !important;
        bottom: auto !important;
    }

    body:has(.lesson-player--aanvul-layout) .nova-companion.is-expanded .nova-companion__stack {
        transform: scale(0.76);
        transform-origin: bottom right;
    }

    body:has(.lesson-player--aanvul-layout) .nova-companion__figure .nova-companion__svg,
    body:has(.lesson-player--aanvul-layout) .nova-companion__figure .nova-mascot {
        width: 76px !important;
        max-width: 76px;
        height: auto !important;
    }

    body:has(.lesson-player--aanvul-layout) .nova-companion__bubble {
        font-size: 0.68rem;
        line-height: 1.28;
        max-width: 10rem;
        padding: 0.28rem 0.42rem;
    }

    body:has(.lesson-player--aanvul-layout) .nova-companion__anchor {
        --nova-bubble-gap: 0.75rem;
    }

    body:has(.lesson-player--aanvul-layout) .nova-companion__peek {
        width: 46px;
        height: 46px;
        border-width: 1.5px;
    }

    body:has(.lesson-player--aanvul-layout) .nova-companion__peek-svg {
        width: 38px;
    }
}

.nova-companion.is-dragging {
    z-index: 10060;
    isolation: isolate;
    will-change: left, top;
}

/* Voorkom sidebar-hover/layout-glitches terwijl Nova eroverheen sleept */
body.nova-companion-dragging .app-sidebar {
    pointer-events: none;
}

body.nova-companion-dragging .nova-companion__figure:hover .nova-companion__png,
body.nova-companion-dragging .nova-companion--talking .nova-companion__png {
    transform: none;
}

body.nova-companion-dragging .nova-companion__figure {
    transform: none !important;
}

body.nova-companion-dragging .nova-companion__png {
    transform: none;
}

.nova-companion.is-minimized .nova-companion__stack {
    display: none;
}

.nova-companion.is-expanded .nova-companion__peek {
    display: none;
}

.nova-companion__stack,
.nova-companion__peek {
    pointer-events: auto;
    touch-action: none;
}

/* Transparante laag: Nova is anker — wolk zweeft erboven zonder verspringen */
.nova-companion__stack {
    position: relative;
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.nova-companion__anchor {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    --nova-bubble-gap: 1rem;
}

.nova-companion__speak-hint {
    margin: 0.35rem 0 0;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: center;
    color: #0a5242;
    background: rgba(255, 236, 179, 0.92);
    border: 1px solid rgba(18, 137, 109, 0.25);
    border-radius: 8px;
    cursor: pointer;
    max-width: 11rem;
}

.nova-companion__speak-hint[hidden] {
    display: none !important;
}

.nova-companion.is-dragging .nova-companion__stack,
.nova-companion.is-dragging .nova-companion__peek {
    cursor: grabbing;
}

.nova-companion--muted [data-nova-mute-icon] {
    color: #b33a2c;
}

.nova-companion__context-menu {
    position: fixed;
    z-index: 100001;
    min-width: 11.5rem;
    max-width: min(17rem, calc(100vw - 16px));
    padding: 0;
    background: #fff;
    border: 1px solid rgba(18, 137, 109, 0.22);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(10, 82, 66, 0.18), 0 2px 8px rgba(10, 82, 66, 0.08);
    pointer-events: auto;
    overflow: hidden;
}

.nova-companion__context-menu[hidden] {
    display: none !important;
}

.nova-companion__context-head {
    padding: 0.55rem 0.85rem 0.45rem;
    border-bottom: 1px solid rgba(18, 137, 109, 0.12);
    background: linear-gradient(180deg, rgba(18, 137, 109, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
}

.nova-companion__context-title {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary, #0f6b56);
}

.nova-companion__context-body {
    padding: 0.35rem;
}

.nova-companion__context-divider {
    height: 1px;
    margin: 0.25rem 0.35rem;
    background: rgba(18, 137, 109, 0.14);
}

.nova-companion__context-divider[hidden] {
    display: none !important;
}

.nova-companion__context-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.52rem 0.65rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text, #1a2e28);
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}

.nova-companion__context-item i {
    width: 1.05rem;
    text-align: center;
    color: var(--primary, #0f6b56);
    font-size: 0.88rem;
    flex-shrink: 0;
}

.nova-companion__context-item:hover,
.nova-companion__context-item:focus-visible {
    background: rgba(18, 137, 109, 0.09);
    outline: none;
}

.nova-companion__context-item--danger {
    color: #b33a2c;
}

.nova-companion__context-item--danger i {
    color: #b33a2c;
}

.nova-companion__context-item--danger:hover,
.nova-companion__context-item--danger:focus-visible {
    background: rgba(179, 58, 44, 0.08);
}

.nova-companion__context-item[hidden] {
    display: none !important;
}

.nova-companion__menu {
    width: 100%;
    max-width: min(13rem, calc(100vw - 32px));
    margin: 0.25rem auto 0;
    padding: 0.4rem 0.45rem;
    background: #fff;
    border: 2px solid rgba(18, 137, 109, 0.28);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(10, 82, 66, 0.18);
    pointer-events: auto;
    cursor: default;
    z-index: 3;
}

.nova-companion__menu[hidden] {
    display: none !important;
}

.nova-companion__menu-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.4rem 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text, #1a2e28);
    border-radius: 8px;
    cursor: pointer;
}

.nova-companion__menu-item:hover {
    background: rgba(18, 137, 109, 0.08);
}

.nova-companion__menu-item--danger {
    color: #b33a2c;
}

.nova-companion__menu-note {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted, #5a6b66);
    line-height: 1.3;
}

.nova-companion--muted .nova-companion__mute-hint {
    opacity: 0.85;
}

.nova-companion__bubble {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: calc(100% + var(--nova-bubble-gap, 1rem));
    transform: translateX(-50%);
    margin: 0;
    padding: 0.5rem 0.65rem;
    width: max-content;
    max-width: min(14rem, calc(100vw - 32px));
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text, #1a2e28);
    text-align: center;
    background: #fff;
    border-radius: 14px;
    border: 2px solid rgba(18, 137, 109, 0.28);
    box-shadow: 0 6px 18px rgba(15, 107, 86, 0.12);
    pointer-events: auto;
    cursor: pointer;
    transform-origin: bottom center;
    transition: opacity 0.18s ease;
}

.nova-companion__bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    background: #fff;
    border-right: 2px solid rgba(18, 137, 109, 0.28);
    border-bottom: 2px solid rgba(18, 137, 109, 0.28);
    transform: rotate(45deg);
}

.nova-companion__bubble[hidden] {
    display: none !important;
}

.nova-companion__figure {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    cursor: pointer;
    line-height: 0;
    overflow: visible;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    --nova-figure-tilt: 0deg;
    transform: rotate(var(--nova-figure-tilt));
    transform-origin: center bottom;
    transition: transform 0.35s ease;
}

/* Zachte grondschaduw — Nova “staat” op de pagina i.p.v. plak-sticker */
.nova-companion__figure::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    z-index: -1;
    width: 62%;
    height: 14px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(26, 46, 40, 0.28) 0%, transparent 72%);
    pointer-events: none;
}

.nova-companion__figure--jump {
    animation: nova-jump-pop 0.55s ease-out;
}

.nova-companion__figure--wiggle {
    animation: nova-wiggle-pop 0.55s ease-in-out;
}

.nova-companion__figure--pop {
    animation: nova-pop-in 0.45s ease-out;
}

.nova-companion__figure .nova-mascot {
    --nova-tilt: 0deg;
    transform: none;
}

.nova-companion__png {
    transition: transform 0.25s ease;
}

.nova-companion__figure:hover .nova-companion__png,
.nova-companion--talking .nova-companion__png {
    transform: translate3d(0, -3px, 0);
}

.nova-companion__actions {
    display: none !important;
}

.nova-companion__svg {
    display: block;
    width: 112px !important;
    height: auto !important;
    margin: 0 auto;
    filter: drop-shadow(0 3px 8px rgba(15, 107, 86, 0.1));
}

.nova-companion__peek-svg {
    width: 58px !important;
    height: auto !important;
}

.nova-companion__actions {
    margin-top: 0.25rem;
    text-align: center;
    width: 100%;
    max-width: 8.5rem;
    pointer-events: auto;
    cursor: default;
}

.nova-companion__help {
    width: auto;
    max-width: 100%;
    min-height: 0;
    padding: 0.22rem 0.45rem;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 107, 86, 0.12);
}

.nova-companion__help i {
    font-size: 0.65rem;
}

.nova-companion--star-coach .nova-companion__bubble {
    cursor: pointer;
}

.nova-companion--star-coach .nova-companion__bubble::after {
    content: ' →';
    font-weight: 800;
    color: var(--primary, #0f6b56);
}

.nova-companion__peek {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid rgba(18, 137, 109, 0.45);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 20px rgba(10, 82, 66, 0.2);
    cursor: grab;
    overflow: hidden;
    touch-action: none;
}

.nova-companion__peek-svg {
    width: 52px;
    height: auto;
    margin-top: 6px;
}

.nova-companion--talking .nova-companion__figure {
    animation: nova-float 2.8s ease-in-out infinite;
}

.nova-companion__bar-btn--mute {
    display: none !important;
}

/* Idle: slapen, vervelen, dansen — hele figuur beweegt duidelijk */
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__float,
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__tail,
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__ear-l,
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__ear-r,
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__paw-wave,
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__book,
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__eye,
.nova-companion.is-idle-active .nova-companion__figure .nova-mascot__sparkle {
    animation: none !important;
}

.nova-companion--idle-sleep .nova-companion__figure {
    animation: nova-sleep-body 4.5s ease-in-out infinite;
}

.nova-companion--idle-sleep .nova-companion__figure .nova-mascot__eye {
    animation: nova-sleep-blink 3.2s ease-in-out infinite !important;
}

.nova-companion--idle-sleep .nova-companion__figure .nova-mascot__paw-wave,
.nova-companion--idle-sleep .nova-companion__figure .nova-mascot__book {
    opacity: 0.25;
}

.nova-companion--idle-bored .nova-companion__figure {
    animation: nova-bored-body 4s ease-in-out infinite;
}

.nova-companion--idle-bored .nova-companion__figure .nova-mascot__ear-l {
    animation: nova-bored-ear-l 3.5s ease-in-out infinite !important;
    transform-origin: 78px 62px;
}

.nova-companion--idle-bored .nova-companion__figure .nova-mascot__ear-r {
    animation: nova-bored-ear-r 3.5s ease-in-out infinite !important;
    transform-origin: 142px 62px;
}

.nova-companion--idle-bored .nova-companion__figure .nova-mascot__tail {
    animation: nova-bored-tail 2.8s ease-in-out infinite !important;
    transform-origin: 58px 168px;
}

.nova-companion--idle-bored .nova-companion__figure .nova-mascot__paw-wave {
    animation: nova-bored-paw 3.8s ease-in-out infinite !important;
    transform-origin: 158px 138px;
}

.nova-companion--idle-dance .nova-companion__figure {
    animation: nova-dance-body 1.8s ease-in-out infinite;
}

.nova-companion--idle-dance .nova-companion__figure .nova-mascot__paw-wave {
    animation: nova-dance-paw 1.8s ease-in-out infinite !important;
    transform-origin: 158px 138px;
}

.nova-companion--idle-dance .nova-companion__figure .nova-mascot__tail {
    animation: nova-dance-tail 1.8s ease-in-out infinite !important;
    transform-origin: 58px 168px;
}

.nova-companion--idle-dance .nova-companion__figure .nova-mascot__ear-l,
.nova-companion--idle-dance .nova-companion__figure .nova-mascot__ear-r {
    animation: nova-dance-ears 1.8s ease-in-out infinite !important;
}

.nova-companion--idle-stretch .nova-companion__figure {
    animation: nova-stretch-body 3.6s ease-in-out infinite;
}

.nova-companion--idle-stretch .nova-companion__figure .nova-mascot__paw-wave {
    animation: nova-bored-paw 2.8s ease-in-out infinite !important;
    transform-origin: 158px 138px;
}

.nova-companion--idle-peek .nova-companion__figure {
    animation: nova-peek-body 2.8s ease-in-out infinite;
}

.nova-companion--idle-peek .nova-companion__figure .nova-mascot__eye {
    animation: nova-blink 3.2s ease-in-out infinite !important;
}

.nova-companion--idle-hop .nova-companion__figure {
    animation: nova-hop-body 1.4s ease-in-out infinite;
}

.nova-companion--idle-hop .nova-companion__figure .nova-mascot__tail {
    animation: nova-dance-tail 1.4s ease-in-out infinite !important;
    transform-origin: 58px 168px;
}

.nova-companion--pose-shift-left .nova-companion__stack {
    animation: nova-companion-shift-left 0.5s ease-out forwards;
}

.nova-companion--pose-shift-right .nova-companion__stack {
    animation: nova-companion-shift-right 0.5s ease-out forwards;
}

@keyframes nova-companion-shift-left {
    from { transform: translateX(6px); }
    to { transform: translateX(0); }
}

@keyframes nova-companion-shift-right {
    from { transform: translateX(-6px); }
    to { transform: translateX(0); }
}

@keyframes nova-sleep-body {
    0%, 100% { transform: translateY(4px) rotate(-2deg) scale(0.98); }
    50% { transform: translateY(10px) rotate(2deg) scale(0.96); }
}

@keyframes nova-sleep-blink {
    0%, 40%, 44%, 100% { transform: scaleY(0.08); }
    42% { transform: scaleY(0.9); }
}

@keyframes nova-bored-body {
    0%, 100% { transform: translateY(2px) rotate(-2deg); }
    50% { transform: translateY(5px) rotate(2deg); }
}

@keyframes nova-bored-ear-l {
    0%, 100% { transform: rotate(8deg); }
    50% { transform: rotate(-12deg); }
}

@keyframes nova-bored-ear-r {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(10deg); }
}

@keyframes nova-bored-tail {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(10deg); }
}

@keyframes nova-bored-paw {
    0%, 100% { transform: rotate(6deg) translateY(2px); }
    50% { transform: rotate(-18deg) translateY(8px); }
}

@keyframes nova-dance-body {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-2.5deg); }
    50% { transform: translateY(-3px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(2.5deg); }
}

@keyframes nova-dance-paw {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(12deg); }
}

@keyframes nova-dance-tail {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(8deg); }
}

@keyframes nova-dance-ears {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3deg); }
}

.lesson-option--nova-hidden {
    opacity: 0.28 !important;
    pointer-events: none !important;
    text-decoration: line-through;
    filter: grayscale(0.6);
}

#nova-companion.nova-companion:not(.nova-companion--boot) {
    opacity: var(--nova-mobile-opacity, 0.55);
    transition: opacity 0.18s ease;
}

#nova-companion.nova-companion.nova-companion--mobile-focus {
    opacity: 1 !important;
}

@media (max-width: 768px) {
    #nova-companion.nova-companion {
        display: block !important;
        visibility: visible !important;
        z-index: 10260;
        pointer-events: auto;
    }

    #nova-companion.nova-companion.is-expanded .nova-companion__stack {
        display: block !important;
        visibility: visible !important;
    }

    .nova-companion.nova-companion--mobile-dock:not(.nova-companion--mobile-lesson) {
        left: var(--app-fab-inset-left, max(12px, env(safe-area-inset-left, 0px))) !important;
        right: auto !important;
        top: auto !important;
        bottom: calc(
            var(--app-mobile-nav-h, 3.35rem)
            + var(--app-fab-offset, 0.65rem)
            + var(--app-fab-size, 50px)
            + 0.75rem
        ) !important;
        pointer-events: auto;
    }

    .nova-companion--boot {
        pointer-events: auto;
    }

    .nova-companion .nova-companion__stack,
    .nova-companion .nova-companion__peek {
        pointer-events: auto;
    }

    .nova-companion .nova-companion__png,
    .nova-companion .nova-png.nova-companion__png {
        --nova-size: 78px;
        width: 78px !important;
        max-width: 78px;
        height: auto !important;
        max-height: none !important;
    }

    .nova-companion__svg {
        width: 78px !important;
        height: auto !important;
    }

    .nova-companion__peek {
        width: 45px;
        height: 45px;
    }

    .nova-companion__peek-svg,
    .nova-companion__peek .nova-png {
        width: 36px !important;
        max-width: 36px;
    }

    .nova-companion__figure::after {
        width: 55%;
        height: 10px;
    }

    .nova-companion__bubble {
        max-width: min(10rem, calc(100vw - 5.5rem));
        font-size: 0.74rem;
        padding: 0.35rem 0.5rem;
    }

    .nova-companion__anchor {
        --nova-bubble-gap: 0.65rem;
    }

    body:has(.lesson-player--vocab-mobile) .nova-companion.nova-companion--mobile-lesson {
        opacity: 1 !important;
    }

    body:has(.lesson-player--vocab-mobile) .nova-companion--vocab-word-skin .nova-companion__png,
    body:has(.lesson-player--vocab-mobile) .nova-companion--vocab-word-skin .nova-companion__figure .nova-mascot,
    body:has(.lesson-player--vocab-mobile) .nova-companion--vocab-word-skin .nova-companion__figure img {
        width: 92px !important;
        max-width: 92px !important;
        height: 92px !important;
        max-height: 92px !important;
        object-fit: cover;
        border-radius: 14px;
        border: 2px solid rgba(15, 107, 86, 0.22);
        background: #fff;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    }

    body:has(.lesson-player--vocab-mobile) .nova-companion--vocab-word-skin .nova-companion__figure::after {
        display: none;
    }

    body:has(.lesson-player--vocab-mobile) .nova-companion--vocab-word-skin .nova-companion__bubble {
        max-width: min(12rem, calc(100vw - 2rem));
    }
}

@media (prefers-reduced-motion: reduce) {
    .nova-mascot__float,
    .nova-mascot__tail,
    .nova-mascot__ear-l,
    .nova-mascot__ear-r,
    .nova-mascot__paw-wave,
    .nova-mascot__book,
    .nova-mascot__eye,
    .nova-mascot__sparkle,
    .nova-mascot--celebrate .nova-mascot__float,
    .nova-mascot--celebrate .nova-mascot__paw-wave,
    .nova-mascot-wrap .nova-mascot,
    .nova-mascot--acc-party .nova-mascot__acc--party,
    .nova-mascot--acc-confetti .nova-mascot__confetti,
    .nova-companion__figure--jump,
    .nova-companion__figure--wiggle,
    .nova-companion__figure--pop,
    .nova-companion--idle-sleep .nova-companion__figure,
    .nova-companion--idle-bored .nova-companion__figure,
    .nova-companion--idle-dance .nova-companion__figure,
    .nova-companion--idle-stretch .nova-companion__figure,
    .nova-companion--idle-peek .nova-companion__figure,
    .nova-companion--idle-hop .nova-companion__figure {
        animation: none;
    }
}

/* Los Nova AI-popupvenster — chat loopt via privéchat */
#nova-ai-chat {
    display: none !important;
}
