.main {
  justify-content: normal;
}

.todo {
  min-width: 40%;
  user-select: none;

  @media (orientation: portrait) {
    min-width: 100%;
  }

  h2 {
    text-align: center;
  }

  ul {
    list-style-type: none;
    text-align: left;
    margin: 0;
    padding: 1em;
    border: 2px solid var(--box-border-color);
    background-color: var(--box-bg-color);
    border-radius: 15px;
    color: var(--box-color);
  }

  li {
    .delete-btn {
      color: gray;
      display: block;
      float: right;
      cursor: pointer;
    }
  }

  &:has(#todo-done-list:empty) #completed {
    display: none;
  }

  input[type="checkbox"] {
    vertical-align: middle;
    transform: scale(1.5);
    margin-right: 1em;
  }

  input[type="checkbox"]:checked + input[type="text"] {
    text-decoration: line-through;
    color: gray;
  }

  input[type="text"] {
    border: none;
    outline: none;
    color: var(--box-color);
    background-color: transparent;
    font-size: var(--content-font-size);
  }

  li:has(input[type="text"]:placeholder-shown) input[type="checkbox"] {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(1);
  }

  input[type="text"]::placeholdler {
    color: gray;
    cursor: text;
    user-select: none;
  }

  input[type="text"]:placeholder-shown + .delete-btn {
    display: none;
  }

  .btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 1em;
    max-width: 100%;
    padding: 1em 0;
  }

  button {
    background-color: var(--secondary-color);
    color: var(--header-color);
    font-size: var(--content-font-size);
    padding: 0.2em 0.5em;
    cursor: pointer;
    border-radius: 12px;
  }

  #how-this-works {
    @media (orientation: portrait) {
      max-width: 80%;
    }
  }

  #todo-done-list:empty {
    display: none;
  }

  #completed {
    font-size: var(--content-font-size);
    margin-top: 1em;
    padding-left: 0.5em;
  }
}
