:root,
body {
  height: 100%;
  margin: 0;
  background: #0b0b0b;
}
canvas {
  display: block;
}

/*preview*/
#preview-container {
  position: absolute;
  top: 25%;
  right: 20px;
  width: 15%;
  max-width: 180px;
  background: light-dark(white, black);
  border: 3px solid #fff;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  z-index: 2;
  & #preview-image {
    width: 100%;
    height: auto;
    display: block;
    -o-object-fit: cover;
       object-fit: cover;
    filter: url("#half-tone-filter");
    -webkit-filter: url("#half-tone-filter");
    transition: --halftone-intensity 0.5s ease-in-out;
    /* Set the initial intensity to 0 */
    --halftone-intensity: 1;
    --reveal: white;
    &:hover {
      transition: all 0.5s allow-discrete;
      --halftone-intensity: 0;
      --reveal: black;
    }
  }
}

/*swtich*/
input[type="checkbox"] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  visibility: hidden;
  position: absolute;
  left: -100vw;
}

.cheat_reveal {
  position: absolute;
  top: calc(5% + 1vw);
  right: 20px;
  color: white;
  cursor: pointer;
  width: 180px;
  max-width: 180px;
  height: 50px;
  background: grey;
  border-radius: 100px;
  display: flex;
  place-content: center;
  place-items: center;
  & .view-reference_txt {
    font: 12px/1.35 system-ui, -apple-system, sans-serif;
    position: absolute;
    top: -50%;
  }
}

label:after {
  content: "";
  position: absolute;
  inset-block: 0;
  margin-block: auto;
  left: 5px;
  width: 45px;
  height: 45px;
  background: #fff;
  border-radius: calc(1px / 0);
  transition: 0.3s;
}

input:checked + label {
  background: #bada55;
}

input:checked + label:after {
  left: calc(100% - 5px);
  transform: translateX(-100%);
}

label:active:after {
  width: 130px;
}

/*diclaimer*/
/* I tried handle variables via CSS but .. I ended via the SVG itself*/