body{
    margin:0;
    background:#f4f6f8;
    font-family:
        "Helvetica Neue",
        Arial,
        sans-serif;
}

.toolbar{
    position:sticky;
    top:0;
    z-index:100;
    background:white;
    padding:12px;
    margin:10px;
    border-radius:20px;
    box-shadow:
        0 4px 12px rgba(0,0,0,.08);
    display:flex;
    flex-direction:column;
    gap:12px;
}






.tool-row{
    display:flex;
    align-items:center;
    gap:10px;
}

.palette{
    display:flex;
    gap:10px;
    justify-content:center;
}

.color-btn{
    width:36px;
    height:36px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    box-shadow:
        0 2px 6px rgba(0,0,0,.15);
    transition:.15s;
}

.color-btn:active{
    transform:scale(.9);
}

#slider{
    flex:1;
    accent-color:#4f46e5;
}

#width-display{
    width:35px;
    text-align:center;
    font-weight:bold;
    color:#4f46e5;
}

#color-picker{
    width:42px;
    height:42px;
    border:none;
    border-radius:50%;
    overflow:hidden;
    background:none;
}

button{
    border:none;
    border-radius:12px;
    padding:10px 14px;
    font-weight:bold;
    cursor:pointer;
    transition:.15s;
}

#eraser-btn{
    background:#f3f4f6;
    color:#333;
}

#clear-btn{
    background:#ef4444;
    color:white;
}

button:active{
    transform:scale(.96);
}

#canvas{
    display:block;
    margin:10px auto;
    background:white;
    border-radius:20px;
    box-shadow:
        0 8px 20px rgba(0,0,0,.08);
    touch-action:none;
}