/* SO Mascotte v0.3.2 - decorative, transparent overlay */
.so-mascotte {
    position: fixed !important;
    inset: auto;
    width: 180px;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: none !important;
    user-select: none;
    -webkit-user-select: none;
    isolation: isolate;
    transition: left var(--so-move-duration, 1050ms) var(--so-move-easing, cubic-bezier(.24,.83,.25,1)), top var(--so-move-duration, 1050ms) var(--so-move-easing, cubic-bezier(.24,.83,.25,1));
}

.so-mascotte[hidden] { display: none !important; }
.so-mascotte .so-settings { display: none !important; }
.so-mascotte .so-figure {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    background: transparent;
    filter: drop-shadow(0 5px 6px rgb(70 10 10 / 16%));
}

/* Overscan prevents the left side of S (and other extremities) from being
   clipped during 3D rotation. The adjusted WebGL camera keeps the visible
   mascot at the SVG's original size and preserves seasonal alignment. */
.so-mascotte .so-3d-canvas {
    display: block;
    position: absolute;
    z-index: 0;
    inset: -10% auto auto -10%;
    width: 120%;
    height: 120%;
    background: transparent !important;
    pointer-events: none !important;
    filter: drop-shadow(0 5px 6px rgb(70 10 10 / 16%));
}
.so-mascotte .so-3d-canvas[hidden] { display: none !important; }
.so-mascotte .so-3d-layers { position: relative; width: 100%; height: auto; }
.so-mascotte.so-render-3d .so-3d-layers {
    transform-origin: center;
    animation: so-mascotte-float 4.5s ease-in-out infinite;
}
.so-mascotte.so-render-3d .so-floating { animation: none !important; }
.so-mascotte.so-render-3d .so-logo,
.so-mascotte.so-render-3d .so-floating > path,
.so-mascotte.so-render-3d .so-eye,
.so-mascotte.so-render-3d .so-brow,
.so-mascotte.so-render-3d .so-mouth-normal,
.so-mascotte.so-render-3d .so-mouth-bored,
.so-mascotte.so-render-3d .so-mouth-happy,
.so-mascotte.so-render-3d .so-mouth-surprised,
.so-mascotte.so-render-3d .so-cartoon-hands,
.so-mascotte.so-render-3d .so-cartoon-feet,
.so-mascotte.so-render-3d .so-ball { opacity: 0 !important; }
.so-mascotte.so-render-3d.so-playing .so-3d-layers { animation-duration: 2.2s; }

.so-mascotte .so-floating {
    transform-origin: center;
    transform-box: fill-box;
    animation: so-mascotte-float 4.5s ease-in-out infinite;
}
.so-mascotte .so-eye {
    transform-origin: center;
    transform-box: fill-box;
}
.so-mascotte.so-blink .so-eye { animation: so-mascotte-blink 5.8s infinite; }
/* In the illustrated render mode the painted eye whites live in the raster
   base plate. An independent eyelid covers them for a short natural blink. */
.so-mascotte.so-mode-illustrated .so-figure { filter: none; }
.so-mascotte.so-mode-illustrated .so-floating {
    transform-box: view-box;
    transform-origin: 50% 86%;
    animation: so-illustrated-sway 6.1s ease-in-out infinite !important;
}
.so-mascotte.so-mode-illustrated .so-illustrated-artwork,
.so-mascotte.so-mode-illustrated .so-illustrated-arm,
.so-mascotte.so-mode-illustrated .so-illustrated-foot { pointer-events: none; }
/* The two new settings are independent and also apply to the SVG fallback
   when WebGL is not available. */
