:root {
    --bot-top: #8b1024;
    --bot-base: #c5162f;
    --bot-casual: #b8182d;
    --bot-error: #7d0f21;

    --energy-blue: #c5162f;
    --energy-red: #c5162f;
    --energy-light: #fff3c4;

    --bell-bone: #f4dec5;
    --bell-skin: #e8c39a;
    --bell-warm: #c88f55;
    --bell-shadow: #8e4e36;
    --bell-light: #fff7df;

    --xmas-dot-a: #fff7df;
    --xmas-dot-b: #ffd86b;
    --xmas-dot-c: #1f7a50;
    --xmas-dot-d: #fff1c2;

    --text-bot: #7a1522;
    --mouth-light: #fff3e6;
    --black: #12090b;
    --white: #fffaf0;
}

@property --xmas-dot-a {
    syntax: "<color>";
    inherits: false;
    initial-value: #fff7df;
}

@property --xmas-dot-b {
    syntax: "<color>";
    inherits: false;
    initial-value: #ffd86b;
}

@property --xmas-dot-c {
    syntax: "<color>";
    inherits: false;
    initial-value: #1f7a50;
}

@property --xmas-dot-d {
    syntax: "<color>";
    inherits: false;
    initial-value: #fff1c2;
}
 

.assistant {
    width: 108px;
    height: 205px;
    position: relative;
    overflow: visible;
    isolation: isolate;
    z-index: 3;
    filter: drop-shadow(0 15px 15px rgba(74, 28, 34, 0.22));
    animation: bot-float 5.4s ease-in-out infinite;
}

.assistant::after {
    content: "";
    position: absolute;
    width: 72px;
    height: 12px;
    left: 18px;
    bottom: 8px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(75, 28, 34, 0.25), transparent 72%);
    filter: blur(3px);
    opacity: 0.72;
    z-index: -1;
    pointer-events: none;
    animation: bot-shadow 5.4s ease-in-out infinite;
}

.body,
.body-casual,
.body-error,
.body-ok {
    width: 100px;
    height: 128px;
    position: absolute;
    top: 50px;
    left: 4px;
    overflow: hidden;
    z-index: 4;
    border-radius: 50% 50% 54% 54% / 46% 46% 56% 56%;
    transform-origin: center bottom;
    background:
        radial-gradient(circle at 24% 28%, var(--xmas-dot-a) 0 2px, transparent 2.6px),
        radial-gradient(circle at 72% 31%, var(--xmas-dot-b) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 19% 53%, var(--xmas-dot-c) 0 1.9px, transparent 2.6px),
        radial-gradient(circle at 82% 56%, var(--xmas-dot-d) 0 2px, transparent 2.7px),
        radial-gradient(circle at 31% 76%, var(--xmas-dot-b) 0 1.7px, transparent 2.4px),
        radial-gradient(circle at 67% 79%, var(--xmas-dot-a) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 46% 39%, rgba(255, 247, 223, 0.78) 0 1.3px, transparent 2px),
        radial-gradient(circle at 58% 65%, rgba(31, 122, 80, 0.82) 0 1.3px, transparent 2px),
        radial-gradient(circle at 30% 14%, rgba(255, 250, 240, 0.18) 0 7%, transparent 8%),
        radial-gradient(circle at 72% 82%, rgba(255, 210, 120, 0.12), transparent 30%),
        linear-gradient(160deg, var(--bot-top) 20%, var(--bot-base) 100%);
    box-shadow:
        inset 8px 0 13px rgba(255, 250, 240, 0.07),
        inset -10px -16px 20px rgba(55, 8, 18, 0.40),
        inset 0 0 14px rgba(255, 243, 196, 0.08),
        0 10px 17px rgba(74, 28, 34, 0.18);
    animation:
        body-breath 5.2s ease-in-out infinite,
        xmas-dot-colors 4.6s ease-in-out infinite;
}

