body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  color: #17202a;
  background: #f6f7f9;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px;
}

input,
button {
  font: inherit;
  padding: 10px 12px;
}

[data-editable-component] {
  cursor: text;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

[data-editable-component]:hover {
  background: #fafafa;
  border-color: #d4d4d8;
}

[data-editable-component][data-dirty="true"] {
  background: #fff7ed;
  border-color: #fdba74;
}

[data-save-status][data-state="pending"] {
  color: #b45309;
}

[data-save-status][data-state="saving"] {
  color: #2563eb;
}

[data-save-status][data-state="saved"] {
  color: #16a34a;
}

[data-save-status][data-state="retry"] {
  color: #dc2626;
}

.rich-graph-canvas {
  aspect-ratio: 16 / 9;
  background: #fff;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  cursor: crosshair;
  display: block;
  touch-action: none;
  width: 100%;
}

.project-menu-button {
  align-items: center;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.project-menu {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  min-width: 150px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 40px;
  z-index: 20;
}

.rich-message-stack {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 10000;
}

.rich-message {
  animation: rich-message-enter 180ms ease-out;
  border: 1px solid;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  padding: 12px 14px;
  width: 100%;
}

.rich-message-success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.rich-message-error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.rich-message-info {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.rich-message-exit {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes rich-message-enter {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
