/* ═══════════════════════════════════════════════════════════════════════
   Beschäftigungen der Flur-NPCs (assets/js/npc-activities.js): Requisiten + Arm-/Kopfbewegung je Rolle.
   Rechter Arm: einwärts = positiver rotate, auswärts = negativer; linker Arm umgekehrt.
   ═══════════════════════════════════════════════════════════════════════ */
.npca-prop { position: absolute; display: block; pointer-events: none; line-height: 0; }
.npca-svg { display: block; overflow: visible; image-rendering: pixelated; }
.pixel-avatar[class*="npc-act-"] .px-arm-left, .pixel-avatar[class*="npc-act-"] .px-arm-right { z-index: 8; }
.px-arm-right .npca-prop, .px-arm-left .npca-prop { z-index: 9; }

/* ── Krankenhaus ── */
@keyframes npcWrite   { 0%, 100% { rotate: 40deg; translate: 0 0; } 25% { rotate: 47deg; translate: 0.5px 0; } 50% { rotate: 43deg; } 75% { rotate: 50deg; translate: -0.5px 0; } }
@keyframes npcTurn    { 0%, 55%, 100% { rotate: 40deg; translate: 0 0; } 65% { rotate: 62deg; translate: 0 -1px; } 80% { rotate: 44deg; } }
@keyframes npcTick    { 0%, 55% { scale: 0; opacity: 0; } 62% { scale: 1.3; opacity: 1; } 70%, 92% { scale: 1; opacity: 1; } 100% { scale: 1; opacity: 0; } }
.pixel-avatar.npc-act-clipboard .px-arm-left, .pixel-avatar.npc-act-checklist .px-arm-left, .pixel-avatar.npc-act-album .px-arm-left { animation: none; rotate: -50deg; }
.pixel-avatar.npc-act-clipboard .px-arm-right, .pixel-avatar.npc-act-checklist .px-arm-right { animation: npcWrite 0.8s ease-in-out infinite; }
.pixel-avatar.npc-act-album .px-arm-right { animation: npcTurn 6s ease-in-out infinite; }
.npca-tick { animation: npcTick 3.2s steps(1, end) infinite; transform-origin: 50% 100%; }

@keyframes npcTrayBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1px; } }
.pixel-avatar.npc-act-tray .px-arm-left  { animation: npcTrayBob 2.2s ease-in-out infinite; rotate: -46deg; }
.pixel-avatar.npc-act-tray .px-arm-right { animation: npcTrayBob 2.2s ease-in-out infinite; rotate: 46deg; }
.npca-tray { animation: npcTrayBob 2.2s ease-in-out infinite; }

@keyframes npcMop { 0%, 100% { rotate: -14deg; } 50% { rotate: 14deg; } }
.pixel-avatar.npc-act-mop .px-arm-right { animation: npcMop 1.8s ease-in-out infinite; }

@keyframes npcHammer { 0%, 100% { rotate: -95deg; } 38%, 46% { rotate: -8deg; } 60% { rotate: -70deg; } }
@keyframes npcSpark  { 0%, 37%, 52%, 100% { opacity: 0; scale: 0.4; } 40%, 46% { opacity: 1; scale: 1.2; } }
.pixel-avatar.npc-act-hammer .px-arm-right { animation: npcHammer 1.5s ease-in-out infinite; }
.npca-spark { animation: npcSpark 1.5s steps(1, end) infinite; top: 58px !important; left: 50px !important; }

@keyframes npcBouquet { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1px; } }
.pixel-avatar.npc-act-flowers .px-arm-left  { rotate: -44deg; animation: npcBouquet 2.6s ease-in-out infinite; }
.pixel-avatar.npc-act-flowers .px-arm-right { rotate: 44deg;  animation: npcBouquet 2.6s ease-in-out infinite; }
.npca-flowers { animation: npcBouquet 2.6s ease-in-out infinite; }

/* ── Urzeit / Vitalzeichen ── */
@keyframes npcGrind { 0%, 100% { rotate: 26deg; translate: 0 0; } 25% { rotate: 38deg; translate: 0.6px 0; } 50% { rotate: 28deg; } 75% { rotate: 40deg; translate: -0.6px 0; } }
.pixel-avatar.npc-act-mortar .px-arm-left { animation: none; rotate: -38deg; }
.pixel-avatar.npc-act-mortar .px-arm-right { animation: npcGrind 0.5s ease-in-out infinite; }