.body-casual {
    background:
        radial-gradient(circle at 24% 28%, var(--xmas-dot-a) 0 2px, transparent 2.6px),
        radial-gradient(circle at 72% 31%, var(--xmas-dot-b) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 19% 53%, var(--xmas-dot-c) 0 1.9px, transparent 2.6px),
        radial-gradient(circle at 82% 56%, var(--xmas-dot-d) 0 2px, transparent 2.7px),
        radial-gradient(circle at 31% 76%, var(--xmas-dot-b) 0 1.7px, transparent 2.4px),
        radial-gradient(circle at 67% 79%, var(--xmas-dot-a) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 46% 39%, rgba(255, 247, 223, 0.72) 0 1.3px, transparent 2px),
        radial-gradient(circle at 58% 65%, rgba(31, 122, 80, 0.78) 0 1.3px, transparent 2px),
        radial-gradient(circle at 30% 14%, rgba(255, 250, 240, 0.16) 0 7%, transparent 8%),
        radial-gradient(circle at 72% 82%, rgba(255, 210, 120, 0.10), transparent 30%),
        linear-gradient(160deg, #941126 20%, var(--bot-casual) 100%);
    animation-duration: 5.8s, 4.9s;
}

.body-error {
    background:
        radial-gradient(circle at 24% 28%, var(--xmas-dot-a) 0 2px, transparent 2.6px),
        radial-gradient(circle at 72% 31%, var(--xmas-dot-b) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 19% 53%, var(--xmas-dot-c) 0 1.9px, transparent 2.6px),
        radial-gradient(circle at 82% 56%, var(--xmas-dot-d) 0 2px, transparent 2.7px),
        radial-gradient(circle at 31% 76%, var(--xmas-dot-b) 0 1.7px, transparent 2.4px),
        radial-gradient(circle at 67% 79%, var(--xmas-dot-a) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 46% 39%, rgba(255, 247, 223, 0.66) 0 1.3px, transparent 2px),
        radial-gradient(circle at 58% 65%, rgba(31, 122, 80, 0.70) 0 1.3px, transparent 2px),
        radial-gradient(circle at 30% 14%, rgba(255, 250, 240, 0.14) 0 7%, transparent 8%),
        radial-gradient(circle at 72% 82%, rgba(255, 210, 120, 0.08), transparent 30%),
        linear-gradient(160deg, #69101d 18%, var(--bot-error) 100%);
    animation-duration: 4s, 3.7s;
}

.body-ok {
    background:
        radial-gradient(circle at 24% 28%, var(--xmas-dot-a) 0 2px, transparent 2.6px),
        radial-gradient(circle at 72% 31%, var(--xmas-dot-b) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 19% 53%, var(--xmas-dot-c) 0 1.9px, transparent 2.6px),
        radial-gradient(circle at 82% 56%, var(--xmas-dot-d) 0 2px, transparent 2.7px),
        radial-gradient(circle at 31% 76%, var(--xmas-dot-b) 0 1.7px, transparent 2.4px),
        radial-gradient(circle at 67% 79%, var(--xmas-dot-a) 0 1.8px, transparent 2.5px),
        radial-gradient(circle at 46% 39%, rgba(255, 247, 223, 0.78) 0 1.3px, transparent 2px),
        radial-gradient(circle at 58% 65%, rgba(31, 122, 80, 0.82) 0 1.3px, transparent 2px),
        radial-gradient(circle at 30% 14%, rgba(255, 250, 240, 0.17) 0 7%, transparent 8%),
        radial-gradient(circle at 72% 82%, rgba(255, 220, 150, 0.12), transparent 30%),
        linear-gradient(160deg, #8b1024 20%, #c5162f 100%);
    animation-duration: 5.6s, 4.4s;
}

.body::after,
.body-casual::after,
.body-error::after,
.body-ok::after {
    content: "";
    position: absolute;
    width: 120%;
    height: 36%;
    left: -10%;
    bottom: -20%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 217, 150, 0.14), transparent 72%);
    opacity: 0.78;
    pointer-events: none;
}

/* ==========================================================
   LUCES NAVIDEÑAS COMO ELEMENTOS REALES DEL DOM
   Rodean el body del NPC sin depender de fondos ni pseudo-bulbos.
   ========================================================== */

.xmas-lights {
    width: 132px;
    height: 158px;
    position: absolute;
    top: 39px;
    left: -12px;
    z-index: 6;
    pointer-events: none;
    transform-origin: center;
    animation: xmas-garland-breath 5.2s ease-in-out infinite;
}

.xmas-lights::before {
    content: "";
    position: absolute;
    width: 116px;
    height: 143px;
    top: 7px;
    left: 8px;
    border-radius: 50% 50% 54% 54% / 46% 46% 58% 58%;
    border: 1.6px solid rgba(17, 95, 55, 0.62);
    box-shadow:
        inset 0 0 4px rgba(255, 247, 223, 0.12),
        0 0 5px rgba(18, 9, 11, 0.08);
    opacity: 0.72;
    transform: rotate(-2deg);
}

.xmas-lights::after {
    content: "";
    position: absolute;
    width: 112px;
    height: 135px;
    top: 12px;
    left: 10px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 4%, rgba(255, 216, 107, 0.14), transparent 14%),
        radial-gradient(circle at 96% 44%, rgba(255, 64, 83, 0.10), transparent 17%),
        radial-gradient(circle at 7% 58%, rgba(37, 190, 115, 0.10), transparent 18%),
        radial-gradient(circle at 48% 98%, rgba(255, 255, 255, 0.10), transparent 18%);
    filter: blur(1px);
    opacity: 0.72;
}

