body {
  width: 100vw;
  min-height: 100vh;
  padding: 6px;
  margin: 0;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-x: hidden;
}

.contentWrapper {
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-template-rows: repeat(3, auto);
  gap: 8px;
  justify-content: flex-start;
  align-items: flex-start;
}

header {
  grid-column-start: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 20px 0px 0px 0px;
}

.headerTitle {
  font-family: "DarumadropOne";
  font-size: 28px;
  margin: 0;
}

.templateLists {
  grid-row-start: 2;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
}

.templateList {
  margin: 0;
  padding: 0;
  list-style-type: none;

  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;

  img {
    border: var(--border-solid);
    display: block;
  }

  img:hover {
    cursor: var(--pointer);
    background-color: white;
  }
}

.preview {
  display: block;
  width: 100px;
  height: 100px;
  border: var(--border-solid);
  background-color: var(--bg-color);
  image-rendering: pixelated;
  pointer-events: none;
}

.preview2 {
  display: block;
  width: 50px;
  height: 50px;
  border: var(--border-solid);
  background-color: var(--bg-color);
  image-rendering: pixelated;
  pointer-events: none;
}

.masterpieceWrapper {
  grid-row-start: 2;
  position: relative;
  width: 500px;
  height: 500px;
  border: var(--border-solid);
  cursor: crosshair;
}

.masterpiece {
  touch-action: none;
  width: 500px;
  height: 500px;
  image-rendering: pixelated;
  position: absolute;
  top: 0;
  left: 0;
}

.hoverOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  height: 500px;
  pointer-events: none;
  image-rendering: pixelated;
}

.toolbar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;

  width: 80px;
  box-sizing: border-box;
  grid-column-start: 3;
  grid-row-start: 2;
}

.toolbarBelow {
  grid-column: span 2 / span 2;
  grid-column-start: 2;
  grid-row-start: 3;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.activeButton {
  cursor: var(--pointer);
  font-family: inherit;
  font-size: 14px;
  border-radius: 2px;
  padding: 4px;

  background: #ffecd3;
  background: linear-gradient(0deg, rgba(255, 236, 211, 1) 0%, rgba(255, 255, 255, 1) 100%);
  border: 1px solid #f88d02;
  filter: drop-shadow(0px 1px 1px #b2a390);
}
