@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:ital,opsz,wght@1,9..144,700;0,9..144,700&display=swap');

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

body {
    font-family: "DM Sans", sans-serif;
    background: #f2ede4;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
}

.wrap {
    width: 100%;
    max-width: 480px;
}

h1 {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: 3rem;
    color: #1e1810;
    margin-bottom: 0.2rem;
}

h1 i {
    font-style: italic;
    color: #c04822;
}

.sub {
    font-size: 13px;
    color: #a0917f;
    margin-bottom: 2rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
    background: #fbf8f3;
    border: 1px solid #ddd5cb;
    border-radius: 12px;
    padding: 0.6rem 0.6rem 0.6rem 1rem;
    margin-bottom: 1.5rem;
}

.input-row input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: #1e1810;
    outline: none;
}

.input-row input::placeholder {
    color: #c0b4a4;
    font-style: italic;
}

button.add {
    background: #c04b22;
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

button.add:hover {
    background: #a33a16;
}

button.add:active {
    transform: scale(0.93);
}

ul {
    list-style: none;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd5cb transparent;
}

ul::-webkit-scrollbar {
    width: 4px;
}

ul::-webkit-scrollbar-thumb {
    background: #ddd5cb;
    border-radius: 99px;
}

li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e2d9ce;
    animation: in 0.2s ease;
}

@keyframes in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.box {
    width: 20px;
    height: 20px;
    border: 1.5px solid #c0b4a4;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s, border-color 0.2s;
}

li.done .box {
    background: #4a6761;
    border-color: #4a6761;
}

li.done .box::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

span.text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
    color: #1e1810;
}

li.done span.text {
    color: #b0a494;
    text-decoration: line-through;
}

button.del {
    background: none;
    border: none;
    color: #c0b4a4;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    opacity: 0.65;
    transition: opacity 0.15s, color 0.15s;
}

li:hover button.del,
button.del:focus-visible {
    opacity: 1;
}

button.del:hover {
    color: #c04b22;
}

.empty {
    text-align: center;
    padding: 3rem 0;
    color: #c0b4a4;
    font-style: italic;
    display: none;
}

@media (max-width: 480px) {
    body {
        padding: 2.5rem 1rem;
    }
}