@keyframes npcStir { 0%, 100% { rotate: 30deg; } 50% { rotate: 46deg; } }
@keyframes npcFlicker { 0%, 100% { scale: 1 1; filter: brightness(1); } 50% { scale: 1.06 1.22; filter: brightness(1.25); } }
@keyframes npcSteam { 0% { opacity: 0; translate: 0 0; scale: 0.6; } 25% { opacity: 0.85; } 100% { opacity: 0; translate: 3px -14px; scale: 1.6; } }
.pixel-avatar.npc-act-cook .px-arm-right, .pixel-avatar.npc-act-cauldron .px-arm-right { animation: npcStir 0.9s ease-in-out infinite; }
.npca-fire { animation: npcFlicker 0.45s steps(2, end) infinite; transform-origin: 50% 100%; }
.npca-pot::after { content: ""; position: absolute; left: 10px; top: -4px; width: 5px; height: 5px; background: #fff; border-radius: 50%; opacity: 0; animation: npcSteam 2.1s ease-out infinite; }
.npca-pot::before { content: ""; position: absolute; left: 17px; top: -2px; width: 4px; height: 4px; background: #fff; border-radius: 50%; opacity: 0; animation: npcSteam 2.1s ease-out 0.9s infinite; }
.npca-cauldron::after { background: #b5ff7a; }
.npca-cauldron::before { background: #d9a6ff; }

@keyframes npcScout   { 0%, 18%, 52%, 100% { rotate: 0deg; } 24%, 44% { rotate: -140deg; } }
@keyframes npcJab     { 0%, 62%, 100% { rotate: 0deg; translate: 0 0; } 68% { rotate: -9deg; translate: 0 -4px; } 76% { rotate: 0deg; translate: 0 0; } 82% { rotate: -9deg; translate: 0 -4px; } 90% { rotate: 0deg; translate: 0 0; } }
.pixel-avatar.npc-act-hunt .px-arm-left  { animation: npcScout 8s ease-in-out infinite; }
.pixel-avatar.npc-act-hunt .px-arm-right { animation: npcJab 8s ease-in-out infinite; }

@keyframes npcSway { 0%, 100% { rotate: 4deg; } 50% { rotate: 12deg; } }
.pixel-avatar.npc-act-skewer .px-arm-right { animation: npcSway 3s ease-in-out infinite; }
@keyframes npcStaff { 0%, 55%, 100% { translate: 0 0; } 62%, 72% { translate: 0 -3px; } }
@keyframes npcGlow { 0%, 100% { filter: drop-shadow(0 0 1px #2dd4bf); } 50% { filter: drop-shadow(0 0 5px #7ff5e6); } }
.pixel-avatar.npc-act-staff .px-arm-right { animation: npcStaff 6s ease-in-out infinite; }
.npca-staff { animation: npcGlow 1.4s ease-in-out infinite; }
.pixel-avatar.npc-act-crook .px-arm-right { animation: npcSway 4s ease-in-out infinite; }
@keyframes npcWobble { 0%, 58%, 100% { rotate: 0deg; } 62% { rotate: -9deg; } 66% { rotate: 9deg; } 70% { rotate: -9deg; } 74% { rotate: 7deg; } 78% { rotate: 0deg; } }
.pixel-avatar.npc-act-cane .px-arm-right { animation: npcWobble 4s ease-in-out infinite; }

/* Läufer: Joggen auf der Stelle */
@keyframes npcJogBody { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@keyframes npcJogL { 0%, 100% { rotate: 38deg; } 50% { rotate: -38deg; } }
@keyframes npcJogR { 0%, 100% { rotate: -38deg; } 50% { rotate: 38deg; } }
@keyframes npcSweat { 0%, 30% { opacity: 0; translate: 0 0; } 45% { opacity: 1; } 100% { opacity: 0; translate: 3px 10px; } }
.pixel-avatar.npc-act-jog { animation: npcJogBody 0.36s steps(2, end) infinite; }
.pixel-avatar.npc-act-jog .px-arm-left  { animation: npcJogL 0.72s ease-in-out infinite; }
.pixel-avatar.npc-act-jog .px-arm-right { animation: npcJogR 0.72s ease-in-out infinite; }
.npca-sweat { animation: npcSweat 1.6s ease-in infinite; }

/* Herzhörer: Stethoskop an die Brust, Herz pocht */
@keyframes npcBeat { 0%, 100% { scale: 1; } 15% { scale: 1.35; } 30% { scale: 1; } 45% { scale: 1.25; } }
.pixel-avatar.npc-act-listen .px-arm-right { animation: none; rotate: 34deg; }
.npca-heart { animation: npcBeat 1s ease-in-out infinite; transform-origin: 50% 50%; }

/* ── Neurologie / Demenz ── */
@keyframes npcSip { 0%, 40%, 100% { rotate: 6deg; } 50%, 72% { rotate: 118deg; } 82% { rotate: 6deg; } }
.pixel-avatar.npc-act-goblet .px-arm-right { animation: npcSip 8s ease-in-out infinite; }
@keyframes npcHowlHead { 0%, 56%, 100% { translate: 0 0; } 62%, 84% { translate: 0 -2.4px; } }
@keyframes npcHowlMouth { 0%, 56%, 100% { scale: 1 1; } 62%, 84% { scale: 1.3 3.2; translate: 0 -2.4px; } }
@keyframes npcHowlEyes { 0%, 56%, 100% { scale: 1 1; } 62%, 84% { scale: 1 0.25; } }
.pixel-avatar.npc-act-howl .px-hair, .pixel-avatar.npc-act-howl .px-face, .pixel-avatar.npc-act-howl .px-beard { animation: npcHowlHead 7s ease-in-out infinite; }
.pixel-avatar.npc-act-howl .px-mouth { animation: npcHowlMouth 7s ease-in-out infinite; }
.pixel-avatar.npc-act-howl .px-eye-left, .pixel-avatar.npc-act-howl .px-eye-right { animation: npcHowlHead 7s ease-in-out infinite, npcHowlEyes 7s ease-in-out infinite; }
@keyframes npcStab { 0%, 62%, 100% { translate: 0 0; } 68% { translate: 0 3px; } 76% { translate: 0 0; } }
.pixel-avatar.npc-act-pitchfork .px-arm-right { animation: npcStab 4.5s ease-in-out infinite; }
@keyframes npcReach { 0%, 100% { rotate: 0deg; } 40%, 55% { rotate: -38deg; } }
.pixel-avatar.npc-act-basket .px-arm-left { animation: none; rotate: -34deg; }
.pixel-avatar.npc-act-basket .px-arm-right { animation: npcReach 5s ease-in-out infinite; }
@keyframes npcBlink { 0%, 100% { filter: brightness(0.8); } 50% { filter: brightness(2) drop-shadow(0 0 3px #6fd3e8); } }
.pixel-avatar.npc-act-gadget .px-arm-right { animation: none; rotate: -42deg; }
.npca-gadget { animation: npcBlink 0.9s steps(2, end) infinite; }
@keyframes npcScanHead { 0%, 20%, 100% { translate: 0 0; } 25%, 45% { translate: -2px 0; } 50%, 70% { translate: 2px 0; } 75% { translate: 0 0; } }
@keyframes npcScanEyes { 0%, 20%, 100% { filter: brightness(1); } 25%, 70% { filter: brightness(2) drop-shadow(0 0 3px #2dd4bf); } }
.pixel-avatar.npc-act-scan .px-hair, .pixel-avatar.npc-act-scan .px-face { animation: npcScanHead 6s steps(6, end) infinite; }
.pixel-avatar.npc-act-scan .px-eye-left, .pixel-avatar.npc-act-scan .px-eye-right { animation: npcScanHead 6s steps(6, end) infinite, npcScanEyes 6s steps(1, end) infinite; }

@media (prefers-reduced-motion: reduce) { .npca-prop, .pixel-avatar[class*="npc-act-"], .pixel-avatar[class*="npc-act-"] * { animation: none !important; } }
.npca-heart .npca-svg { width: 14px; height: auto; }
