/* The Conservatory's pupils (js/bots.js, 2026-09-23): the bots that walk the
   one room. A pupil is an other-player sprite to the engine (town.css
   .tw-player); this file only marks it as a pupil and gives it a voice. */

/* who is who: a pupil's name is townsfolk yellow, never a player's green */
.tw-player.tw-bot .tw-name { color: #ffd75e; }
.tw-player.tw-bot .tw-lv { box-shadow: 0 0 0 1px rgba(255, 215, 94, .45); }

/* the speech bubble, above the name tag, in world px like the tag itself */
.tw-say {
  position: absolute; left: 50%; bottom: calc(100% + 30px); transform: translateX(-50%);
  width: max-content; max-width: 210px; white-space: normal; text-align: center;
  background: #fffdf3; color: #2b2419; border: 1px solid #c9b984; border-radius: 10px;
  padding: 5px 9px; font: 12px/1.3 Georgia, "Iowan Old Style", serif;
  box-shadow: 0 2px 8px #0005; pointer-events: none; z-index: 3;
  animation: bot-say 4.8s ease-out forwards;
}
.tw-say::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px;
  background: #fffdf3; border-right: 1px solid #c9b984; border-bottom: 1px solid #c9b984;
  transform: translateX(-50%) rotate(45deg);
}
@keyframes bot-say {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  8% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}
@media (prefers-reduced-motion: reduce) { .tw-say { animation: none; } }