.xmas-bulb {
    --c1: #ff3852;
    --c2: #ffd86b;
    --c3: #26b96f;
    --glow: rgba(255, 56, 82, 0.62);
    --t: 2.05s;
    --s: 1;
    --r: 0deg;

    width: 8px;
    height: 11px;
    position: absolute;
    top: var(--y);
    left: var(--x);
    z-index: 2;
    border-radius: 56% 56% 48% 48% / 62% 62% 42% 42%;
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.94) 0 13%, transparent 15%),
        linear-gradient(180deg, var(--c1), color-mix(in srgb, var(--c1) 72%, #12090b 28%));
    border: 1px solid rgba(255, 250, 240, 0.58);
    box-shadow:
        0 0 5px var(--glow),
        0 0 10px color-mix(in srgb, var(--c1) 48%, transparent),
        inset 0 -2px 3px rgba(18, 9, 11, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.62);
    transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s));
    transform-origin: center top;
    animation: xmas-bulb-rhythm var(--t) ease-in-out infinite;
    animation-delay: var(--d);
}

.xmas-bulb::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 4px;
    top: -3px;
    left: 50%;
    border-radius: 3px 3px 1px 1px;
    background:
        linear-gradient(180deg, #244831 0%, #123522 100%);
    box-shadow:
        inset 0 1px 1px rgba(255, 250, 240, 0.14),
        0 1px 1px rgba(18, 9, 11, 0.18);
    transform: translateX(-50%);
}

.xmas-bulb::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--c1) 36%, transparent), transparent 68%);
    filter: blur(1px);
    opacity: 0.68;
    transform: translate(-50%, -50%);
    animation: xmas-glow-soft var(--t) ease-in-out infinite;
    animation-delay: var(--d);
}

.xmas-bulb.is-red {
    --c1: #ff3048;
    --c2: #ffffff;
    --c3: #ffd86b;
    --glow: rgba(255, 48, 72, 0.72);
}

.xmas-bulb.is-gold {
    --c1: #ffd86b;
    --c2: #fff7df;
    --c3: #ff4058;
    --glow: rgba(255, 216, 107, 0.74);
}

.xmas-bulb.is-green {
    --c1: #25b86f;
    --c2: #eaffd8;
    --c3: #ffd86b;
    --glow: rgba(37, 184, 111, 0.70);
}

.xmas-bulb.is-cream {
    --c1: #fff7df;
    --c2: #ffd86b;
    --c3: #ff3852;
    --glow: rgba(255, 247, 223, 0.70);
}

.xmas-bulb.is-mint {
    --c1: #7fffd0;
    --c2: #ffffff;
    --c3: #25b86f;
    --glow: rgba(127, 255, 208, 0.58);
}

