@keyframes larryClaw {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-18deg); }
  70% { transform: rotate(12deg); }
}

@keyframes larryBounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-12px); }
  70% { transform: translateY(-6px); }
}

@keyframes larryPop {
  0% { transform: translateY(8px) scale(.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes larryShiver {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-3px) rotate(-1deg); }
  20% { transform: translateX(3px) rotate(1deg); }
  30% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  50% { transform: translateX(-1px); }
  60% { transform: translateX(1px); }
  70% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  90% { transform: translateX(0); }
}

@keyframes larryDot {
  0%, 80%, 100% { opacity: .24; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.larry-root,
.larry-root * {
  box-sizing: border-box;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.larry-wrap {
  position: fixed;
  z-index: 2147483645;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: min(300px, calc(100vw - 32px));
  max-width: 300px;
  pointer-events: none;
}

.larry-wrap > * {
  pointer-events: auto;
}

.larry-wrap.larry-side-left {
  align-items: flex-start;
}

.larry-toggle {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 2147483646;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(196, 94, 42, .3);
  border-radius: 50%;
  background: rgba(10, 10, 10, .85);
  color: #C45E2A;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .15s, border-color .15s, transform .15s;
}

.larry-toggle.larry-side-left {
  right: auto;
  left: 12px;
}

.larry-toggle:hover {
  background: rgba(196, 94, 42, .15);
  border-color: #C45E2A;
}

.larry-toggle:focus-visible,
.larry-qbtn:focus-visible,
.larry-send:focus-visible,
.larry-link:focus-visible,
.larry-cancel:focus-visible,
.larry-reset:focus-visible,
.larry-mascot:focus-visible {
  outline: 2px solid rgba(224, 90, 43, .55);
  outline-offset: 3px;
}

.larry-reset {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 4px;
  background: rgba(255, 255, 255, .92);
  color: #666;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}

.larry-side-left .larry-reset {
  right: auto;
  left: -6px;
}

.larry-wrap:hover .larry-reset {
  opacity: 1;
}

.larry-bubble {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 16px;
  background: #fffaf7;
  color: #222;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  animation: larryPop .22s ease forwards;
}

.larry-tail {
  position: absolute;
  right: 24px;
  bottom: -8px;
  width: 16px;
  height: 8px;
  overflow: hidden;
}

.larry-side-left .larry-tail {
  right: auto;
  left: 24px;
}

.larry-tail span {
  display: block;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 1px solid rgba(0, 0, 0, .1);
  background: #fffaf7;
  transform: rotate(45deg);
}

.larry-quicklist {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

.larry-side-left .larry-quicklist {
  justify-content: flex-start;
}

.larry-qbtn {
  max-width: 100%;
  padding: 6px 12px;
  border: 1.5px solid rgba(0, 0, 0, .12);
  border-radius: 20px;
  background: #fff;
  color: #444;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}

.larry-qbtn:hover {
  border-color: #E05A2B;
  background: #FEF0EB;
  color: #E05A2B;
  transform: translateY(-1px);
}

.larry-composer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
}

.larry-input {
  min-width: 0;
  height: 34px;
  flex: 1;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #222;
  font-size: 13px;
  line-height: 1.2;
  outline: none;
  padding: 0 9px;
}

.larry-input::placeholder {
  color: rgba(34, 34, 34, .44);
}

.larry-input:focus {
  box-shadow: inset 0 0 0 2px rgba(224, 90, 43, .28);
}

.larry-send {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  background: #E05A2B;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transition: background .15s, transform .15s, opacity .15s;
}

.larry-send:hover {
  background: #C04A20;
  transform: translateY(-1px);
}

.larry-send:disabled {
  cursor: default;
  opacity: .5;
  transform: none;
}

.larry-link {
  align-self: center;
  margin-bottom: 8px;
  padding: 5px 9px;
  border: 0;
  background: rgba(255, 250, 247, .92);
  border-radius: 999px;
  color: rgba(0, 0, 0, .58);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s, background .15s;
}

.larry-link:hover {
  background: #FEF0EB;
  color: #E05A2B;
}

.larry-escalate,
.larry-escalate-done {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1.5px solid rgba(0, 0, 0, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.larry-escalate-copy,
.larry-escalate-done {
  color: #444;
  font-size: 12px;
  line-height: 1.4;
}

.larry-escalate-done {
  align-items: center;
  text-align: center;
}

.larry-escalate .larry-input,
.larry-textarea {
  border: 1.5px solid rgba(0, 0, 0, .12);
  background: #fff;
}

.larry-escalate .larry-input {
  padding: 0 12px;
}

.larry-textarea {
  min-height: 68px;
  padding: 9px 10px;
  border-radius: 12px;
  color: #222;
  font-size: 12px;
  line-height: 1.4;
  outline: none;
  resize: vertical;
}

.larry-textarea:focus {
  border-color: #E05A2B;
}

.larry-error {
  display: none;
  color: #C53030;
  font-size: 12px;
  line-height: 1.4;
}

.larry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.larry-cancel {
  padding: 7px 12px;
  border: 1.5px solid rgba(0, 0, 0, .12);
  border-radius: 16px;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.larry-cancel:hover {
  border-color: #E05A2B;
  color: #E05A2B;
}

.larry-mascot {
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .15s, filter .15s;
}

.larry-mascot:active {
  cursor: grabbing;
  transform: scale(.94);
}

.larry-mascot--shiver {
  filter: hue-rotate(220deg) saturate(1.4);
}

.larry-svg {
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .15));
}

.larry-wave-claw {
  transform-origin: 62px 95px;
  animation: larryClaw 1.2s ease-in-out infinite;
}

.larry-bounce {
  animation: larryBounce .6s ease infinite;
}

.larry-shiver {
  animation: larryShiver .3s ease infinite;
}

.larry-dots span {
  display: inline-block;
  font-weight: 900;
  animation: larryDot 1.2s infinite both;
}

.larry-dots span:nth-child(2) {
  animation-delay: .2s;
}

.larry-dots span:nth-child(3) {
  animation-delay: .4s;
}

@media (max-width: 380px) {
  .larry-wrap {
    width: calc(100vw - 32px);
  }

  .larry-bubble {
    font-size: 13px;
    padding: 11px 12px;
  }

  .larry-qbtn {
    font-size: 11.5px;
  }

  .larry-send {
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .larry-bounce,
  .larry-shiver,
  .larry-bubble,
  .larry-wave-claw,
  .larry-dots span {
    animation: none !important;
  }
}
