/* Screen-space labels stay legible when a phone letterboxes the world canvas.
   The chat log is the accessible, complete transcript; these labels are a view. */
#playerChatBubbles {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  z-index: 16;
  contain: layout style;
}
#playerChatBubbles[hidden], #playerChatBubbles [hidden] { display: none !important; }
#playerChatBubbles, #playerChatBubbles * { pointer-events: none !important; }
.playerChatBubble {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #bbc7ddaa;
  border-radius: 10px;
  background: #101a2afa;
  box-shadow: 0 3px 10px #0008;
  color: #fff7e5;
  font: 600 13px/1.4 system-ui, sans-serif;
  text-align: center;
  text-shadow: none;
  user-select: none;
  isolation: isolate;
}
.playerChatBubble[data-self="true"] { border-color: #8cdbea; }
.playerChatBubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--bubble-tail, 50%);
  width: 1px;
  height: var(--bubble-stem, 6px);
  background: #d9e1eab8;
  box-shadow: 1px 0 #101a2a;
}
.playerChatBubbleText {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}
