.se360-mascot {
    position: fixed;
    right: clamp(16px, 3vw, 34px);
    bottom: clamp(18px, 4vw, 34px);
    z-index: 820;
    font-family: inherit;
    color: #25211d;
}

.se360-mascot-mini {
    width: 74px;
    height: 74px;
    border: 1px solid rgba(215, 185, 118, .55);
    border-radius: 999px;
    background: rgba(255, 250, 239, .94);
    box-shadow: 0 18px 40px rgba(52, 39, 19, .18);
    display: grid;
    place-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
}

.se360-mascot-mini:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 24px 52px rgba(52, 39, 19, .24);
}

.se360-mascot-mini img {
    width: 78px;
    height: 78px;
    object-fit: contain;
    transform: translateY(6px);
}

.se360-mascot-mini span {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f3d978, #c69a2c);
    color: #221d18;
    font-size: 15px;
    font-weight: 900;
}

.se360-mascot-card {
    position: absolute;
    right: 0;
    bottom: 88px;
    width: min(510px, calc(100vw - 28px));
    min-height: 302px;
    border: 1px solid rgba(222, 205, 167, .82);
    border-radius: 32px;
    background:
        radial-gradient(circle at 9% 12%, rgba(246, 211, 119, .2), transparent 28%),
        linear-gradient(145deg, rgba(255, 253, 246, .99), rgba(255, 247, 232, .97));
    box-shadow: 0 34px 88px rgba(38, 29, 18, .26);
    display: grid;
    grid-template-columns: 176px 1fr;
    gap: 18px;
    padding: 22px 22px 18px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(.96);
    transition: opacity .24s ease, transform .24s ease;
    overflow: hidden;
}

.se360-mascot.is-open .se360-mascot-card {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.se360-mascot.is-context-tip .se360-mascot-card {
    width: min(420px, calc(100vw - 28px));
    min-height: 196px;
    grid-template-columns: 116px 1fr;
    padding: 17px 18px 15px;
}

.se360-mascot.is-alert-tip .se360-mascot-card {
    border-color: rgba(151, 49, 54, .46);
    background:
        radial-gradient(circle at 14% 16%, rgba(244, 213, 128, .22), transparent 30%),
        linear-gradient(145deg, rgba(255, 249, 238, .99), rgba(255, 242, 235, .98));
    box-shadow: 0 34px 88px rgba(101, 37, 35, .28);
}

.se360-mascot.is-open .se360-mascot-mini {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(.88);
}

.se360-mascot-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #2c271f;
    color: #fff8e8;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

.se360-mascot-glow {
    position: absolute;
    inset: auto auto -72px -80px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(235, 196, 93, .22), transparent 68%);
    pointer-events: none;
}

.se360-mascot-hero {
    align-self: end;
    min-height: 248px;
    display: grid;
    place-items: end center;
    position: relative;
    z-index: 1;
}

.se360-mascot-hero img {
    width: 212px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 24px rgba(36, 28, 20, .16));
    animation: se360MascotFloat 4.8s ease-in-out infinite;
    transform-origin: 54% 72%;
}

.se360-mascot-hero::after {
    content: "";
    position: absolute;
    left: 38px;
    top: 82px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 2px solid rgba(229, 183, 58, .55);
    opacity: 0;
    transform: scale(.4);
    pointer-events: none;
}

.se360-mascot-hero.is-gesturing img {
    animation: se360MascotGesture .7s ease both;
}

.se360-mascot-hero.is-gesturing::after {
    animation: se360MascotPing .62s ease-out both;
}

.se360-mascot.is-context-tip .se360-mascot-hero {
    min-height: 166px;
}

.se360-mascot.is-context-tip .se360-mascot-hero img {
    width: 132px;
}

.se360-mascot.is-alert-tip .se360-mascot-hero img {
    animation: se360MascotAlert .76s ease both;
}

.se360-mascot-copy {
    min-width: 0;
    align-self: center;
    padding: 18px 6px 0 0;
    position: relative;
    z-index: 1;
}

.se360-mascot-copy > span {
    display: inline-flex;
    margin-bottom: 9px;
    color: #b28427;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.se360-mascot-greeting {
    display: block;
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.22;
    color: #2b261e;
}

.se360-mascot.is-context-tip .se360-mascot-greeting,
.se360-mascot.is-context-tip .se360-mascot-pills,
.se360-mascot.is-context-tip .se360-mascot-progress,
.se360-mascot.is-context-tip .se360-mascot-dots,
.se360-mascot.is-context-tip .se360-mascot-actions {
    display: none;
}

.se360-mascot-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 15px;
}

.se360-mascot-pills b {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border: 1px solid rgba(199, 164, 85, .42);
    border-radius: 999px;
    background: rgba(255, 250, 239, .72);
    color: #846625;
    font-size: 12px;
    font-weight: 900;
    padding: 0 10px;
}

.se360-mascot-copy h3 {
    margin: 0 0 8px;
    font-size: 29px;
    line-height: 1.05;
    letter-spacing: 0;
}

.se360-mascot.is-context-tip .se360-mascot-copy h3 {
    font-size: 24px;
}

.se360-mascot.is-alert-tip .se360-mascot-copy h3 {
    color: #8d2f35;
}

.se360-mascot-copy p {
    margin: 0;
    color: #766d61;
    font-size: 15px;
    line-height: 1.35;
}

.se360-mascot-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(218, 205, 178, .58);
    margin: 16px 0 0;
    overflow: hidden;
}