.so-mascotte.so-no-hands .so-illustrated-arm,
.so-mascotte.so-no-hands .so-cartoon-hands,
.so-mascotte.so-no-feet .so-illustrated-foot,
.so-mascotte.so-no-feet .so-cartoon-feet { display: none !important; }
.so-mascotte .so-surprise-trigger {
    position: absolute;
    z-index: 3;
    left: 5%;
    top: 7%;
    width: 90%;
    height: 53%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: pointer;
    pointer-events: auto !important;
    touch-action: manipulation;
}
.so-mascotte.so-mode-illustrated .so-surprise-trigger {
    left: 7%;
    top: 5%;
    width: 85%;
    height: 59%;
}
.so-mascotte .so-surprise-trigger:focus-visible {
    outline: 2px dashed #a63e2d;
    outline-offset: 3px;
    border-radius: 18px;
}
/* Pivots are in the 1292x1218 SVG coordinates. These visible gestures and
   small alternating steps stay independent of the light body sway. */
.so-mascotte.so-mode-illustrated .so-illustrated-arm,
.so-mascotte.so-mode-illustrated .so-illustrated-foot {
    transform-box: view-box;
    will-change: transform;
}
.so-mascotte.so-mode-illustrated .so-illustrated-arm-left {
    transform-origin: 310px 681px;
    animation: so-illustrated-wave-left 4.6s ease-in-out infinite;
}
.so-mascotte.so-mode-illustrated .so-illustrated-arm-right {
    transform-origin: 1048px 464px;
    animation: so-illustrated-wave-right 5.1s ease-in-out infinite;
}
.so-mascotte.so-mode-illustrated .so-illustrated-foot-left {
    transform-origin: 259px 1108px;
    animation: so-illustrated-step-left 3.7s ease-in-out infinite;
}
.so-mascotte.so-mode-illustrated .so-illustrated-foot-right {
    transform-origin: 417px 1110px;
    animation: so-illustrated-step-right 3.7s ease-in-out infinite;
}
.so-mascotte.so-mode-illustrated.so-happy .so-illustrated-arm-right {
    animation-duration: 2.3s;
}
.so-mascotte.so-mode-illustrated.so-playing .so-illustrated-foot-left,
.so-mascotte.so-mode-illustrated.so-playing .so-illustrated-foot-right {
    animation-duration: 2.8s;
}
.so-mascotte.so-mode-illustrated .so-illustrated-lid { opacity: 0; }
.so-mascotte.so-mode-illustrated.so-blink .so-eye { animation: none; }
.so-mascotte.so-mode-illustrated.so-blink .so-illustrated-lid {
    animation: so-illustrated-blink 5.8s infinite;
}
.so-mascotte.so-mode-illustrated .so-illustrated-face { pointer-events: none; }
.so-mascotte.so-mode-illustrated .so-illustrated-face .so-mouth-normal,
.so-mascotte.so-mode-illustrated .so-illustrated-face .so-mouth-happy,
.so-mascotte.so-mode-illustrated .so-illustrated-face .so-mouth-bored,
.so-mascotte.so-mode-illustrated .so-illustrated-face .so-mouth-surprised {
    transition: opacity 110ms ease;
}
.so-mascotte.so-mode-illustrated .so-illustrated-face .so-mouth-surprised { opacity: 0; }
.so-mascotte.so-mode-illustrated.so-smile .so-mouth-normal,
.so-mascotte.so-mode-illustrated.so-happy .so-mouth-normal { opacity: 0; }
.so-mascotte.so-mode-illustrated.so-smile .so-mouth-happy { opacity: 1; }
.so-mascotte.so-mode-illustrated.so-happy .so-mouth-happy,
.so-mascotte.so-mode-illustrated.so-happy .so-mouth-bored { opacity: 0; }
.so-mascotte.so-mode-illustrated.so-happy .so-mouth-surprised { opacity: 1; }
.so-mascotte.so-mode-illustrated .so-brow-left { animation: so-illustrated-brow-left 5.9s ease-in-out infinite; }
.so-mascotte.so-mode-illustrated .so-brow-right { animation: so-illustrated-brow-right 5.9s ease-in-out infinite; }
.so-mascotte.so-mode-illustrated.so-happy .so-brow {
    animation: none;
    transform: translateY(-25px) rotate(-4deg);
}
.so-mascotte.so-mode-illustrated.so-bored .so-brow {
    animation: none;
    transform: translateY(9px) rotate(3deg);
}
.so-mascotte.so-mode-illustrated.so-variant-watercolor .so-brow { stroke: #6b4b3e; }
.so-mascotte.so-mode-illustrated.so-variant-gouache .so-brow { stroke: #4d2c22; }
.so-mascotte .so-brow { transform-origin: center; transform-box: fill-box; transition: transform 220ms ease; }
.so-mascotte .so-mouth-normal { opacity: 1; }
.so-mascotte .so-mouth-bored,
.so-mascotte .so-mouth-happy,
.so-mascotte .so-mouth-surprised { opacity: 0; }
.so-mascotte.so-bored .so-mouth-normal,
.so-mascotte.so-playing .so-mouth-normal,
.so-mascotte.so-happy .so-mouth-normal,
.so-mascotte.so-smile .so-mouth-normal { opacity: 0; }
.so-mascotte.so-bored .so-mouth-bored { opacity: 1; }
.so-mascotte.so-playing .so-mouth-happy,
.so-mascotte.so-smile .so-mouth-happy { opacity: 1; }
.so-mascotte.so-happy .so-mouth-surprised { opacity: 1; }
.so-mascotte.so-happy .so-mouth-happy,
.so-mascotte.so-happy .so-mouth-bored { opacity: 0; }
.so-mascotte.so-bored .so-brow { transform: translateY(5px); }
.so-mascotte.so-playing .so-brow { animation: so-mascotte-brow 1.5s ease-in-out infinite; }
.so-mascotte:not(.so-mode-illustrated) .so-brow-left {
    animation: so-cartoon-brow-left 5.3s ease-in-out infinite;
}
.so-mascotte:not(.so-mode-illustrated) .so-brow-right {
    animation: so-cartoon-brow-right 5.8s ease-in-out infinite;
}
.so-mascotte:not(.so-mode-illustrated).so-bored .so-brow {
    animation: none;
    transform: translateY(5px) rotate(2deg);
}
.so-mascotte:not(.so-mode-illustrated).so-happy .so-brow {
    animation: none;
    transform: translateY(-7px) rotate(-5deg);
}
.so-mascotte .so-cartoon-arm,
.so-mascotte .so-cartoon-foot {
    /* Rotate around the real limb attachment instead of the global SVG
       viewport (which starts at y=-85). This prevents floating arms. */
    transform-box: fill-box;
}
.so-mascotte .so-cartoon-arm-left {
    transform-origin: 96% 8%;
    animation: so-cartoon-wave-left 4.5s ease-in-out infinite;
}
.so-mascotte .so-cartoon-arm-right {
    transform-origin: 3% 73%;
    animation: so-cartoon-wave-right 4s ease-in-out infinite;
}
.so-mascotte .so-cartoon-foot-left {
    transform-origin: 54% 10%;
    animation: so-cartoon-step-left 3.6s ease-in-out infinite;
}
.so-mascotte .so-cartoon-foot-right {
    transform-origin: 25% 8%;
    animation: so-cartoon-step-right 3.6s ease-in-out infinite;
}
.so-mascotte.so-playing .so-floating { animation-duration: 2.2s; }
.so-mascotte.so-bored .so-eye { animation: none; transform: scaleY(.8); }
.so-mascotte.so-theme-summer .so-sunglasses { transition: transform 260ms ease; }
.so-mascotte.so-theme-summer.so-happy .so-sunglasses { transform: translateY(-8px); }

@keyframes so-mascotte-float {
    0%, 100% { transform: translateY(2px) rotate(-.9deg); }
    50% { transform: translateY(-5px) rotate(.9deg); }
}
@keyframes so-illustrated-sway {
    0%, 100% { transform: translateY(0) rotate(-.35deg); }
    48% { transform: translateY(-2px) rotate(.85deg); }
    75% { transform: translateY(0) rotate(.15deg); }
}
@keyframes so-illustrated-wave-left {
    0%, 8%, 65%, 100% { transform: rotate(0deg); }
    22%, 47% { transform: rotate(19deg); }
    35% { transform: rotate(-11deg); }
}
@keyframes so-illustrated-wave-right {
    0%, 8%, 65%, 100% { transform: rotate(0deg) translateX(0); }
    20%, 45% { transform: rotate(27deg) translateX(20px); }
    32% { transform: rotate(12deg) translateX(14px); }
    53% { transform: rotate(22deg) translateX(10px); }
}
@keyframes so-illustrated-step-left {
    0%, 15%, 48%, 100% { transform: translateY(0) rotate(0); }
    30% { transform: translateY(-35px) rotate(-16deg); }
}
@keyframes so-illustrated-step-right {
    0%, 48%, 83%, 100% { transform: translateY(0) rotate(0); }
    65% { transform: translateY(-37px) rotate(16deg); }
}
@keyframes so-illustrated-brow-left {
    0%, 28%, 53%, 100% { transform: translateY(0) rotate(0); }
    39% { transform: translateY(-11px) rotate(-4deg); }
}
@keyframes so-illustrated-brow-right {
    0%, 24%, 48%, 100% { transform: translateY(0) rotate(0); }
    35% { transform: translateY(-10px) rotate(4deg); }
}
@keyframes so-mascotte-blink {
    0%, 43%, 46%, 100% { transform: scaleY(1); }
    44.5% { transform: scaleY(.06); }
}
@keyframes so-illustrated-blink {
    0%, 43%, 46%, 100% { opacity: 0; }
    44.5% { opacity: 1; }
}
@keyframes so-cartoon-brow-left {
    0%, 32%, 53%, 100% { transform: translateY(0) rotate(0); }
    40% { transform: translateY(-5px) rotate(-6deg); }
}
@keyframes so-cartoon-brow-right {
    0%, 25%, 58%, 100% { transform: translateY(0) rotate(0); }
    37% { transform: translateY(-6px) rotate(6deg); }
}
@keyframes so-cartoon-wave-left {
    0%, 10%, 63%, 100% { transform: rotate(0deg); }
    26%, 43% { transform: rotate(13deg); }
    34% { transform: rotate(-9deg); }
}
@keyframes so-cartoon-wave-right {
    0%, 12%, 65%, 100% { transform: rotate(0deg); }
    26%, 44% { transform: rotate(-19deg); }
    35% { transform: rotate(11deg); }
}
@keyframes so-cartoon-step-left {
    0%, 19%, 49%, 100% { transform: translateY(0) rotate(0); }
    33% { transform: translateY(-13px) rotate(-10deg); }
}
@keyframes so-cartoon-step-right {
    0%, 51%, 83%, 100% { transform: translateY(0) rotate(0); }
    66% { transform: translateY(-14px) rotate(12deg); }
}
@keyframes so-mascotte-brow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    .so-mascotte.so-respect-reduced,
    .so-mascotte.so-respect-reduced * {
        animation: none !important;
        transition: none !important;
    }
}

/* Christmas beard: keep the lower tip stable and open space for the mouth
   when laughing or surprised, without moving the Santa hat. */
.so-mascotte .so-beard-expression {
    transform-box: fill-box;
    transform-origin: center bottom;
    transition: transform 110ms ease;
}
.so-mascotte.so-smile .so-beard-expression,
.so-mascotte.so-playing .so-beard-expression { transform: scaleY(.54); }
/* Surprise uses its own full-height silhouette instead of a flattened beard. */
.so-mascotte.so-happy .so-beard-expression { display: none; }
.so-mascotte.so-happy .so-beard-surprise { display: inline; }
.so-mascotte.so-respect-reduced .so-beard-expression { transition: none; }

/* WebGL places each accessory against the projected mouth bounds. */
.so-mascotte.so-render-3d .so-beard-expression { transform: none; transition: none; }
.so-mascotte .so-christmas-moustache { pointer-events: none; }
.so-mascotte:not(.so-render-3d).so-smile .so-christmas-moustache,
.so-mascotte:not(.so-render-3d).so-playing .so-christmas-moustache { transform: translateY(-2px); }
