.tt {
  --ground: #4b22c2;
  --well: #3a1798;
  --lift: #6238de;
  --cream: #fff3d2;
  --tip: #a4f5cf;
  --tip-ink: #2a0f6e;
  box-sizing: border-box;
  width: 540px;
  height: 540px;
  padding: 240px 25px 0;
  background: var(--ground);
  color: var(--cream);
  font-family: "Public Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.tt *,
.tt *::before,
.tt *::after {
  box-sizing: border-box;
}

.tt-bar {
  display: flex;
  gap: 10px;
  height: 170px;
  padding: 10px;
  border-radius: 42px;
  background: var(--well);
}

.tt-button {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0 0 6px;
  border: 0;
  border-radius: 32px;
  background: transparent;
  color: inherit;
  font-family: "Source Serif 4 Variable", serif;
  font-size: 94px;
  font-weight: 500;
  line-height: 1;
  font-variation-settings: "opsz" 60;
  outline: 0;
  cursor: default;
  transition: background-color 160ms ease-out;
}

.tt-button:hover {
  background: var(--lift);
}

.tt-button[data-format="bold"] {
  font-weight: 800;
}

.tt-button[data-format="italic"] {
  font-style: italic;
}

.tt-button[data-format="underline"] span {
  text-decoration: underline;
  text-decoration-thickness: 7px;
  text-underline-offset: 12px;
}

.tt-content {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
  color: var(--tip-ink);
  pointer-events: none;
}

.tt-bubble {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 84px;
  padding: 0 15px 0 28px;
  border-radius: 24px;
  background: var(--tip);
  font-size: 38px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  translate: var(--tt-dx, 0px) 0;
  clip-path: inset(0 var(--tt-clip, 0px) round 24px);
  transform-origin: 50% calc(100% + 36px);
  transition:
    opacity 150ms ease-out,
    scale 150ms ease-out;
}

.tt-keys {
  display: grid;
  place-items: center;
  height: 54px;
  padding: 0 14px;
  border-radius: 13px;
  background: #72dfae;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0;
}

.tt-arrow {
  position: absolute;
  bottom: -11px;
  left: var(--arrow-offset, 50%);
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border-radius: 5px;
  background: var(--tip);
  translate: var(--tt-ax, 0px) 0;
  rotate: 45deg;
  z-index: -1;
  transition: opacity 150ms ease-out;
}

.tt-content[data-starting-style] .tt-bubble,
.tt-content[data-ending-style] .tt-bubble {
  opacity: 0;
  scale: 0.9;
}

.tt-content[data-starting-style] .tt-arrow,
.tt-content[data-ending-style] .tt-arrow {
  opacity: 0;
}
