.floating-tools {
  position: fixed;
  z-index: 120;
  right: max(13px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  display: grid;
  gap: 8px;
  font-family: "Template Fusion Pixel", "Microsoft YaHei", sans-serif;
}

.floating-tool {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 7px;
  border: 4px solid #68422e;
  border-radius: 0;
  place-items: center;
  color: #6a3d32;
  background: #efc874;
  box-shadow: inset 0 0 0 2px #fff0a7, 4px 5px #35283b;
  cursor: pointer;
  touch-action: manipulation;
}

.floating-tool svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  shape-rendering: crispEdges;
}

.floating-tool:active {
  transform: translate(3px, 3px);
  box-shadow: inset 0 0 0 2px #fff0a7, 1px 2px #35283b;
}

.floating-tool:focus-visible {
  outline: 4px solid #fff5a8;
  outline-offset: 3px;
}

.floating-tool.playing {
  color: #fff2ac;
  background: #b44d62;
  animation: floating-music-pulse 1.2s ease-in-out infinite;
}

@keyframes floating-music-pulse {
  50% { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .floating-tool.playing {
    animation: none;
  }
}
