* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

canvas {
  display: block;
  background: #3a7d44;
  image-rendering: pixelated;
  width: 100%;
  height: 100%;
}

#settings {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: none;
  background: rgba(0,0,0,0.85);
  border: 1px solid #555;
  border-radius: 10px;
  padding: 20px 28px;
  font-family: monospace;
  font-size: 12px;
  color: #ccc;
  user-select: none;
  min-width: 480px;
}

#settings.show { display: block; }

#settings-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  align-items: center;
}

.setting {
  display: flex;
  align-items: center;
  gap: 6px;
}

.setting label {
  white-space: nowrap;
  color: #aaa;
}

.setting input[type=range] {
  width: 80px;
  height: 4px;
  accent-color: #ffd700;
  cursor: pointer;
}

.setting .val {
  color: #ffd700;
  width: 34px;
  text-align: right;
  font-weight: bold;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #aaa;
}

.toggle-label input[type=checkbox] {
  accent-color: #ffd700;
  cursor: pointer;
}

.section-label {
  grid-column: 1 / -1;
  color: #ffd700;
  font-weight: bold;
  font-size: 13px;
  padding-top: 8px;
  border-top: 1px solid #444;
  margin-top: 4px;
}

.section-label:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

.close-hint {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  font-size: 11px;
  padding-top: 6px;
}
