* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 8px;
  min-height: 100vh;
  background: #1e2a22;
  color: #f5f5f5;
  font-family: system-ui, sans-serif;
  overflow-x: hidden;
}

.wrap {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

h1 {
  font-size: 1.5rem;
  margin: 8px 0;
}

.hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  touch-action: manipulation;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
}

.overlay p {
  margin: 0;
  font-size: 1rem;
}

button {
  font: inherit;
  padding: 10px 22px;
  border: 0;
  border-radius: 6px;
  background: #f3a712;
  color: #1e2a22;
  font-weight: 700;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.help {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 10px 0;
}
