:root {
  --bg: #12151d;
  --panel: #1b2130;
  --text: #eef2ff;
  --line: #35a0ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

.toolbar {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: end;
  gap: 10px;
}

button {
  border: 1px solid #2a3244;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  padding: 8px 10px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.canvas-wrap {
  position: relative;
  border: 1px solid #2a3244;
  border-radius: 12px;
  background: #0c0f16;
  overflow: hidden;
  min-height: 0;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  user-select: none;
}

.inline-editor {
  position: absolute;
  display: flex;
  gap: 6px;
  background: #0f1420;
  border: 1px solid #2a3244;
  border-radius: 8px;
  padding: 6px;
  max-width: min(90vw, 260px);
}

.inline-editor input {
  width: 120px;
  border: 1px solid #2a3244;
  border-radius: 6px;
  background: #1a2130;
  color: var(--text);
  padding: 6px 8px;
}

.inline-editor button {
  padding: 6px 8px;
  font-size: 0.8rem;
}

.hidden {
  display: none;
}
