body {
  padding: 2rem;
}

.d-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  margin-bottom: 3rem;

  h2 {
    display: block;
    margin-bottom: 0.5rem;
    width: 100%;
    font-size: 1rem;
  }
}

.btn-group {
  display: flex;

  .form-check {
    input {
      position: absolute;
      appearance: none;
      clip: rect(0, 0, 0, 0);
      width: 0;
      height: 0;
    }

    label {
      display: block;
      padding: 0.5rem 1rem;
      background-color: transparent;
      border: 2px solid black;
      cursor: pointer;

      &:hover {
        position: relative;
        z-index: 1;
        border-color: #888;
      }
    }

    &:first-of-type {
      label {
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
      }
    }

    &:last-of-type {
      label {
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
      }
    }

    ~ .form-check {
      label {
        margin-left: -2px;
      }
    }

    input:checked + label {
      background-color: black;
      color: white;
    }
  }
}

.v1 {
  .icon-container {
    width: 4rem;
  }

  .size-keeper {
    width: 2rem;
  }
}

.icon-container {
  padding: 1rem;
  width: 7rem;
  border: 1px solid #ddd;
  border-radius: 4px;

  h3 {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    text-align: center;
  }
}

.size-keeper {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 5rem;

  .resize {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.5rem;
    width: 2rem;
    min-width: 2rem;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    resize: horizontal;
    outline: 1px solid #ddd;
  }
}

.post-icon {
  container-name: post-icon;
  container-type: inline-size;
  width: 100%;
  height: 100%;

  > svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
  }
}

@container post-icon (max-width: 23.98px) {
  svg {
    --pis-16: block;
  }
}

@container post-icon (min-width: 24px) and (max-width: 31.98px) {
  svg {
    --pis-24: block;
  }
}

@container post-icon (min-width: 32px) and (max-width: 39.98px) {
  svg {
    --pis-32: block;
  }
}

@container post-icon (min-width: 40px) and (max-width: 47.98px) {
  svg {
    --pis-40: block;
  }
}

@container post-icon (min-width: 48px) and (max-width: 63.98px) {
  svg {
    --pis-48: block;
  }
}

@container post-icon (min-width: 64px) {
  svg {
    --pis-64: block;
  }
}
