:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0f141b;
  color: #e5e7eb;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #111827;
  position: sticky;
  top: 0;
  z-index: 10;
}

header strong {
  margin-right: 8px;
  color: #22d3ee;
}

button {
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

button.active {
  background: #0891b2;
  border-color: #22d3ee;
  color: white;
}

main {
  display: flex;
  justify-content: center;
  padding: 12px;
  overflow: auto;
}

canvas {
  width: min(100%, 800px);
  height: auto;
  image-rendering: pixelated;
  background: #0b0f14;
  border: 1px solid #374151;
  border-radius: 8px;
  touch-action: none;
}

.hint {
  padding: 0 12px 12px;
  color: #9ca3af;
  font-size: 13px;
}
