*,
*::after,
*::before {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  font-family: sans-serif;
  font-size: 1em;
  line-height: 1.5;
}

body {
  align-items: center;
  display: flex;
  justify-content: center;
}

a,
button {
  transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[hidden] {
  display: none;
}

ul[class],
ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  padding: 0;
}

button,
input {
  background: transparent;
  border: none;
  font: inherit;
  line-height: 1;
  margin: 0;
  -webkit-appearance: none;
}

.grid {
  border: 6px solid #f7f7f7;
  border-radius: 4px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-auto-rows: 1fr;
  height: 90vh;
  width: 90vh;
}

.grid::before {
  content: '';
  width: 0;
  padding-bottom: 100%;
  grid-row: 1 / 1;
  grid-column: 1 / 1;
}

.grid > *:first-child {
  grid-row: 1 / 1;
  grid-column: 1 / 1;
}

.grid > * {
  align-items: center;
  background: #fff;
  display: flex;
  font-size: 4vh;
  font-weight: bold;
  justify-content: center;
  outline: 1px solid #ddd;
  overflow: hidden;
  transition: outline 0.4s;
}

.grid button {
  background-image: radial-gradient(#aaa 50%, transparent 50%);
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 0% 0%;
  transition: background-size 0.25s, color 0.2s,
    transform 0.3s cubic-bezier(1, -0.16, 0.06, 1.35);
  transform-origin: 50% 50%;
  height: 100%;
  width: 100%;
}

.grid button:hover,
.grid button:focus {
  background-color: #f7f7f7;
}

.grid .active {
  outline: 1px solid transparent;
  z-index: 2;
}

.grid .active button {
  background-size: 170% 170%;
  color: #fff;
  outline: #78bc3a;
  transform: scale(1.2) rotate(-2deg);
}

.color-picker-swatches {
  display: flex;
}

.color-picker-swatches button {
  height: 3rem;
  width: 3rem;
  border-radius: 4px;
  border: 4px solid transparent;
  margin: 0.1875rem;
  transform: scale(0.9);
}

.color-picker-swatches .active button {
  border-color: rgba(0,0,0,0.3);
  transform: scale(1);
}

button.button {
  background-color: #f0f0f0;
  padding: 0.75rem;
  width: auto;
}

button.button:hover {
  background-color: #aaa;
}