.energy,
.energy-error,
.energy-ok {
    width: 76px;
    height: 82px;
    position: absolute;
    top: 78px;
    left: 16px;
    z-index: 7;
    overflow: hidden;
    border-radius: 50%;
    opacity: 0.96;
    background-color: var(--bell-bone);
    background-image:
        radial-gradient(ellipse at 36% 18%, rgba(255, 250, 240, 0.88) 0 5%, rgba(255, 243, 196, 0.36) 6% 14%, transparent 15%),
        radial-gradient(circle at 54% 47%, var(--bell-light) 0 8%, var(--bell-bone) 24%, var(--bell-skin) 58%, var(--bell-warm) 100%);
    background-size: 115% 205%;
    background-position: 44% 82%;
    border: 1px solid rgba(255, 243, 196, 0.62);
    box-shadow:
        inset 0 0 8px rgba(255, 250, 240, 0.42),
        inset 0 -15px 22px rgba(142, 78, 54, 0.26),
        inset 0 8px 13px rgba(255, 243, 196, 0.18),
        0 0 12px rgba(197, 22, 47, 0.18),
        0 0 18px rgba(255, 214, 139, 0.12);
    animation: water-flow 4.8s linear infinite, energy-glow 3.8s ease-in-out infinite;
}

.energy-error {
    background-image:
        radial-gradient(ellipse at 36% 18%, rgba(255, 250, 240, 0.78) 0 5%, rgba(255, 225, 205, 0.34) 6% 14%, transparent 15%),
        radial-gradient(circle at 54% 47%, #fff0dc 0 8%, #f0c9aa 25%, #d4956d 58%, #a85c45 100%);
    box-shadow:
        inset 0 0 8px rgba(255, 250, 240, 0.34),
        inset 0 -15px 22px rgba(120, 46, 38, 0.28),
        0 0 12px rgba(197, 22, 47, 0.22);
    animation-duration: 4s, 3.2s;
}

.energy-ok {
    background-image:
        radial-gradient(ellipse at 36% 18%, rgba(255, 250, 240, 0.88) 0 5%, rgba(255, 243, 196, 0.36) 6% 14%, transparent 15%),
        radial-gradient(circle at 54% 47%, #fff8df 0 8%, #f4dec5 24%, #e0b77e 58%, #bd8347 100%);
    box-shadow:
        inset 0 0 8px rgba(255, 250, 240, 0.42),
        inset 0 -15px 22px rgba(125, 79, 38, 0.26),
        inset 0 8px 13px rgba(255, 243, 196, 0.18),
        0 0 12px rgba(255, 214, 139, 0.22);
}

.energy::before,
.energy-error::before,
.energy-ok::before {
    content: "";
    position: absolute;
    inset: 10px 16px 16px 13px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 250, 240, 0.28), transparent 38%),
        radial-gradient(ellipse at 34% 19%, rgba(255, 243, 196, 0.28) 0 10%, transparent 11%);
    opacity: 0.76;
    mix-blend-mode: screen;
    pointer-events: none;
}

.energy::after,
.energy-error::after,
.energy-ok::after {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    bottom: 9%;
    height: 18%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(92, 42, 28, 0.22), transparent 72%);
    opacity: 0.56;
    pointer-events: none;
}

.nameBot {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 7.6px;
    line-height: 1;
    letter-spacing: 0.06em;
    font-weight: 800;
    color: rgba(122, 21, 34, 0.96);
    text-transform: uppercase;
    text-shadow:
        0 1px 1px rgba(255, 250, 240, 0.84),
        0 0 3px rgba(255, 243, 196, 0.50);
    pointer-events: none;
}

.head {
    width: 50px;
    height: 50px;
    position: absolute;
    left: 29px;
    top: 4px;
    z-index: 9;
    overflow: hidden;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 250, 240, 0.16) 0 8%, transparent 9%),
        linear-gradient(160deg, #941126 20%, #5e101d 100%);
    box-shadow:
        inset 7px 0 10px rgba(255, 250, 240, 0.07),
        inset -8px -11px 14px rgba(55, 8, 18, 0.44),
        0 7px 12px rgba(74, 28, 34, 0.22);
    animation: head-bob 5.8s ease-in-out infinite;
}

