.zoom-toolbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 28px 14px;
  padding: 10px;
  width: max-content;
  max-width: calc(100vw - 56px);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 14px 34px rgba(29, 37, 44, 0.12);
  backdrop-filter: blur(12px);
}

.zoom-toolbar button {
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #115e59;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 7px 11px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.zoom-toolbar button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.5);
  background: rgba(240, 253, 250, 0.9);
}

.zoom-toolbar .zoom-level {
  min-width: 54px;
  text-align: center;
  color: #475569;
  font-size: 13px;
}

.zoom-toolbar .zoom-tip {
  color: #64748b;
  font-size: 12px;
  padding-right: 6px;
}

#diagram {
  transform-origin: top left;
  user-select: none;
}

.panel {
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: none;
}

.panel.is-dragging {
  cursor: grabbing;
}

.panel.is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

@media (max-width: 720px) {
  .zoom-toolbar {
    position: static;
    width: auto;
    border-radius: 18px;
  }

  .zoom-toolbar .zoom-tip {
    width: 100%;
  }
}
