/* Each tool mark and Till share the same small, transparent Three.js volume. */
.context-tool {
  --context-pill-hover-scale: 1;
  position: relative;
  display: inline-block;
  flex: none;
  width: 48px;
  height: 28px;
  vertical-align: middle;
}
.context-tool-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 58px;
  transform: translate(-50%, -50%) scale(var(--context-pill-hover-scale));
  transform-origin: 50% 50%;
  transition: transform 180ms var(--ease, ease);
  pointer-events: none;
}
.context-tool-fallback {
  position: absolute;
  inset: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdfa, #f7f7f7 80.648%, #f5f5f5);
  box-shadow: inset 0 0 0 .33px rgba(21, 17, 13, .45);
  transform: scale(var(--context-pill-hover-scale));
  transform-origin: 50% 50%;
  transition: transform 180ms var(--ease, ease);
}
.context-tool[data-renderer="three"] .context-tool-fallback { visibility: hidden; }
.context-tool-button {
  position: absolute;
  z-index: 1;
  top: calc(50% - var(--context-pill-hop, 0px));
  left: 50%;
  width: 54px;
  height: 34px;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.context-tool-button:focus-visible {
  outline: 2px solid #15110d;
  outline-offset: 3px;
}
.context-tool:has(> .context-tool-button:enabled:focus-visible) {
  --context-pill-hover-scale: 1.04;
}
@media (hover: hover) and (pointer: fine) {
  .context-tool:has(> .context-tool-button:enabled:hover) {
    --context-pill-hover-scale: 1.04;
  }
}
@media (prefers-reduced-motion: reduce) {
  .context-tool-canvas,
  .context-tool-fallback { transition: none; }
}
.context-app .context-tool-fallback img { width: 18px; height: 14.344px; }
.context-tool[data-tool="cursor"] .context-tool-fallback {
  background: linear-gradient(180deg, #373737, #141414 78.365%, #212121 99.038%);
}
.context-tool[data-tool="cursor"] .context-tool-fallback img { width: 18px; height: 20.884px; }
