.mascot-speaking{display:grid;justify-items:center;gap:8px;min-width:0;max-width:100%;align-content:center}
.mascot-bubble{
  --speech-edge:#714abc;--speech-base:#2a1a52;
  display:block;position:relative;isolation:isolate;width:fit-content;max-width:min(100%,17rem);min-width:12px;min-height:1.4em;
  padding:8px 12px;border:1px solid #a383e5;border-radius:15px;
  background:radial-gradient(ellipse at 16% 5%,#7045a8 0,transparent 64%),linear-gradient(154deg,#54327f,#3a225f 80%);
  box-shadow:0 3px 0 var(--speech-base),0 6px 12px #19113545,inset 0 1px 0 #d8b7ff65,inset 0 -1px 0 var(--speech-edge);
  color:#fff;text-align:center;font-size:.86rem;line-height:1.36;font-weight:730;overflow-wrap:anywhere;
}
.mascot-bubble:not([data-spoken]){visibility:hidden}
.mascot-bubble::after{
  content:"";position:absolute;left:calc(50% - 5px);bottom:-5px;width:10px;height:10px;
  transform:rotate(45deg);border-right:1px solid var(--speech-edge);border-bottom:1px solid var(--speech-edge);
  background:#422969;box-shadow:3px 3px 0 var(--speech-base);z-index:-1;
}
.mascot-bubble strong{font-weight:950;color:#fff4d2}
.mascot-bubble[data-spoken]{animation:mascot-bubble-in .22s ease-out both}
.mascot-word{display:inline-block;max-width:100%;overflow-wrap:anywhere;animation:mascot-type var(--type-duration) var(--type-delay) linear backwards}
@keyframes mascot-bubble-in{from{opacity:0;transform:translateY(4px) scale(.97)}to{opacity:1;transform:none}}
@keyframes mascot-type{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}
.hero .mascot-speaking,.reaction-feedback .mascot-speaking,.streak-summary .mascot-speaking{align-self:center}
.reaction-feedback .mascot-speaking{float:right;max-width:min(47%,190px);margin:0 0 8px 12px}
.streak-summary .mascot-speaking{max-width:min(62%,200px);margin-inline-start:auto}
.reaction-feedback .mascot-speaking img{float:none;margin:0}
.streak-summary .mascot-speaking img{margin:0}
.finish .mascot-speaking{margin-bottom:10px}
.streak-goal .mascot-bubble{font-size:.77rem}
.mascot-speaking>.mascot-bubble,.study-scene>.mascot-bubble,.mascot-tile>.mascot-bubble,.demo-animals article>.mascot-bubble{order:-1}
.mascot-tile>.mascot-bubble{width:100%;font-size:.75rem;margin:2px auto 6px;padding:5px 4px}
.mascot-tile>.mascot-stage{order:0}
.mascot-tile>strong{order:1}
.study-scene:has(.mascot-bubble){height:auto;min-height:170px;padding-bottom:8px;gap:7px}
.response-continue,.vocab-continue{padding-bottom:12px}
@media(prefers-reduced-motion:reduce){.mascot-bubble[data-spoken],.mascot-word{animation:none}}

@media(max-width:390px){
  .reaction-feedback .mascot-speaking{float:none;margin:0 auto 9px;max-width:min(100%,230px)}
}

.demo-animals article{display:flex;flex-direction:column;align-items:center;gap:4px}

.mascot-tile>.mascot-bubble{
  grid-area:1/1/2/3;justify-self:start;align-self:start;order:0;
  width:fit-content;max-width:89%;min-width:0;min-height:0;margin:0 0 5px;
  padding:5px 7px;line-height:1.18;font-size:.69rem;text-align:left;z-index:1;
}
.mascot-tile>.mascot-bubble::after{
  inset:auto 12px -9px auto;width:14px;height:12px;transform:none;
  clip-path:polygon(0 0,100% 0,100% 100%);border:0;border-radius:0;
  background:#a383e5;box-shadow:none;z-index:0;
}
.mascot-tile>.mascot-bubble::before{
  content:"";position:absolute;right:13px;bottom:-7px;width:12px;height:9px;
  clip-path:polygon(0 0,100% 0,100% 100%);background:#432669;z-index:1;
}
