#face-overlay {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
  left: 0vw;
  bottom: -42vh;
  transition:
    left,
    bottom 0.5s ease-in-out;
  background-image: url(../images/face-overlay.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;
}

#face-overlay > #bar {
  position: absolute;
  width: 90vw;
  bottom: 45vh;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: nowrap;
}

#face-overlay > #bar > img {
  position: relative;
  width: 20vw;
  height: auto;
}

#face-overlay > #bar > #face-overlay-flip {
  width: 15vw;
  transition: opacity 0.5s ease-in-out;
}

#face-overlay > #bar > #face-overlay-record {
  width: 23vw;
  transition: opacity 0.5s ease-in-out;
}

#face-overlay > #bar > #face-overlay-style {
  width: 17vw;
}

#face-overlay > #bar > #styles-drawer {
  position: absolute;
  bottom: -31vh;
  display: flex;
  flex-direction: column;
  gap: 2vh;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
}

#face-overlay > #bar > #styles-drawer > .h-row {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2vw;
}

#face-overlay > #bar > #styles-drawer > .h-row > img {
  width: 17vw;
  border: #f40009 solid 4px;
  border-radius: 50%;
  background-color: #f40009;
}

#face-overlay > #bar > #styles-drawer > .h-row > .selected {
  border: #090909 solid 4px;
}

/* 12-step hue wheel; outer rim top half=white, bottom half=black (see script below). */
#face-overlay > #bar > #styles-drawer > #color-container {
  height: 3vh;
  width: 100vw;
  height: 10vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3vw;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
}

#face-overlay > #bar > #styles-drawer > #color-container > .color-selector {
  position: relative;
  width: 12vh;
  height: 12vh;
  flex: 0 0 auto;
  touch-action: none;
  aspect-ratio: 1;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
}

#face-overlay
  > #bar
  > #styles-drawer
  > #color-container
  > .color-selector
  > img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
}

#face-overlay
  > #bar
  > #styles-drawer
  > #color-container
  > .color-selector
  > .color-selection {
  position: absolute;
  left: 50%;
  top: 50%;
  box-sizing: border-box;
  width: min(26px, 22%);
  height: min(26px, 22%);
  min-width: 5vh;
  min-height: 5vh;
  border: 3px solid #fff;
  border-radius: 50%;
  z-index: 1;
  --dx: 0px;
  --dy: 0px;
  transform: translate(
    calc(-50% + var(--dx, 0px)),
    calc(-50% + var(--dy, 0px))
  );
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  /* Hit-tests pass through to .color-selector so drags aren't stolen by a neighbor's thumb */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
}
