.task-list li {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.task-list li span {
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-width: 0; /* Critical for flexbox text wrapping */
    padding-right: 10px;
    line-height: 1.4;
}

/* Ensure drag handle and buttons maintain size */
.task-list li .actions {
    flex-shrink: 0;
    display: flex;
    gap: 5px;
}

@media (max-width: 480px) {
    .task-list li {
        flex-direction: row; /* Keep row even on mobile? Or column? User asked to cut the word to next line */
        /* Row is standard for checkboxes and actions. The text just needs to wrap. */
    }
}
