* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: rgb(128, 128, 128);
}

#mainCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: grab;
}

#mainCanvas:active {
  cursor: grabbing;
}

#uiPanel {
  position: fixed;
  top: 16px;
  left: 16px;
  width: 240px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(20, 20, 20, 0.86);
  color: white;
  border-radius: 8px;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#uiPanel.hidden {
  display: none;
}

button {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 5px;
  background: #2f8cff;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #4ca0ff;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

input[type="range"] {
  width: 100%;
}

input[type="color"] {
  width: 100%;
  height: 34px;
  border: none;
  padding: 0;
  background: transparent;
}

#help {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.75;
}