.floating-node {
  position: fixed;
  right: var(--floating-node-right, 4px);
  top: var(--floating-node-top);
  z-index: 40;
  display: block;
  width: var(--floating-node-size, 72px);
  height: var(--floating-node-size, 72px);
  overflow: hidden;
  border-radius: 50%;
  background: #00372a;
  box-shadow: 0 2px 7px #082e2633;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}
.floating-node.is-dragging { cursor: grabbing; }
.floating-node-art {
  position: absolute;
  inset: 0;
  background-image: var(--floating-node-image);
  background-size: 105.56% 105.56%;
  background-position: 37.5% 50%;
  background-repeat: no-repeat;
  pointer-events: none;
}
/* Use the supplied artwork unchanged. Cut out the two moving regions from
   its base layer so moving the symbol or arrow cannot leave a duplicate. */
.floating-node-base {
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    24% 12%, 77% 12%, 77% 59%, 24% 59%, 24% 12%, 0 0,
    45% 72%, 57% 72%, 57% 85%, 45% 85%, 45% 72%, 0 0);
}
.floating-node-symbol { position: absolute; inset: 0; pointer-events: none; }
.floating-node-symbol svg { display: block; width: 100%; height: 100%; overflow: visible; }
.floating-node-point, .floating-node-halo, .floating-node-cube {
  transform-box: fill-box;
  transform-origin: center;
}
.floating-node-halo { fill: none; stroke: #ffe7a1; stroke-width: 1.1; opacity: 0; }
.floating-node-flow { stroke-dasharray: 18 110; stroke-dashoffset: 128; opacity: 0; }
.floating-node-face { opacity: 0; }
.floating-node-arrow { clip-path: inset(72% 43% 15% 45%); }
.floating-node::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid #f6d68c;
  border-radius: inherit;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .floating-node-point {
    animation: floating-node-punch var(--floating-node-cycle, 3.6s) ease-in-out infinite;
    animation-delay: calc(var(--node-delay) * var(--floating-node-cycle, 3.6s));
  }
  .floating-node-halo {
    animation: floating-node-halo var(--floating-node-cycle, 3.6s) ease-out infinite;
    animation-delay: calc(var(--node-delay) * var(--floating-node-cycle, 3.6s));
  }
  .floating-node-flow {
    animation: floating-node-flow var(--floating-node-cycle, 3.6s) ease-in infinite;
    animation-delay: calc(var(--node-delay) * var(--floating-node-cycle, 3.6s));
  }
  .floating-node-cube { animation: floating-node-cube var(--floating-node-cycle, 3.6s) ease-in-out infinite; }
  .floating-node-face {
    animation: floating-node-face var(--floating-node-cycle, 3.6s) ease-in-out infinite;
    animation-delay: var(--face-delay);
  }
  .floating-node-arrow { animation: floating-node-arrow 1.8s ease-in-out infinite; }
  .floating-node::after { animation: floating-node-border 5.2s ease-in-out infinite; }
  .floating-node.is-dragging *,
  .floating-node.is-dragging::after { animation-play-state: paused; }
  @keyframes floating-node-punch {
    0%, 3%, 21%, 100% { transform: scale(1); filter: brightness(1); }
    9% {
      transform: scale(var(--floating-node-pulse-scale, 1.85));
      filter: brightness(1.65) drop-shadow(0 0 1.8px #ffeab1);
    }
    14% { transform: scale(.9); filter: brightness(1.15); }
    18% { transform: scale(1); filter: brightness(1); }
  }
  @keyframes floating-node-halo {
    0%, 3% { opacity: 0; transform: scale(.7); }
    9% { opacity: .9; transform: scale(1.35); }
    24%, 100% { opacity: 0; transform: scale(2.1); }
  }
  @keyframes floating-node-flow {
    0%, 5% { opacity: 0; stroke-dashoffset: 128; }
    9% { opacity: 1; }
    25% { opacity: 1; stroke-dashoffset: -18; }
    29%, 100% { opacity: 0; stroke-dashoffset: -18; }
  }
  @keyframes floating-node-cube {
    0%, 40%, 73%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
    53% { transform: translateY(-1px) scale(1.055); filter: brightness(1.25) drop-shadow(0 0 1px #fce6a4); }
  }
  @keyframes floating-node-face {
    0%, 42%, 63%, 100% { opacity: 0; }
    51% { opacity: .9; }
  }
  @keyframes floating-node-arrow {
    0%, 100% { transform: translateX(-1.2px); }
    50% { transform: translateX(1.2px); }
  }
  @keyframes floating-node-border {
    0%, 100% { border-color: #e7bd69; }
    50% { border-color: #fff0b8; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-node *, .floating-node::after { animation: none !important; }
}