.head::before {
    content: "";
    position: absolute;
    inset: 6px;
    z-index: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 24%, rgba(255, 250, 240, 0.14) 0 11%, transparent 12%),
        linear-gradient(135deg, rgba(255, 250, 240, 0.09), transparent 48%);
    pointer-events: none;
}

.eyes {
    width: 31px;
    height: 31px;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
}

.eye,
.eye-casual {
    width: 31px;
    height: 31px;
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 50%;
    transform-origin: center;
    background:
        radial-gradient(circle at 33% 24%, rgba(255, 250, 240, 0.90) 0 8%, transparent 9%),
        radial-gradient(circle at 50% 52%, #fffaf0 0 32%, #f0e7d8 33% 57%, #d6c8b8 58% 100%);
    border: 2px solid rgba(50, 22, 18, 0.32);
    box-shadow:
        inset 0 -5px 8px rgba(50, 22, 18, 0.16),
        inset 0 3px 5px rgba(255, 250, 240, 0.62),
        0 0 0 1px rgba(255, 250, 240, 0.14),
        0 2px 4px rgba(50, 22, 18, 0.28);
}

.eye {
    animation: eye-look 6s ease-in-out infinite;
}

.eye-casual {
    animation: eye-look-soft 10s ease-in-out infinite;
}

.pupil,
.pupil-casual {
    width: 12px;
    height: 12px;
    position: absolute;
    top: 52%;
    left: 52%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
    background:
        radial-gradient(circle at 35% 27%, rgba(255, 250, 240, 0.56) 0 13%, transparent 14%),
        radial-gradient(circle, #12090b 0 58%, #2a1518 59% 100%);
    box-shadow:
        0 0 0 2px rgba(50, 22, 18, 0.08),
        0 1px 2px rgba(50, 22, 18, 0.35);
}

.pupil {
    animation: blink-clean 4.4s ease-in-out infinite;
}

.pupil-casual {
    animation: blink-clean 6.8s ease-in-out infinite;
}

.mouth,
.mouth-casual {
    width: 13px;
    height: 2px;
    position: absolute;
    top: 43px;
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    border-radius: 18px;
    background-color: var(--mouth-light);
    border-left: 2px solid rgba(255, 250, 240, 0.68);
    border-right: 2px solid rgba(255, 250, 240, 0.68);
    opacity: 0.82;
}

.mouth {
    animation: talk 1.5s ease-in-out infinite;
}

.mouth-casual {
    height: 1px;
    background-color: var(--white);
    opacity: 0.72;
}

.limb-left,
.limb-right,
.limb-left-casual,
.limb-right-casual,
.limb-left-ok,
.limb-right-ok,
.limb-left-error,
.limb-right-error {
    width: 10px;
    height: 76px;
    position: absolute;
    top: 90px;
    z-index: 3;
    border-radius: 999px;
    transform-origin: top center;
    background:
        radial-gradient(circle at 35% 12%, rgba(255, 250, 240, 0.12) 0 9%, transparent 10%),
        linear-gradient(180deg, #8b1024 8%, #a9152a 48%, #6b0f1e 100%);
    box-shadow:
        inset 2px 0 4px rgba(255, 250, 240, 0.07),
        inset -3px -6px 6px rgba(55, 8, 18, 0.38),
        0 4px 8px rgba(74, 28, 34, 0.18);
}

.limb-left,
.limb-left-casual,
.limb-left-ok,
.limb-left-error {
    left: 2px;
    border-radius: 70% 45% 60% 80% / 30% 40% 90% 90%;
    transform: rotate(13deg);
}

.limb-right,
.limb-right-casual,
.limb-right-ok,
.limb-right-error {
    right: 3px;
    border-radius: 45% 70% 80% 60% / 40% 30% 90% 90%;
    transform: rotate(-13deg);
}

.limb-left {
    animation: wave-limb-left 3.2s ease-in-out infinite;
}

.limb-right {
    animation: wave-limb-right 3.2s ease-in-out infinite;
}

.limb-left-casual,
.limb-left-ok,
.limb-left-error {
    animation: wave-limb-left-soft 9s ease-in-out infinite;
}

.limb-right-casual,
.limb-right-ok,
.limb-right-error {
    animation: wave-limb-right-soft 9s ease-in-out infinite;
}

@keyframes bot-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes bot-shadow {

    0%,
    100% {
        transform: scaleX(1);
        opacity: 0.72;
    }

    50% {
        transform: scaleX(0.84);
        opacity: 0.42;
    }
}

@keyframes body-breath {

    0%,
    100% {
        transform: scaleY(1);
        filter: brightness(1);
    }

    50% {
        transform: scaleY(1.035);
        filter: brightness(1.035);
    }
}

@keyframes xmas-dot-colors {

    0%,
    100% {
        --xmas-dot-a: #fff7df;
        --xmas-dot-b: #ffd86b;
        --xmas-dot-c: #1f7a50;
        --xmas-dot-d: #fff1c2;
    }

    33% {
        --xmas-dot-a: #ffe08a;
        --xmas-dot-b: #ffffff;
        --xmas-dot-c: #2f9b62;
        --xmas-dot-d: #ffd36a;
    }

    66% {
        --xmas-dot-a: #ffffff;
        --xmas-dot-b: #1f7a50;
        --xmas-dot-c: #ffe08a;
        --xmas-dot-d: #fff7df;
    }
}

@keyframes xmas-garland-breath {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.015) rotate(-0.7deg);
        filter: brightness(1.04);
    }
}

@keyframes xmas-bulb-rhythm {

    0%,
    100% {
        background:
            radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.94) 0 13%, transparent 15%),
            linear-gradient(180deg, var(--c1), color-mix(in srgb, var(--c1) 72%, #12090b 28%));
        box-shadow:
            0 0 5px var(--glow),
            0 0 10px color-mix(in srgb, var(--c1) 48%, transparent),
            inset 0 -2px 3px rgba(18, 9, 11, 0.25),
            inset 0 1px 2px rgba(255, 255, 255, 0.62);
        transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s));
        opacity: 0.92;
    }

    34% {
        background:
            radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.98) 0 13%, transparent 15%),
            linear-gradient(180deg, var(--c2), color-mix(in srgb, var(--c2) 70%, #12090b 30%));
        box-shadow:
            0 0 7px color-mix(in srgb, var(--c2) 72%, transparent),
            0 0 15px color-mix(in srgb, var(--c2) 46%, transparent),
            inset 0 -2px 3px rgba(18, 9, 11, 0.22),
            inset 0 1px 2px rgba(255, 255, 255, 0.72);
        transform: translate(-50%, -50%) rotate(var(--r)) scale(calc(var(--s) + 0.12));
        opacity: 1;
    }

    68% {
        background:
            radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.94) 0 13%, transparent 15%),
            linear-gradient(180deg, var(--c3), color-mix(in srgb, var(--c3) 70%, #12090b 30%));
        box-shadow:
            0 0 6px color-mix(in srgb, var(--c3) 68%, transparent),
            0 0 13px color-mix(in srgb, var(--c3) 42%, transparent),
            inset 0 -2px 3px rgba(18, 9, 11, 0.24),
            inset 0 1px 2px rgba(255, 255, 255, 0.66);
        transform: translate(-50%, -50%) rotate(var(--r)) scale(calc(var(--s) + 0.05));
        opacity: 0.96;
    }
}

