/* 今日のやること */

.tasks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px 16px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--soft);
}

.tasks__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.tasks__title {
  margin: 0;
  font-family: var(--title);
  font-weight: var(--title-w);
  font-size: 1.25rem;
  letter-spacing: .04em;
}

.tasks__prog {
  font-family: var(--title);
  font-weight: var(--title-w);
  font-size: 1.1875rem;
  color: var(--accent);
}

/* 進み具合のバー（やることの数だけ区切る） */
.tasks__pips {
  display: flex;
  gap: 6px;
}

.tasks__pip {
  flex: 1;
  height: 12px;
  border-radius: 8px;
  background: var(--line);
  box-shadow: inset 0 2px 2px rgba(74, 59, 69, .1);
}

.tasks__pip--on {
  background: var(--pink);
}

.tasks__pips--all .tasks__pip--on {
  background: var(--green);
}

.tasks__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* やること1つ */
.task {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task__check {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #F8E7EC;
  box-shadow: inset 0 3px 5px rgba(74, 59, 69, .16);
  cursor: pointer;

  & svg {
    opacity: 0;
  }

  &[aria-pressed="true"] {
    background: var(--green);
    box-shadow: 0 3px 0 rgba(74, 59, 69, .18);

    & svg {
      opacity: 1;
    }
  }
}

.task__text {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.task--done .task__text {
  color: var(--sub);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--pink);
}

.task__del {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--sub);
  cursor: pointer;
}

/* やることを足す */
.tasks__add {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tasks__input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;

  &::placeholder {
    color: var(--sub);
    font-weight: 500;
  }
}

.tasks__add-btn {
  flex: none;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(74, 59, 69, .22);
  cursor: pointer;
}

.tasks__note {
  margin: 0;
  font-size: .78125rem;
  line-height: 1.7;
  color: var(--sub);
}
