* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin-top: 150px;
    font-size: 1rem;
    background: #f8f5f0;
    font-family: "Yu Gothic", sans-serif;
}

/* コンテナ */
.conteiner {
    width: 700px;
    margin: 20px auto;
    padding: 20px 30px;
    background-color: #fffdf9;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* タイトル */
h1 {
    font-size: 30px;
    margin-bottom: 20px;
    padding: 10px;
    color: #8a6f5b;
}

/* 入力欄 */
#todo-input {
    width: 100%;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid #d7c7b8;
    border-radius: 10px;
    background: #fffef0;
    outline: none;
}

#todo-input:focus {
    border: 2px solid #927d69;
}

/* テキスト入力 */
input[type="text"] {
    width: 100%;
    background: #fffef0;
}

/* ===== チェックボックス ===== */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #93c05f;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    flex-shrink: 0;
}

input[type="checkbox"]:hover {
    border-color: #9bcf83;
}

input[type="checkbox"]:checked {
    background: #93c05f;
}

input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 追加ボタン */
button {
    padding: 1em 0;
    width: 20%;
    background-color: #b79d87;
    color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 7px;
    margin-bottom: 25px;
    box-shadow: 7px 5px 18px -13px #b8b8b8;
    cursor: pointer;
    transition: 0.2s;
}

#clear-btn {
    background-color: #d28e8e;
}

#clear-btn:hover {
    background-color: #ac7265;
}

button:hover {
    background-color: #9c826c;
}

/* リスト */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 2px dashed #dedede;
    cursor: pointer;
}

/* タスク名 */
.task-text {
    flex: 1;
    color: #5b4c42;
}

/* 完了したタスク */
.completed {
    text-decoration: line-through;
    color: #999;
}

/* 削除ボタン */
.delete-btn {
    width: auto;
    margin: 0;
    padding: 8px 15px;
    background-color: #d28e8e;
    color: white;
    border: none;
    border-radius: 8px;
    box-shadow: none;
}

.delete-btn:hover {
    background-color: #ac7265;
}

/* スマホ対応 */
@media (max-width: 768px) {

    .conteiner {
        width: 90%;
        padding: 20px;
    }

    button {
        width: 100px;
    }

    li {
        gap: 8px;
    }
}

#error-message {
    color: #c96b6b;
    font-size: 14px;
    margin-bottom: 10px;
    height: 18px;
}