@media (min-width: 768px) {
  .container {
    max-width: 460px;
  }
}

.container {
  position: relative;
}

#grid {
  border-collapse: collapse;
  border: 1px solid #212121;
}

#grid td, #grid th {
  padding: 0px;
  border: 0px;
}

#palette {
  position: absolute;
  top: 35px;
  right: -30px;
}

.palette-colour {
  display: block;
  border: 1px solid #333333;
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
}

.outer {
  position: relative;
  height: 35px
}

.bottom-right {
 position:absolute;
 bottom:5px;
 right:15px;
}

/* Yaoshitian: keep the colour controls in the viewport. */
body{padding:10px 0} #palette{position:static;display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.palette-colour{width:44px;height:44px;margin:0;touch-action:manipulation}.form-group .btn{margin-bottom:6px}.bottom-right{position:static}.outer{height:auto;margin-bottom:12px}#grid{max-width:100%}
