.canvas-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  cursor: default;
  background: var(--bg);
  touch-action: none;
  overscroll-behavior: contain;
}

.canvas-container.pan-mode {
  cursor: grab;
}

.canvas-container.panning {
  cursor: grabbing;
}

.canvas-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, var(--bg-grid) 1px, transparent 1px);
  background-repeat: repeat;
}

.canvas-hud {
  position: fixed;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 12px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  font-size: 11px;
  font-family: ui-monospace, Menlo, monospace;
  color: var(--text);
  pointer-events: none;
  z-index: 1000;
}

.card {
  position: absolute;
  background: var(--card-bg);
  border: calc(1px * var(--scale, 1)) solid var(--card-border);
  border-radius: calc(8px * var(--scale, 1));
  box-shadow: 0 calc(4px * var(--scale, 1)) calc(16px * var(--scale, 1)) rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-header {
  padding: 0.46em 0.77em;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: calc(1px * var(--scale, 1)) solid var(--card-border);
  font-size: 0.85em;
  cursor: move;
  flex-shrink: 0;
}

.card-body {
  flex: 1;
  overflow: auto;
}

.note-card textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1em;
  padding: 0.77em;
}
