* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: #f3f4f6;
  color: #111827;
}

.app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

h1 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.hud {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

canvas {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  display: block;
  border: 1px solid #d1d5db;
  margin: 0 auto;
  background: #fafafa;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

button {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

button:hover {
  background: #f3f4f6;
}

.controls {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.controls .spacer {
  visibility: hidden;
}

@media (min-width: 701px) {
  .controls {
    display: none;
  }
}
