#tooltip {
  position: fixed;
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 8pt;
  font-family: Tahoma, Arial, sans-serif;
  pointer-events: none;
  display: none;
  white-space: nowrap;
  z-index: var(--z-tooltip);
  box-shadow: 1px 1px 3px rgba(0,0,0,.2);
}

#balloon {
  position: fixed;
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 7px;
  padding: 6px 20px 6px 10px;
  font-size: 11.55px;
  pointer-events: none;
  filter: drop-shadow(2px 2px 1px rgba(0,0,0,.4));
  display: none;
  z-index: 99990;
  max-width: 280px;
  opacity: 0;
  transition: opacity .3s;
}
#balloon.visible { display: block; opacity: 1; }

#balloon .bhead {
  font-size: 12.6px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
#balloon-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: transparent;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 3px;
  cursor: pointer;
  pointer-events: auto;
}
#balloon-close::before,
#balloon-close::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 8px;
  background: #787878;
  left: 6px;
  top: 3px;
}
#balloon-close::before { transform: rotate(45deg); }
#balloon-close::after  { transform: rotate(-45deg); }
#balloon-close:hover { background: #e81123; border-color: rgba(0,0,0,.3); }
#balloon-close:hover::before,
#balloon-close:hover::after { background: #fff; }

#balloon::before {
  content: '';
  position: absolute;
  bottom: -19px;
  right: 14px;
  border-style: solid;
  border-width: 0 19px 19px 0;
  border-color: transparent #000 transparent transparent;
}
#balloon::after {
  content: '';
  position: absolute;
  bottom: -17px;
  right: 15px;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent #ffffe1 transparent transparent;
}