@keyframes xmas-glow-soft {

    0%,
    100% {
        opacity: 0.46;
        transform: translate(-50%, -50%) scale(0.92);
    }

    50% {
        opacity: 0.82;
        transform: translate(-50%, -50%) scale(1.24);
    }
}

@keyframes head-bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

@keyframes water-flow {
    0% {
        background-position: 44% 82%;
        transform: translate(0, 0) scale(1);
    }

    25% {
        background-position: 48% 78%;
        transform: translate(-1px, -1px) scale(1.01);
    }

    50% {
        background-position: 52% 72%;
        transform: translate(1px, 1px) scale(1.025);
    }

    75% {
        background-position: 45% 80%;
        transform: translate(1px, -1px) scale(1.01);
    }

    100% {
        background-position: 44% 82%;
        transform: translate(0, 0) scale(1);
    }
}

@keyframes energy-glow {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.08);
    }
}

@keyframes eye-look {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2px, -1px);
    }

    50% {
        transform: translate(2px, 1px);
    }

    75% {
        transform: translate(1px, -2px);
    }
}

@keyframes eye-look-soft {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-1px, -1px);
    }

    50% {
        transform: translate(1px, 1px);
    }

    75% {
        transform: translate(1px, -1px);
    }
}

@keyframes blink-clean {

    0%,
    46%,
    52%,
    100% {
        transform: translate(-50%, -50%) scaleY(1);
    }

    49% {
        transform: translate(-50%, -50%) scaleY(0.18);
    }
}