.se360-mascot-progress i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f4dc82, #c39935);
    transition: width .28s ease;
}

.se360-mascot-copy.is-changing h3,
.se360-mascot-copy.is-changing p {
    animation: se360MascotText .26s ease;
}

.se360-mascot-dots {
    display: flex;
    gap: 7px;
    margin: 14px 0 13px;
}

.se360-mascot-dots button {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: #ded2bb;
    padding: 0;
    cursor: pointer;
}

.se360-mascot-dots button.is-active {
    width: 24px;
    background: linear-gradient(135deg, #f1d16d, #b98b22);
}

.se360-mascot-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.se360-mascot-actions button,
.se360-mascot-actions a {
    min-height: 40px;
    border: 1px solid rgba(207, 180, 121, .68);
    border-radius: 999px;
    background: #fffaf0;
    color: #2a241d;
    font-weight: 900;
    padding: 0 15px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.se360-mascot-actions button:last-child,
.se360-mascot-actions a {
    background: linear-gradient(135deg, #f4dc82, #c69a32);
    border-color: transparent;
}

@keyframes se360MascotFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-7px) rotate(1deg); }
}

@keyframes se360MascotGesture {
    0% { transform: translateY(0) rotate(-1deg) scale(1); }
    28% { transform: translateY(-8px) rotate(-5deg) scale(1.035); }
    56% { transform: translateY(-3px) rotate(4deg) scale(1.015); }
    100% { transform: translateY(0) rotate(-1deg) scale(1); }
}

@keyframes se360MascotAlert {
    0% { transform: translateY(0) rotate(-1deg) scale(1); }
    18% { transform: translateY(-11px) rotate(-6deg) scale(1.05); }
    42% { transform: translateY(0) rotate(5deg) scale(1.02); }
    66% { transform: translateY(-5px) rotate(-2deg) scale(1.03); }
    100% { transform: translateY(0) rotate(-1deg) scale(1); }
}

@keyframes se360MascotPing {
    0% { opacity: 0; transform: scale(.45); }
    26% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.65); }
}

@keyframes se360MascotText {
    from { opacity: .22; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
    .se360-mascot {
        right: 14px;
        bottom: max(18px, env(safe-area-inset-bottom));
    }

    body.modal-open .se360-mascot:not(.is-open) {
        top: clamp(292px, 36vh, 392px);
        right: 34px;
        bottom: auto;
    }

    body.modal-open .se360-mascot:not(.is-open) .se360-mascot-mini {
        width: 62px;
        height: 62px;
        background: rgba(255, 248, 228, .92);
        box-shadow: 0 14px 34px rgba(22, 18, 13, .24);
    }

    body.modal-open .se360-mascot:not(.is-open) .se360-mascot-mini img {
        width: 66px;
        height: 66px;
        transform: translateY(6px);
    }

    .se360-mascot-card {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: max(14px, env(safe-area-inset-bottom));
        width: auto;
        min-height: 0;
        grid-template-columns: 106px 1fr;
        border-radius: 24px;
        padding: 14px 14px 15px;
        gap: 10px;
    }

    .se360-mascot.is-context-tip .se360-mascot-card {
        grid-template-columns: 78px 1fr;
        min-height: 130px;
        bottom: max(92px, env(safe-area-inset-bottom));
    }

    .se360-mascot-hero {
        min-height: 184px;
        align-self: center;
    }

    .se360-mascot-hero img {
        width: 132px;
    }

    .se360-mascot.is-context-tip .se360-mascot-hero {
        min-height: 112px;
    }

    .se360-mascot.is-context-tip .se360-mascot-hero img {
        width: 92px;
    }

    .se360-mascot-hero::after {
        left: 12px;
        top: 64px;
        width: 26px;
        height: 26px;
    }

    .se360-mascot-copy {
        padding: 16px 28px 0 0;
    }

    .se360-mascot-greeting {
        font-size: 14px;
        margin-bottom: 9px;
    }

    .se360-mascot-pills {
        gap: 5px;
        margin-bottom: 11px;
    }

    .se360-mascot-pills b {
        min-height: 25px;
        font-size: 11px;
        padding: 0 8px;
    }

    .se360-mascot-copy h3 {
        font-size: 22px;
    }

    .se360-mascot.is-context-tip .se360-mascot-copy h3 {
        font-size: 19px;
    }

    .se360-mascot-copy p {
        font-size: 14px;
    }

    .se360-mascot.is-context-tip .se360-mascot-copy p {
        font-size: 13px;
    }

    .se360-mascot-mini {
        width: 64px;
        height: 64px;
    }

    .se360-mascot-mini img {
        width: 68px;
        height: 68px;
    }
}

@media (max-width: 390px) {
    .se360-mascot-card {
        grid-template-columns: 1fr;
    }

    .se360-mascot-hero {
        min-height: 112px;
        place-items: center;
        margin: -16px 0 -20px;
    }

    .se360-mascot-hero img {
        width: 116px;
    }

    .se360-mascot-copy {
        padding-left: 4px;
    }

    .se360-mascot-actions {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .se360-mascot-card,
    .se360-mascot-mini,
    .se360-mascot-hero img,
    .se360-mascot-hero.is-gesturing img,
    .se360-mascot-hero.is-gesturing::after,
    .se360-mascot-copy.is-changing h3,
    .se360-mascot-copy.is-changing p {
        animation: none;
        transition: none;
    }
}
