.mascot-assistant {
    --mascot-accent: #0d70f4;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    color: #18304f;
}

.mascot-assistant[hidden] { display: none !important; }

.mascot-assistant__visual {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
    margin: 0 -10px 0 0;
}

.mascot-assistant__visual img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 14px 18px rgba(34, 92, 170, .18));
}

.mascot-assistant__glow {
    position: absolute;
    inset: 48% 8% 3%;
    border-radius: 50%;
    background: rgba(80, 165, 255, .22);
    filter: blur(13px);
}

.mascot-assistant__bubble {
    position: relative;
    z-index: 1;
    max-width: 270px;
    margin-bottom: 14px;
    padding: 13px 16px;
    border: 1px solid rgba(188, 215, 249, .88);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 15px 34px rgba(39, 91, 160, .11);
    text-align: left;
}

.mascot-assistant__bubble::before {
    position: absolute;
    left: -7px;
    bottom: 22px;
    width: 12px;
    height: 12px;
    border-left: 1px solid #c8ddf8;
    border-bottom: 1px solid #c8ddf8;
    background: #fff;
    content: "";
    transform: rotate(45deg);
}

.mascot-assistant__label {
    display: block;
    margin-bottom: 4px;
    color: var(--mascot-accent);
    font-size: 11px;
    font-weight: 800;
}

.mascot-assistant__message {
    margin: 0;
    color: #5f728c;
    font-size: 12px;
    line-height: 1.6;
}

.mascot-assistant__action {
    display: inline-flex;
    margin-top: 8px;
    color: var(--mascot-accent);
    font-size: 11px;
    font-weight: 800;
}

.mascot-assistant__close {
    position: absolute;
    z-index: 4;
    top: 3px;
    right: 3px;
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #8191a6;
    cursor: pointer;
    font-size: 18px;
}

.is-mascot-error { --mascot-accent: #e06a55; }
.is-mascot-success { --mascot-accent: #12a77f; }
.is-mascot-generating .mascot-assistant__visual,
.is-mascot-waiting .mascot-assistant__visual { animation: mascot-breathe 3.4s ease-in-out infinite; }
.is-mascot-success .mascot-assistant__visual { animation: mascot-celebrate .65s ease-out both; }
.is-mascot-welcome .mascot-assistant__visual { animation: mascot-arrive .6s ease-out both; }

.home-mascot-slot {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 8;
    width: 320px;
}

.image-mascot-slot { margin: 0 auto 6px; }
.image-mascot-slot .mascot-assistant__visual { width: 104px; height: 104px; }
.image-mascot-slot .mascot-assistant__bubble { max-width: 250px; }
.skills-empty .mascot-assistant { margin: -28px auto 14px; }
.skill-login-mascot { margin: 0 0 12px; }
.skill-login-mascot .mascot-assistant__visual { width: 78px; height: 78px; }
.skill-login-mascot .mascot-assistant__bubble { padding: 10px 12px; }

@keyframes mascot-breathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes mascot-celebrate {
    0% { opacity: 0; transform: translateY(8px) scale(.92); }
    65% { opacity: 1; transform: translateY(-5px) scale(1.04); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes mascot-arrive {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
    .mascot-assistant__visual { width: 88px; height: 88px; }
    .mascot-assistant__bubble { max-width: 220px; padding: 11px 13px; }
    .home-mascot-slot { right: 12px; bottom: 6px; width: 280px; }
}

@media (prefers-reduced-motion: reduce) {
    .mascot-assistant__visual { animation: none !important; }
}