@keyframes talk {

    0%,
    100% {
        height: 2px;
        width: 13px;
    }

    25% {
        height: 5px;
        width: 11px;
    }

    50% {
        height: 1px;
        width: 9px;
    }

    75% {
        height: 3px;
        width: 11px;
    }
}

@keyframes wave-limb-left {

    0%,
    100% {
        transform: rotate(13deg);
    }

    50% {
        transform: rotate(-6deg);
    }
}

@keyframes wave-limb-right {

    0%,
    100% {
        transform: rotate(-13deg);
    }

    50% {
        transform: rotate(6deg);
    }
}

@keyframes wave-limb-left-soft {

    0%,
    100% {
        transform: rotate(13deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

@keyframes wave-limb-right-soft {

    0%,
    100% {
        transform: rotate(-13deg);
    }

    50% {
        transform: rotate(-5deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    .assistant,
    .assistant *,
    .assistant::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}
/* === NPC Aquabot clicable (UX: el personaje es la interfaz, sin boton adicional) === */
.assistant[data-aquabot-npc] {
  cursor: pointer;
}
.assistant[data-aquabot-npc]:hover,
.assistant[data-aquabot-npc]:focus-visible {
  transform: scale(1.04);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.55));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.assistant[data-aquabot-npc]:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 4px;
  border-radius: 12px;
}

/* TANDA 77: pausa la animacion ambiental eye-look-soft mientras el JS de
   seguimiento de mouse (aquabot-eye-tracking.js) controla la posicion del
   ojo via transform inline -- evita que el keyframe le gane la pelea al
   valor que pone el JS en cada frame. Si el JS no carga, esta clase nunca
   se agrega y la animacion de siempre sigue igual. */
.assistant.is-eye-tracking .eye-casual {
  animation-play-state: paused;
}

/* Parpadeo natural (aquabot-blink-engine.js): pausa blink-clean en
   .pupil-casual mientras el motor JS controla el parpadeo via la clase
   .is-blinking, con intervalos aleatorios en vez del bucle fijo de 6.8s.
   Si el JS no carga, esta clase nunca se agrega y el parpadeo de siempre
   (blink-clean) sigue igual. */
.assistant.is-blink-engine-active .pupil-casual {
  animation: none;
  transition: transform 90ms ease-in-out;
}

.assistant.is-blink-engine-active .pupil-casual.is-blinking {
  transform: translate(-50%, -50%) scaleY(0.12);
}

/* Boca sincronizada (aquabot-mouth-sync.js): .mouth-casual es estatica por
   defecto; la clase .is-talking (agregada por JS mientras el personaje
   "habla", via la nube de frases o la voz real del chat) activa este
   keyframe. Si el JS no carga, esta clase nunca se agrega y la boca se
   queda estatica como siempre. */
.mouth-casual.is-talking {
  animation: aquabot-mouth-talk 0.3s ease-in-out infinite;
}

@keyframes aquabot-mouth-talk {
  0%, 100% {
    height: 1px;
    width: 13px;
  }
  50% {
    height: 4px;
    width: 9px;
  }
}
