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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #9f8f82;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#canvas-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(32, 26, 22, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 240, 220, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  color: #f6efe6;
}

.control {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.control-label {
  width: 36px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f2e5d5;
}

.control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 118px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 245, 232, 0.24);
  outline: none;
  cursor: pointer;
}

.control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f5b95b;
  border: 2px solid #fff7ea;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease;
}

.control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.control input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f5b95b;
  border: 2px solid #fff7ea;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

@media (max-width: 540px) {
  .hud {
    left: 10px;
    bottom: 10px;
    padding: 8px 11px;
    gap: 7px;
  }

  .control input[type="range"] {
    width: 96px;
  }
}
