body {
  margin: 0;
  overflow: hidden;
  background: #111;
  color: #fff;
  font-family: sans-serif;
}

#canvas {
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

#controls {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  z-index: 10;
}

.group {
  min-width: 200px;
  font-size: 14px;
}

input,
button {
  width: 100%;
  margin-bottom: 6px;
}

/* Parts 1行（チェック列＋名前列） */
.parts-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  column-gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}

.parts-row input[type="checkbox"] {
  margin: 0;
  justify-self: center;
}

.parts-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* チェックボックス + ラベル（横位置完全固定） */
.check-row-grid {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  column-gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}

.check-row-grid input[type="checkbox"] {
  margin: 0;
  justify-self: center;
}
.parts-row input:not(:checked) + .parts-name {
  opacity: 0.4;
}
.parts-row input:not(:checked) + .parts-name {
  opacity: 0.4;
}
